Sunday, July 08, 2007

Future-Proof Home Theater Audio

As I mentioned in Aiming Towards a New Living Room TV, I'm contemplating a new living room home theater, minimalist-style. That means I'll eschew having multichannel sound. The audio channels from my TiVo Series3 DVR and from the high-def disc player I'll eventually get will pass to the TV and its internal speakers, for now.

That does not, however, mean I won't someday add in a home theater audio system. Which means I need to bear in mind what the future of home theater audio will be.

That future is spelled out in the standards for the two competing high-def disc formats, HD DVD and Blu-ray, as complemented by the new HDMI 1.3 standard for routing digital audio/video signals from source equipment like disc players to receiving equipment like HDTVs and A/V receivers.

In what follows, I'm going to abbreviate "high-definition disc formats" as HDDFs.

The two HDDFs, HD DVD and Blu-ray, are alike in that they both support a multiplicity of audio codecs. A codec is basically a digital encoding-decoding format for, in this case, digital audio. There are also a number of codecs for digital video.

Each disc, in either of the HDDFs or as a "regular" DVD, contains at least one — and often several — digital audio streams; for instance, a movie's soundtrack in a given codec will constitute one stream. On a regular, non-high definition DVD, the soundtrack will usually be encoded as Dolby Digital 5.1. That means there are five digital audio channels, plus one (the ".1") containing "low frequency effects" only in the bass range. The five full-frequency channels are front-left, front-center, front-right, and two side/rear "surround sound" channels.

Somewhere along the line, DD 5.1 acquired the alternate name "AC-3." But never mind ... by whatever name, the "encoding side" of the DD 5.1 or AC-3 codec is used to define the stream of computer bits and bytes to be recorded on the disc. Then, as the disc player reads the disc, the codec's "decoding side" separates out the 5.1 channels and, if you don't have a multichannel home theater setup, mixes them into two stereo analog (i.e., non-digital) channels for output to a TV that cannot decode DD 5.1.

If you have a multichannel home theater setup, the disc player can output fully six channels (including the ".1" LFE channel) of analog audio to it. Or, it can delegate the "decoding side" responsibility to the multichannel home theater receiver. In that case, the original DD 5.1 audio stream, read straight from the disc, is sent directly to the receiver for decoding. Nowadays, an HDMI connection between the player and the receiver typically carries the output DD 5.1 bitstream.


What happens when there's no DD 5.1 stream on the DVD? Actually, that almost never happens, since DD 5.1 is one of two codecs that every DVD made for sale in the United States has to support at least one of. The other is so-called linear PCM, where PCM stands for pulse code modulation.

Historically, linear PCM audio streams were typically stereo, not multichannel; they are what have long been used on CDs. They were (and remain) digital, not analog. As "linear" digital encodings, they are, unlike DD 5.1, not digitally compressed ... so encoding and decoding them is a snap. Because they are uncompressed, they are "lossless." Where "lossy" compression codecs like DD 5.1 discard audio information which hopefully your ears will never miss, lossless encoding sidesteps the risk of over-enthusiastic compression entirely.

But they use up a lot more of the available bits on the DVD. You'll find few DVDs with linear PCM tracks for that reason.


Actually, I need to slightly qualify the idea that linear PCM is always lossless. If the original recording from which the linear PCM track on a disc is derived has a higher sampling frequency or greater bit depth, the track on the disc has less resolution than the original.

Linear PCM encoding involves treating each sound channel as a rising and falling electronic waveform whose amplitude is sampled several thousand times per second — the sampling frequency. Each amplitude is expressed as a binary number requiring a certain number of 0's and 1's — the bit depth or sample resolution.

Sampling rate or frequency for CDs is usually 44.1 kilohertz (thousands of samples per second). For DVDs and HDDFs, it can be 48 kHz, 96 kHz, or 192 kHz.

Sampling resolution — bit depth — is typically 16, 24, or 32 bits per sample, although other resolutions are sometimes used. Accordingly, the overall resolution of a linear PCM track can be stated briefly. For example, you may find 48 kHz/16-bit resolution (which is typical on DVDs) or 96 kHz/24-bit (common in HDDFs).

But if the overall resolution of the source soundtrack exceeds that of the disc track in either of its two key parameters, the linear PCM disc track has in effect been compressed, and cannot really be called lossless.

Likewise, if there is a 96 kHz/24-bit linear PCM track on the disc but the player downsamples it to 48 kHz/16-bit, a lossy compression has in effect been done within the player itself.


So ... most regular DVDs have DD 5.1 tracks, but few have linear PCM at all. Many DVDs supplement their DD 5.1 tracks, however, with tracks encoded using an optional audio codec called Digital Theater System, or DTS. DTS is, like DD 5.1, a 5.1-channel surround sound format. If there's a DTS track on a particular DVD, it will be selectable via a menu in lieu of the standard DD 5.1 track. Many DVD players can decode DTS internally. Virtually all can export it as-is to an external receiver for decoding.

Again, that is typically done today via an HDMI digital audio/video connection — a single cable that carries both digital audio and digital video. The receiver is typically responsible for grabbing the digital audio for its own internal use, while forwarding the digital video stream to the TV.


Older equipment did it a different way. The digital video stream was sent directly from the disc player to the TV via an HDMI cable or its now-obsolete predecessor, DVI. (DVI used a different kind of plug at each end of its cable and could not carry audio information.) Meanwhile, the digital audio stream was routed to the A/V receiver via a dedicated digital-audio conduit, which could be either "optical" or "coaxial."

All of which points up a general principle: whatever digital-audio codecs are present on a DVD or an HDDF (HD DVD or Blu-ray disc) need to have one of two things happen to them:

  1. The one that is automatically chosen by the player, or that is optionally selected by the user, has to be decoded internally by the player, or,
  2. The one that is automatically chosen by the player, or that is optionally selected by the user, has to be routed as-is to external equipment for decoding.

Actually, there is a third possibility. (I never told you this couldn't get confusing.) The player can "transcode" the digital audio from the disc, converting it into a different codec or format. That almost never happens with regular DVDs played by regular DVD players, but with the new HDDFs it tends to happen more often.

For instance, Blu-ray and HD DVD each support, at least optionally, certain new audio codecs that offer superior sound to DD 5.1, DTS, or even 2.0-channel linear PCM.

I'll use the new Dolby TrueHD codec as an example. Dolby TrueHD, like DD 5.1, was developed by Dolby Laboratories. Like DD 5.1, it's compressed, not linear. But unlike DD 5.1, the compression scheme is lossless. Accordingly, the result can be noticeably better sound.

Dolby TrueHD can contain many more sound channels than the 5.1 of Dolby Digital — up to 14! The Blu-ray and HD DVD standards allow up to 8 of the 14 to be used on a disc, in up to a "7.1" configuration where the ".1" again refers to the LFE, bass-only channel. Or, more commonly today, TrueHD 5.1 can be encoded on the disc.

But HD DVD players are allowed to "downmix" those 5.1 or 7.1 channels into just two stereo channels. For example, if there is a TrueHD 5.1 audio track on a disc, the player is not absolutely required to output it as such. Instead, the player can transcode it into TrueHD 2.0. (In fact, I am given to understand that no current HD DVD players actually do downmix TrueHD 5.1 to TrueHD 2.0, but it is legal.)

As for Blu-ray players, they don't necessarily even have to recognize Dolby TrueHD tracks, however many or few the number of channels contained therein. Dolby TrueHD tracks are strictly optional on BD-ROMs, the official name of Blu-ray discs. Dolby TrueHD is a mandatory codec on HD DVDs; all discs must use it, and all players must output it, if only in downmixed form.

Again, to repeat, Dolby TrueHD is an optional codec on BD-ROMs, and not all Blu-ray players have to be able to deal with it at all.


Another transcoding option legally utilized by Blu-ray and HD DVD players is to decode, say, Dolby TrueHD into multichannel linear PCM. Instead of sending out just 2.0-channel, stereo LPCM, all 5.1 or 7.1 channels encoded as Dolby TrueHD on a disc are decoded inside the player and shipped out to an external receiver in an uncompressed digital-audio stream having an equal number of channels ... again via HDMI.

Multichannel LPCM involves a huge bitrate. The "bitrate" measures how many bits per second have to pass from the player to the receiver. Because the bitrate is so high with multichannel LPCM, a new HDMI standard — called "version 1.3" — needs to be supported by both the player and the receiver ... either that, or the multichannel LPCM bitrate has to be curtailed, by downsampling, to fit within the limit supported by HDMI 1.2.

Downsampling, as mentioned earlier, involves lowering the bit depth of the linear PCM samples from, say, 24 bits to 16 bits. Or it can involve changing the sampling frequency from, say, 24 kHz to 16 kHz.

Downsampling causes a loss in audio quality. In future-proofing a home theater audio system today, one should buy nothing but HDMI 1.3-compatible gear that is comfy with high-bitrate, multichannel LPCM.


The reason why will become apparent when you consider the three other new audio codecs you're apt to run into on Blu-ray or HD DVD discs: Dolby Digital Plus, DTS-HD High Resolution, and DTS-HD Master Audio.

Before I discuss each of them, I'd like to point out some general things about them:

  • Some of them are "mandatory"; the rest are only "optional"
  • Which ones are "mandatory" depends on the disc format, HD DVD or Blu-ray
  • A format's "mandatory" codecs must be supported by every player for that format
  • Each disc must use one or more of the format's "mandatory" codecs

For example, the new Dolby Digital Plus (DD+) codec is mandatory for HD DVD but only optional for Blu-ray.

So every HD DVD player must be able to "use" a DD+ audio track if there's one recorded on the disc — provided, that is, that the track's bitrate does not exceed 1.7 million bits per second (1.7 Mbps). (The bitrate of a digital audio track tells the maximum number of bits per second the player is expected to be able to accept and decode.)

Here, "use" apparently means having the ability to, at minimum, extract and decode a 2.o-channel analog stereo waveform from a TrueHD bitstream. That waveform can drive the analog stereo audio outputs of the player. Or it can be re-encoded as 2.0-channel LPCM and delegated to an outboard receiver for decoding and use.

So, if more than two channels — up to 7.1 — happen to be present in a DD+ audio track on HD DVD, it can legally be "downmixed" (transcoded) by the player into just 2.0-channel form. That qualifies as "using" the track.

Of course, most or all real-world HD DVD players can do more than that with Dolby Digital Plus bitstreams. Many of the HD DVD players can pass the Dolby Digital Plus bitstreams through, undecoded, to an external receiver which will decode and use them to drive speakers.

Many of the players can also "unpack" (transcode) Dolby Digital Plus bitstreams to multichannel linear PCM to be sent to an outboard receiver via HDMI 1.3. That's why I said above that in future-proofing a home theater audio system today, one should buy nothing but HDMI 1.3-compatible gear that is onboard with high-bitrate, multichannel LPCM.

Finally, yet another way for the player to "use" a Dolby Digital Plus bitstream is to convert it to (up to) six analog channels to be output on a group of six RCA jacks included on the player. There can be three front channels, two surround channels, and one LFE channel output in analog form by these six multichannel audio jacks. A Dolby Digital Plus bitstream can be decoded and used to feed those jacks, which in turn feed an A/V receiver with suitable 6-channel inputs.

The six analog jacks in question are separate from the two analog jacks on the player that carry only downmixed 2.0-channel stereo. However, it stands to reason that most players that "use" a Dolby Digital Plus bitstream to drive their six multichannel analog outputs will also downmix the bitstream for their two analog stereo output jacks.


Accordingly, these are the various things a given high-def disc player may be able to do with any given audio bitstream on a disc it is playing, whether the bitstream is Dolby Digital Plus or otherwise:

  • Ignore it (not allowed if the bitstream's codec is "mandatory" for the disc format)
  • Pass it through undecoded to external gear
  • Transcode it to, say, multichannel linear PCM and route it to external gear that way
  • Use it to drive the player's own 2.0-channel and/or 5.1-channel analog audio output jacks (required if the bitstream's codec is "mandatory" for the disc format)


What a Blu-ray player does with Dolby Digital Plus bitstreams, should any be present on a disc, is equally free-form. The player can simply ignore the bitstream, since DD+ is "optional" for Blu-ray. The player can pass the original digital bitstream as-is to outboard gear for decoding and handling. The player can unpack it to multichannel linear PCM for digital output. Or the player can convert it for analog multichannel output and/or downmix it for analog stereo output.

The straight pass-through option means the external gear has to be able to decode Dolby Digital Plus bitstreams, of course. When you widen that scenario to include the other two codecs I've yet to discuss, DTS-HD High Resolution and DTS-HD Master Audio, you can see that today's A/V receivers need to incorporate a lot of codecs to be absolutely future-proof.

Alternatively, a receiver that handles any variety of multichannel linear PCM the disc player throws its way covers all bases — provided the disc player can transcode to multichannel linear PCM any audio track on any disc it can play, without compromising the overall resolution of the original audio track in terms of its bit depth and sampling frequency.

(I'm getting tired of repeating "multichannel linear PCM" ... from now on, it's MLPCM.)

MLPCM can be thought of as an umbrella codec that can take the transcoded digital audio from any original codec on any disc and render it usable by the receiver. (Again, there may be issues of downsampling to a lower overall resolution than that of the original audio stream.)


DTS-HD High Resolution and DTS-HD Master Audio are two new codecs from the folks who brought you DTS: Digital Theater Systems, a company that is rival to Dolby Labs.

The main difference between DTS-HD High Resolution and DTS-HD Master Audio is that the former uses lossy digital compression, while the latter's compression is lossless.

DTS-HD High Resolution (HR) and DTS-HD Master Audio (MA) each piggyback on the original DTS codec in such a way that each represents an "extension" to the "core" DTS. That is, a HR bitstream consists of a "core" DTS stream to which is added extra data, for more realistic sound and/or extra channels. An MA bitstream simply adds to that "extended" amount of HR data yet more data, for completely lossless audio.

Presently, all HD DVD and Blu-ray players can read full DTS-HD Master Audio bitstreams (which would include all DTS-HD High Resolution bitstreams, if any were present on discs). But they all merely discard the "extension" data and decode only the DTS "core" soundtrack, at up to a bitrate limit of 1.5 Mbps.

A better alternative would be to have the players ship DTS-HD Master Audio bitstreams as-is to external gear for decoding. I confess to not knowing which if any current HD DVD and Blu-ray players can do that.

Another fine alternative would be to have the player unpack DTS-HD Master Audio bitstreams to MLPCM for external use. It is not clear that any Blu-ray or HD DVD players can do that today. I imagine none can: if a player can't decode full DTS-HD Master Audio bitstreams, it surely can't transcode them.


I don't, by the way, consider full DTS-HD Master Audio support crucial in a future-proof home theater audio system. It and the lesser DTS-HD High Resolution codec (which, as far as I can tell, has been totally ignored by disc creators so far) are, after all, optional for both the HD DVD and the Blu-ray formats. You may never come across a disc that has either of them. And if you do, chances are the disc will also have the "equivalent" Dolby format as well: Dolby TrueHD, for DTS-HD Master Audio; Dolby Digital Plus, for DTS-HD High Resolution.

Furthermore, it looks as if all players from both camps will continue to be able to extract "core" DTS from the more advanced DTS codecs, into the foreseeable future — even though the ability to do so is, technically, strictly optional.


So there you have it. Each new high-def disc format supports a welter of old and new audio codecs, some of which offer more than 5.1 channels and/or lossless data compression. Depending on the format, these codecs can be mandatory or optional. Within each format, every disc must contain at least one of the mandatory audio codecs, and every player must be able to "use" every mandatory codec.

Codecs which are "used" by a player can optionally simply be downmixed for, say, 2.0-channel analog stereo output — not good enough, in my estimation, in a future-proof system.

Or, they can be converted to multichannel analog output (up to six channels including LFE). That's fine if you receiver can input it ... and if you don't mind running six wires between the player and the receiver. (But if you have one HD DVD player and one Blu-ray player, to cover both formats, good luck in finding a receiver that can accept multichannel analog inputs from both.)

Or, they can be output to external gear for decoding, without necessarily being decoded within the player. That's fine, too, as long as the external gear has a suitable decoder.

Or, they can optionally be unpacked within the player to multichannel linear PCM. That requires that the player be able to transcode its supported codecs to MLPCM, and that the external gear be able to decode MLPCM. It also needs a fast, HDMI 1.3 signal path.

Accordingly, MLPCM transcoding by players, MLPCM decoding and use by receivers, and HDMI 1.3 would seem to be the three indispensable attributes of a truly future-proof home theater system.

***

(There is a table in the Wikipedia article on HD DVD that lists which audio codecs are supported, either optionally or manditorily, by HD DVD, Blu-ray, and DVD. Click here to scroll to the "HD DVD/Blu-ray disc comparison," then scroll down a bit further to see the table.)

No comments: