Log in

View Full Version : YUY2 vs YV12 vs RGB24?


comrinec
22nd July 2007, 01:54
Is there a guide that explains the differences between these formats?

Virtual dub has like 10+ different uncompressed formats to choose from, for some reason when I try to capture video from my eyetoy I can only capture rgb24 as it says every other format is not supported by it. I compress the captured video to x.264 @ 2Mb/s on the fly anyway, but I would like to understand how these formats work.

signal
22nd July 2007, 05:27
They are referred to as color spaces and represent mathematically how color is is being represented.

There are advantages and disadvantages to which ones to use depending on what tools your using and what the final format and source will be.

Your more than likely being limited to RGB24 as that's all the "eyetoy" can provide or look at the Capture Pin and see if the other color space options are there.

Other capture cards/devices can provide additional color spaces but don't be fooled as sometimes they are converting to them on the fly and aren't native (i.e. not the best quality either).

It can be a messy subject and you'll find more than a few threads on here about what's best to use when.

If you want to get into the gorry basics of it:
http://en.wikipedia.org/wiki/Color_space
http://www.couleur.org/index.php?page=transformations

And here's a basic one related to YUV:
http://www.answers.com/topic/yuv?cat=technology

Google around on color space and video or television for more info on what color spaces are all about.

comrinec
22nd July 2007, 05:31
Do they affect the size of the uncompressed video? I assume 24 bit rgb means 24b/pixel?

Mug Funky
22nd July 2007, 05:58
yv12 is the smallest uncompressed format as it ditches 3/4 of the original chroma info.

yuy2 only ditches half of it, and 4:4:4 yuv keeps it all. rgb keeps all information, but the catch is that most of the time it didn't exist in the first place and hence capturing RGB actually reduces detail due to converting from a native yuv colourspace.

definitely a messy subject though. probably it is most useful to capture in yuy2 to ensure the whole interlaced structure is kept, process carefully in yv12 for speed and also because most of the good processing scripts out there work only in yv12.

x264 works only in yv12, so there will be conversions happening if you encode to it. that's another reason it's more useful to process in yv12 - you have control over how the conversion happens.

comrinec
22nd July 2007, 07:35
So does capturing to yuy2 and yv12 reduce quality over yuv then?


When set top boxes output rgb, is that extra information over yuv fake or real? People seem to say rgb scart is better than component for sd rgb sources like set top boxes but I always wondered if the source was ever in rgb anyway.

Mug Funky
27th July 2007, 06:51
DVDs are always 4:2:0 (YV12 equivalent), up to 10 bits.

broadcast/DVD masters are most likely 4:2:2, 10-bit, or analog component or worse.

the only RGB tape format in common usage is HDCAM-SR, though many telecines can capture 4:4:4 RGB. they get decimated to 4:2:2 on the way to the tape deck...

using scart to get to your TV can be advantageous though - you certainly wont lose anything over component, and you'll have the bonus of an analog colourspace conversion, meaning it'll look better on an LCD or Plasma than it's component (which will likely be converting yuv to rgb digitally, with probably-not-enough precision, causing banding and stuff).