Dolby Audio Decoder

The Dolby audio decoder is a Media Foundation transform (MFT) that decodes the following stream types:

  • Dolby Digital, also called Dolby AC-3
  • Dolby Digital Plus, also called Enhanced AC-3 (E-AC-3)

Important  For versions of Windows prior to Windows 8, the Microsoft implementation of the Dolby Digital technology is restricted under terms of the Dolby Digital licensing program to use by Microsoft applications.

For more information about these formats, refer to Advanced Television Systems Committee (ATSC) document Digital Audio Compression Standard (AC-3, E-AC-3) Revision B.

The decoder can also convert a Dolby Digital Plus stream to Dolby Digital format for AC-3 S/PIDF output, or format a Dolby Digital Plus stream for HDMI digital output.

Class Identifier

The class identifier (CLSID) of the Dolby audio decoder is CLSID_CMSDDPlusDecMFT, defined in the header file wmcodecdsp.h.

Input Types

The Dolby audio decoder supports the following input subtypes.

SubtypeDescriptionHeader
MEDIASUBTYPE_DOLBY_AC3Dolby Digital audio.mfapi.h
MEDIASUBTYPE_DVMDolby Digital audio; see Audio Subtypes. This subtype can be used interchangeably with MEDIASUBTYPE_DOLBY_AC3.wmcodecdsp.h
MFAudioFormat_Dolby_Digital_Plus Dolby Digital Plus audio.mfapi.h

 

The following table lists the requires and optional attributes for the input media type.

AttributeDescriptionRemarks
MF_MT_MAJOR_TYPE Major type.Required. Must be MFMediaType_Audio.
MF_MT_SUBTYPE Audio subtype.Required. See the previous table for details.
MF_MT_AUDIO_SAMPLES_PER_SECOND Sample rate, in samples per second.

Optional. Valid values are: 48000, 44100, 32000, 24000, 22050, and 16000. If this attribute is not set, the default value is 48000.

Note  Dolby AC-3 streams are limited to the three highest rates in this list.

MF_MT_AUDIO_NUM_CHANNELS Number of channels, including the low frequency (LFE) channel, if present. Optional. Valid values are in the range 1 (mono) to 8 (7.1 channel configuration). If this attribute is not set, the default value is 2 (stereo).
MF_MT_AUDIO_CHANNEL_MASK Specifies the assignment of audio channels to speaker positions. Optional. If specified, the value must be consistent with the number of audio channels. If the attribute is not set, the decoder uses a default channel mask, based on the number of channels.

 

The following table lists the supported Dolby channel configurations.

Channel configurationNumber of channelsChannel masks
1/0 (mono)10x4 (SPEAKER_FRONT_CENTER)
2/0 (stereo) or 1+1 (dual mono)20x3 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
3/03 0x7 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER)
2/13 0x103 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_CENTER)
3/14 0x107 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
2/24

0x33 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)

or

0x603 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)

3/25

0x37 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)

or

0x607 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)

3/2 + LFE6

0x3F (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)

or

0x60F (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)

3/2/2 + LFE

Note  Dolby Digital Plus only.

80x63F (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)

 

In addition, channel configurations 1/0, 2/0, 3/0, 2/1, 3/1, and 2/2 may also appear with an LFE channel.

Output Types

The Dolby audio decoder supports the following output subtypes.

SubtypeDescriptionHeader
MFAudioFormat_Dolby_AC3_SPDIFDolby AC-3 audio formatted for S/PDIF digital output.mfapi.h
KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUSDolby Digital Plus audio formatted for HDMI digital output.ksmedia.h
MFAudioFormat_Float IEEE 32-bit floating-point PCM audio (stereo or 5.1).mfapi.h
MFAudioFormat_PCM16-bit PCM audio (stereo or 5.1).mfapi.h

 

The following table lists the required and optional attributes for the output media type.

AttributeDescriptionRemarks
MF_MT_MAJOR_TYPE Major type.Required. Must be MFMediaType_Audio.
MF_MT_SUBTYPE Audio subtype.Required. See the previous table for details.
MF_MT_AUDIO_SAMPLES_PER_SECOND Sample rate, in samples per second.Required. Valid values are: 48000, 44100, 32000, 24000, 22050, and 16000. The output sample rate must be identical to the input sample rate. The decoder cannot change the sampling rate of the stream.
MF_MT_AUDIO_NUM_CHANNELS Number of channels, including the low frequency (LFE) channel, if present.

Required for PCM output.

Not needed for digital output.

If the input type is mono, stereo, or dual-mono (all without LFE channel), the only valid value is 2, for stereo output. Otherwise, the value can be either 2, for stereo downmix, or 6 for 5.1 channel configurations.

MF_MT_AUDIO_CHANNEL_MASK Specifies the assignment of audio channels to speaker positions.

Required for PCM output if the number of channels is greater than 2. The value must be either 0x3 for stereo output, or 0x3F for 5.1 channel output.

Not needed for digital output.

MF_MT_AUDIO_BITS_PER_SAMPLE Number of bits per audio sample.

Required for PCM output. The value must be 32 for MFAudioFormat_Float, and 16 for MFAudioFormat_PCM.

Not needed for digital output.

MF_MT_AUDIO_VALID_BITS_PER_SAMPLE Number of valid bits of audio data in each audio sample.

Optional for PCM output. If set, the value must be identical to MF_MT_AUDIO_BITS_PER_SAMPLE.

Not needed for the digital output subtypes.

MF_MT_AUDIO_BLOCK_ALIGNMENT Block alignment, in bytes.Optional for PCM output. Not needed for digital output.
MF_MT_AUDIO_AVG_BYTES_PER_SECOND Average number of bytes per second.Optional for PCM output. Not needed for digital output.

 

Transform Attributes

The Dolby audio decoder implements the IMFTransform::GetAttributes method. The application can use this method to get or set the following attributes.

AttributeDescription
CODECAPI_AVDecAudioDualMono

Specifies whether a 2-channel Dolby audio stream is encoded as stereo or dual-mono. Before the first Dolby frame is decoded, the value is eAVDecAudioDualMono_UnSpecified. After decoding begins, the value reflects the most recent Dolby frame.

Read-only.

CODECAPI_AVDecAudioDualMonoReproMode

Specifies how the decoder reproduces dual-mono audio. The default value is eAVDecAudioDualMonoReproMode_LEFT_MONO. The application can set this property at any time.

Read/write.

CODECAPI_AVDecCommonMeanBitRate

For Dolby Digital (AC-3) streams, specifies the bit rate of the input stream in bits per second. For Dolby Digital Plus (E-AC3), the value is always zero.

Read only.

CODECAPI_AVDecDDDynamicRangeScaleHigh

The high-level cut when the decoder performs dynamic range control.

Read/write.

CODECAPI_AVDecDDDynamicRangeScaleLow

The low-level boost when the decoder performs dynamic range control.

Read/write.

CODECAPI_AVDecDDOperationalMode

The compression control mode.

Read/write.

CODECAPI_AVDecDDStereoDownMixMode

The type of stereo downmix. This property applies when the input is a multichannel stream and the output is a stereo stream.

Read/write.

MFT_SUPPORT_DYNAMIC_FORMAT_CHANGE

This attribute returns FALSE, indicating that the decoder must be drained before a new input type is set.

Read/write.

 

Remarks

The decoder accepts only raw Dolby streams, as defined by A/52B. Payloads such as Packetized Elementary Streams (PES) are not supported. For Dolby Digital Plus, the decoder decodes up to 5.1 channels. If the stream is 7.1 channels, only the 5.1 channel downmix will be decoded. If the stream is Dolby Digital Plus with more than one independent substream, only independent substream 0 is decoded. The decoder skips other independent substreams. In addition, the decoder skips all dependent substreams. The decoder supports decryption and decoding of streams that are protected by Digital Rights Management (DRM) technology.

If the input media type has a channel configuration other than mono, stereo, or dual-mono (all without LFE channel), the decoder provides two options for the output channel configurations:

  • 6-channel output (5.1 channel configuration)
  • Stereo downmix

If stereo downmix is selected, the type of downmix can be set on the MFT by using the CODECAPI_AVDecDDStereoDownMixMode property.

If the output type is MFAudioFormat_Dolby_AC3_SPDIF, each output buffer contains 6,144 bytes. The buffer starts with an 8-byte S/PDIF header, followed by a compressed AC-3 frame, followed by zero padding to 6,144 bytes.

If the output type is KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUS, each output buffer contains 24,576 bytes. The buffer starts with an 8-byte S/PDIF header, followed by 1–6 compressed Dolby Digital Plus frames corresponding to 1,536 PCM samples, followed by zero padding to 24,576 bytes. For HDMI output, only independent substream 0 is packed.

The decoder MFT is registered with the flag MFT_ENUM_FLAG_FIELDOFUSE, which indicates that the MFT that must be unlocked by the application before use. For more information, see Field of Use Restrictions.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

None supported [desktop apps | Windows Store apps]

DLL

Msauddecmft.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft