YCbCr 4:2:2: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
 
(add YUV2 as FourCC; add samples link)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
* FourCCs: YUY2, UYVY
* FourCCs: YUY2, UYVY, YUV2 (Apple Component Video stored in [[MOV]] files)
* Samples: http://samples.mplayerhq.hu/V-codecs/YUV2/


YUV 4:2:2 is a packed [[YUV]] format in which a pair of consecutive pixels is represented by 1 Y sample each but share a U sample and a V sample.
(These FourCC names only reflect that the YCbCr of digital media is often falsely mixed up with analog PAL's YUV color space.)
 
YCbCr 4:2:2 is a packed [[YCbCr]] format in which a pair of consecutive pixels is represented by 1 Y sample each but share a Cb sample and a Cr sample.


This type of data may be packaged in a container format with a a FourCC of YUY2 which indicates the following byte formatting:
This type of data may be packaged in a container format with a a FourCC of YUY2 which indicates the following byte formatting:


   Y0 U Y1 V
   Y0 Cb Y1 Cr
 
The first pixel is a a function of (Y0, Cb, Cr) and the second pixel is a function of (Y1, Cb, Cr). Alternately, the FourCC UYVY is used to indicate YCbCr 4:2:2 data with a byteswapped order:


The first pixel is a a function of (Y0, U, V) and the second pixel is a function of (Y1, U, V). Alternately, the FourCC UYVY is used to indicate YUV 4:2:2 data with a byteswapped order:
  Cb Y0 Cr Y1


  U Y0 V Y1
For trivia, the 2 in YUY2 most likely refers to the number of bytes needed to represent a single pixel. Since 4 bytes represent 2 pixels, an average of 2 bytes are required to represent a single pixel in this scheme.


[[Category:YUV Formats]]
[[Category:YCbCr Formats]]
[[Category:Pixel Formats]]

Latest revision as of 00:14, 12 December 2008

(These FourCC names only reflect that the YCbCr of digital media is often falsely mixed up with analog PAL's YUV color space.)

YCbCr 4:2:2 is a packed YCbCr format in which a pair of consecutive pixels is represented by 1 Y sample each but share a Cb sample and a Cr sample.

This type of data may be packaged in a container format with a a FourCC of YUY2 which indicates the following byte formatting:

 Y0 Cb Y1 Cr

The first pixel is a a function of (Y0, Cb, Cr) and the second pixel is a function of (Y1, Cb, Cr). Alternately, the FourCC UYVY is used to indicate YCbCr 4:2:2 data with a byteswapped order:

 Cb Y0 Cr Y1

For trivia, the 2 in YUY2 most likely refers to the number of bytes needed to represent a single pixel. Since 4 bytes represent 2 pixels, an average of 2 bytes are required to represent a single pixel in this scheme.