Traditional YV12 to YUY2 upsamplers operate either in the progressive or interlaced mode, and the upsampler must be told which mode to use. This paradigm can be unsatisfactory in several cases:
The distribution ZIP files contains three screen shots that illustrate the problem. They are taken from a video clip supplied by scharfis_brain. The 'interlaced.bmp' shot is upsampled as interlaced. You can see that the interlacing is properly preserved but there is bad CUE throughout the frame. The 'progressive.bmp' shot is upsampled as progressive. You can see that the CUE is eliminated, but the interlacing is destroyed. The 'autoyuy2.bmp' shot is upsampled adaptively using AutuYUY2(). You can see that the CUE is eliminated and the interlacing is preserved. If you look hard, you may find small areas where there is remaining CUE or DOI, due to imperfections in the detection of interlacing.
Version 1.0.0 is a proof-of-concept version. I plan to improve the interlace detection in future versions. I also plan to create an AutoRGB() filter that performs the same function but outputs RGB.
This filter was inspired by a discussion with scharfis_brain, who demonstrated an Avisynth script that performs this function. I wanted to create a native filter for this functionality.
AutoYUY2() takes two named parameter:
threshold (integer, default 100) This defines the threshold for detection of interlacing. To bias the filter towards declaring areas as interlaced, lower the threshold. No interlace detector can be perfect and so any failures may allow CUE or DOI to occur. This parameter allows for the user to tradeoff between these two. A lower thresold will tend to produce more CUE and less DOI. A higher thresold will tend to produce more DOI and less CUE. Use the map parameter to visualize the areas detected as interlaced to assist in tweaking teh threshold. The default threshold works well for most video.
map (true/false, default false) Set map=true to visualize the areas detected as interlaced. Progressive areas are rendered as flat gray, while interlaced areas have their content passed through.
Copyright © 2005, Donald A. Graft, All Rights Reserved.
For updates and other filters/tools, visit my web site:
http://neuron2.net