Freigeben über


MPEG4 Part 2 Video Decoder

The MPEG4 Part 2 Video decoder decodes video streams that were encoded according to the MPEG4 Part 2 standard.

You can create an instance of the MPEG4 Part 2 Video decoder by calling CoCreateInstance. To create an instance of the decoder that behaves as a DirectX Media Object (DMO), use the class identifier CLSID_CMpeg4sDecMediaObject. To create an istance of the decoder that behaves as a Media Foundation Transform (MFT), use the class identifier CLSID_CMpeg4sDecMFT.

Input Types

The MPEG4 Part 2 Video decoder supports the following input media types.

  • MEDIASUBTYPE_M4S2
  • MEDIASUBTYPE_m4s2
  • MEDIASUBTYPE_MP4V
  • MEDIASUBTYPE_mp4v
  • MEDIASUBTYPE_MP4S (deprecated)
  • MEDIASUBTYPE_mp4s (deprecated)

Output Types

The MPEG4 Part 2 Video decoder supports the following output media subtypes when it is acting as a DMO.

  • MEDIASUBTYPE_YV12
  • MEDIASUBTYPE_NV12
  • MEDIASUBTYPE_YUY2
  • MEDIASUBTYPE_UYVY
  • MEDIASUBTYPE_YVYU
  • MEDIASUBTYPE_NV11
  • MEDIASUBTYPE_RGB32
  • MEDIASUBTYPE_RGB24
  • MEDIASUBTYPE_ RGB565
  • MEDIASUBTYPE_RGB555
  • MEDIASUBTYPE_RGB8

The MPEG4 Part 2 Video decoder supports the following output media subtypes when it is acting as an MFT.

  • MEDIASUBTYPE_NV12
  • MEDIASUBTYPE_YV12

Formats

The MPEG4 Part 2 Video decoder accepts the following formats.

  • VIDEOINFOHEADER
  • VIDEOINFOHEADER2 (VIH2)
  • MFVideoInfo
  • MPEG2VIDEOINFO (Only the VIH2 portion of the header is used.)

Interfaces for the DMO

If you create an instance of the MPEG4 Part 2 Video decoder as a DMO, the decoder exposes the following interfaces.

  • IMediaObject
  • ICodecAPI

You can obtain an IMediaObject interface by calling CoCreateInstance, and you can obtain an ICodecAPI interface by calling QueryInterface.

Interfaces for the MFT

If you create an instance of the MPEG2 Part 2 Video decoder as an MFT, the decoder exposes the following interfaces.

  • IMFTransform
  • IMFAttributes
  • IMFQualityAdvise
  • IMFQualityAdvise2
  • IMFRateControl
  • IMFRateSupport

You can obtain an IMFTransform interface by calling CoCreateInstance, and you can obtain an IMFAttributes interface by calling IMFTransform::GetAttributes. You can obtain an IMFQualityAdvise or IMFQualityAdvise2 interface by calling QueryInterface. You can obtain an IMFRateControl or IMFRateSupport interface by calling MFGetService and passing the service identifier MF_RATE_CONTROL_SERVICE.

Profiles and Levels

The MPEG4 specification defines several profiles, each of which specifies the tools that an encoder can use to generate an encoded stream. The MPEG4 Part2 Video Decoder supports two of those profiles: Simple Visual Profile and Advanced Simple Profile. In other words, the MPEG4 Part 2 Video decoder can decode streams that were encoded according to either the Simple Visual Profile or the Advanced Simple Profile.

The Simple Visual Profile supports basic transmission of low bit-rate video in progressive mode. It supports only Intra and Prediction pictures. It also supports the short header mode, which is backward compatible with the H.263 baseline profile.

The Advanced Simple Profile supports all the tools of the Simple Visual Profile and, in addition, supports interlaced video, B-frames, quarter-pel motion compensation, additional quantization tables, and global motion compensation.

The MPEG4 specification also defines several levels, each of which specifies constraints on the output stream generated by an encoder.

The following table shows the profiles and levels, along with typical resolutions, supported by the MPEG4 Part 2 Video decoder.

Profile Level Typical Resolution
Simple Visual 0 176 x 144
Simple Visual 1 176 x 144
Simple Visual 2 352 x 288
Simple Visual 3 352 x 288
SimpleVisual 4a 640 x 480
Simple Visual 5 720 x 576
Advanced Simple 0 176 x 144
Advanced Simple 1 176 x 144
Advanced Simple 2 352 x 288
Advanced Simple 3 352 x 288
Advanced Simple 3b 352 x 288
Advanced Simple 4 352 x 756
Advanced Simple 5 720 x 576

 

For more information about profiles and levels, see the MPEG4 Part 2 specification (ISO/IEC 14496-2): Information technology -- Coding of audio-visual objects -- Part 2: Visual.

Decoder Properties

To set properties on the MPEG4 Part 2 Video decoder, use the ICodecAPI interface or the IMFAttributes interface.

The MPEG4 Part 2 Video decoder supports the following properties.

Property Description
CODECAPI_AVDevVideoSWPowerLevel

Specifies the power level for the decoder.

Windows 7. Write-only.
CODECAPI_AVDecVideoThumbnailGenerationMode

Specifies the thumbnail generation mode for the decoder.

Windows 7. Write-only.

 

Remarks

The globally unique identifiers (GUIDs) for RGB media subtypes differ depending on whether a decoder is acting as a DMO or an MFT. The GUIDs for non-RGB media subtypes are the same, regardless of whether a decoder is acting as a DMO or an MFT. For information about the GUIDs that represent media subtypes, see Media Subtype GUIDs.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Header

Wmcodecdsp.h

DLL

MP4SDecd.dll

See Also

Codec Objects

 

 

Send comments about this topic to Microsoft

Build date: 4/7/2010