Düzenle

Aracılığıyla paylaş


Video Subtype GUIDs

The following video subtype GUIDs are defined in the header file mfapi.h. To specify the subtype, set the MF_MT_SUBTYPE attribute on the media type.

When these subtypes are used, set the MF_MT_MAJOR_TYPE attribute to MFMediaType_Video.

Uncompressed RGB Formats

GUID Description
MFVideoFormat_RGB8 RGB, 8 bits per pixel (bpp). (Same memory layout as D3DFMT_P8.)
MFVideoFormat_RGB555 RGB 555, 16 bpp. (Same memory layout as D3DFMT_X1R5G5B5.)
MFVideoFormat_RGB565 RGB 565, 16 bpp. (Same memory layout as D3DFMT_R5G6B5.)
MFVideoFormat_RGB24 RGB, 24 bpp.
MFVideoFormat_RGB32 RGB, 32 bpp.
MFVideoFormat_ARGB32 RGB, 32 bpp with alpha channel.
MFVideoFormat_A2R10G10B10 RGB, 10 bpp for each color and 2 bpp for alpha. (Same memory layout as D3DFMT_A2B10G10R10)
MFVideoFormat_A16B16G16R16F RGB, 16 bpp with alpha channel. (Same memory layout as D3DFMT_A16B16G16R16F)

 

Note

These subtypes do not match the RGB subtype GUIDs used in previous SDKs, such as DirectShow.

 

YUV Formats: 8-Bit and Palettized

GUID Format Sampling Packed or planar Bits per channel
MFVideoFormat_AI44 AI44 4:4:4 Packed Palettized
MFVideoFormat_AYUV AYUV 4:4:4 Packed 8
MFVideoFormat_I420 I420 4:2:0 Planar 8
MFVideoFormat_IYUV IYUV 4:2:0 Planar 8
MFVideoFormat_NV11 NV11 4:1:1 Planar 8
MFVideoFormat_NV12 NV12 4:2:0 Planar 8
MFVideoFormat_NV21 NV21 4:2:0 Planar 8
MFVideoFormat_UYVY UYVY 4:2:2 Packed 8
MFVideoFormat_Y41P Y41P 4:1:1 Packed 8
MFVideoFormat_Y41T Y41T 4:1:1 Packed 8
MFVideoFormat_Y42T Y42T 4:2:2 Packed 8
MFVideoFormat_YUY2 YUY2 4:2:2 Packed 8
MFVideoFormat_YVU9 YVU9 8:4:4 Planar 9
MFVideoFormat_YV12 YV12 4:2:0 Planar 8
MFVideoFormat_YVYU YVYU 4:2:2 Packed 8

 

The recommended YUV formats are described in detail in the topic Recommended 8-Bit YUV Formats for Video Rendering.

Note

I420 and IYUV have the same layout in memory, but are assigned distinct subtype GUIDs. The subtype GUIDs correspond to the FOURCC codes 'I420' and 'IYUV'; see Video FOURCCs for more information.

 

YUV Formats: 10-Bit and 16-Bit

GUID Format Sampling Packed or planar Bits per channel
MFVideoFormat_P010 P010 4:2:0 Planar 10
MFVideoFormat_P016 P016 4:2:0 Planar 16
MFVideoFormat_P210 P210 4:2:2 Planar 10
MFVideoFormat_P216 P216 4:2:2 Planar 16
MFVideoFormat_v210 v210 4:2:2 Packed 10
MFVideoFormat_v216 v216 4:2:2 Packed 16
MFVideoFormat_v410 v40 4:4:4 Packed 10
MFVideoFormat_Y210 Y210 4:2:2 Packed 10
MFVideoFormat_Y216 Y216 4:2:2 Packed 16
MFVideoFormat_Y410 Y40 4:4:4 Packed 10
MFVideoFormat_Y416 Y416 4:4:4 Packed 16

 

For more information about these formats, see 10-bit and 16-bit YUV Video Formats.

Luminance and Depth Formats

GUID Description
MFVideoFormat_L8 8-bit luminance only. (bpp). (Same memory layout as D3DFMT_L8.)
MFVideoFormat_L16 16-bit luminance only. (Same memory layout as D3DFMT_L16.)
MFVideoFormat_D16 16-bit z-buffer depth. (Same memory layout as D3DFMT_D16.)

 

Encoded Video Types

GUID FOURCC Description
MFVideoFormat_DV25 'dv25' DVCPRO 25 (525-60 or 625-50).
MFVideoFormat_DV50 'dv50' DVCPRO 50 (525-60 or 625-50).
MFVideoFormat_DVC 'dvc ' DVC/DV Video.
MFVideoFormat_DVH1 'dvh1' DVCPRO 100 (1080/60i, 1080/50i, or 720/60P).
MFVideoFormat_DVHD 'dvhd' HD-DVCR (1125-60 or 1250-50).
MFVideoFormat_DVSD 'dvsd' SDL-DVCR (525-60 or 625-50).
MFVideoFormat_DVSL 'dvsl' SD-DVCR (525-60 or 625-50).
MFVideoFormat_H263 'H263' H.263 video.
MFVideoFormat_H264 'H264' H.264 video.
Media samples contain H.264 bitstream data with start codes and has interleaved SPS/PPS. Each sample contains one complete picture, either one field or one frame.
MFVideoFormat_H265 'H265' H.265 video.
MFVideoFormat_H264_ES Not applicable H.264 elementary stream.
This media type is the same as MFVideoFormat_H264, except media samples contain a fragmented H.264 bitstream. Each sample may contain a partial picture; multiple complete pictures; or one or more complete pictures plus a partial picture.
MFVideoFormat_HEVC 'HEVC' The HEVC Main profile and Main Still Picture profile.
Each sample contains one complete picture.
Supported in Windows 8.1 and later. The HEVC Main profile and Main Still Picture profile elementary stream.
MFVideoFormat_HEVC_ES 'HEVS' This media type is the same as MFVideoFormat_HEVC, except media samples contain a fragmented HEVC bitstream. Each sample may contain a partial picture; multiple complete pictures; or one or more complete pictures plus a partial picture.
Supported in Windows 8.1 and later.
MFVideoFormat_M4S2 'M4S2' MPEG-4 part 2 video.
MFVideoFormat_MJPG 'MJPG' Motion JPEG.
MFVideoFormat_MP43 'MP43' Microsoft MPEG 4 codec version 3. This codec is no longer supported.
MFVideoFormat_MP4S 'MP4S' ISO MPEG 4 codec version 1.
MFVideoFormat_MP4V 'MP4V' MPEG-4 part 2 video.
MFVideoFormat_MPEG2 Not applicable MPEG-2 video. (Equivalent to MEDIASUBTYPE_MPEG2_VIDEO in DirectShow.)
MFVideoFormat_VP80 'MPG1' VP8 video.
MFVideoFormat_VP90 'MPG1' VP9 video.
MFVideoFormat_MPG1 'MPG1' MPEG-1 video.
MFVideoFormat_MSS1 'MSS1' Windows Media Screen codec version 1.
MFVideoFormat_MSS2 'MSS2' Windows Media Video 9 Screen codec.
MFVideoFormat_WMV1 'WMV1' Windows Media Video codec version 7.
MFVideoFormat_WMV2 'WMV2' Windows Media Video 8 codec.
MFVideoFormat_WMV3 'WMV3' Windows Media Video 9 codec.
MFVideoFormat_WVC1 'WVC1' SMPTE 421M ("VC-1").
MFVideoFormat_420O '420O' 8-bit per channel planar YUV 4:2:0 video.
MFVideoFormat_AV1 'AV01' AV1 video.

 

Creating Subtype GUIDs from FOURCCs and D3DFORMAT Values

Video formats are often represented by FOURCCs or D3DFORMAT values. A range of GUIDs is reserved for representing these values as subtypes. These GUIDs have the form XXXXXXXX-0000-0010-8000-00AA00389B71, where XXXXXXXX is the 4-byte FOURCC code or D3DFORMAT value.

If a video format has an associated FOURCC or D3DFORMAT value, you can create the corresponding subtype GUID as follows: Start with the constant MFVideoFormat_Base and replace the first DWORD of the GUID with the video FOURCC or the D3DFORMAT value. You can use the DEFINE_MEDIATYPE_GUID macro for this purpose.

Note

DirectShow also uses this system for most video subtypes, but not for uncompressed RGB formats. Therefore, the RGB subtypes in DirectShow do not match the RGB subtypes in Media Foundation.

 

The D3DFORMAT enumeration is defined in the header file d3d9types.h. The following table shows the most common uncompressed RGB formats and the corresponding D3DFORMAT value.

RGB format D3DFORMAT value
32-bit RGB D3DFMT_X8R8G8B8
32-bit RGB with alpha channel D3DFMT_A8R8G8B8
24-bit RGB D3DFMT_R8G8B8
RGB 555 (16-bit RGB) D3DFMT_X1R5G5B5
RGB 555 with alpha channel D3DFMT_A1R5G5B5
RGB 565 (16-bit RGB) D3DFMT_R5G6B5
8-bit palettized RGB D3DFMT_P8
A2 R10 G10 B10 (32-bit RGB with alpha channel; 10 bits per RGB channel) D3DFMT_A2R10G10B10
A2 B10 G10 R10 (32-bit RGB with alpha channel; 10 bits per RGB channel) D3DFMT_A2B10G10R10
8-bit luminance only. D3DFMT_L8
16-bit luminance only. D3DFMT_L16
16-bit z-buffer depth D3DFMT_D16

 

For more information about FOURCCs, see Video FOURCCs.

IMFMediaType

Media Type GUIDs

MF_MT_SUBTYPE

Media Types

Video Media Types