All pastes #2130834 Raw Edit

Anonymous

public text v1 · immutable
#2130834 ·published 2012-03-20 22:20 UTC
rendered paste body
Deinterlace / IVTC

First of a big thanks to jase99 (From SDBits) he allowed me to use he's great guide on Deinterlacing. 

I have only altered a small part of this section so all credit goes to him. :) 

Find a scene with motion using AVSP and step though frame by frame looking for interlacing (example). MeGUI has an 'Analyze' function in the 'Filters' tab of the 'AviSynth Script Creator' dialog that occasionally produces a correct de-interlacing filter chain, although they are not the best to use and are frequently wrong. Below are a few common scenarios and recommended de-interlacing filters. 

Important Note: The source video type must be identified correctly. Using a deinterlace filter on a source type it was not designed for will produce bad results. 


[edit]
Hard or soft telecined Film

(Common for NTSC movies) 

Check for a repeating pattern of 3 progressive frames followed by 2 interlaced frames. This is called telecine. Check several scenes for this pattern. Pay attention to any scenes that use special effects. If all scenes show the same repeating pattern then use inverse telecine to completely recover progressive frames: 

TIVTC v1.0.5 Doom9 Download Link 
TFM().TDecimate()
[edit]
Pure interlace

Temporarily add SeparateFields() to encode.avs and re-load into MeGUI. The video will be half the original height, these are called fields. One field will be all the horizontal odd lines from the original image, the second field will be all the even lines from the original image. Step through field by field. If every field is unique then the video is pure interlace. Remove the SeparateFields() filter and use one of the following filter chains. Filters are listed in decreasing order of quality: 

TempGaussMC_beta2 using NNEDI2 Download Link | Superb, but denoises the picture. Not practical for many users because it is very slow (but it's faster than MCBob). 
TempGaussMC_beta2(tr2=0, EdiMode="nnedi2", lossless=3).SelectEven()

MCBob v0.3u using NNEDI2 Doom9 Download Link | Superb, but may output ghosting. Not practical for many users because it is very slow. 
MCBob(sharpness=1.0).SelectEven()

YADIFMod using NNEDI2 Download tritical's filters | Very good. Little or no interlace artifacts remain (not good with horizontal scrolling credits) 
YADIFMod(edeint=NNEDI2())

TDeint using TMM & NNEDI2 Download tritical's filters Doom9 Download Link | Average to good depending on the source. (excellent with horizontal scrolling credits) 
TDeint(edeint=NNEDI2(),emask=TMM())

YADIF avisynth Download Link Doom9 Download Link | Reasonable. Can leave noticeable interlace artifacts. 
Load_Stdcall_plugin("path\to\yadif.dll")
YADIF()

TDeint Download tritical's filters | Average. Can leave noticeable interlace artifacts. 
TDeint()

Emulate VirtualDub's PAL deinterlace filter | Poor for general use. Can produce 'ok' results on some sources. 
DoubleWeave().SelectOdd()
[edit]
Hybrid

Telecine and progressive or interlace scenes in the same video 

Hybrid sources typically require VFR (variable frame rate) so that film sequences are inverse telecined and shown at 23.976 frames/sec, and non-film sequences (usually special effects) are shown at 29.970 frames/sec. Examples that require VFR are Stargate SG1, Star Trek TNG, Babylon 5 and many "Making Of" documentaries. Refer to this guide to make a VFR encode. 

If special effects sequences are very short (a few seconds) or if the only non-film sequences are scrolling credits then you may consider the effort required to make a VFR encode does not outweigh the downside of having a small number of blended frames, dropped frames or stutter. In these cases use one of the following filter chains: 

Mostly Film (telecine) 
TFM(mode=5,slow=2,clip2=NNEDI2()).TDecimate(hybrid=1)

Mostly Video (interlace) 
TFM(mode=5,slow=2,clip2=NNEDI2()).TDecimate(hybrid=3)
[edit]
Miscellaneous IVTC

Anime, cartoons Doom9 Download Link 
AnimeIVTC()

Animes is also often Hybrid here is a example of a commandline with AnimeIVTC that can deal with that. 
AnimeIVTC(Mode=3, estart1=0, eend1=last frame of ep, istart1=1st frame of ending credits, iend1=last frame)

Deal with residual combing (invented for Family Guy) Doom9 Download Link 
VInverse()

De-interlacer for masochists Ivtc.org Download Link 
Yatta