Choosing a deinterlacer ======================= In VLC, there are several deinterlacing algorithms to choose from. For a summary, see the table below. The algorithms can be divided into the following general types: Doublers -------- These algorithms double the framerate, hence the name. This approach to deinterlacing is also known as field rendering. If the video framerate is compatible with the display refresh rate, these algorithms produce very smooth motion for true interlaced video. This is because the fields were intended to be displayed at different times, which is accounted for in these algorithms. Simple doublers (Bob and Linear) use information from only one field of the input picture at a time. This is sufficient in practice. The double framerate produces a convincing illusion of full vertical resolution while playback is running. Some more advanced doublers (X (2x) and Yadif (2x)) are based on interpolators (see below), and attempt to generate a full picture for each displayed output frame. When interpolators are used in this way, which field is kept, alternates at every output frame. The last doubler (Phosphor) does not fit into either of these categories, but attempts to simulate a CRT TV. All framerate doublers can be used with both true interlaced and telecined video (see below). Interpolators ------------- These algorithms analyze the picture, detecting progressive and interlaced parts. Typically the progressive parts of the picture are passed through unchanged, although in some algorithms various kinds of filtering may be used. For the interlaced parts, one field is kept, while the other field is generated out of thin air using various mathematical methods, based on the information in the kept field. The output runs at the original framerate. The different intended display times for fields in a true interlaced video are ignored. Interpolators are designed for use with true interlaced video only. Without the doubler component (see above), they will introduce serious stutter if applied to telecined video. Blenders -------- These algorithms mix information from both fields to produce a blended picture. This is simple and removes interlacing, but causes "ghosting" for fast motion. The output runs at the original framerate. The different intended display times for fields in a true interlaced video are ignored. Blenders are designed for use with true interlaced video only, and are not applicable to telecined video. Inverse teleciners ------------------ These algorithms are specifically designed for NTSC telecined video. Inverse telecine is also known as "IVTC", "film mode" and "3:2 reverse pulldown". Telecined video was designed for 24 frames per second, but had to be made compatible with systems that work at 60 fields per second. This is done by doubling some of the input fields in a regular 3:2 pattern, and produces a characteristic look of 3 progressive frames followed by 2 (artificially) interlaced frames. Telecine is common in NTSC countries, and especially in Japan. With very few exceptions, all NTSC anime is telecined, including the American releases. Inverse teleciners reverse this procedure, extracting the original progressive frames and displaying them at the intended framerate. In the ideal case, this perfectly restores the progressive signal, at no loss of information and no need to generate anything out of thin air. Due to practical reasons, these algorithms are always based on analyzing the picture. They are not and cannot be perfectly accurate, but in practice they work well for most telecined sources. Side note on anime specifically =============================== As was said above, almost all NTSC anime requires inverse telecine if it is to be viewed on a progressive display. It is well-known in technically minded anime circles that the NTSC releases are the "good" ones. PAL versions are usually bad conversions from the NTSC releases. The standard procedure for movies is to get a progressive master copy, and speed it up by 4% to convert from 24 fps to 25 fps. However, for anime, progressive master copies often do not even exist, so the original must be inverse telecined first to obtain a progressive copy. PAL anime that has been properly processed like this is very rare. Far more common is that the telecined original has been processed incorrectly, using field blending and other cheap approaches that severely degrade picture quality (also making the end result impossible to deinterlace). The best that can be done to PAL anime (in realtime, at least) is to use a blender and hope that it hits at least some of the interlacing artifacts (which are no longer necessarily aligned with video lines, due to scaling from 480 to 576 lines). While less common, there also exists anime that mixes in true interlaced (60i) effects, or 30/60 fps camera pans, with the telecined 24p signal. For these, inverse telecine is not applicable, and a framerate doubler is recommended. Summary of the algorithms ========================= Legend: C H FR = Chroma, Height, Framerate 0 = 4:2:0 chroma 2 = 4:2:2 chroma h = half height: output has half the lines of the input f = full height: output has as many lines as the input 1x = original framerate 2x = double framerate (field rendering) * = special, see starred note n) = numbered note, see for details Algo \ Input 4:2:0 4:2:2 \ Algo type Interpolation (if applic.) Notes ------------------------------------------------------------------------------------------------------------------------ C H FR C H FR Discard 0 h 1x 0 f 1x interpolator none keeps only top field; each line is repeated Mean 0 h 1x 2 h 1x blender half-resolution blender; 1) Blend 0 f 1x 0 f 1x blender full-resolution blender; 2) Bob 0 f 2x 0 f 2x doubler none each line is repeated; 3) Linear 0 f 2x 2 f 2x doubler simple linear first/last line of picture is copied X 0 f 1x 2 f 1x interpolator edge-oriented keeps only top field in interlaced parts; 4) X (2x) 0 f 2x 2 f 2x doubler edge-oriented Yadif 0 f 1x 2 f 1x interpolator hybrid spatial/temporal keeps only top field in interlaced parts Yadif (2x) 0 f 2x 2 f 2x doubler hybrid spatial/temporal Phosphor * f 2x 2 f 2x doubler CRT TV simulator; 5) IVTC 0 f ** 2 f ** inverse teleciner * Output from Phosphor is 4:2:2 if the Upconvert mode is chosen in the settings, otherwise 4:2:0 is used. ** IVTC outputs at (4/5)x of original framerate, when inverting telecine on a locked-on cadence, and at 1x while trying to acquire lock-on. The luma (Y) component scale I (16..240) vs. J (full scale, 0..255) is preserved in all format conversions. Numbered notes: 1) The Mean algorithm simply pairs the original lines, and averages each pair into one output line. Line 1 of output is the mean of lines 1 and 2 in input, line 2 of output is the mean of lines 3 and 4 in input, and so on. 2) Blend is slightly more sophisticated than Mean. The first line of output is copied from the first line of input. All other lines are the mean value of the original line and the one following it. The second line of output is the mean of lines 1 and 2 in input, the third line is the mean of lines 2 and 3, ... and finally, the last line of output is the mean of the last two lines in input. The sliding average procedure preserves the original vertical resolution. 3) While Bob is a standard algorithm, a note may be in order. Bob is slightly more clever than just a 2x version of Discard: in the output, the bottom field is offset by one line with respect to the top field. This is the technical reason behind the perceived full resolution magic, and is why the output needs to be rendered at full height. (As a side effect, this causes perfectly horizontal lines to flicker in a way characteristic to the Bob algorithm. The Phosphor algorithm is an attempt to overcome this.) 4) The X algorithm divides the video into blocks of 8x8 pixels, and analyzes them. It blurs the progressive blocks lightly. In the interlaced blocks, it keeps only the top field, and uses edge-oriented interpolation to create the bottom field. 5) Phosphor displays the latest two fields, regardless of temporal frame boundaries. To simulate phosphor light output decay, the old field is darkened by an amount that can be configured in All settings > Video > Filters > Deinterlace. Same table, showing only entries where output is different from input: Algo \ Input 4:2:0 4:2:2 ----------------------------- C H FR C H FR Discard h 0 Mean h h Blend 0 Bob 2x 0 2x Linear 2x 2x X X (2x) 2x 2x Yadif Yadif (2x) 2x 2x Phosphor * 2x 2x IVTC ** **