MVTools

Abstract

authors: Manao, Fizick(Alexander Balakhnin), Tsp, TSchniede, SEt
version: 2
download: http://avisynth.org.ru/
category: Misc Plugins
requirements: YV12 or YUY2 Color format
license: GPL


Table of contents

I) About MVTools

MVTools plugin for AviSynth 2.5 is collection of functions for estimation and compensation of objects motion in video clips. Motion compensation may be used for strong temporal denoising, advanced framerate conversions, image restoration and other tasks.

The plugin contains the motion estimation server-function MAnalyse to find the motion vectors and several motion compensation client-functions (MCompensate, MMask and others) which use these vectors.

Plugin uses block-matching method of motion estimation (similar methods are used in MPEG2, MPEG4, etc). At analysis stage plugin divides frames by small blocks and try to find for every block in current frame the most similar (matching) block in second frame (previous or next). The relative shift of these blocks is motion vector. The main measure of block similarity is sum of absolute differences (SAD) of all pixels of these two blocks compared. SAD is a value which says how good the motion estimation was. The output of MAnalyse (server) is special clip with motion vector information in some format.

At compensation stage the plugin client functions read the motion vectors and use them to move blocks and form motion compensated frame (or realize some other full or partial motion compensation or interpolation function). Every object (block) in this (fully) compensated frame is placed in the same position as this object in current frame. So, we may (for example) use strong temporal denoising even for quite fast moving objects without producing annoying artefactes and ghosting (object's features and edges are coincide if compensation is perfect). Plugin can create compensated neighbor frames for every current frame, and denoise it by internal function. Alternatively, you can use compensated and original frames to create interleaved clip, denoise it by any external temporal filter, and select central cleaned original frames for output (see examples).

Of course, the motion estimation and compensation is not ideal and precise. In some complex cases (video with fading, ultra-fast motion, or periodic structures) the motion estimation may be completely wrong, and compensated frame will be blocky and (or) ugly. Severe difficulty is also due to objects mutual screening (occlusion) or reverse opening. Complex Avisynth scripts with many motion compensation functions may eat huge amount of memory and result in very slow processing. It is not simple but quite advanced plugin. Use it for appropriate cases only, and try tune its parameters. There are many discussions about motion compensation using at doom9 Avisynth forum. In particular see old MVTools thread, true motion thread, new MVTools thread and some other. Try read postings in addition to this documentation and ask for support there. If you really interested in motion estimation and compensation topics, you can easy find numerous scientific publications (use WWW search).

Notes: The plugin is still under development. Current version has some limitations. Only progressive YV12, YUY2 video is supported. Use color format conversion and try use (smart) bob-deinterlace for interlaced video (SeparateFields may works too with or without SelectEven/SelectOdd). Some complex scripts (MVBOB, MCBOB, TempGaussMC) use MVTools for motion compensated deinterlace.
Alternatively you can try to use Motion plugin by mg262.

Ia) About MVTools version 2

MVTools version 2 is a major internal and external upgrade. Main goals of MVTools v2.X branch are clarity and stability (in particular for multithreaded environment with multicore CPU) and of course performance and memory usage improving.

Main mean for goals achievement is removing MVTools internal buffer with mysterious (for many people) index (idx) and some other internal tricks (see thread MVTools without idx). To implement this without performance degradance we use normal effective Avisynth cache and introduce new mandatory preparation stage (before motion estimation by MAnalyse). At this stage a new function MSuper will get source clip and prepare special "super" clip with multilevel (hierarchical scaled) frames data (in previous MVTools versions 0.X-1.X these multilevel datas were prepared, saved and cached internally with idx as an index of pseudo-clip of these "superframes" ). The super clip is then used by both MAnalyse function and client motion compensation functions.

Related syntax change: some MAnalyse parameters (pel, sharp) are moved to MSuper function.

Other essential external change is replacing all named clips parameters by unnamed (mandatory, without double-quotes in description) for normal work of Avisynth implicit "last" clip.

Also faster planar processing for YUY2 is implemented in v2.0.

Since v2.2 MVTools.dll is renamed to MVTools2.dll, and since v2.3 all functions are renamed from MVxxx to Mxxx (e.g. from MVAnalyse to MAnalyse), so you can continue to use old MVTools 1.x with your old scripts, and you are able to use / make new scripts with MvTools 2.x without changing the load dll.

I also have an intention to remove (not implement) some obsolete functions like MVDenoise, MVFlowFps2 (please, vote).

Full list of changes see at Revisions section.

Generally, new MVTools 2.0 should provide similar results as v1.11.4. Algorithm improvements is planned in v2.1 and later.

Note: v2 currently has alpha (beta?) status (it should be rather stable for processing, but some syntax may be changed). Welcome for possible bug reports and suggestions (features requests).

Final note: MVTools v1.x branch is not developed and not supported anymore (by Fizick).

II) Function descriptions

Common parameters

Filters that use motion vectors have common parameters. Those are the scene-change detection thresholds, and the isse mmx flag. They also use one or several vectors stream, which are produced by MAnalyse.

thSCD1 (int): threshold which decides whether a block has changed between the previous frame and the current one. When a block has changed, it means that motion estimation for it isn't relevant. It occurs for example at scene changes. So it is one of the thresholds used to tweak the scene changes detection engine. Raising it will lower the number of blocks detected as changed. It may be useful for noisy or flickered video. The threshold is compared to the SAD (Sum of Absolute Differences, a value which says how bad the motion estimation was ) value. For exactly identical blocks we have SAD=0. But real blocks are always different because of objects complex movement (zoom, rotation, deformation), discrete pixels sampling, and noise. Suppose we have two compared 8x8 blocks with every pixel different by 5. It this case SAD will be 8x8x5 = 320 (block will not detected as changed for thSCD1=400). If you use 4x4 blocks, SAD will be 320/4. If you use 16x16 blocks, SAD will be 320*4. Really this parameter is scaled internally in MVTools, and you must always use reduced to block size 8x8 value. Default is 400 (since v.1.4.1).

thSCD2 (int): threshold which sets how many blocks have to change for the frame to be considered as a scene change. It is ranged from 0 to 255, 0 meaning 0 %, 255 meaning 100 %. Default is 130 ( which means 51 % ).

isse (int): flag which allows to enable (if set to True) or disable (if set to False) ISSE, MMX and other CPU optimizations (for debugging). Default is True. If your processor doesn't support CPU optimizations, it will be disabled anyway ( and you won't be able to activate them ).

planar (bool): flag to use special planar color format for YUY2 clips both for input and output of function. It uses special trick for storing of frames with planar color data organisation (separate Y, U, V planes in memory) in normal interleaved YUY2 frames format as a container. This way we can avoid numerous internal interleaved to planar conversions and increase speed. You can convert normal interleaved YUY2 source clip to planar format with Interleaved2planar function from RemoveGrain plugin by kassandro, and convert final result by Planar2interleaved function. This special planar YUY2 format is also supported by Removegrain plugin by Kassandro, MaskTools2 plugin by Manao and some others. This trick will not be needed in Avisynth v2.6 with native support of planar YV16 format. This paramenter is ignored for YV12 clips. Note: super clip is always planar. Default is planar=false.

MSuper

MSuper (clip, int "hpad", int "vpad", int "pel", int "levels", bool "chroma", int "sharp", int "rfilter", clip "pelclip", bool "isse", bool "planar")

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 source clip with client functions. You may have a look to super clip yourself (it has normal format).

hpad : it is horizontal padding added to source frame (both left and right). Small padding is added for more correct motion estimation near frame borders. (In MVTools before v2.0 the value of padding = block size was always used internally. Now it is not strict but recommended value.) Default=8.

vpad : it is vertical padding added to source frame (both top and bottom). Default=8.

pel : it is the accuracy of the motion estimation. Value can only be 1, 2 or 4. 1 means a precision to the pixel. 2 means a precision to half a pixel, 4 means a precision to quarter a pixel, produced by spatial interpolation (more accurate but slower and not always better due to big level scale step). Default is 2 since v1.4.10.

levels : it is the number of hierarchical levels in super clip frames. MAnalyse is need in 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).

chroma : if set to true, it allows to prepare chroma planes too in superclip. (false - luma only). Default is true.

sharp: subpixel interpolation method for pel=2,4.
Use 0 for soft interpolation (bilinear), 1 for bicubic interpolation (4 tap Catmull-Rom), 2 for sharper Wiener interpolation (6 tap, similar to Lanczos).
Default is 2.

rfilter: hierarchical levels smoothing and reducing (halving) filter.
0 is simple 4 pixels averaging like unfiltered SimpleResize (old method);
1 is triangle (shifted) filter like ReduceBy2 for more smoothing (decrease aliasing);
2 is triangle filter like BilinearResize for even more smoothing;
3 is quadratic filter for even more smoothing;
4 is cubic filter like BicubicResize(b=1,c=0) for even more smoothing.
Default is 2 (since v2.3.1). You may also try to apply some external filter to superclip or its coarse bottom part (by appropriate crop and overlay).

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.
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 EEDI2 edge-directed resampler.
Default is not defined.

MAnalyse

MAnalyse (clip super, int "blksize", int "blksizeV", int "levels", int "search", int "searchparam", int "pelsearch", bool "isb", int "lambda", bool "chroma", int "delta", bool "truemotion", int "lsad", int "plevel", bool "global", int "pnew", int "pzero", int "pglobal", int "overlap", int "overlapV", string "outfile", int "dct", int "divide", int "sadx264", int "badSAD", int "badrange", bool "isse", bool "meander", bool "temporal", bool "trymany")

Get prepared multilevel super clip, estimate motion by block-matching method and produce special output clip with motion vectors data (used by other functions).
Some hierarchical multi-level search methods are implemented (from coarse image scale to finest). Function uses zero vector and neighbors blocks vectors as a predictors for current block. Firstly difference (SAD) are estimated for predictors, then candidate vector changed by some values to some direction, SAD is estimated, and so on. The accepted new vector is the vector with minimal SAD value (with some penalty for motion coherence).

super (unnamed) is multilevel super clip prepared by MSuper function.

blksize : Size of a block (horizontal). It's either 4, 8, 16 or 32 ( default is 8 ). Larger blocks are less sensitive to noise, are faster, but also less accurate.

blksizeV : vertical size of a block. Default is equal to horizontal size. Additional options are: 4 for blksize=8, 8 or 2 for blksize=16, 16 for blksize=32.

levels : positive value is the number of levels used in the hierarchical analysis made while searching for motion vectors.
Negative or zero value is the number of coarse levels NOT used in the hierarchical analysis made while searching for motion vectors.The lower the usually better (vectors with any length can be found). It is kept variable for study's purposes mostly. Sometimes levels is useful to prevent large (false) vectors (computer graphics, etc). Default = 0 since v.2.5 (all levels are used).

search, searchparam, pelsearch : search decides the type of search at every level, and searchparam is an additional parameter (step, radius) for this search, and pelsearch is the radius parameter at finest (pel) level:

Defaults are: search=4, searchparam=2, pelsearch=pel.

isb : allows to choose between a forward search (motion from the previous frame to current one) for isb=false and a backward search (motion from following frame to the current one) for isb=true (isb stands for "IS Backward", it is implemented and named exactly as written here, do not ask :-). Default isb=false.

chroma : set to true, it allows to take chroma into account when doing the motion estimation (false - luma only). Default is true.

delta : set the frame interval between the reference frame and the current frame. By default, it's 1, which means that the motion vectors are searched between the current frame and the previous ( or next ) frame. Setting it to 2 will allow you to search mvs between the frame n and n-2 or n+2 ( depending on the isb setting ). If delta is negative or null, -delta is the absolute index of a fixed reference frame. In this case, the isb value is ignored. Only a few functions are compatible with fixed reference frame (MCompensate, MFlow, MMask, MShow).

There are few advanced parameters which set coherence of motion vectors for so called true motion estimation. Some matched blocks from other frame may be most similar to sample blocks of current frame by intensity criterion (SAD), but not correspond to true object motion. For example, they may belong to other similar object in different corner of the frame or belong to some periodic structure. "True motion" parameters try maintain the motion field more coherent, instead of some random vectors distribution. It is especially important for partial motion compensation and interpolation. Some parameters are experimental and may be removed (replaced) in next versions after testing. Please report your conclusions.

truemotion is a preset of these parameters values. It allows easy to switch default values of all "true motion" parameters at once. Set it true for true motion search (high vector coherence), set it false to search motion vectors with best SAD. Default is true since v1.4.10. In any case you can tune each parameter individually.

lambda : set the coherence of the field of vectors. The higher, the more coherent. However, if set too high, some best motion vectors can be missed. Values around 400 - 2000 (for block size 8) are strongly recommended. Internally it is coefficient for SAD penalty of vector squared difference from predictor (neighbors), scaled by 256.
Default is 0 for truemotion=false and 1000*blksize*blksizeV/64 for truemotion=true.

lsad: SAD limit for lambda using. Local lambda is decreased (smoothly since v1.10.2) if SAD value of vector predictor (formed from neighbor blocks) is greater than the limit. It prevents bad predictors using but decreases the motion coherence. Values above 1000 are recommended for true motion. Scaled to blocksize=8 internally (since v2.0.11).
Default is 400 for truemotion=false and 1200 for truemotion=true.

pnew: relative penalty (scaled to 256) to SAD cost for new candidate vector. New candidate vector must be better will be accepted as new vector only if its SAD with penalty (SAD + SAD*pnew/256) is lower then predictor cost (old SAD). It prevent replacing of quite good predictors by new vector with a little better SAD but different length and direction.
Default is 0 for truemotion=false and 50 for truemotion=true.

plevel: penalty factor lambda level scaling mode. Value=0 - no scaling, 1 - linear, 2 - quadratic dependence from hierarchical level size. Note, that vector length is smaller at lower level.
Default is 0 for truemotion=false and 1 for truemotion=true

global: estimate global motion (at every level) and use it as an additional predictor. Only pan shift is estimated (no zoom and rotation). Use false to disable, use true to enable. Default is false for truemotion=false and true for truemotion=true.

pzero: relative penalty (scaled to 256) to SAD cost for zero vector. It prevent replacing of quite good predictor by zero vector with a little better SAD (lambda is not used for zero vector). Default is equal to pnew since v1.11.

pglobal: relative penalty (scaled to 256) to SAD cost for global predictor vector. (lambda is not used for global vector). Default is 0.

overlap: block overlap value (horizontal). Must be even and less than block size (up to blksize/2 for MCompensate). The step between blocks for motion estimation is equal to (blksize-overlap). N blocks cover the size ((blksize-overlap)*N + overlap) on frame. Try use overlap value from blksize/4 to blksize/2. The greater overlap, the more blocks number, and the lesser the processing speed. Default value is 0.
Functions with overlap support are: MFlow, MFlowInter, MFlowFps, MShow, MMask, MCompensate, MDeGrain1, MDeGrain2, MDeGrain3.

overlapv: vertical block overlap value. Default is equal to horizontal. Must be even for YV12 and less than block size.

outfile: name of file to write motion vectors data. This data may be used by some external program or may be by next MVTools versions for second pass coding, etc.
Produced binary file has a header (MVAnalysisData structure, see MVInterface.h source code), and the data sequence:
frame number, vector data (Vx, Vy, SAD) of every block, next valid frame number, this frame vector data, and so on.
Default - empty string, do not write.

dct: using of block DCT (frequency spectrum) for blocks difference (SAD) calculation. In particular it can improve motion vector estimation at luma flicker and fades.
0 - usual spatial blocks, do not use DCT;
1 - use block DCT instead of spatial data (slow for block size 8x8 and very slow for other sizes);
2 - mixed spatial and DCT data; weight is dependent on mean frame luma difference;
3 - adaptive per-block switching from spatial to equal-weighted mixed mode (experimental, a little faster).
4 - adaptive per-block switching from spatial to mixed mode with more weight of DCT (experimental, a little faster).
added in v1.9.5.3 modes: (require sadx264 0-7, uses fastest SATD function, luma only!)
5 - SATD instead of SAD for luma
6 - same as 2 only use SATD
7 - same as 3 only use SATD
8 - same as 4 only use SATD
9 - similar to 2, use SATD and weight ranges from SAD only to equal SAD & SATD
10 - similar to 3/4,use SATD weight is on SAD, only on strong luma changes
Default = 0.

divide: post-processing motion vectors by dividing every block into 4 subblocks.
0 - do not divide;
1 - divide blocks and assign the original vector to all 4 subblocks;
2 - divide blocks and assign median (with 2 neighbors) vectors to subblocks;
Default = 0. Block size and overlap values must be selected to be acceptable after internal dividing.

sadx264: use SAD functions from x264 codec if available for the blocksize
0 - Autodetect CPU and select best function
1 - use MMX 16x16, 16x8, 8x8, 8x4, 4x4 (8x16, 4x8 used on chroma only)
2 - use MMX 16x16, 16x8, 8x8, 8x4 (8x16, used on chroma only) aligned to 32 Byte blocks
3 - use MMX 16x16, 16x8, 8x8, 8x4 (8x16, used on chroma only) aligned to 64 Byte blocks, best for Pentium M
4 - use SSE2 16x16, 16x8 (no special alignment)
5 - use SSE2 16x16, 16x8, aligned to 64 Byte blocks (good option on Core)
6 - use SSE3 16x16, 16x8 (seems only to work faster on Pentium 4E & Core1)
7 - use SSSES3 16x16, 16x8, aligned to 64 Byte blocks (good option on Core2)
Modes 8-12 are meant for debug testing only - use dct >4 instead.
Using sadx264 > 7 means: use selected instead of SAD for any luma/chroma SAD where possible!
for SAD / SATD mix and luma only use dct
8 - use SSD mmx, works on any mode as 1
9 - use SATD mmx, works on any mode as 1
10 - use SATD SSE2, works ony any mode like 2
11 - use SATD SSSE3, works ony any mode like 2
12 - use SATD SSSE3 with PHADD on 8xY, works ony any mode like 2
Default is 0, use -1 or >=13 to use old v1.9.4 SAD algo and completely deactivate x264 SAD functions

badSAD: SAD threshold to make more wide second search for bad vectors. Value is scaled to block size 8x8. Default is 10000 (disabling value), recommended is about 1000-2000.

badrange: the range (radius) of wide search for bad blocks. Default is 24 (image pixel units). Use positive value for UMH search and negative for Exhaustive search.

meander: Alternate blocks scan in rows from left to right and from right to left. Default is True (since v2.5.1).

temporal: use temporal predictors from previous frame motion vectors. Default is False. (not compatible with SetMTMode).

trymany: try to start searches around many predictors (besides finest level). Default is false.

Try use MShow function to check estimated motion field and tune parameters.

Note: MAnalyse (if Pel=2) detects fieldbased video flag (after SeparateFields) and automatically makes correction of motion vectors according to verticlal shift of fields with different parity. Try use AssumeFrameBased if you do not need in it.

MCompensate

MCompensate (clip source, clip super, clip vectors, bool "scbehavior", float "recursion", int "thSAD", bool "fields", float "time", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Do a full motion compensation of the frame. It means that the blocks pointed by the mvs in the reference frame will be moved along the vectors to reach their places in the current frame.

super (unnamed) is multilevel super clip prepared by MSuper function.

vectors (unnamed) is clip with motion vectors data produced by MAnalyse function.

scbehavior ( by default true ), decide which frame will be kept on a scene change. If true, the frame is left unchanged. Else, the reference frame is copied into the current one. Same for right and bottom padded area.

recursion is percent weight of previously compensated frames used for new compensation in special recursive mode. Rest weight is taken (uniformly) from given reference frame (used in ordinary mode). Recursion=100 is full recursion similar to in-loop mode=2 of old MVTools v0.9.x. Do not use recursive mode unless you know what do you do. Default recursion=0.

thSAD is SAD threshold for safe (dummy) compensation. If block SAD is above the thSAD, the block is bad, and we use source block instead of the compensated block. Default is 10000 (practically disabled).

fields: if set to true and pel=2 or 4, then we add appropriate vertical shift (by halfpixel) of fields for fieldbased video. Try use it for deinterlacing (not for denoising).
Default is false.

time: percent of motion compensation (default=100.0, full compensation), define time moment between reference and current frame.

Overlapped blocks processing is implemented as window block summation (like FFT3DFilter, overlap value up to blksize/2) for blocking artefactes decreasing.

MMask

MMask (clip source, clip vectors, float "ml", float "gamma", int "kind", int "Ysc", float "time", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Creates mask clip from source clip with motion vectors data. Mask is defined by blocks data, but is interpolated to fit full frame size. The mask is created both on the luma and on chroma planes. Mask values may be from 0 (min) to 255 (max).

kind parameter defines kind of mask.

Mode kind=0 creates motion mask from the motion vectors length. It builds a better mask than MotionMask function of MaskTools plugin because motion vectors are a lot more reliable than the algorithm of MotionMask. Mask value 0 means no motion at all ( the length of the motion vector is null ). The longer vector length, the larger mask value (saturated to 255), the scale is defined by ml.

kind=1 allows to build a mask of the SAD (sum of absolute differences) values instead of the vectors' length. It can be useful to find problem areas with bad motion estimation. (Internal factor blocksize*blocksize/4 is used for normalization of scale ml.)

kind=2 allows to build a occlusion mask (bad blocks due to rupture, tensile). Currently, some normalized sum of positive blocks motion differences is used. It can be scaled with ml.

kind=3 allows to build a mask of horizontal component of motion vector in pel units plus 128. It can be scaled with ml.

kind=4 allows to build a mask of vertical component of motion vector in pel units plus 128. It can be scaled with ml.

kind=5 - motion colormap as x,y components of motion vector shown in U, V color planes (in pel units plus 128, It can be scaled with ml).

ml parameter defines the scale of motion mask. When the vector's length (or other kind value) is superior or equal to ml, the output value is saturated to 255. The lesser value results to lesser output.

gamma is used to defined the exponent of relation output to input. gamma = 1.0 implies a linear relation, whereas gamma = 2.0 gives a quadratic relation.

time: percent of motion compensation (default=100.0, full compensation), define time moment between reference and current frame.

And finally, Ysc is the value taken by the mask on scene change

Defaults are : kind = 0, ml = 100, gamma = 1.0, and Ysc = 0.

MSCDetection

MSCDetection (clip source, clip vectors, int "Ysc", int "thSCD1", int "thSCD2", bool "isse")

Creates scene detection mask clip from motion vectors data. The mask is created both on the luma and on chroma planes. Output without scene change is 0.

Ysc is the value taken by the mask on scene change, default is 255.

MShow

MShow (clip super, clip vectors, int "scale", int "sil", int "tol", bool "showsad", int "number", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Shows the motion vectors on padded source by super clip opening (since v2.0.11).

scale allows to enlarge the motion vectors, in order for example to gain in accuracy ( when pel > 1 and scale = 1, you can't see a variation of less than one pixel ).

sil allows to see a different level of analysis ( when searching for motion vectors, a hierarchical analysis is done, and it may be interesting to see what happens at higher levels ).

tol is a tolerance threshold. If the distortion induced by the motion vector is over tol the vector isn't shown.

showsad allows to show the mean (scaled to block 8x8) SAD after compensating the picture and quantity (ThSCD1) of bad (ThSCD1) blocks.

number allows to mark given block (with this number) as white. Default=-1.

Defaults are : scale = 1, sil = 0, tol = 20000 and showsad = false ( which shows all vectors ).

MDepan

MDepan (clip, clip vectors, clip "mask", bool "zoom", bool "rot", float "pixaspect", float "error", bool "info", string "log", float "wrong", float "zerow", int "range", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Get the motion vectors, estimate global motion and put data to output frame in special format for DePan plugin (by Fizick).

Inter-frame global motion (pan, zoom, rotation) is estimated by iterative procedure, with good blocks only.

Rejected blocks: 1) near frame borders or by mask; 2) with big SAD (by thSCD1 parameter); 3) with motion different from neighbors or global.

mask clip (if defined) is used to set weight of blocks vectors equal to correspondent mask frame pixels values (use deep black to reject block). If the mask clip is not defined, then 4 blocks at every border are rejected (old pre v2.4.3 algorithm.)

zoom and rot parameters switch zoom and rotation estimation, pixaspect is pixel aspect (1.094 for standard PAL, 0.911 for standard NTSC), error is maximum mean motion difference.

The frame estimated global motion is switched to null for big motion error or at scene change (by thSCD1, thSCD2 parameters).

info parameter allows to type global motion info for debug.

log parameter allows to set log file name in DeShaker, Depan format.

wrong parameter defines limit to disable blocks very different from neighbors.

zerow parameter defines weight of zero motion vectors (to decrease its influence).

range - number of previous (and also next) frames (fields) near requested frame to estimate their motion.

Defaults are : zoom = true, rot = true, pixaspect = 1.0, error = 15.0, info = false, wrong=10, zerow=0.05, range=0.

For global motion estimation of interlaced source, you must separate fields (for both MAnalyse and MDepan).

MFlow

MFlow (clip source, clip super, clip vectors, float "time", int "mode", bool "fields", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Do a motion compensation of the frame not by blocks (like MCompensate), but by pixels. Motion vector for every pixel is calculated by bilinear interpolation of motion vectors of current and neighbor blocks (according to pixel position). It means that the pixels pointed by the vector in the reference frame will be moved (flow) along the vectors to reach their places in the current frame. This flow motion compensation method does not produce any blocking artefactes, and is good for denoising, but sometimes can create very strange deformed pictures :). True motion estimation is strongly recommended for this function. Motion compensation may be full or partial (at intermediate time).

super (unnamed) is multilevel super clip prepared by MSuper function.

vectors (unnamed) is clip with motion vectors data produced by MAnalyse function.

time: percent of motion compensation (default=100.0, full compensation), define time moment between reference and current frame.

mode can be either 0 ( default ), or 1.
mode=0 - fetch pixels to every place of destination. It is main producing mode.
mode=1 - shift pixels from every place of source (reference). It is debug (learning) mode with some empty spaces (with null intensity). It can be used for occlusion mask creation.

fields: if set to true and pel =2 or 4, then we add appropriate vertical shifts (by halfpixel) of fields for fieldbased video. Try use it for deinterlacing (not for denoising).
Default is false.

MFlowInter

MFlowInter (clip source, clip super, clip mvbw, clip mvfw, float "time", float "mL", bool "blend", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Motion interpolation function. It is not the same (but similar) as MVInterpolate function of older MVTools version. It uses backward "mvbw" and forward "mvfw" motion vectors to create picture at some intermediate time moment between current and next (by delta) frame. It uses pixel-based (by MFlow method) motion compensation from both frames. Internal forward and backward occlusion masks (MMask kind=2 method) and time weighted factors are used to produce the output image with minimal artefactes. True motion estimation is strongly recommended for this function.

super (unnamed) is multilevel super clip prepared by MSuper function.

mvbw, mvfw (unnamed) is clips with backward and forward motion vectors data produced by MAnalyse function.

time: interpolation time position between frames (in percent, default=50.0, half-way)

mL: mask scale parameter. Lower values are corresponded to more strong occlusion mask (as in MMask function, use it to tune and debug). Default=100.

blend: blend frames at scane change like ConvertFps if true, or repeat last frame like ChangeFps if false. Default is true.

MFlowFps

MFlowFps (clip source, clip super, clip mvbw, clip mvfw, int "num", int "den", int "mask", float "ml", bool "blend", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Will change the framerate (fps) of the clip (and number of frames). The function can be use for framerate conversion, slow-motion effect, etc. It uses backward "mvbw" and forward "mvfw" motion vectors to create interpolated pictures at some intermediate time moments between frames. The function uses pixel-based motion compensation (as MFlow, MFlowInter). Internal forward and backward occlusion masks (MMask kind=2 method) and time weighted factors are used to produce the output image with minimal artefactes. True motion estimation is strongly recommended for this function.

super (unnamed) is multilevel super clip prepared by MSuper function.

mvbw, mvfw (unnamed) is clips with backward and forward motion vectors data produced by MAnalyse function.

num: output clip fps numerator. Default=25.

den: fps denominator (default=1). Resultant fps = num/den. In particular for doubled NTSC fps=2*29.97 use num=60000 and den=1001, and for doubled NTSC FILM fps=2*23.976 use num=48000 and den=1001. When num or den is equal to 0, then doubled fps of input clip is assumed for output (since v1.8.1).

mask: processing mask mode:
mask=0 is simple backward and forward occlusion masks (used in versions up to 1.4.x, fastest);
mask=1 is similar masks with additional switching to static zero vectors at occlusion areas (similar to v1.5.x);
mask=2 is for using extra vectors from adjacent frames for decreasing objects halo at occlusion areas (v1.8, slowest). Default=2.

ml: mask scale parameter. The greater values are corresponded to more weak occlusion mask (as in MMask function, use it to tune and debug). Default=100.

blend: blend frames at scane change like ConvertFps if true, or repeat last frame like ChangeFps if false. Default is true.

MBlockFps

MBlockFps (clip, clip super, clip mvbw, clip mvfw, int "num", int "den", int "mode", float "ml", bool "blend", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

The function uses block-based partial motion compensation to change the framerate (fps) of the clip (and number of frames). It uses backward "mvbw" and forward "mvfw" motion vectors to create interpolated pictures at some intermediate time moments between frames. Some internal forward and backward masks and time weighted factors are used to produce the output image. (Algorithm is based on MVInter function of old MVTools v1.9.12.) It is usually faster than MFlowFps but may produce blocking and other artefactes if overlap is not set. True motion estimation is strongly recommended for this function. Some pixels at right and bottom which are not entirely covered by blocks will be produced by frames blend.

super (unnamed) is multilevel super clip prepared by MSuper function.

mvbw, mvfw (unnamed) is clips with backward and forward motion vectors data produced by MAnalyse function.

num: output clip fps numerator. Default=25.

den: fps denominator (default=1). Resultant fps = num/den. In particular for doubled NTSC fps=2*29.97 use num=60000 and den=1001, and for doubled NTSC FILM fps=2*23.976 use num=48000 and den=1001. When num or den is equal to 0, then doubled fps of input clip is assumed for output.

mode: processing mode:
0 - average of fetched forward and backward partial motion compensation (fastest).
1 - static median.
2 - dynamic median.
3 - time weigthed combination of fetched forward blocks masked by shifted backward and fetched backward masked by shifted forward (now default mode);
4 - mode 3 mixed with simple static time average by occlusion mask of shifted blocks.
5 - occlusion mask (for debug).
6 to 8 - modes like 3 to 5 but SAD mask is used as occlusion mask.

ml: mask scale factor. Default=100.

blend: blend frames at scane change like ConvertFps if True, or repeat last frame like ChangeFps if False. Default is True.

MFlowBlur

MFlowBlur (clip, clip super, clip mvbw, clip mvfw, float "blur", int "prec", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Experimental simple motion blur function. It may be used for FILM-effect (to simulate finite shutter time). It uses backward "mvbw" and forward "mvfw" motion vectors to create and overlay many copies of partially compensated pixels at intermediate time moments in some blurring interval around current frame. It uses pixel-based motion compensation (as MFlow). True motion estimation is strongly recommended for this function.

super (unnamed) is multilevel super clip prepared by MSuper function.

mvbw, mvfw (unnamed) is clips with backward and forward motion vectors data produced by MAnalyse function.

blur: blur time interval between frames, open shutter time (in percent, default=50.0)

prec: blur precision in pixel units. Maximal step between compensated blurred pixels. Default =1 (most precise).

MDeGrain1, MDeGrain2 and MDegrain3

MDeGrain1 (clip, clip super, clip mvbw, clip mvfw, int "thSAD", int "thSADC", int "plane", int "limit", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

MDeGrain2 (clip, clip super, clip mvbw, clip mvfw, clip mvbw2, clip mvfw2, int "thSAD", int "thSADC", int "plane", int "limit", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

MDeGrain3 (clip, clip super, clip mvbw, clip mvfw, clip mvbw2, clip mvfw2, clip mvbw3, clip mvfw3,int "thSAD", int "thSADC", int "plane", int "limit", int "limitC", int "thSCD1", int "thSCD2", bool "isse", bool "planar")

Makes a temporal denoising with motion compensation. Blocks of previous and next frames are motion compensated and then averaged with current frame with weigthing factors depended on block differences from current (SAD). Functions support overlapped blocks mode. Overlaped blocks processing is implemented as window block summation (like FFT3DFilter, overlap value up to blksize/2) for blocking artefactes decreasing.

MDeGrain1 has temporal radius 1 (uses vectors of previous mvfw and next mvbw frames). MDeGrain2 has temporal radius 2 (uses vectors of two previous mvfw2, mvfw and two next mvbw,mvbw2 frames). MDeGrain3 has temporal radius 3 (uses vectors of three previous mvfw3, mvfw2, mvfw and three next mvbw, mvbw2, mvbw3 frames). It is slower, but produces a little better results (more strong denoising).

super (unnamed) is multilevel super clip prepared by MSuper function.

mvbw, mvfw (unnamed) is clips with backward and forward motion vectors data produced by MAnalyse function.

"thSAD" parameter defines soft threshold of block sum absolute differences. Block with SAD above threshold thSAD have a zero weight for averaging (denoising). Block with low SAD has highest weight. Rest of weight is taken from pixels of source clip. You must enter thSAD value reduced to block size 8x8. Low values can result in staggered denoising, large values can rezult in ghosting and artefactes.
Default thSAD=400.

"thSADC" is the threshold for chroma planes.
Default (if not defined) : thSADC=thSAD. If defined then thSADCis used for chroma and thSAD is used for luma.

plane parameter set procesed color plane:
0 - luma, 1 - chroma U, 2 - chroma V, 3 - both chromas, 4 - all. Default is 4.

limit: maximal change of pixel luma (post-process like DeGrainMedian plugin and LimitChange function of SSETools plugin, to prevent some artefactes). Default is 255 (no limit).

limitC: maximal change of pixel chroma. Default value = limit.

MRecalculate

MRecalculate (clip super, clip vectors, int "thSAD", int "smooth", int "blksize", int "blksizeV", int "search", int "searchparam", int "lambda", bool "chroma", bool "truemotion", int "pnew", int "overlap", int "overlapV", string "outfile", int "dct", int "divide", int "sadx264", bool "isse")

Refines and recalculates motion data of previously estimated (by MAnalyse) motion vectors with different super clip or new parameters set (e.g. lesser block size), after divide, etc. The two-stage method may be also useful for more stable (robust) motion estimation. The refining is at finest hierarchical level only. Interpolated vectors of old blocks are used as predictors for new vectors, with recalculation of SAD. Only bad quality new vectors with SAD above threshold thSAD will be re-estimated by search. Enter thSAD value reduced (scaled) to block size 8x8. Default thSAD=200. Good vectors are not changed, but its SAD will be updated (re-calculated).

smooth is method how to divide coarse blocks to smaller. 0 - use motion of nearest block, 1 - bilinear interpolation of 4 neighbors. Default 1.

Other parameters have the same meaning as MAnalyse (but you can use other values). Default settings are same as defaults of MAnalyse.

III) Examples

To show the motion vectors ( forward ) :

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
vectors = MSuper().MAnalyse(isb = false)
MShow(vectors) # implicit last works properly

To show the backward one :

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
vectors = MSuper().MAnalyse(isb = true)
MShow(vectors)

To use MMask :

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
vectors = MSuper().MAnalyse(isb = false)
MMask(vectors)

To use MDepan with Depan plugin for interlaced source (DepanStabilize function example):

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
AssumeTFF().SeparateFields() # set correct fields order
vectors = MSuper().MAnalyse(isb = false)
globalmotion = MDepan(vectors, pixaspect=1.094, thSCD1=400)
DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094)
Weave()

To blur problem (blocky) areas of compensated frame with occlusion mask:

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
super = MSuper()
vectors = MAnalyse(super, isb = false)
compensation = MCompensate(super,vectors) # or use MFlow function here
# prepare blurred frame with some strong blur or deblock function:
blurred = compensation.DeBlock(quant=51) # Use DeBlock function here
badmask = MMask(vectors, kind = 2, ml=50)
overlay(compensation,blurred,mask=badmask) # or use faster MaskedMerge function of MaskTools

To recreate bad frames by interpolation with MFlowInter:

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
super = MSuper()
backward_vectors = MAnalyse(super, isb = true, delta=2)
forward_vectors = MAnalyse(super, isb = false, delta=2)
inter = MFlowInter(super, backward_vectors, forward_vectors, time=50, ml=70)
# Assume bad frames are 50 and 60
trim(0,49) ++ inter.trim(49,-1) \
 ++ trim(51,59) ++ inter.trim(59,-1) ++ trim(61,0)

To change fps with MFlowFps:

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
# assume progressive PAL 25 fps source
super = MSuper(pel=2)
backward_vec = MAnalyse(super, isb = true)
forward_vec = MAnalyse(super, isb = false)
MFlowFps(super, backward_vec, forward_vec, num=50, den=1, ml=100) # get 50 fps

To double fps with MFlowFps for fastest (almost) real-time playing:

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
# assume progressive PAL 25 fps or NTSC Film 23.976 source
super = MSuper(pel=1,hpad=0,vpad=0,chroma=false)
backward_vec = MAnalyse(super, blksize=32, isb = true, chroma=false, searchparam=1,search=0)
forward_vec = MAnalyse(super, blksize=32, isb = false, chroma=false, searchparam=1,search=0)
MFlowFps(super, backward_vec, forward_vec, num=2*FramerateNumerator(last), \
   den=FramerateDenominator(last), mask=0)

To double fps with MFlowFps for 'best' results (but slower processing):

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
# assume progressive PAL 25 fps or NTSC Film 23.976 source
super = MSuper(pel=2)
backward_vec = MAnalyse(super, overlap=4, isb = true, search=3)
# Use block overlap, halfpixel accuracy and Exhaustive search
forward_vec = MAnalyse(super, overlap=4, isb = false, search=3)
MFlowFps(super, backward_vec, forward_vec, num=2*FramerateNumerator(last), \
   den=FramerateDenominator(last))

To generate nice motion blur with MFlowBlur:

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
super = MSuper()
backward_vectors = MAnalyse(super, isb = true)
forward_vectors = MAnalyse(super, isb = false)
MFlowBlur(super, backward_vectors, forward_vectors, blur=15)

To denoise with some external denoiser filter (which uses 3 frames: prev, cur, next):

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
super = MSuper()
backward_vectors = MAnalyse(super, isb = true)
forward_vectors = MAnalyse(super, isb = false)
forward_compensation = MFlow(super, forward_vectors, thSCD1=500) # or use MCompensate
backward_compensation = MFlow(super, backward_vectors, thSCD1=500)
# create interleaved 3 frames sequences
interleave(forward_compensation, last, backward_compensation)

DeGrainMedian() # place your preferred temporal (spatial-temporal) denoiser here

selectevery(3,1) # return filtered central (not-compensated) frames only

To use prefiltered clip for more reliable motion estimation, but compensate motion of not-prefiltered clip (denoising example)

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
# Use some denoiser (blur) or deflicker for prefiltering
prefiltered = blur(1.0)
super = MSuper(levels=1) # one level is enough for MCompensate
superfilt = MSuper(prefiltered) # all levels for MAnalyse
backward_vectors = MAnalyse(superfilt, isb = true)
forward_vectors = MAnalyse(superfilt, isb = false)
# use not-prefiltered (super) clip for motion compensation
forward_compensation = MCompensate(super, forward_vectors)
backward_compensation = MCompensate(super, backward_vectors)
# create interleaved 3 frames sequences
interleave(forward_compensation, last, backward_compensation)

DeGrainMedian() # place your preferred temporal (spatial-temporal) denoiser here

selectevery(3,1) # return filtered central (not-compensated) frames only

To denoise by MDegrain2 with overlapped blocks (blksize=8) and subpixel precision:

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
super = MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)

To denoise interlaced source by MDegrain1 with overlapped blocks (blksize=8) and subpixel precision:

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
fields=AssumeTFF().SeparateFields() # or AssumeBFF
super = MSuper(fields)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=2)
MDegrain1(fields, super, backward_vec2,forward_vec2,thSAD=400)
Weave()

To denoise interlaced source with function MDegrain2i2:

function MDegrain2i2(clip source, int "overlap", int "dct")
{
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
fields=source.SeparateFields() # separate by fields
super = fields.MSuper()
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 4, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 4, overlap=overlap, dct=dct)
fields.MDegrain2(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)
Weave()
}

AVISource("video.avi")
mdegrain2i2(4,0)

How to use external subpixel interpolation clip:

# Load Eedi2 plugin (by tritical) with edge-directed interpolation function
LoadPlugin("Eedi2.dll")
AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
# create upsampled clip of source
ups = EEDI2(field=1).LanczosResize(2*width(last), 2*height(last), src_left=0.25)
super = MSuper(pel=2, pelclip=ups)
bv = MAnalyse(super, isb = true, overlap=4)
MCompensate(super, bv)

How to use with MT filter and special multithreaded AviSynth:

# Load MT plugin by TSP
LoadPlugin("MT.dll")
avisource("some.avi")
MT("""
super = MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=4)
backward_vec1 = super.MAnalyse(isb = true, delta = 1, overlap=4)
forward_vec1 = super.MAnalyse(isb = false, delta = 1, overlap=4)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
""",2) # two threads

Note: SetMTMode(2) mode of multithreaded AviSynth is also supported since MVTools v.1.8.4.1 (beta testing). MVtools version 2 should works more stable. Same example with SetMTMode:

SetMTMode(5)
FFmpegSource("some.avi") # avisource doesn't work with SetMTMode on my machines - TSchniede

SetMTMode(2)
super = MSuper(pel=2)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)

How to use prefiltered clip and recalculate motion data with original source (MFlowFPS example)

AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
prefiltered = DeGrainMedian() # some smoothing
super = MSuper(hpad=16, vpad=16, levels=1) # one level is enough for MRecalculate
superfilt = MSuper(prefiltered, hpad=16, vpad=16) # all levels for MAnalyse
backward = MAnalyse(superfilt, isb = true, blksize=16)
forward = MAnalyse(superfilt, isb = false, blksize=16)
# recalculate for original source clip and other block size
forward_re = MRecalculate(super, forward, blksize=8, thSAD=100)
backward_re = MRecalculate(super, backward, blksize=8, thSAD=100)
MFlowFps(super, backward_re, forward_re, num=50, den=1)

How to use planar option for faster processing of YUY2 (MDegrain3 example):

LoadPlugin("SSEToolsS.dll") # for conversion functions
AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
Interleaved2Planar() # convert clip to planar
super = MSuper(planar=true)
bv1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
fv1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
bv2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
fv2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
bv3 = MAnalyse(super, isb = true, delta = 3, overlap=4)
fv3 = MAnalyse(super, isb = false, delta = 3, overlap=4)
MDegrain3(super,bv1,fv1,bv2,fv2,bv3,fv3,thSAD=400,planar=true)
Planar2Interleaved() # convert back to normal interleave YUY2

IV) Disclaimer

This plugin is distributed under terms of the GNU GPL license, without any warranty. See 'gpl.txt'.
Documentation is distributed under CreativeCommons BY-SA 3.0 license.

Please consider to make some donation for support.

MVTools uses portions of code of following projects:
Resizer (SimpleResize.cpp) is from SimpleResize Avisynth plugin by Tom Barry. http://www.trbarry.com
Fast DCT (fdct_mmx.asm) is from XVID MPEG-4 VIDEO CODEC. http://www.xvid.org
DCT general transform (see fftwlite.h) is from FFTW library (as DLL call). http://www.fftw.org
SATD (pixel-32.asm, pixel.asm) and alternative SADx264 (sad-a.asm, x86inc.asm, x86inc-32.asm, cpu-32.asm) are from x264 project. http://www.videolan.org/developers/x264.html (Loren Merritt, Laurent Aimar, Alex Izvorski et al).

V) Revisions

2.5.11.22 (26.04.2016 by Fizick)

2.5.11.21 (22.04.2016 by Fizick)

2.5.11.20 (02.04.2016 by Fizick)

2.5.11.3 (19.09.2011 by Fizick)

2.5.11.2 beta (20.03.2011 by Fizick)

2.5.11.1 beta (22.12.2010 by Fizick)

2.5.11 beta (17.10.2010 by Fizick)

2.5.10.1 beta (25.06.2010 by Fizick)

2.5.10 beta (8.11.2009 by Fizick)

2.5.9 (4.11.2009 by Fizick)

2.5.8.1 (26.10.2009 by Fizick)

2.5.8 (18.10.2009 by Fizick)

2.5.7 (09.10.2009 by Fizick)

2.5.6 (08.10.2009 by Fizick)

2.5.5 (28.09.2009 by Fizick)

2.5.4 (27.09.2009 by Fizick)

2.5.3 (08.09.2009 by Fizick)

2.5.2 (11.08.2009 by Fizick)

2.5.1 (07.08.2009 by Fizick)

2.5.0 (01.08.2009 by Fizick)

2.4.7 (28.07.2009 by Fizick)

2.4.6 (26.07.2009 by Fizick)

2.4.5 (11.07.2009 by Fizick)

2.4.4 (08.07.2009 by Fizick)

2.4.2_mod2 (30.06.2009 by Pavel Skakov aka SEt)

2.4.2_mod (22.06.2009 by Pavel Skakov aka SEt)

Some source/project settings cleanup and optimized primary for MDegrain1/2/3 - depending on your settings you'll probably see 2-15% speedup, results are bit-identical to original 2.4.2:

2.4.3 beta (26.04.2009 by Fizick)

2.4.2 (07.04.2009 by Fizick)

2.4.1 beta (24.01.2009 by Fizick)

2.4.0 beta (09.01.2009 by Fizick)

2.3.1 (14.12.2008 by Fizick)

2.3.0 (6.12.2008 by Fizick)

2.2.2 (30.11.2008 by Fizick)

2.2.1 (27.11.2008 by Fizick)

2.1.2 (23.11.2008 by Fizick)

2.1.1 (18.11.2008 by Fizick)

2.1.0 (8.11.2008 by Fizick)

2.0.11.2 (6.11.2008 by Fizick)

2.0.11.1 (5.11.2008 by Fizick)

2.0.9.2 (3.11.2008 by Fizick)

2.0.9.1 (20.10.2008 by Fizick)

2.0.9.0 alpha (13.10.2008 by Fizick)

2.0.7.0 alpha (02.10.2008 by Fizick)

2.0.0.3 alpha (28.09.2008 by Fizick)

1.11.4.4 (15.10.2008 by Fizick)

1.11.4.3 (08.10.2008 by Fizick)

1.11.4.2 (26.09.2008 by Fizick)

1.11.0.1 beta (08.09.2008 by Fizick)

1.10.2.1 (28.08.2008 by Fizick)

1.10.2.0 beta (27.08.2008 by Fizick)

1.10.1.0 not public (22.08.2008 by Fizick)

1.10.0.0 not public (18.08.2008 by Fizick)

1.9.6.x-1.9.7.x series branch (01.08.2008-26.08.2008 by josey_wells)

1.9.5.7 public beta (03.07.2008 by Fizick)

1.9.5.6 (02.07.2008 by TSchniede)

1.9.5.5 (28.06.2008 by TSchniede)

1.9.5.4 (27.06.2008 by TSchniede)

1.9.5.3 (26.06.2008 by TSchniede)

1.9.5.2 (24.06.2008 by TSchniede)

1.9.5.1 public beta (21.06.2008 by Fizick)

1.9.5 (21.06.2008 by TSchniede), based on v.1.9.3

1.9.4.1 beta (12.06.2008 by Fizick, released 21.06.2008)

1.9.4 not public beta (08.06.2008 by Fizick)

1.9.3.1 (05.06.2008 by Fizick)

1.9.3 (20.04.2008 by Fizick)

1.9.2 (29.01.2008, all bugs were found by josey_wells)

1.9.1 beta (15.12.2007 by Fizick)

1.9.0 (04.12.2007 by Fizick)

1.8.6 (02.12.2007 by Fizick)

1.8.5.1 (12.11.2007 by we:)

1.8.4.3 (05.10.2007 by Tsp)

1.8.5 (05.11.2007 by Fizick)

1.8.4.2 (25.10.2007 by Tsp)

1.8.4.1 (23.10.2007 by Tsp)

1.8.4 (22.08.2007 by Fizick)

1.8.3 (17-20.08.2007 by Fizick)

1.8.2 beta (30.07.2007 by Fizick)

1.8.1 beta (28.06.2007 by Fizick)

1.8.0 beta (22.06.2007 by Fizick)

1.7.0 beta (05.06.2007 by Fizick)

1.6.4 (30.05.2007 by Fizick)

1.6.3 (06.05.2007 by Fizick)

1.6.2 (11.11.2006 by Fizick)

1.6.1 beta (25.10.2006 by Fizick)

1.5.8 beta (14.10.2006 by Fizick)

1.5.3 beta (01.10.2006 by Fizick)

1.5.1 beta (05.09.2006 by Fizick)

1.5.0 beta (23.08.2006 by Fizick)

1.4.13 (28.09.2006 by Fizick)

1.4.12 (25.09.2006 by Fizick)

1.4.11 (06.09.2006 by Fizick)

1.4.10 (18.08.2006 by Fizick)

1.4.9 (14.08.2006 by Fizick)

1.4.8 (31.07.2006 by Fizick)

1.4.7 (25.07.2006 by Fizick)

1.4.6 (24.07.2006 by Fizick)

1.4.5 (22.07.2006 by Fizick)

1.4.4 (19.07.2006 by Fizick)

1.4.3 (17.07.2006 by Fizick)

1.4.2 (16.07.2006 by Fizick)

1.4.1 (23.06.2006 by Fizick)

1.4.0 (19.06.2006 by Fizick)

1.3.1 (11.06.2006 by Fizick)

1.3.0 (05.06.2006 by Fizick)

1.2.6 beta (21.05.2006 by Fizick)

1.2.5 (08.05.2006 by Fizick)

1.2.4 (07.04.2006 by Fizick)

1.2.3 (31.03.2006 by Fizick)

1.2.2 beta (01.03.2006 by Fizick)

1.2.1 beta (20.02.2006 by Fizick)

1.2 beta (17.02.2006 by Fizick)

1.1.1 (16.02.2006 by Fizick)

1.1 (non-public build 9.01.2006 by Fizick)

1.0.3 (Released 30.12.2005 by Fizick)

1.0.2 (Released 28.12.2005 by Fizick)

1.0.1 (Released 24.12.2005 by Fizick)

1.0 (Released 29.11.2005 by Fizick)

0.9.13.3 (Released 27.11.2005 by Fizick)

0.9.13.2 (Released 22.11.2005 by Fizick)

0.9.13.1 (Released 21.11.2005 by Fizick)

0.9.13 (Released 20.11.2005 by Fizick)

0.9.12.4 (Released 15.11.2005 by Fizick)

0.9.12.3 (Released 14.11.2005 by Fizick)

0.9.12.2 (Released 13.11.2005 by Fizick)

0.9.12.1 (Released 12.11.2005 by Fizick)

0.9.12 (Released 09.11.2005 by Fizick)

0.9.11.1 (Released 06.11.2005 by Fizick)

0.9.11 (Released 04.11.2005 by Fizick)

0.9.10.1 (Released 01.11.2005 by Fizick)

0.9.10 (Released 31.10.2005 by Fizick)

0.9.9.1 (Released 20.01.2005 by Manao)

0.9.9

0.9.8.5

0.9.8.4

0.9.8.3

0.9.8.2

0.9.8.1

0.9.8

0.9.7

0.9.6.2

0.9.6.1

0.9.5.3

0.9.5.2

0.9.5

0.9.4

0.9.3

0.9.2.1

0.9.2

0.9.1 - 12.05.2004

0.1-0.6 Released 24.01.2004 - 01.04.2004 by Manao

VI) Download

Latest version by Fizick: Download MVTools v2.5.11.22

Previous version: Download MVTools v2.5.11.20

Early version: Download MVTools v2.5.11.3

MVTools 2 mod16 dither version by Laurent de Soras 'Firesledge': http://ldesoras.free.fr

You can found other 'unofficial' builds at forums, also 64 bit.

Older version 1.X documentation and download link are at http://avisynth.org.ru/mvtools/mvtools.html

Older MVTools v.0.9.9.1 can be downloaded from Manao's site