AviSynth MSU Field Shift Fixer

Free AviSynth filter for fixing situation when different lines of source frame are placed in different output frames. This often occurs during movie capture, when odd lines are one frame later than even lines. In films after PAL->NTSC conversion there is another problem: in two neighbour frames odd lines are equal and even are different. The main idea of this filter is searching for the optimal line’s position for current frame. If this position exists, optimal odd lines are placed into current frame, otherwise (for example when odd lines are in one frame after even lines and we are in the last frame) the odd field is interpolated, or no changes are done (behavior depends on filter’s settings). After applying MSU FieldShiftFixer to sequence visual video quality is improved, and compression and denoising processes give better results.


Let’s consider the filter results on a test sequence “4msu2_25.avi”

Frame from film
source frame from 4msu2_25.avi
after Filter
after filter works

Comparison with deinterlace filter

Deinterlaced frame
after deinterlace filter
frame, after filter works
after MSU FieldShiftFixer filter

On these two pictures you can see that after applying deinterlace filter to a sequence a lot of details (especially horizontal) are not reconstructed as well, as with this filter.



  1. Download AviSynth (for example from www.avisynth.org)
  2. Create a script (text file with .avs extension):

Each line description:

  1. Avisource(“4msu2_27.avi”) - path to movie file
  2. ConvertToYUY2() - conversion to YUY2
  3. LoadPlugin(“msu_fieldshiftfixer.dll”) - loading filter. It could be placed anywhere, but if the location of the filter differs from the location of .avs script, you should specify absolute or relative (to .avs file) path.
  4. MSU_FieldShiftFixer(16,1,1) - processing video with MSU FieldShiftFixer filter. The first parameter is the step between even lines, which are used in calculation (from 1 till 16). By decreasing this parameter, you will decrease processing speed, but you will also decrease error propability in the detection of the optimal field. Sometimes there is no optimal field for border frames, and if the second parameter is set to 1, the odd field in border frames will be interpolated. And if this parameter is set to 0, there will be no modifications in border frames. By setting the third parameter to 1 you prevent situation when one frame is duplicated in two neighbour frames.
  5. ConvertToRGB24() - conversion to RGB

After these steps open .avs in VirtualDub or another video editor or viewer.


10 Mar 2011
See Also
Super-Resolution Quality Metrics Benchmark
Discover 66 Super-Resolution Quality Metrics and choose the most appropriate for your videos
MSU Video Group / Video data filtering and compession
VirtualDub MSU Logo Remover
The filter is intended to remove logo from films
MSU Stereo To Multiview 3D Video Conversion ( Glasses-free 3D-Displays Video Content creation)
Stereo to multiview video conversion algorithm for glasses-free autostereoscopic 3D displays
MSU Video Super-Resolution Filter
This filter increases resolution of video sequence while saving and improving details and reducing artifacts.
MSU Video Group / Video data filtering and compession
Site structure