Selur's Little Message Board

Full Version: stab() with zero range
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would have thought that stab() with a range of zero would have a placebo effect, but on the test video I tried it appears to have a significant effect (i.e. 2-3% increase) on the resulting lossless encoded video size.   Not that I can see it visually, mind you.  Is this to be expected?

Ahhh, setting range=1 gives the same file size ... so maybe 0 is just treated as 1
Hmm,.. I wonder why.

With range=1 Hybrid uses:
Code:
clip = stabilize.Stab(clp=clip,mirror=0)
with range=0 Hybrid uses:
Code:
clip = stabilize.Stab(clp=clip,range=0,mirror=0)
This is correct, since the default for range is 1.
Code:
def Stab(clp, range=1, dxmax=4, dymax=4, mirror=0):
  if not isinstance(clp, vs.VideoNode):
    raise TypeError('Stab: This is not a clip')

  temp = AverageFrames(clp, weights=[1] * 15, scenechange=25 / 255)
  if hasattr(core,'zsmooth'):
    inter = core.std.Interleave([core.zsmooth.Repair(temp, AverageFrames(clp, weights=[1] * 3, scenechange=25 / 255), 1), clp])
  else:
    inter = core.std.Interleave([core.rgvs.Repair(temp, AverageFrames(clp, weights=[1] * 3, scenechange=25 / 255), 1), clp])
  mdata = core.depan.DePanEstimate(inter, range=range, trust=0, dxmax=dxmax, dymax=dymax)
  last = core.depan.DePan(inter, data=mdata, offset=-1, mirror=mirror)
  return last[::2]
Also, range is not changed and send to depan.DePanEstimate, which
Code:
depan.DePanEstimate(clip clip[, int range=0, float trust=4.0, int winx, int winy, int wleft=-1, int wtop=-1, int dxmax=winx/4, int dymax=winy/4, float zoommax=1.0, float stab=1.0, float pixaspect=1.0])
...
range: Number of previous (and also next) frames (fields) near requested frame to estimate motion.
see: https://github.com/Vapoursynth-Plugins-G...file#usage
should differ assuming the motion does change between the frames,...

Cu Selur