Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Display Modes
Old 2nd August 2009, 02:45   #1  |  Link
thewebchat
Advanced Blogging
 
Join Date: May 2009
Posts: 480
Explanation of YUV X:X:X notation

I know that the different YUV chroma sub-sampling formats are given the notation 4:x:x, with YUY2 being 4:2:2 and YV12 being 4:2:0. My question is, what does this numerical notation indicate? I have read the YUV article on Wikipedia, but it does not explain what this notation means.
thewebchat is offline   Reply With Quote
Old 2nd August 2009, 04:00   #2  |  Link
linyx
Un-Registered User
 
linyx's Avatar
 
Join Date: Mar 2008
Location: Audio Stream - 0x80
Posts: 341
I'm a noob, so this might be wrong, But:

The numbers represent the vertical resolutions given to the Luminance and Chrominance of a color space.

The first number usually represents the Luminance (Y), the second represents the Blue minus the Luminance (Cb), while the third represents the Red minus the Luminance (Cr). Green minus the Luminance is not stored becuase it can be calculated by subtracting the Cb & Cr from Y.

So for something like 4:2:2, each pixel would have a Luminance sample, but only 2 out of every four (vertical & horizontal; so truly only 1/4 of the pixels are given a color sample) would have a Cb and Cr sample. The exception is 4:2:0 which should really be 4:0:0

It can be illustrated like such for a 4:2:0 colorspace:
0=Y
1=Y+Cb+Cr

Code:
1    0

0    0
4:4:4 would be:
Code:
1    1

1    1
Most of this was roughly copied from "H.264 and MPEG-4 Video Compression."
linyx is offline   Reply With Quote
Old 2nd August 2009, 11:17   #3  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
The first digit represents the number of horizontal pixels we're considering. Although this can have any value it always seems to be 4. It's also implicit that we're looking at two lines at a time. So with the first digit as 4 it means that we have a 4x2 (horizontal by vertical) block of pixels.

The second digit indicates how many chroma samples are taken from the top line of each block of pixels, and the third digit indicates how many are taken from the bottom line.

e.g. 4:2:2 results in each chroma sample representing a 2x1 block of pixels - 2 samples per line of four pixels.

Code:
x represents a chroma sample, o doesn't

xo|xo
xo|xo
4:2:0 results in each chroma sample representing a 2x2 block of pixels as the bottom line value is 0.

Code:
xo|xo
oo|oo
And 4:1:1 would be:

Code:
xooo
xooo
Hope this makes sense!

Last edited by TinTime; 2nd August 2009 at 11:22. Reason: Added another example
TinTime is offline   Reply With Quote
Old 2nd August 2009, 14:42   #4  |  Link
thewebchat
Advanced Blogging
 
Join Date: May 2009
Posts: 480
Thank you, TinTime, your post cleared this up for me.
thewebchat is offline   Reply With Quote
Old 3rd August 2009, 04:17   #5  |  Link
unnikrisb4u
Registered User
 
Join Date: Nov 2008
Location: India
Posts: 13
That was a wonderful explanation. Thanks for Information
unnikrisb4u is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.