Tuesday, February 26, 2008

Blu-ray Audio Codecs

(Note: this post contains some unfortunate errors and omissions. For a corrected update, see Blu-ray Audio Codecs Revisited. Also, I have edited this post to remove one of the worst mistakes.)

Now that Blu-ray has kayoed HD DVD in their two-year war and has been accepted as the dominant high-definition disc format, many Blu-ray buyers will want to know about the many types of audio tracks that can appear on Blu-ray discs.

The two most basic types are Dolby Digital and Linear PCM. Every Blu-ray disc must contain one or both of these. Every Blu-ray player must be able to decode both.

Dolby Digital encoding, or DD, is capable of compressing up to 5.1 channels of digital audio: front right and left, front center, two side/rear channels, and one Low Frequency Effects channel. LFE (the .1 in 5.1) contains low bass information.

DD is found on DVDs, and is sometimes referred to as AC-3. It is a "lossy" compression codec. A codec is a "compression/decompression" algorithm that takes raw, uncompressed data — in this case, digital audio data — and compresses it for storage/transmission, and later restores it to (something close to) its original form. If the codec is lossy, the restored version is only something like its original form. The differences between the original and the reconstructed version may or may not be subtly noticeable. If the codec is "lossless," the restored version is identical to the original.

Linear PCM isn't, strictly speaking, a codec, because it is simply a way of representing the digital audio data in its original form, without compression. Blu-ray discs often contain an LPCM audio track of up to 7.1 channels. The added two channels, in addition to the usual 5.1, represent extra channels for speakers positioned in the very rear of the listening room. Frequently, if an LPCM track is present on a Blu-ray disc, there is no DD track, and none is needed. LPCM is the gold standard of Blu-ray audio, since it's uncompressed and easy to decode. Its only drawback is that it takes up a great deal of space on a disc.

Optional on Blu-ray discs is DTS Digital Surround (lossy, up to 5.1 channels). From DTS rather than Dolby Labs, it is an alternate way to do what DD does. Its aficionados call it superior because (among other things) it uses higher bitrates than DD. [Edit: Although DTS is an optional codec on Blu-ray discs, Blu-ray players must be able to decode DTS if it does appear on the disc.]

Some DVDs have DTS soundtracks in addition to DD. As on DVDs, DTS is an optional codec on Blu-ray discs. It may or may not be present. Any codec that is optional on Blu-ray discs is also optional on Blu-ray players.

[Edit: Some codecs are not only optional on Blu-ray discs, support for them by Blu-ray players is also optional.] This means the player need not be equipped to use an optional codec at all. Or, it can optionally pass the audio track just as recorded on the disc to an external audio/video receiver for decoding. This is referred to as "bitstream" output, since the bitstream that is recorded on the disc is simply passed along via a digital HDMI connection to the outboard receiver. The outboard receiver must then decode it.

Finally, the Blu-ray player may actually decode a soundtrack that has been recorded on the disc using an optional codec, just as it decodes a DD or linear PCM track. When it does this, it converts the soundtrack on the disc (if it's not linear PCM already) to linear PCM, which is then sent via a digital HDMI connection to an outboard receiver or TV.

Most Blu-ray players can also output in analog form 5.1-channel sound from audio tracks it has decoded, in addition to outputting it in digital form on HDMI.


Two other codecs from Dolby Labs are optional on Blu-ray discs. One of these is Dolby Digital Plus (DD+). It is an extension of lossy Dolby Digital that offers up to 7.1 channels of sound, instead of the usual 5.1. Also, there is Dolby TrueHD, for truly lossless digital audio of up to 7.1 channels.

As with the Dolby family, there are two high-res codecs offered by DTS. DTS-HD High Resolution Audio is equivalent to DD+ in offering lossy compression of up to 7.1 channels. DTS-HD Master Audio is the DTS version of lossless, up-to-7.1-channel compression.

Soundtracks using any or all of these optional codecs may appear on any given disc title, in addition to DD and/or linear PCM.

Every Blu-ray disc title must have at least one of those two forms of audio track present: Dolby Digital or linear PCM (often referred to as "LPCM" or just "PCM"). All other forms of soundtrack are, again, optional on the disc. The player can simply ignore them, or pass them along as bitstreams, or use an onboard decoder to decode them.

Every Blu-ray disc title must have at least one of these three forms of audio track present: Dolby Digital, DTS, or linear PCM (often referred to as "LPCM" or just "PCM"). All other forms of soundtrack are, again, optional for the player to decode. The player can simply ignore them, or pass them along as bitstreams, or use an onboard decoder to decode them.


In some cases, Blu-ray players that decode soundtracks to linear PCM and output them on HDMI, or decode them to analog form for output that way, pass along only some of the audio information from the disc: the so-called "core" version of the audio track in question.

For example, there are some Blu-ray players that are capable of reading in DD+ (or Dolby TrueHD) from a Blu-ray disc but decoding just the "core" 5.1-channel Dolby Digital track, which means that the two extra channels that differentiate DD+ (or TrueHD) 7.1 from DD 5.1 are thrown away. Also thrown away and not decoded or used is the extra information that makes the rear channels of DD 5.1 yet more lifelike in DD+ (or TrueHD) than in DD (even if the two extra channels are not used). The extra channels and extra audio information that get thrown away form an "extension" to the "core" audio track. That's why it is easy to throw them away.

Likewise, some Blu-ray players strip DTS-HD High Resolution or DTS-HD Master Audio down to just plain "core" DTS and decode that.

The earliest player models quite often "cheated" in this way. More recent player models tend to decode the various optional codecs — if at all — without stripping away any information.

Anyone who is concerned to get all the advantages of high-res audio optionally offered on Blu-ray discs, either now or in the future, will want to shop carefully to make sure their chosen player either can decode every standard or optional Blu-ray codec without sacrificing any information, or can at least pass it along untouched in its original bitstream form for external gear to decode.

3 comments:

Anonymous said...

Hi, I thought normal DTS was a mandatory part of BD spec? Wikipedia and bluray.com seem to think so... http://www.blu-ray.com/faq/#bluray_audio_codecs can you confirm? Many thanks.

eric said...

anonymous,

You are absolutely right, and my original post was wrong. DTS audio is mandatory for Blu-ray players to decode ... though it is optional from the point of view of the disc itself. If a DTS track appears on the disc, the player must be able to decode it.

Thanks for pointing out my mistake! I'm going to edit my original post to get rid of the error.

Anonymous said...

thanks for doing this, educational for us