General Information About Pixel Formats

Article translations Article translations
Article ID: 294880 - View products that this article applies to.
This article was previously published under Q294880
Expand all | Collapse all

On This Page

SUMMARY

There are different methods for representing color and intensity information in a video image. The video format that a file uses to store this information is also known as the pixel format. When you convert a file to Windows Media Format, some pixel formats are recommended over others to maintain high content quality. There are two major types of pixel formats. They are classified as YUV and RGB pixel formats.

MORE INFORMATION

YUV Pixel Format

YUV Color System is a color-encoding scheme for natural pictures in which the luminance (the black-and-white component of a video signal that controls the light intensity) and chrominance (the color component of the video signal) are separate. The human eye is less sensitive to color variations than to intensity variations, so YUV allows the encoding of luminance (Y) information at full bandwidth and chrominance (UV) information at half bandwidth.

YUV formats are subdivided into two more groups: packed and planar. In the packed format, the Y, U, and V components are stored in a single array. The three components packed into what is known as a macropixel (two pixels stored in one unsigned integer value). Conversely, the planar format stores these components in three separate arrays and combines the planes to form the image.

The variations in the different YUV samples are based on how data is sampled, both in the horizontal and vertical directions. The horizontal subsampling interval describes how frequently across a line that a sample of that component is taken, and the vertical interval describes on which lines samples are taken. For example, if the format has a horizontal subsampling period of 2 for both the U and V components, it indicates that U and V samples are taken for every second pixel across a line. If the vertical subsampling period is 1, it indicates that U and V samples are taken on each line of the image.

RGB Pixel Format

The primary colors in color video are red, green, and blue (RGB). RGB is often used to describe a type of video color-recording scheme and the type of equipment that uses it. It also describes a type of computer color display output signal comprising separately controllable red, green, and blue signals (as opposed to composite video, in which signals are combined before output). RGB monitors typically offer higher resolution than composite monitors.

Recommended Pixel Formats

The following list contains the recommended pixel formats (in order of preference), and a brief description of the format:
  1. IYUV/I420 (planar 4:2:0 or 4:1:1) Comprised of an NxN Y plane followed by (N/2)x(N/2) U and V planes. This format draws a top-down image (for example, the first line is at the top of the screen).

    Collapse this tableExpand this table
    Horizontal Subsampling
    Interval
    Vertical Subsampling
    Interval
    Y Component11
    U Component22
    V Component22

  2. YV12 (planar 4:2:0 or 4:1:1) Identical to IYUV/I420 except that the U and V planes are switched. This is usually the pixel choice for many MPEG codecs.

  3. YUY2 (packed 4:2:2) Specifications claim this is a top-down image, although not all drivers follow the specifications properly. In some instances, this can lead to an inverted image when the video is played back. This problem can also be seen in other packed formats such as UYVY and YVYU, which are not PC99 compliant. For more information see the following KB Article:
    269967 Video Appears Upside Down When You Use AVI File as Source File
    The YUY2 format effectively stores 16 bits per pixel.

    Collapse this tableExpand this table
    Horizontal Subsampling
    Interval
    Vertical Subsampling
    Interval
    Y Component11
    U Component21
    V Component21

    The data is stored as (Y0-U0-Y1-V0)(Y2-U2-Y3-V2)(Y4-U4-Y5-V4) and so on.

    NOTE: () represents 1 megapixel

  4. UYVY (packed 4:2:2) Very similar to YUY2 except in the ordering of the data.

    Collapse this tableExpand this table
    Horizontal Subsampling
    Interval
    Vertical Subsampling
    Interval
    Y Component11
    U Component21
    V Component21

    The data is stored as (U0-Y0-V0-Y1)(U2-Y2-V2-Y3)(U4-Y4-V4-Y5) and so on.

    NOTE: () represents 1 megapixel

  5. YVYU (packed 4:2:2) Also, very similar to YUY2 except for the ordering of the data.

    Collapse this tableExpand this table
    Horizontal Subsampling
    Interval
    Vertical Subsampling
    Interval
    Y Component11
    U Component21
    V Component21

    The data is stored as (Y0-V0-Y1-U0)(Y2-V2-Y3-U2)(Y4-V4-Y5-U4) and so on.

    NOTE: () represents 1 megapixel

  6. RGB 24 Specifies a pixel format with 24 bits per pixel (bpp). An individual pixel is represented by 3 bytes. The blue intensity is the lowest order byte, followed by green, and then red. There is no padding between pixels.

  7. RGB 32 Very similar to RGB 24 except that each pixel is padded. Although this uses more memory, it is usually easier to process by graphics cards.

  8. RGB 15/16 This RGB format is based on 5 bpp (RGB 5:5:5), yielding 32,786 colors. RGB 16 uses RGB 5:6:5 ratio yielding 65,536 colors.

  9. YVU9 (planar 16:1:1) Comprised of an NxN plane of Y samples, 8 bits each, followed by (N/4)x(N/4) V and U planes. This format draws a top-down image.

    Collapse this tableExpand this table
    Horizontal Subsampling
    Interval
    Vertical Subsampling
    Interval
    Y Component11
    U Component44
    V Component44

  10. RGB 8 Each pixel is represented by 1 byte. This gives a total of 256 colors.

REFERENCES

For more information about YUV and RGB pixels, visit the following Conexant Web site:
http://www.webartz.com/fourcc/

Properties

Article ID: 294880 - Last Review: November 26, 2003 - Revision: 2.2
APPLIES TO
  • Microsoft Windows Media Services 4.1
  • Microsoft Windows Media Player 6.4
  • Microsoft Windows Media Player 7.0
  • Microsoft Windows Media Player 7.1
  • Microsoft Windows Media Encoder 7.0
  • Microsoft Windows Media Encoder 7.1
  • Microsoft Windows Media Encoder 8.0
Keywords: 
kbinfo KB294880

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com