MVTools2/MSuper
From Avisynth wiki
Back to MVTools2 ←
Description
- Get source clip and prepare special "super" clip with multilevel (hierarchical scaled) frames data. The super clip is used by both MAnalyse and motion compensation (client) functions.
- For storing and transferring its parameters we use audio properties of super clip (specifically, num_audio_samples) as a trick. So, audio is killed in super clip.
- That is one of reasons why we additionally use a source clip with client functions. You may have a look at the super clip yourself (it has normal format).
Syntax and Parameters
- MSuper (clip, int "hpad", int "vpad", int "pel", int "levels", bool "chroma", int "sharp", int "rfilter", clip "pelclip", bool "isse", bool "planar")
- int hpad = 8
- Horizontal padding added to source frame (both left and right). Small padding is added for more correct motion estimation near frame borders.
- int hpad = 8
- int vpad = 8
- Vertical padding added to source frame (both top and bottom). Small padding is added for more correct motion estimation near frame borders.
- int vpad = 8
- int pel = 2
- It is the accuracy of the motion estimation. Value can only be 1, 2 or 4.
- int pel = 2
- 1 : means precision to the pixel.
- 2 : means precision to half a pixel.
- 4 : means precision to quarter of a pixel, produced by spatial interpolation (more accurate but slower and not always better due to big level scale step).
- int levels = 0
- It is the number of hierarchical levels in super clip frames. MAnalyse needs all levels, but for other client functions single finest level is enough (courser levels are not used).
- Default : 0 (auto, all possible levels are produced).
- int levels = 0
- bool chroma = true
- If set to true, it allows to prepare chroma planes too in superclip. (false - luma only).
- bool chroma = true
- int sharp = 2
- Subpixel interpolation method for pel=2,4.
- int sharp = 2
- 0 : use for soft interpolation (bilinear).
- 1 : bicubic interpolation (4 tap Catmull-Rom)
- 2 : 2 for sharper Wiener interpolation (6 tap, similar to Lanczos).
- int rfilter = 2
- Hierarchical levels smoothing and reducing (halving) filter.
- int rfilter = 2
- 0 : simple 4 pixels averaging like unfiltered SimpleResize (old method)
- 1 : triangle (shifted) filter like ReduceBy2 for more smoothing (decrease aliasing)
- 2 : triangle filter like BilinearResize for even more smoothing
- 3 : quadratic filter for even more smoothing
- 4 : cubic filter like BicubicResize(b=1,c=0) for even more smoothing
- You may also try to apply some external filter to superclip or its coarse bottom part (by appropriate crop and overlay).
- clip pelclip =
- Optional upsampled source clip for using instead of internal subpixel interpolation (for pel>1).
- Pixels at rows and colunms positions multiple to pel (0,2,4,... for pel=2) (without padding) must be original source pixels, other pixels must be interpolated.
- clip pelclip =
- Example for pel=2: LanczosResize(width*2,height*2,src_left=0.25, src_top=0.25).
- Recent note: it is true for luma, but is not exactly corresponded to chroma pixels positions of internal MVTools interpolation.
- Nevertheless vectors and motion compensation are quite similar for usual clips, same chroma would be with src_left=0.5 for YUY2 and additionally src_top=0.5 for YV12).
- Other useful example is eedi3 edge-directed resampler.
Examples
MSuper with default values.
AviSource("blah.avi")
Back to MVTools2 ←