Deinterlacing

From VideoLAN Wiki
Revision as of 23:20, 17 December 2010 by Brandondorf9999 (talk | contribs)
Jump to navigation Jump to search

Deinterlacing is the process of converting source material that contains alternating half-pictures to a computer screen that displays a full picture at a time.

Description

TVs do not display one picture-frame at a time. Instead, they display alternately all the odd lines and all the even lines of the picture. That way, they can get a fast display rate of 50 or 60 half-pictures per second, without the bandwidth requirements that full pictures have.

Computers however, do display full pictures, typically at a rate of at least 60 pictures per second. So to get optimum quality when displaying TV-material (such as DVDs) on a computer, the player can convert the alternating half-pictures to full pictures. That is called deinterlacing.

A very good description of the problem and the various ways of deinterlacing can be found at 100fps.com.

VLC settings

VLC has deinterlacing disabled by default. You can enable it for the current video by using the menus or right-clicking.

To make deinterlacing the default, go to Preferences/Video/Filters; also change the deinterlace mode in Preferences/Video/Filters/Deinterlace. Unfortunately, VLC will then apply deinterlacing even if the original is not interlaced, which is a really bad idea.

VLC deinterlace modes

VLC has the following deinterlace modes. Refer to 100fps.com for illustrations. VLC does not have anything like what 100fps.com calls Motion blur, Hybrid, and Motion compensation.

Disabled

(is this what 100fps.com calls "do nothing"?) Other names: "weave" or "no deinterlacing". Should be used for PsF content.

Blend

Each line of the picture is created as the average of a line from the odd and a line from the even half-pictures. This ignores the fact that they are supposed to be displayed at different times.

Bob

Display each half-picture like a full picture, by simply displaying each line twice. Preserves temporal resolution of interlaced video.

Discard

Only display one of the half-pictures, discard the other. Other name: "single field". Both temporal and vertical spatial resolutions are halved. Can be used for slower computers or to give interlaced video movie-like look with characteristic judder.

Linear

Bob with linear interpolation: instead of displaying each line twice, line 2 is created as the average of line 1 and 3, etc.

Mean

Display a half-picture that is created as the average of the two original half-pictures.

X

Generates a full picture taking the odd lines from the odd half-picture, and creating the even lines through a complicated algorithm that uses information from both half-pictures.

This may be similar to what 100fps.com calls Area based?

Yadif

Display a picture as the other deinterlacer like discard and X.

Yadif (2x)

Bob with Yadif 2x interpolation like linear: Instead of 25fps you could try this but it may skip some of the frames when you use this deinterlacer.

Resulting framerate and resolution

In the table below, Fps is how often VLC will update the picture on your monitor. Half is 25 or 30 times per second, while full is 50 or 60 times.

Picture lines is how many lines there is in the picture that VLC generates. Half equals the number of lines in a half-picture, while full is twice as many. That picture will be scaled before being displayed, so this just tells us how detailed the picture could potentially be.

Method Fps Picture lines
Disabled half? full
Blend half full
Bob full half/full (note 1)
Discard half half
Linear full half/full (note 1)
Mean half half
X half full
Yadif half half
Yadif (2x) full full\half (note 1)

Note 1: Bob converts the half-pictures to full-pictures by simply showing each line twice; so while the full number of lines are displayed, the true resolution is only half. The same goes for linear, though it's a bit smarter about the process.

Recommendation

"Linear" is probably the best compromise from the algorithms that VLC implements.

Disclaimer

This information is based on a quick reading of VLC's source code. Please update this page if it contains any errors.