View Full Version : Colorspaces - DV
State of Mind
3rd January 2005, 16:09
How much detail/image quality is really lost when converting colorspaces? Just wondering. I har YV12 and YUY2 most of all on these forums. Since DV is RGB, I'd prefer to keep it that way, but I know for a fact that not all the filters I'll be using will support it. Is it really such a loss to convert from RGB > YV12 or even three conversions?
I told you...I am picky. Probably the only thing in my life I'm actually proud of for some strange reason. *breaks down and cries* lol
Si
3rd January 2005, 19:22
Since DV is RGB
I think you'll find that DV is a YUV colourspace (YUV 4:2:0) but your codec might be outputting RGB as a default.
In general converting to RGB and using RGB colourspace normally works fine but ends up being the slowest (each frame takes up more memory).
YV12 is usually the fastest (uses smallest memory/frame) but there can be a quality loss when converting from RGB or YUY2.
However, if you consider that DVDs use YV12 and they look quite good then the loss is usually considered very acceptable.
The main conversion issues are to do with handling interlaced material (from a camcorder or live TV) and converting that into a YV12 colourspace (or the other way) - this can be a nightmare.
regards
Simon
State of Mind
3rd January 2005, 20:20
I think you'll find that DV is a YUV colourspace (YUV 4:2:0) but your codec might be outputting RGB as a default.
Oh, really? YUV...hmm, that's interesting.
YV12 is usually the fastest (uses smallest memory/frame) but there can be a quality loss when converting from RGB or YUY2.
You mean YV12 > RGB, or YV12 > YUY2?
However, if you consider that DVDs use YV12 and they look quite good then the loss is usually considered very acceptable.
Well, the only DVD material I'll be making is from DV > MPEG-2, so it's only going to look as good as my filtered/enhanced DV.
The main conversion issues are to do with handling interlaced material (from a camcorder or live TV) and converting that into a YV12 colourspace (or the other way) - this can be a nightmare.
So interlaced DV (as you say is YUV) uploaded onto the PC and filtered, and in turn, converted to YV12 for overall compatibility with other filters (any other factors I am unaware of) isn't a very good dream to doze off to? :confused:
stickboy
3rd January 2005, 20:44
Originally posted by State of Mind
YV12 is usually the fastest (uses smallest memory/frame) but there can be a quality loss when converting from RGB or YUY2.You mean YV12 > RGB, or YV12 > YUY2?Both. YV12 has less chroma data than either RGB or YUY2.
tsp
3rd January 2005, 22:00
Originally posted by stickboy
You mean YV12 > RGB, or YV12 > YUY2?Both. YV12 has less chroma data than either RGB or YUY2.
also it's easier to code filters for YV12 because it's a planar colorspace (the chroma and luma information isn't packed for each pixel). This speeds some of the filter up because it doesn't need to unpack the data to proces it and afterwards pack it.
Also if you would like to se the difference from converting between colorspace you can use a script like this:
subtract(last,last.converttoyv12().converttorgb32())
if your source is RGB32.
State of Mind
4th January 2005, 02:25
My friend reminded me that RGB to YV12 causes "color bleeding". Is there anyway to minimize this?
Also, I am not in it for speed, I am in it for quality, so ways to minimize this would be great. I suppose the ideal thng for me would be if all the filters I planned to use supported RGB. :p
So...anything?
Leak
4th January 2005, 08:34
Originally posted by State of Mind
Also, I am not in it for speed, I am in it for quality, so ways to minimize this would be great. I suppose the ideal thng for me would be if all the filters I planned to use supported RGB. :p
Not really. DV is stored as YUY2 to begin with, so your best bet would be a codec that outputs YUY2 (I believe ffdshow can handle that) and a YUY2 (or YV12, if the codec you'll use for encoding only stores YV12) filter chain.
State of Mind
4th January 2005, 08:45
Ok, since it is YUY2 to begin with, if I use FFDShow to allow playback instead of installing Panasonic/Canpus/MC DV Codec, will this preserve the YUY2 color space? Do people only say it's RGB because of the codecs traditionally and commonly used to allow playback (the three just mentioned)? For DVD, I'd obviously be encoding DV > MPEG-2. For AVI, XviD. Is a filter chain a series of filters that support YUY2 allowing preservation of the color space? Does XviD output YUY2? Thanks for your replies, Leak.
Cheers,
Jeremy
Leak
4th January 2005, 09:23
Originally posted by State of Mind
Ok, since it is YUY2 to begin with, if I use FFDShow to allow playback instead of installing Panasonic/Canpus/MC DV Codec, will this preserve the YUY2 color space?
As long as you don't disable YUY2 output in ffdshow, yes.
Also, if you're using VirtualDub, make sure to use "fast recompress" so VD won't convert it to RGB either.
Do people only say it's RGB because of the codecs traditionally and commonly used to allow playback (the three just mentioned)?
Well, every output device you're displaying it on is using RGB, but for storage and processing YUV is better suited than RGB.
For DVD, I'd obviously be encoding DV > MPEG-2. For AVI, XviD.
Which both use YV12 internally, so you can just convert to YV12 somewhere in your filter chain.
Is a filter chain a series of filters that support YUY2 allowing preservation of the color space? Does XviD output YUY2?
Well, XviD and MPEG decoders will probably output to almost any colorspace you want, but YV12 is the native colorspace for them. (Okay, MPEG2 also supports colorspaces without or with less chroma subsampling, but I don't think those can be used on DVDs...)
stephanV
4th January 2005, 09:33
Isnt DV 4:1:1 for NSTC and 4:2:0 for PAL? not YUY2?
Wilbert
4th January 2005, 10:06
Isnt DV 4:1:1 for NSTC and 4:2:0 for PAL? not YUY2?
Yup, Leak has it wrong. Note however (State of Mind), since nothing (avisynth, vdub) supports 4:1:! you should request YUY2 (or RGB) from the DV codec.
Do people only say it's RGB because of the codecs traditionally and commonly used to allow playback (the three just mentioned)?
Some DV codecs can deliver YUY2 or RGB, some of them only RGB (see DV sticky in DV forum). In both cases the DV codec itself converts YV12 to YUY2/RGB.
State of Mind
4th January 2005, 16:58
Originally posted by Wilbert
Yup, Leak has it wrong. Note however (State of Mind), since nothing (avisynth, vdub) supports 4:1:1 you should request YUY2 (or RGB) from the DV codec.
Some DV codecs can deliver YUY2 or RGB, some of them only RGB (see DV sticky in DV forum). In both cases the DV codec itself converts YV12 to YUY2/RGB.
I'd like to use FFDShow to allow playback and not have to install a DV Codec, I hear this is better/convenient. And if I do it through FFDShow, there isn't any automatic colorspace (YUY2/YV12 > RGB) conversion, is there? I would prefer to "request" YUY2 to retain as much quality as humanly possible. :D
Mug Funky
4th January 2005, 17:15
start > ffdshow > configuration > output > select your favourite colourspace.
i have YV12 disabled because my hardware deinterlace doesn't do the chroma properly. if i output in YUY2 it does it right.
however, in VfW mode, i have it decode in YV12, as i'm in PAL land and don't have to deal with gakky 4:1:1.
State of Mind
4th January 2005, 17:54
Yeah, I know people don't like NTSC but it's what I've got so I have to deal with it. Video still looks beautiful, but I know there are many disadvantages. That's life. Thanks for the instructions. :)
State of Mind
9th January 2005, 22:19
Do DVD Players support YUY2? If not than its a lost battle to bother try staying in that color space if its not hardware supported. I am just worried about "color bleeding".
Edit - Just re-read the beginning of the thread. DVD Players use YV12. So YUY2 > YV12...is it that much of a quality loss? I'm so picky about maximum quality.
stickboy
9th January 2005, 22:54
YV12 has half the chroma information. It's usually not easily noticeable given how human perception works.
If your destination format is DVD, you don't have a choice anyway.
State of Mind
10th January 2005, 11:20
Well, the same cannot be said for XviD compressed copies. At least there I will be able to keep the original colorspace.
stephanV
10th January 2005, 11:57
XviD uses YV12 internally as well. I think most codecs do.
State of Mind
10th January 2005, 12:16
Yes, but I thought if I went through FFDShow to select favorite colorspace as instructed by Mug Funky, I would be able to output in YUY2...
stickboy
10th January 2005, 12:33
That doesn't change the fact that your destination format still will be YV12. Decoder settings won't affect the data actually stored in the video.
stephanV
10th January 2005, 12:35
yes but that still requires a conversion from YV12 to YUY2. :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.