The chroma upsampling error seems to come up every few months. I am trying to put as much information about this issue in one place. Thanks to jagabo for this information.
Different applications handle YV12 differently.
Virtualdubmod
- when fed interlaced YV12, the internal MPEG-2 decoder handles the chroma properly
- when fed progressive YV12, the internal MPEG-2 decoder handles the chroma improperly
- when fed interlaced YV12 via Avisynth the chroma is handled improperly
- when fed progressive chroma via Avisynth the chroma is handled properly
Virtualdub
- treats all chroma as progressive
- all progressive YV12 handled properly
- all interlaced YV12 handled improperly
General Information
To put interlaced chroma in a form that Virtualdub can handle one adds Converttoyuy2(interlaced=true) to an Avisynth script before opening it in Virtualdub. This can be followed with Convertoyv12() (assumes interlaced=false) if necessary and, I believe, Convertoyuy2(), but this blurs the chroma channnels together similar to VirtualDub's handling of interlaced chroma.
Hard telecined sources should have interlaced chroma. Soft telecined sources will depend on whether the MPEG decoder is performing the pulldown or not. If the decoder is not performing the pulldown AviSynth will receive progressive frames with progressive chroma channels (usually at 23.976 fps). If the decoder is performing the pulldown AviSynth will receive interlaced frames with interlaced chroma channels at 29.97 fps.
FAQ
Is the only way to determine whether chroma is interlaced or not to examine the video with your eyes?
It depends on what your source is. If you have a YUY2 AVI file you have to look for yourself. If you use DgIndex in Honor Pulldown Flags mode, you will get interlaced video with interlaced chroma. If you use DgIndex in Force Film mode you will get progressive frames with progressive chroma.
If you perform an inverse telecine on 29.97i material does it makes the chroma progressive?
The video should be interlaced with interlaced chroma channels before the inverse telecine. After the inverse telecine you have progressive frames with progressive chroma channels.
As long as one inverse telecines NTSC material in Avisynth first (if possible), should it always be acceptable to feed YV12 to Virtualdub?
Yes.
Other
There does seem to be an AutoYUY2() filter that tackles this issue, but I don't have any experience with it, and am not sure how reliable it is considered to be.
This post has some good pictures of the problem. As does this one.
+ Reply to Thread
Results 1 to 7 of 7
-
Anonymous344Guest
Last edited by Anonymous344; 22nd Apr 2011 at 21:07.
-
Yes.
Yes. But you're not "fixing" it, your just putting it in a form that VirtualDub handles correctly.
Yes, but it will blur the interlaced chroma channels together, similar to VirtualDub's handling of interlaced chroma.
Hard telecined sources should have interlaced chroma. Soft telecined sources will depend on whether the MPEG decoder is performing the pulldown or not. If the decoder is not performing the pulldown AviSynth will receive progressive frames with progressive chroma channels (usually at 23.976 fps). If the decoder is performing the pulldown AviSynth will receive interlaced frames with interlaced chroma channels at 29.97 fps.
After the inverse telecine you have progressive frames with progressive chroma channels.
The video should be interlaced with interlaced chroma channels before the inverse telecine.
It depends on what your source is. If you have a YUY2 AVI file you have to look for yourself. If you use DgIndex in Honor Pulldown Flags mode, you will get interlaced video with interlaced chroma. If you use DgIndex in Force Film mode you will get progressive frames with progressive chroma. -
Anonymous344Guest
Thanks, jagabo. That's all very helpful. As long as one inverse telecines NTSC material in Avisynth first (if possible) it should always be acceptable to feed YV12 to Virtualdub.
I shall update the first post with this and any other information I can find about this too. I thought it might be good to have information on this in one place. At the moment, it is scattered about a bit. -
Anonymous344Guest
Thanks again. I'll find some links to threads in which pictures of the problem have been posted, and might find some information about PAL too. With a little luck, this thread will be stickied because the issue comes up frequently and it would be useful to have information about it in one place.
-
What about VirtualDub using the MPEG-2 input plugin?
Does it handle the chroma correctly?
(I guess it depends on whether the plugin calls it 'YV12' or something else.) -
I discovered this morning that it depends on what you have VirtualDub's input color depth set to (Video -> Color Depth -> Decompression Format). When set to Autoselect or YV12 it outputs interlaced YV12 and the chroma is handled incorrectly. When set to YUY2 it works correctly. With some of the other choices the behavior is a bit unpredictable.
Similar Threads
-
NTSC : progressive or interlaced
By mathmax in forum Authoring (DVD)Replies: 54Last Post: 2nd Feb 2012, 07:06 -
Progressive Vs Interlaced?
By shagratt71 in forum Video ConversionReplies: 4Last Post: 26th Dec 2011, 09:22 -
Interlaced or progressive
By rank in forum Newbie / General discussionsReplies: 4Last Post: 3rd Jul 2010, 16:41 -
Interlaced YV12 chroma messes up between AviSynth and VirtualDub
By Neimo in forum Video ConversionReplies: 6Last Post: 21st Apr 2010, 19:30 -
cropping interlaced YV12 video caused chroma error
By dphirschler in forum EditingReplies: 2Last Post: 3rd Dec 2009, 10:07