chaynik
2nd October 2009, 08:10
A lot of my source media originates as MPEG-2, already in the YV12 4:2:0 color format, however pretty much all video editing software (Final Cut Pro, Avid, etc) only thinks in 4:2:2 and higher. I use AviSynth for prepping the material for editorial (ivtc, etc) so I can stay within YV12 internally, but when rendering the prepped material for editorial, I must upsample to 4:2:2. Ironically, after editorial my destination format is either MPEG-2 or H.264, both 4:2:0, so this step is unfortunately completely redundant but necessary for compatibility.
The question is, how lossy is this practice? Does the chroma simply get doubled during conversion to YUY2 (and then discarded during conversion back to YV12) or does it get resampled (via bicubic or similar)? Does different software handle this conversion differently (AviSynth vs CCE, for example)? I would imagine if it's the former, the output would be lossless since it's a matter of first adding an extra pixel "every other time" and then throwing it away "every other time". If it's the latter, however, I imagine there would be some loss as it's akin to resizing a picture from 360x240 to 360x480 and then back to 360x240 (although here it only occurs in the chroma plane). How noticeable is this loss? Can it have a noticeable impact on let's say, h.264 compression efficiency?
I've also noticed that performance wise, I get much higher framerates in x264 encoding from a YV12 file over a YUY2 file (with ConvertToYV12 added), leading me to believe these calculations are somewhat computationally intensive (and I'm on an 8-core Xeon machine), hinting at pixels being resampled versus simply doubled/discarded.
Certain encoders like CCE take YUY2 only so the upconversion is a must even though the output is YV12. Would one recommend using a different mpeg2 encoder because of this (such as those in ffmpeg and/or mencoder) or again is this conversion of minor importance and minor impact on quality?
What are some rules/practices pertaining to all of this? Are there any workarounds I may not know of?
Thanks in advance.
The question is, how lossy is this practice? Does the chroma simply get doubled during conversion to YUY2 (and then discarded during conversion back to YV12) or does it get resampled (via bicubic or similar)? Does different software handle this conversion differently (AviSynth vs CCE, for example)? I would imagine if it's the former, the output would be lossless since it's a matter of first adding an extra pixel "every other time" and then throwing it away "every other time". If it's the latter, however, I imagine there would be some loss as it's akin to resizing a picture from 360x240 to 360x480 and then back to 360x240 (although here it only occurs in the chroma plane). How noticeable is this loss? Can it have a noticeable impact on let's say, h.264 compression efficiency?
I've also noticed that performance wise, I get much higher framerates in x264 encoding from a YV12 file over a YUY2 file (with ConvertToYV12 added), leading me to believe these calculations are somewhat computationally intensive (and I'm on an 8-core Xeon machine), hinting at pixels being resampled versus simply doubled/discarded.
Certain encoders like CCE take YUY2 only so the upconversion is a must even though the output is YV12. Would one recommend using a different mpeg2 encoder because of this (such as those in ffmpeg and/or mencoder) or again is this conversion of minor importance and minor impact on quality?
What are some rules/practices pertaining to all of this? Are there any workarounds I may not know of?
Thanks in advance.