YUV Video Subtypes

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

YUV formats are categorized according to the following information:

Packed formats versus planar formats. In a packed format, the Y, U, and V components are stored in a single array. Pixels are organized into groups of macropixels, whose layout depends on the format. In a planar format, the Y, U, and V components are stored separately, as three planes.

Chroma sampling. A notation called the A:B:C notation is used to describe how often U and V are sampled relative to Y:

  • 4:4:4 means no downsampling of the chroma channels.
  • 4:2:2 means 2:1 horizontal downsampling, with no vertical downsampling. Every scan line contains four Y samples for every two U or V samples.
  • 4:2:0 means 2:1 horizontal downsampling, with 2:1 vertical downsampling.
  • 4:1:1 means 4:1 horizontal downsampling, with no vertical downsampling. Every scan line contains four Y samples for every U or V sample. 4:1:1 sampling is less common than other formats, and is not discussed in detail in this article.

Bits per channel. The most common sample sizes are 8, 10, or 16 bits per sample. Some YUV formats are palettized.

Memory layout. Two YUV format types can be otherwise identical but use different orderings for the Y, V, and U samples in memory.

Recommended YUV Formats

GUID Format Sampling Packed or planar Bits per channel
MEDIASUBTYPE_AYUV AYUV 4:4:4 Packed 8
MEDIASUBTYPE_YUY2 YUY2 4:2:2 Packed 8
MEDIASUBTYPE_UYVY UYVY 4:2:2 Packed 8
MEDIASUBTYPE_IMC1 IMC1 4:2:0 Planar 8
MEDIASUBTYPE_IMC3 IMC2 4:2:0 Planar 8
MEDIASUBTYPE_IMC2 IMC3 4:2:0 Planar 8
MEDIASUBTYPE_IMC4 IMC4 4:2:0 Planar 8
MEDIASUBTYPE_YV12 YV12 4:2:0 Planar 8
MEDIASUBTYPE_NV12 NV12 4:2:0 Planar 8

 

For a description of theses YUV formats for video rendering on Windows, see Recommended 8-Bit YUV Formats for Video Rendering .

Other YUV Format Types

GUID Format Sampling Packed or planar Bits per channel
MEDIASUBTYPE_I420 I420 4:2:0 Planar 8
MEDIASUBTYPE_IF09 No longer supported.
Indeo YVU9
No longer supported.
See remarks.
No longer supported.
Planar
No longer supported.
8
MEDIASUBTYPE_IYUV IYUV 4:2:0 Planar 8
MEDIASUBTYPE_Y211 Y211 See remarks. Packed 8
MEDIASUBTYPE_Y411 Y411 4:1:1 Packed 8
MEDIASUBTYPE_Y41P Y41P 4:1:1 Packed 8
MEDIASUBTYPE_YVU9 YVU9 See remarks. Planar 8
MEDIASUBTYPE_YVYU YVYU 4:2:2 Packed 8

 

  • I420 consists of a Y plane, followed by a U plane, followed by a V plane.

  • IYUV is identical to I420.

  • Y211 is a packed format, in which Y is sampled every 2 pixels horizontally, and U and V are sampled every 4 pixels horizontally. Each macropixel is 4 bytes and contains 4 pixels. It uses the following byte order:

    Y0 U0 Y2 V0    Y4 U4 Y6 V4    Y8 U8 Y10 V8

  • Y41P is a 4:1:1 packed format. It uses the following byte order:

    U0 Y0 V0 Y1    U4 Y2 V4 Y3    Y4 Y5 Y6 Y7

  • YVU9 is a planar format, in which U and V are sampled every 4 pixels horizontally and vertically (sometimes referred to as 16:1:1). The V plane appears before the U plane.

  • The Indeo YVU9 format (MEDIASUBTYPE_IF09) is a variation of YVU9 with additional delta-frame information after the U plane. The Indeo codec is no longer supported in Windows.

  • YVYU is similar to UYVY with a different byte order: Y0 V0 Y1 U0

  • The Indeo codec is no longer supported in Windows.

Requirements

Requirement Value
Header
Dshow.h

See also

Recommended 8-Bit YUV Formats for Video Rendering

Video Subtypes

Working with Video Frames