YUV422 format & byte order

YUV422: 16 bits/pixel packed YUV format. Y is sampled at every pixel, U and V are sampled at every second pixel horizontally.
1. Three main formats (the illustration uses little endian?)
  • UYVY (Y422, UYNV, HDYC)
    • The difference between HDYC and others (UYVY, Y422, UYNV) is: the RGB space of HDYC is defined in BT.709, rather than BT470 series (the latest one: BT470.7)
    • Different RGB color spaces is distinguished by defining different values for three primary colors and a white point.
    • NTSC, PAL, SECAM follows BT470. HDTV follows BT.709.
  • YUY2
  • YVYU
    • just different byte ordering.
2. bits per channel: 8 bit, 16 bit or 10 bit
 10/16 bit YUV formats use a fixed-point representation for both the luma channel and the chroma channels. Sample values are scaled 8-bit values, using a scaling factor of 2^(n-8), when n = 10 or 16.
10-bit formats also use 16 bits for each channel, with the lowest 6 bits set to zero ((little endian in the graph below)
Diagram showing 10-bit representation
The precision conversions can be performed using simple bit shifts. E.g. If 8-bit value is 235, the corresponding 10-bit format is 235×4=940
3. Byte order/endianness
BT656 transmit order: U–Y–V–Y.
If the receiving hardware (especially DMA) is configured to use little endian, U/Cb will be written to the lowest byte, followed by Y, then V, then Y at the upper most byte.
If the receiving hardware only supports big endian, U will be written to the upper most byte, …with Y at the lowest byte.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s