View Full Version : Can YUY2 store 4:1:1 losslessly?
shae
26th June 2008, 21:12
I always forget what these annoying notations mean...
Is YUY2 4:2:2? Would 4:1:1 not lose chroma data when stored as YUY2?
(BTW, is there no RGB mode for ffdshow HuffYUV)?
JohnnyMalaria
26th June 2008, 21:51
It would be the other way around. 4:2:2 has 2 chroma samples per 4 luma samples vertically and horizontally. 4:1:1 has one chroma sample per 4 luma samples. Hence, YUY2 would simply duplicate each 4:1:1 chroma sample in each direction.
Dark Shikari
26th June 2008, 22:13
It would be the other way around. 4:2:2 has 2 chroma samples per 4 luma samples vertically and horizontally. 4:1:1 has one chroma sample per 4 luma samples. Hence, YUY2 would simply duplicate each 4:1:1 chroma sample in each direction.Actually, it would probably upscale the chroma with a resizing filter, so not exactly.
shae
26th June 2008, 22:19
Searching some more, I found 4:1:1 is 4 horizontal pixels per chroma vs 4:2:2's 2 h pixels, so it should do.
Dark Shikari: You mean the 4:1:1 might get interpolated before being output as 4:2:2?
Dark Shikari
26th June 2008, 22:20
Searching some more, I found 4:1:1 is 4 horizontal pixels per chroma vs 4:2:2's 2 h pixels, so it should do.
Dark Shikari: You mean the 4:1:1 might get interpolated before being output as 4:2:2?The encoder will convert your 4:1:1 to 4:2:2 before encoding. This probably isn't a problem.
JohnnyMalaria
26th June 2008, 22:42
Actually, it would probably upscale the chroma with a resizing filter, so not exactly.
That depends on the colorspace conversion implementation. I was being purist :)
shae
26th June 2008, 22:51
The encoder will convert your 4:1:1 to 4:2:2 before encoding. This probably isn't a problem.Unless it's being fed 4:2:2 (which is the likely case since most codecs accept YUY2).
akupenguin
27th June 2008, 08:44
BTW, is there no RGB mode for ffdshow HuffYUV?
I don't know what's enabled in ffdshow, but libavcodec huffyuv supports RGB.
henryho_hk
29th June 2008, 03:46
i really love the clear illustrations on this site: http://www.mir.com/DMG/chroma.html
shae
29th June 2008, 05:16
The illustration are nice. But it'd be nicer to have a few comparison shots of actual frames. :)
JohnnyMalaria
29th June 2008, 17:58
The illustration are nice. But it'd be nicer to have a few comparison shots of actual frames. :)
That can be difficult since to see the frames, the data have to be converted to RGB which, in turn, depends on the algorithm used (i.e., blend, interpolate etc).
henryho_hk
30th June 2008, 06:56
Try these: http://www.nattress.com/Chroma_Investigation/chromasampling.htm
Not exactly the same topic but you will get the idea.
henryho_hk: That's an interesting page.
Thanks all.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.