Thursday, July 13, 2006

HD DVD vs. Blu-ray (Pt. V)

In HD DVD vs. Blu-ray (Pt. IV), I discussed what forms of audio output the first Toshiba HD DVD players, the HD-A1 and HD-XA1, are able to deliver. Now I'd like to talk about the audio outputs of the initial Blu-ray players: Samsung's BD-P1000, which is the Blu-ray format's debut machine; and Sony's BDP-S1, the second Blu-ray player on the market, just now reaching consumers for the first time.

My comments are decidedly preliminary. They are based in part on Samsung's BD-P1000 user's manual, downloadable here. They are also partly based on this online discussion of the first HD DVD and Blu-ray players, which outlines the audio capabilities of Sony's BDP-S1 ... since I can't find a Sony manual online to speak more authoritatively about this player.

I must also disclose that I have yet to read any authoritative reviews of the first Blu-ray discs (BDs) now on the market, so I am in the dark as to which codecs are actually being used to encode the audio tracks on these discs.


That being said, I gather that the first Blu-ray players have the same roster of audio output connections as the first HD DVD players:

  • 1 HDMI digital audio/video output jack, version 1.1
  • 1 ea., S/PDIF optical and coaxial digital audio outputs
  • 1 set, 5.1-channel analog audio outputs (6 RCA jacks)
  • 1 set, 2.0-channel (left-and-right stereo) analog audio outputs (2 RCA jacks)
The Blu-ray players also echo the HD DVD machines in making a basic distinction between "bitstream" and "PCM" outputs on the two digital audio connections, HDMI and S/PDIF.

In principle, "bitstream" refers to a succession of 1's and 0's, output in the original form in which they are encoded on a disc — no matter what codec was used to do the encoding. Nominally, a bitstream audio output simply delivers the original data stream from the disc to the player's output port, where it will be transported to outboard gear such as an AV receiver. The receiver is then responsible for decoding it and using it to drive its speakers.

If the audio bitstream is mixed with video, as it is on HDMI, an HDMI-capable receiver must forward the video portion of the signal — or else pass through the entire original signal, audio included — to the TV.

A bitstream audio stream is characteristically compressed; for example, Dolby Digital, Dolby Digital Plus, DTS, and DTS HD audio streams are all digitally compressed bitstreams. Specifically, those four types are compressed using "lossy" compresion schemes.

Dolby TrueHD and DTS HD Master are two other forms of digitally compressed audio bitstreams. They differ in being compressed using "lossless" compression schemes.

"PCM" refers to digital audio in the form of linear (uncompressed) pulse-code-modulated digital audio, which may be either 2-channel or multichannel (typically, multichannel PCM uses a maximum of 5.1 channels, but it's theoretically able to carry fully 7.1 channels). Linear PCM (or LPCM) tracks may appear as such on HD DVD and Blu-ray discs ... or the respective players may derive LPCM from other types of digital audio tracks which are present on the disc, and output the derived LPCM on the players' digital audio output ports.

Converted-to-analog LPCM audio is also the basis for the non-digital audio outputs, both 2-channel and multichannel, of these players.


5.1-channel Dolby Digital Plus appears to be the workhorse audio codec of the first spate of releases on Blu-ray's competitor, HD DVD. It's a lossy multichannel encoding method that nevertheless offers noticeably better sound than the original Dolby Digital codec, also lossy. But the online discussion of the BDP-S1 mentioned earlier says the Sony Blu-ray player won't decode Dolby Digital Plus or even pass it through for external decoding (scroll down to the table at the end to see what I mean). That is apparently true also of the Samsung BD-P1000, judging by its manual.

Apparently, the Sony and Samsung players restrict themselves to the three mandatory Blu-ray codecs:

  • Dolby Digital 5.1 (as found on standard DVDs)
  • DTS 5.1 (also as found on standard DVDs)
  • 5.1-channel PCM (I'm not clear on whether standard DVDs ever have this)
All of the new, high-definition "bitstream" codecs are optional, however, and as such are (as far as I can tell) not included on the first Blu-ray players:

  • Dolby TrueHD (lossless, from 2.0-channels up to 7.1 channels)
  • DTS HD Master (lossless, up to 5.1 channels)
  • Dolby Digital Plus (lossy, 5.1- or 6.1-channel)
  • DTS HD (lossy, 5.1-, 6.1-, or 7.1-channel, up to 3.0Mbps)
  • DTS HD "core" audio (lossy, 1.5Mbps 5.1-channel, compatible with current DTS 5.1 decoders)

(See HD DVD vs. Blu-ray (Pt. III) for more discussion of these.)

Not only can't the first Blu-ray players decode these formats, they can't (again, as far as I can tell) pass them through as bitstreams for decoding by external gear.


The first HD DVD players from Toshiba have the quirk that they can't actually pass through compressed, non-LPCM bitstreams from a disc to their digital audio outputs when the disc is authored using "advanced content." Instead, they transcode all bitstreams to DTS 5.1, in order to be able to interactively mix (say) menu-click sounds from a disc with a movie's soundtrack. Such interactive abilities are also called iHD, for "interactive HD."

I gather that the Blu-ray camp has something called BD-Java which I assume does the same kind of thing. Java, of course, is a computer language familiar to Web users for its "applets" which occasionally respond to mouse clicks in a browser window by performing some complex task. I assume BD-Java consists of applets on a disc that give the disc its interactive capabilities.

Conceivably, BD-Java might, like iHD for HD DVD players, limit the ability of Blu-ray players to pass through bitstreams on the disc.

In the HD DVD world, "advanced content" or iHD is present on every disc released in the U.S. so far, or so I understand, and looks to be a given on future releases as well. Unless future players provide more options for bitstream pass-throughs than the original Toshiba players do, it is hard so see how (say) a Dolby Digital Plus audio track on a HD DVD disc could ever be routed to an AV receiver for decoding and use, instead of an inferior-quality, player-derived DTS track.

I simply don't yet know whether similar limitations might affect Blu-ray players, now or in the future. If all I say above is correct, the first two Blu-ray players can't pass through compressed bitstreams other than Dolby Digital and/or DTS, so the question is for now somewhat moot. Future players will surely be able to decode more advanced bitstreams such as Dolby Digital Plus and DTS HD Master, and might be able to pass them through to outboard gear as well.

Or, again, there might be some limitation associated with BD-Java which will circumscribe audio bitstream pass-through in the way "advanced content" does with iHD. Only time will tell.




It is worthwhile at this point to pause and get firmly in mind that both HD DVD and Blu-ray players, in their initial, out-of-the-starting-gate incarnations, have apparent limitations with respect to passing through compressed digital audio bitstreams from files encoded on discs to the players' HDMI and S/PDIF digital output ports.

New, more data-intensive codecs such as Dolby Digital Plus and DTS HD offer better options for home-theater sound than their long-in-the-tooth predecessors, Dolby Digital and DTS. But they, along with their truly lossless cousins, Dolby TrueHD and DTS HD Master, require more bandwidth than optical and coaxial S/PDIF connections can muster. In short, they need HDMI.

Specifically, they need HDMI 1.3, the first HDMI version that will support their ilk. But HDMI 1.3 isn't ready for prime time, and the first HD DVD and Blu-ray players content themselves with implementing HDMI 1.1. (By the way, why no HDMI 1.2?)

Once HD DVD and Blu-ray players have HDMI 1.3, as do the AV receivers to which they will be connected, the players may need to come up with ways of passing through superior-format audio bitstreams from disc to the outboard receiver for decoding and use.

Right now, when HD DVD discs are authored with "advanced content"/iHD — as are all HD DVDs released in the U.S. so far — that can't happen with the first Toshiba players. The players turn all bitstream output into plain old DTS 5.1. I suspect that similar limitations apply to the first Blu-ray players as well.


Is there a workaround? One possibility is to set the player to output PCM, rather than bitstream audio, on HDMI. The player will take whatever sound files it is playing from the disc and decode them into 5.1-channel linear PCM at high resolution — 96 kHz on the Toshiba HD DVD players — and it will then output that form of digital audio on HDMI.

This supposedly works with HDMI 1.1. However, I understand that not all AV receivers that are nominally 1.1-compatible can actually handle multichannel PCM input on HDMI. For such receivers, if they can accept multichannel analog audio inputs, those inputs can be connected to the equivalent outputs on an HD DVD or Blu-ray player for much the same effect.

The secret here is that multichannel PCM, when output as such, is not re-compressed by the player. Imagine what happens when an HD DVD player reads a Dolby Digital Plus audio track from a disc. If it is set to send bistream audio out over HDMI, and if the disc has "advanced content," the player will expand the Dolby Digital Plus bitstream into linear PCM, and then it will re-compress the LPCM into DTS for output on HDMI (and on S/PDIF, for that matter).

At the other end of the HDMI cable, a receiver will then expand and use the DTS stream.

Decompressing, re-compressing, and re-decompressing an audio stream introduces errors due to the lossiness of the original compression (if it was lossy, as with Dolby Digital Plus) compounded by the lossiness of the re-compression (as with DTS).

But the use of linear PCM at every stage of the proceedings after the intial decompression has been accomplished avoids compounding the lossiness problem, since linear PCM is not compressed at all.


Conceivably, future players might also offer options to transcode (say) Dolby Digital Plus, not to linear PCM, but to a lossless codec, such as Dolby TrueHD, for output on HDMI. That would very likely be as satisfactory as expanding to LPCM, since no more bits would be lost in the transcoding than had been lost in the original Dolby Digital Plus compression.

But even if future players don't transcode to lossless-compression output modes, picky consumers may find that they're perfectly happy with the expansion of on-disc audio bitstreams to multichannel LPCM and their output as such over HDMI 1.3-and-later audio/video connections to compatible outboard gear. It may be that "bitstream" digital audio output modes will one day become relics of a dimly remembered past.


Wednesday, July 12, 2006

HD DVD vs. Blu-ray (Pt. IV)

The first HD DVD players on the market are the Toshiba HD-A1 and HD-XA1, models whose audio and video capabilities are basically identical. They have four ways to output audio: two digital and two analog.

Digital audio can be output on HDMI and/or on the S/PDIF optical and coaxial digital connections that have long been provided by standard DVD players. HDMI carries both digital video and digital audio. S/PDIF, just audio.

Analog audio can be output on a group of six RCA jacks that permit up to 5.1-channel multichannel sound to be sent to an AV receiver capable of handling it. Or, analog audio can be output on a pair of stereo RCA jacks for just 2-channel sound. In both cases, the analog audio output is derived from linear PCM (LPCM) digital audio, which in turn has been derived from whatever format the digital audio is encoded in on the disc.

First I'll discuss how these players handle the audio from regular DVDs. Then I'll go into how they deal with the audio from HD DVDs.


The Toshiba HD-A1 and HD-XA1 behave like ordinary DVD players when playing standard DVDs, with their up-to-5.1-channel Dolby Digital (DD) and/or DTS audio tracks, through the players' S/PDIF optical and coaxial digital connections: the players can be configured to forward the raw bitstream from the disc to a multichannel surround-sound AV receiver for decoding by the receiver. Or the players can convert the audio from the disc into a 2-channel linear PCM format for their S/PDIF outputs, if the receiver/amplifier is limited to two channels.

S/PDIF stands for "Sony/Philips Digital Interface." Optical and coaxial digital-audio outputs on standard DVD players and on HD DVD and Blu-ray players use S/PDIF.

DD and DTS from standard DVDs can likewise be output as raw bitstreams on HDMI, to be decoded by an HDMI-capable multichannel surround-sound AV receiver. But in the case of HDMI audio output, there are not one but two forms of LPCM output which can be selected. One, called "downmixed PCM," is the 2-channel linear PCM format mentioned above. (Are there any HDMI receivers which are just 2-channel?) The other, called "PCM," is meant to be used when the HDMI receiver is multichannel.

The assumption here is that any HDMI-capable receiver to which the Toshiba player is connected will be able to deal with linear PCM audio input on HDMI.

The 5.1-channel and 2-channel analog outputs of the HD-A1 and HD-XA1 receive non-downmixed and downmixed analog versions, respectively, of the up-to-5.1-channel DD and DTS tracks that are present on standard DVDs.


When using the Toshiba HD-A1/XA1 players to play audio from discs in the new HD DVD format, things get more complex.

The new disc format theoretically supports several new, high-definition audio codecs (coders/decoders). Multichannel linear (i.e., non-compressed) PCM (pulse code modulated) audio is one new possibility. Two other new multichannel options are Dolby TrueHD and DTS HD Master, both capable in theory of supporting up to 7.1 channels of losslessly compressed sound: the player restores every bit that was discarded in the compression process. Then there are (again, in theory) up-to-7.1-channel Dolby Digital Plus and DTS HD (without the "Master" designation). They too are compressed, but using a lossy compression scheme in which the player can't restore every bit.

Finally, there is DTS HD "core" audio, which is like DTS HD except that no more than 5.1 channels are allowed, and the top data rate is restricted to 1.5 million bits per second (Mbps), not 3 Mbps.

The first Toshiba HD DVD players don't permit more than 5.1 channels to be present on discs in any of these encoding formats. Linear PCM audio tracks cannot include more than 5.1 channels. These players won't handle any variant of DTS HD or DTS HD Master except the 5.1-channel, 1.5-Mbps "core" version of DTS HD. Dolby Digital Plus is likewise limited to 5.1 channels. Dolby TrueHD 5.1 input is limited to 2-channel (!) output only; multichannel Dolby TrueHD output is not supported.

The codecs listed above that in theory allow up to 7.1 channels are likewise restricted in practice to a maximum of 5.1 channels on all actual HD DVD disc releases to date.

You might think that the encoding formats and quantities of channels which the Toshiba players can't process internally would be able to be transmitted as raw bitstreams to outboard AV receivers and processors where they could be decoded and used. But, alas, no.


The Toshiba players can under certain circumstances output an HD DVD disc's raw audio bitstreams on S/PDIF and HDMI — see below.

But this apparently is not a possibility if the bitstreams utilize unsupported codecs or more than 5.1 channels. This limitation is admittedly hard to confirm, based on the initial disc releases and the often unclear information given in the Toshiba owner's manuals.

One reason it's hard to confirm is so-called "advanced content." All of the supported audio codecs listed above are in and of themselves considered to be the "standard content" of HD DVD discs. But going beyond those encodings, all HD DVDs so far released in the U.S. are authored with "advanced content," which is a way of letting the player mix more than one standard-content audio (or video) stream together into a single output audio (or video) stream.

Advanced-content audio allows sounds to play when you select menu items from the screen, even as an in-progress movie, with its own soundtrack, is being shown (and heard) beneath the menu overlay. Advanced content is also called iHD, for "interactive HD." Apparently, advanced content or iHD is considered to be present on a disc even if it's not being used — i.e., if no disc menus are currently displayed on the screen.

The first Toshiba HD DVD players respond to advanced-content audio streams by decoding the audio input streams, whatever their original formats, into multichannel (up to 5.1-channel) linear PCM. The decoded streams are then mixed together as necessary and output in one of a handful of forms.

The analog 5.1-channel RCA-jack outputs get analog versions of the multichannel digital PCM being streamed internally by the player. The analog 2-channel RCA jacks get the same content, downmixed to two analog channels.

The S/PDIF digital connections (optical and coaxial) can get (depending on which "Digital out S/PDIF" setting you choose in the player's on-screen menus) a bitstream that has been "transcoded" by the player to DTS — the kind of up-to-5.1-channel DTS long familiar on standard DVDs. Or they can get a digital, 2-channel linear PCM transcoding that, I believe, is downsampled as necessary to 48 kHz (48,000 digital samples per second).

The HDMI digital connection can, depending on the setting of another user-menu item, "Digital out HDMI," get either of those two, or it can get a digital, up-to-5.1-channel linear PCM transcoding at 96 kHz (96,000 digital samples per second). (Note that, unlike the S/PDIF digital connections, the HDMI output also carries a video bitstream, in addition to the audio stream.)

And that's it. Those are the only audio output options afforded by the Toshiba HD-A1 and HD-XA1 HD DVD players when playing an HD DVD disc that has been authored with advanced content.


If that's so, why did I say before that these Toshiba players can under certain circumstances output a HD DVD disc's raw audio bitstreams on S/PDIF and HDMI? The "circumstances" I had in mind occur when the players are playing discs without iHD/advanced content.

HD DVD discs don't necessarily have to be authored with advanced content. All U.S. HD DVD releases so far do have advanced content, so I hear, but rumor has it that Japanese HD DVD releases don't.

The Toshiba HD-A1 and HD-XA1 can ostensibly export raw audio bitstreams from non-advanced content HD DVD discs in their original form. Over S/PDIF, this ability is limited to Dolby Digital Plus and "DTS HD core" bitstreams. All other standard-content bitstreams are turned into 2-channel PCM, which is downsampled to 48 kHz, over S/PDIF. (You can force the latter behavior with Dolby Digital Plus and "DTS HD core" bitstreams as well, by setting "Digital out S/PDIF" to "PCM.")

Over HDMI, as opposed to S/PDIF, non-advanced content raw audio bitstreams from the disc can be exported as well. Again, this is just in the case of Dolby Digital Plus and "DTS HD core" encodings — as long as they are being sent to an HDMI-equipped receiver or processor that can decode them properly.

What is not entirely clear is whether these exported raw bitstreams can include, say, DTS HD Master, a codec that is not directly supported by the player. Also, can they include more than 5.1-channels? Probably the answer is no, in both cases.

In the absence of advanced content, the HDMI output of these Toshiba players can also carry 2-channel or multichannel linear PCM, depending on what's actually on the disc and how "Digital out HDMI" is set.

If what's on the disc is itself in the form of linear, multichannel PCM, it can be sent out over HDMI as such — except, apparently, if it's sampled at 192 kHz — not 48 kHz or 96 kHz — in which case it's reduced to 2-channel LPCM.

That emphasis on outputting linear, multichannel PCM in either digital or analog form is one reason why the Toshiba owner's manual states: "For Dolby Digital Plus and DTS HD (DTS Core only) multichannel audio playback [you need a] receiver or processor/amp combination with 5.1-channel analog input or HDMI multichannel LPCM-capable audio input."


Clearly, then, there are restrictions on what forms of digital audio can be sent out over S/PDIF and HDMI.

In the case of S/PDIF, the restrictions apparently come from limitations on the rates at which data can be transmitted over optical and coaxial digital connections.

With HDMI, higher data rates are nominally allowed, but limitations arise because the version of HDMI called HDMI 1.1 is the one being supported, not the new version, HDMI 1.3. Version 1.3 was not codified and implemented in chipsets in time for these Toshiba players.

According to Widescreen Review's coverage of the Toshiba HD-XA1, downloadable here, "Future Toshiba HD DVD players will support multichannel lossless TrueHD and/or DTS HD Master Audio via HDMI version 1.3 and [also] the multichannel analog outputs."

The restrictions on the S/PDIF outputs will apparently not go away in future players. It is not clear, furthermore, whether the multichannel analog outputs on future players will be enhanced to support 7.1 channels.


The initial HD DVD disc releases are from Warner and Universal. They all use Dolby Digital Plus 5.1-channel soundtracks. All of them as released in the U.S. are apparently authored with advanced content.

A handful of them also contain 5.1-channel DTS tracks — not DTS HD or DTS HD Master, just DTS, of the sort frequently found on standard DVDs. Clearly, it is permissible to carry over audio codecs from standard DVDs to HD DVD.

One and only one of the first spate of HD DVD titles, The Phantom of the Opera, contains a Dolby TrueHD track. It is just 2.0-channel. (Or, according to this article about the new audio codecs, it is 5.1-channel but is reduced by the player to 2.0-channel.)

There are as yet no releases with DTS HD soundtracks, "core" or otherwise, or with DTS HD Master audio tracks.

Nor are there any releases with linear PCM audio tracks, either multichannel or 2-channel.

Reviewers of the initial HD DVD releases are generally impressed with the improvement Dolby Digital Plus offers over plain Dolby Digital, as well as over plain DTS. The Dolby TrueHD track on The Phantom of the Opera also draws raves. Clearly, HD DVD audio using Dolby Digital Plus 5.1 offers the best sound yet heard in consumers' homes, with the possible exception of the Dolby TrueHD track on Phantom, which unfortunately plays back with just two channels.

But the potential of HD DVD to deliver high-quality sound hasn't really been exploited by today's players and discs. When HDMI 1.3 arrives in players and AV receivers, we can expect true multichannel Dolby TrueHD and DTS HD Master audio tracks, compressed losslessly, to appear on new HD DVD disc releases. We may also be able to look forward to multichannel linear PCM tracks that have not been compressed at all, losslessly or otherwise.


That's where we currently stand with respect to audio on HD DVD. In my next installment, I'll talk about Blu-ray audio. Hint: the players and discs we have now don't fully exploit the possibilities of the format, just as is true with HD DVD.

Tuesday, July 11, 2006

HD DVD vs. Blu-ray (Pt. III)

I have yet to say much about the audio capabilities of HD DVD and Blu-ray, the two new high-definition video disc formats. In part that's because, with my lifelong hearing loss, I frankly don't have good enough ears to get the most out of even today's DVDs.

It's also because both formats apparently offer roughly the same somewhat confusing list of available audio options. These include modes that offer up to two more sound channels (7.1) than the 5.1-channel Dolby Digital and DTS many of us are now accustomed to.

Moreover, two of these new modes, Dolby TrueHD and DTS HD Master, will present us for the first time with the ability to hear digitally recorded 2.0-channel — and/or multichannel (up to 7.1-channel) — sound that has been compressed using "lossless" compression methods.

What does that mean? Well, bits are typically tossed aside during the encoding of audio for standard DVDs, and for certain of the new hi-def audio modes on HD DVD and Blu-ray discs, that the player cannot reconstitute at its end of the process; that's "lossy" compression. Such lossy forms of audio "data reduction" employ so-called "perceptual coding": throwing away bits the player can't reconstitute, on the theory that if the bits are well chosen, the ear won't notice.

The old-style Dolby Digital 5.1 and DTS 5.1 audio modes which are familiar from standard DVDs, and which the new hi-def disc formats continue to support, use lossy compression techniques. But with these new lossless audio encoding modes that are optionally going to be present on hi-def HD DVD and Blu-ray discs — Dolby TrueHD and DTS HD Master — no bits are thrown away that the player cannot reconstitute.


Two other new multichannel audio modes on HD DVD and Blu-ray discs are Dolby Digital Plus and DTS HD. They can offer the two extra channels, for a total of 7.1 — or they optionally can contain just 5.1-channel (or 6.1-channel) multichannel sound. Dolby Digital Plus and DTS HD, though, are lossy; they don't use a lossless compression methodology the way that Dolby TrueHD and DTS HD Master do.

Both camps' initial players also support wholly uncompressed, multichannel linear PCM ("pulse-code-modulated") audio input and output — up to 5.1 channels, for now. Linear PCM, or LPCM, digital audio is not compressed in any way, either lossy or lossless — that's why its "linear," I assume. The digital audio on CDs is LPCM. Optional audio tracks on some HD DVDs and some Blu-ray discs can also be LPCM.


Depending on the disc format, any given hi-def player, whether HD DVD or Blu-ray, may not be able to decode one or more of these new audio modes, if they are in fact present on a disc. For HD DVD players, apparently only

  • Dolby Digital
  • Dolby Digital Plus
  • Dolby TrueHD 2.0-channel (with 5.1- and 7.1-channel decoding optional)
modes are mandatory for players to support — so every disc must contain at least one of these formats.

I find that different discussions claim different mandatory modes are required in the HD DVD specification, so take this list with a grain salt. For example, some discussions say that another mandatory audio encoding mode that all HD DVD players must support is a version of DTS HD called "DTS HD core" audio (see below).

Note that not all mandtory decoding modes are necessarily supported by HD DVD players for every theoretically available number of channels defined by the modes' originators — say, Dolby Labs — for that mode of encoding. For example, the first HD DVD players apparently decode Dolby TrueHD audio on a disc only if it's 2.0-channel, not if it's multichannel.

HD DVD discs can include those optional audio formats its authors see fit to provide, of course, even if there's no guarantee that any given player will be able to use them.


Blu-ray discs, on the other hand, have to include at least one of:

  • linear PCM 5.1
  • Dolby Digital 5.1
  • DTS 5.1
These three modes seem to be the only ones Blu-ray players absolutely must be able to handle, and so at least one of them has to be present on every disc.


Notice again that neither format's discs, in tandem with the respective players, are guaranteed to offer audio modes that provide fully 7.1 channels of sound. In fact, it is my understanding that none of the original discs in either the HD DVD or the Blu-ray format have any 7.1-channel audio tracks.

Nor is the presence of lossless Dolby TrueHD/DTD HD Master and/or wholly uncompressed LPCM audio on either an HD DVD or a Blu-ray disc a given. I assume that all HD DVD and Blu-ray players will in general (immediately? eventually?) support the avoidance of lossy encodings in some way — if not in the first player models, in subsequent ones — but will all disc releases one day come to do so, too? Maybe, maybe not.


Something needs to be said also about the resolution and quality at which these various encoding modes can or will be recorded on HD DVD and Blu-ray hi-def discs. In general, resolution and quality are a function of the number of samples per second at which the audio is digitally captured, plus the number of bits in each digital sample.

For example, linear PCM audio may be sampled using either 16-bit or 24-bit samples at rates (in kilohertz) of 48 kHz, 96 kHz, or 192 kHz. One kHz is 1,000 Hertz, and 1 Hz equals one cycle or sample per second. The faster the sampling rate, the smoother the sound. (CD sound is sampled at 44.1 kHz, I believe.) Also, the larger the number of bits per sample, the less "digital noise" creeps into the sound. (CDs use 16 bits, I understand. 24 bits per sample are said to be the norm for the new hi-def audio formats.)


You will also see references to the total bit rates or data rates which the various old and new audio encoding/decoding modes can sustain, expressed in Mbps or millions of bits per second, or in some cases in thousands of bits per second (kbps). For example, consider a statement from this online discussion of the first HD DVD players:

The mandatory decoders that must appear in all HD DVD players are losslessly compressed two-channel Dolby True HD up to 96kHz/24-bit quality; a core 5.1-channel DTS HD lossy stream that's compatible with existing 1.5Mbps DTS 5.1 decoders in A/V receivers; and lossy Dolby Digital Plus at data rates up to 3Mbps, including 5.1 and 6.1 variations. The players will convert Dolby Digital Plus to 5.1- and 6.1-channel Dolby Digital at a data rate up to 640Kbps for playback by existing Dolby Digital decoders.
The first clause talks about kilohertz and numbers of bits, as befits a lossless encoding method like Dolby TrueHD for which the output of the decoder in the disc player will be exactly the same as the input to the encoder in the HD DVD (or Blu-ray) authoring facility.

The part about a "core 5.1-channel DTS HD lossy stream" reflects the fact that what counts here is not so much the sampling rate and number of bits per sample, figures that apply to the digital audio stream prior to compression, as the overall data rate after compression. For HD DVD, DTS HD, a lossy format, is compressed so as to ensure that the overall data rate stays under 1.5 Mbps. (Note: this discussion does not apply to lossless DTS HD Master encoding.) Such a "core 5.1-channel DTS HD lossy stream," encoded at under 1.5 Mbps, is what other discussions is simply call "DTS HD core" audio.

Likewise, a similar lossy compression must be done to hold a 5.1-channel (or 6.1-channel) Dolby Digital Plus audio stream, when present on HD DVD, below a data rate of 3 Mbps.

The quote above also suggests that since existing Dolby Digital decoders in AV receivers can't deal with the new Dolby Digital Plus format, and they can't handle a 3-Mbps data rate, HD DVD players will have responsibility for "transcoding" 3-Mbps Dolby Digital Plus (and, by extension, other new hi-def formats) to old-style Dolby Digital at a data rate of up to 640 Kbps — 640 thousand bits per second.

I believe that transcoding-to-Dolby-Digital requirment may have changed since the article was written, since the first HD DVD players from Toshiba seem to transcode not to Dolby Digital but to 5.1-channel DTS. But the principle is the same: take the new, data-intensive audio formats that may appear on HD DVD and transcode them to an old, less-data-intensive format that consumers' existing gear can deal with.


So the quality of the lossy new audio formats depends mostly on the data rates at which they are compressed. But the lossless new compression formats — and also hi-def linear PCM, which is not compressed at all — are generally stated in terms of sampling rates and bit "levels": the number of bits per sample.

Yet, often the bit level of a hi-def audio encoding mode is not mentioned explicitly. When the bit level of one of these new hi-def formats is not mentioned, it can be assumed to be 24 bits. Accordingly, Dolby TrueHD (and also linear PCM) is defined as having three supported quality levels, stated solely in terms of sampling rates: 48 kHz, 96 kHz, and 192 kHz.

Those are the three quality levels that can be present on the disc itself. The player will often "downsample" these lossless/uncompressed formats for its internal processing — and also for output — at, say, just 48 kHz. It is relatively easy to downsample 192 kHz or 96 kHz to 48 kHz, because the first two numbers are multiples of the third.


That, then, is a rundown on many of the audio input options that can appear on HD DVD and Blu-ray discs and (possibly) be able to be decoded by players, either current or future. In my next installment, I'll take up the complex question of what audio output modes the first HD DVD players and discs actually support. In a subsequent installment, I'll ask the same question about the first Blu-ray players.

Thursday, July 06, 2006

HD DVD vs. Blu-ray (Pt. II)

HD DVD and Blu-ray are new, competing video disc formats. They're both high-definition, and they've both hit the stores over the last few months, after nearly a decade in which DVDs were all standard definition (480i, raised to enhanced definition 480p by "progressive" players). The players for each new hi-def format cannot play the other new format, even though both player types use a new blue laser. Both formats' players play standard, red-laser DVDs.

Officially, Blu-ray discs are exactly that: "Blu-ray discs," BDs for short. They are not DVDs, since the DVD Forum has not endorsed this format. BDs can't be played in standard DVD players or in HD DVD players.

HD DVDs are DVDs, endorsed by the forum ... but they can't be played in standard DVD players or in Blu-ray players.

Toshiba has been first out of the starting gate with its HD-XA1 ($799.99) and HD-A1 ($499.99) HD DVD players. Now the introductory Blu-ray players have arrived: Sony's BDP-S1 ($999.95) and Samsung's BD-P1000 ($999.99). Sony is expected to release a less-pricey PlayStation 3 gaming console in the fall that also plays Blu-ray discs.

The Toshiba entrants have received mostly positive media reviews, including: Sound & Vision's HD-XA1 review, Home Theater's HD-XA1 review, Ecoustics.com's HD-A1 review, and Ultimate AV's HD-A1 review.


In general, most reviewers have been blown away by the picture quality of the initial spate of HD DVD titles when played on a Toshiba player
  • through a HDMI digital connection
  • at a 1080i scan rate
  • into a 1080p-native HDTV
but not at a 720p scan rate, a problem seemingly due to a poor 1080p-t0-720p internal scaler in the players. Component video output at 1080i is likewise excellent — not down-rezzed to 480p as had been feared. (These two Toshiba models share the same basic innards and yield the same overall performance.)

The HD DVD video-quality improvement over standard DVD is said to include
  • greater picture clarity and resolution
  • an absence of compression artifacts such as mosquito noise
  • super-punchy contrast
  • subtle shadow detail, and
  • eye-popping colors that are nonetheless not at all oversaturated (due presumably to the wider color gamut)
Spurious edge enhancement, long the bugbear of DVD cinemaphiles, has been deep-sixed, at least for the initial HD DVD titles.

Some reviewers have noted that HD DVD beats cable and broadcast HD quality(!), owing to higher bit rates and better codecs (see Pixel-Perfect 1080p from DVD?).

Sound quality has also drawn raves. But some of the initial movie releases have been mastered with sound levels way too low.


Also impressing reviewers has been an interactive menu capability that lets you select from most options while the disc continues to play. But some reviewers don't like the players' sluggish response to commands from the remote control.

Most reviewers, moreover, have disliked how long it takes these first HD DVD player models to boot up (they're actually special-purpose, 2.5-GHz Pentium 4 computers) or to begin playing a newly inserted disc. The wait times can easily exceed one minute and can approach twice that long.

There have been widely reported minor playback glitches of the type that will probably be addressed by firmware updates from Toshiba later on. (The players can be updated through their Ethernet ports.) Other playback woes such as the inability to stop and restart a disc without going back all the way to the beginning have been laid at the doorstep of early disc-mastering miscues and will unfortunately not resolve themselves as easily via firmware updates.


Ecoustics.com's reviewer unearthed a pair of subtle video performance issues with the Toshiba player.
  1. "Using the HDMI output, the luma values are being clipped. Above white and below black information are missing from the image, so dynamic range is not preserved." (Luma is the black-and-white or Y portion of a YCbCr digital video signal. Clipping its above-white and below-black values — removing them entirely — can theoretically cause digital signal processing errors later on in the TV that might wind up degrading actual whites and/or blacks on the screen. That could eliminate subtle detail in very bright or very dark parts of the image.)
  2. " ... the player is using the wrong color space for HD material if HDMI is converted to DVI at any point. Instead of using the proper REC 709 spec that HD is mastered in, it is being converted to REC 601, which is for standard definition sources. So if your display has a DVI input and you are using an HDMI to DVI cable, the color space used is for SD material, not HD. If you go HDMI to HDMI, it does not have this problem. With standard DVDs, the color space stays correct at 480p." (So DVI conversion of the players' HDMI digital outputs yields hue and saturation errors from HD DVD discs, but not from standard DVDs.)

I have yet to see any editorial reviews of the brand new Blu-ray players from Sony and Samsung. But a posting at TheDigitalBits.com gives a cautionary note about the Samsung BD-P1000's 1080p HDMI-output video quality: too little detail, contrast, and color, compared with Pioneer's yet-to-be-introduced Elite BDP-HD1 Blu-ray player. All of the problems that were complained of at the Digital Bits disappeared with a switch to using the player's component-video output at 1080i.

Bill Hunt, the proprietor of the Digital Bits website, also complained that with his Panasonic projector at the other end of an interconnecting HDMI cable, his Samsung BD-P1000 didn't "handshake" correctly and consequently didn't scale properly from one scan rate to another — or (I'm not clear on this) was it from one aspect ratio to another?

There have also been consumer complaints logged online that the video quality of the first Blu-ray titles has been uneven, with some looking superb and some looking less so. Check out the customer ratings for the Blu-ray titles listed at Amazon.com. (The equivalent list of HD DVD titles is here.)


It is obviously too soon to draw meaningful, once-and-for-all comparisons between what HD DVD actually delivers as one of two new hi-def home video disc formats that will surely be with us for quite some time vs. what the other one, Blu-ray, does. Clearly, both formats' first players and disc releases are beset by startup woes that obscure long-term judgments.

I note also that the roster of initial releases from the two camps is both abbreviated and less than prepossessing, with no real "must have" titles. Moreover — and this could ruin both sides' chances at dominance — neither format is supported yet by all the major studios. (A rundown on which studios are releasing what titles in these two hi-def disc formats can be found here, at the Digital Bits site.) One can only hope that the various studios will gradually come to follow two of their number's, Paramount's and Warner Bros.', stated intention to release all titles in both formats.

Moreover, there is a pricing gap that surely hurts Blu-ray. You can get a HD DVD player for $500, while the current entry-level Blu-ray machine is twice that. (The Sony PlayStation 3 that is due in November and will play Blu-ray discs will reportedly cost $500.) HD DVD discs seem to cost between $20 and a figure a bit north of $30 at Amazon, while BDs (Blu-ray discs) are debuting at roughly, I'd say, $5 more.


As I indicated in HD DVD vs. Blu-ray (Pt. I) and Pixel-Perfect 1080p from DVD?, Blu-ray is providing true 1080p output over HDMI. With that output scan rate, the best possible picture on a 1080p-native HDTV that also supports 1080p input can theoretically be obtained. HD DVD has missed that particular boat, with 1080i output the best scan rate its initial players offer. But HDTVs with first-rate 1080i deinterlacers can fully offset that drawback.

Future HD DVD players will, it has been promised, include the full 1080p output capability.

I also said before that Blu-ray has missed an entirely different pair of boats. In practice, HD DVD uses advanced AVC and VC-1 codecs to compress the video bitstream, then stores it on dual-layer discs. Blu-ray, on the other hand, has chosen (for now) stodgy, less-efficient MPEG-2 encoding on single-layer discs. The combination of those two choices may make for disc-to-player-to-TV bit-delivery rates too low to ward off compression artifacts.

Both of those questionable choices on the part of Blu-ray will surely be superseded on future disc releases, once the necessary authoring tools and disc-manufacturing facilities are in place.


I see that this discussion has gotten much more long-winded than I originally intended. More is to come on the HD DVD/Blu-ray format war in later posts.

Tuesday, July 04, 2006

HD DVD vs. Blu-ray (Pt. I)

The consumer electronics world is about to experience a format war. Two competing formats for high-definition DVD, HD DVD and Blu-ray, are bursting out of the starting gate. In fact, HD DVD players and discs have already been on sale for a while now, while the Blu-ray debut is just now here.

Both formats store more information on a single disc than regular DVDs do, mainly by virtue of employing a new, blue-colored laser. Standard DVDs are played by a red laser beam with a longer wavelength than that of a blue laser. As a result, the tiny pits in the surface of a standard DVD which record information can get only so small. With a blue laser, they can get much smaller — so there can be more information put on the disc.

The Blu-ray laser has an even shorter wavelength than the HD DVD laser — the color is not actually blue, but blue-violet — so Blu-ray discs can encode more data in tinier pits than can HD DVD.

You need more information to carry hi-def video, because every frame of video has 1,080 rows of 1,920 pixels each. Standard DVDs use 720 pixels across the screen in a 480-row pixel grid. Each pixel, naturally, requires a certain number of bits. Do the math, and you can see hi-def needs much more information to be able to be put on the disc.


But another factor in the math is how much the digital video bistream is compressed. Digital video, whether on the air or over cable/satellite, on DVD or Internet-delivered, would be out of the question without compression. Compression throws out a huge proportion of the bits in the video bitstream, doing so in an artful, perceptually savvy way that (it is hoped) the eye won't notice.

TV broadcasts and standard DVDs use so-called MPEG-2 compression. It has served us well, but it's growing long in the tooth. Newer compression algorithms can today compress video bit streams to a much greater degree, with fewer noticeable artifacts.

One of these is MPEG-4 Advanced Video Coding (AVC, aka H.264), about which I know little. Another is VC-1, formerly known as Windows Media Video 9 (WMV9). These two, plus the old standby MPEG-2, are supported by HD DVD and Blu-ray. All players from both camps must be able to play discs that use any of the three codecs (encoder/decoders).

As for the discs, each disc's producer or author can select which of the three video codecs to use on a release-by-release basis.

I am told that both AVC and VC-1 run rings around MPEG-2. According to an article in The Perfect Vision magazine for July/August 2006, "Today, MPEG-4 AVC and VC-1 cam achieve the same picture quality as MPEG-2 using roughly half the bit rate, and that efficiency is likely to get better in the future."


The bit rate is all-important when it comes to digital video compression. These three compression schemes all use mathematical algorithms to determine which bits to throw away. The first bits to be discarded are those which can be restored, bit by bit, by the player. But such "lossless" compression methodology is not enough. Further reduction of the bitstream is accomplished by "lossy" compression techniques. The player can't restore bits that are jettisoned in this way, so the discarded bits must be carefully selected so as to have no visible impact on the picture.

Because of certain oddities of human vision, that can indeed work. Lossy compression methods, used judiciously, can result in delivered images that are visually indistinguishable from the original.

Some scenes are easier to compress without artifacts than others. The ones that have lots of fine detail and/or a great deal of fast movement generally can withstand less compression than simpler, more static scenes. The post houses that author DVDs tweak the degree of compression on a scene-by-scene basis so that difficult material is less compressed than easy material. They thereby squeeze an entire movie into an allotted "bit budget" which limits the total number of bits recorded on the disc.


Even with tweaking, artifacts slip through. The Secrets of Home Theater and High Fidelity web site documents some of them in this review of a home-theater product that acts to filter them out. (Click on the images below to see larger versions.)

Macroblocking,
before and after filtering

Macroblocking, sometimes called pixellation, allows the large or small squares into which the picture is sliced and diced during the algorithmic encoding to show up on the screen. Post-facto filtering is a stopgap, but a higher encoding bit rate is the cure.

Mosquito noise,
before and after filtering

Mosquito noise is sort of like macroblocking, but just at sharp edge transitions. Again, a higher bit rate will cure it.


The two hi-def DVD formats hold out the possibility of banishing macroblocking, mosquito noise, and other compression artifacts forever.

Standard DVDs put up to 4.7 gigabytes of data on a single disc layer, 8.5 GB on a dual-layer disc. Some of the bits record stuff other than video, such as audio or menus. But most of them are devoted to video. It turns out that 8.5 gigabytes are not a lot, for a two-hour movie, even rendered in standard definition, but supposedly with top video quality.

Also, regular DVDs are not allowed to deliver data faster than 11 megabits per second — again, not a huge bit rate.

HD DVD will hold 15 GB on one layer, 30 GB on two. (Triple-layer 45-GB discs are promised.) Bit rates up to more than 36 Mbps are possible.

Blu-ray boasts fully 25 GB per layer, for 50 GB per dual-layer disc. Bit rates can go up to 48 Mbps.

For comparison, the bit rates of broadcast HDTV channels max out at 19 Mbps. The not-so-well-known D-VHS D-Theater digital videocassette format can deliver bits at a rate of over 24 Mbps.


HD DVD and Blu-ray discs can hold more video data per square inch and deliver it faster than anything yet known. They need to, because each frame of high-definition 1080p video contains over two million pixels — five times the number per frame on standard DVD.

But as I say, high data capacities and fast bit rates don't tell the whole story. If the most efficient commpression codec isn't used, they're both squandered.

Here's where the fat hits the fire. Sony, the force behind Blu-ray, has said that it will stick to the now-antiquated MPEG-2 codec for its initial releases. They apparently will be using a bit rate of up to 18 Mbps. Meanwhile, the initial releases on HD DVD use the more effective VC-1 at a similar bit rate; reviewers have been amazed at the stunning video quality.

Amir Majidimehr, leader of the group at Microsoft responsible for VC-1, is interviewed along with video guru Joe Kane in the the July 2006 issue of Widescreen Review magazine. Majidimehr says, "VC-1 is about twice as efficient as MPEG-2. Actually, VC-1 is more than twice as efficient at lower data rates. But even if you use the 2x number, 18 megabits per second is equivalent to 36 megabits per second MPEG-2, which is nearly double the ATSC [broadcast HDTV] transmission rate of 19 megabits per second. You’re talking about incredible headroom and compression efficiency at 18 megabits per second. The kind of picture you can get is obviously phenomenal at these rates."

If Majidimehr is right, MPEG-2 Blu-ray discs encoded at 18 Mbps may not look as good as VC-1 HD DVD discs encoded at 18 Mbps.


What's more, Majidimehr says, the first Blu-ray titles will be limited to a single layer — for reasons he does not go into, but which I assume have to do with not yet having the neccessary disc-manufacturing ability in place — while the first HD DVDs are already dual-layer. Not being able to take advantage of Blu-ray's projected two-layer capability is seemingly one reason why 18 Mbps has been designated as the top MPEG-2 bitrate for initial Blu-ray releases.

That single-layer startup limitation would seem to dictate that Sony ought to be switching to VC-1 (or MPEG-4 AVC). But that won't happen, at least not right away. Why not? Majidimehr blames the fact that Sony has failed to provide disc-authoring post houses with a "multiplexing tool" capable of taking a VC-1 raw bitstream — the "elementary stream," he calls it — and integrating it with digital audio and menu information for a Blu-ray disc.

Toshiba has indeed provided post houses with a VC-1 multiplexing tool for HD DVD. Blu-ray, again, is limited to an authoring tool that only takes MPEG-2 video input.

Meanwhile, third parties such as Sonic Solutions are furiously developing authoring tools that will support all three codecs for both new disc formats. But such tools will apparently not be in play in time for the Blu-ray launch.


It remains to be seen whether MPEG-2 at 18 Mbps will in fact encode perceptible artifacts on Blu-ray discs, of course. Theory and practice often diverge. But if the pundits are right about this startup limitation, it could cancel out Blu-ray's vaunted full-1080p output capability in the minds of early format adopters.

As I mentioned in Pixel-Perfect 1080p from DVD?, the first Blu-ray players are said to be able to output 1080p/24 from the disc as such without converting it to 1080i/60, with its potential for deinterlacing artifacts. If the HDTV can accept a 1080p/24 input and display it at full resolution at 24, 48, or 72 images per second, the result will be a pixel-perfect picture, with no opportunity for degradation.

The first HD DVD players always convert 1080p/24 to 1080i/60 for transmission to the TV over digital HDMI connections. On-screen deinterlacing artifacts can result. Later on, HD DVD players with true 1080p outputs are expected to appear.

Blu-ray would seem to have the advantage here. But if the perfectly replicated pixels sent from the disc to the TV are themselves mangled by old-fashioned video compression methods used at too-low bitrates, will it matter?

Monday, July 03, 2006

World Cup Revisited

I said in 2006 FIFA World Cup on HDTV that high definition helps televised soccer. That was on a 32" Hitachi plasma. I now find that watching hi-def soccer on a 61" Samsung DLP is even more of a thrill.

I watched ESPN's cablecast of the quarterfinal game between Brazil and France, in which France upset the tournament favorite, 1-0, on the Samsung. The picture was so sharp, I realized I need to get my glasses prescription updated! I was able to read the numbers on players' jerseys just about all the time, but I had to turn my head slightly to get my present spectacles to bring them in sharp focus.

Though I have been watching televised soccer on and off since the U.S.-hosted 1994 World Cup, I am only now starting to be able to make much sense of the game. I found it helpful in the France-Brazil match to keep my eye on the star midfielder for Les Bleus, Zinedine Zidane, who had pretty much single-handedly beaten Brazil in the 1998 final, scoring I think two of France's three goals.

This time Zidane didn't score his team's lone goal ... he set it up. He used truly amazing footwork to gain and keep control of the ball in Brazil's end and then fed the ball to a teammate, starting France's attack. The ball was taken rapidly down the left side of the pitch, where a French player was (I thought needlessly) fouled by Brazil's Cafu as he approached serious goal-striking distance.

That so-called "professional foul" — given to stall the game and allow the defending team time to fall back into the attacking team's end of the field — allowed France to take a free kick from near the left sideline. Naturally, the great Zidane (not the player who was fouled) was the one who took it. He arced what in baseball is called a Texas leaguer over the lump of players from both sides jostling near the front of the goal, where circling French striker Therry Henry, surprisingly unmarked, volley-kicked it past the Brazilian goalkeeper Dida into the roof of the net.

It was for once in my soccer-watching career easy to keep track of this sequence and Zidane's other, more subtle exploits as rendered in large-screen high definition. The picture was so clear that I never had trouble finding Zidane in it, with his shaved-bald head, his pale skin tone, and his signature number 10.


Watching and enjoying a soccer game, it still must be admitted, is not something that is easy for many Americans. Jeffrey Toobin writes in the July 3, 2006, New Yorker, in "Un-American Activity: The World Cup and Our Problem with Soccer":
It's little wonder that many American fans, raised on the pauses between innings in baseball, and the committee meetings known as huddles in football — not to mention the pitching changes and time-outs that prolong the conclusions of these games — find soccer games both bewildering and annoying. "Soccer does not have the rhythm that Americans are used to," [former Secretary of State Henry] Kissinger [a well-known soccer junkie] told me from New York last week. "Americans like their games segmented into different plays, which can then be statistically analyzed. Soccer, with its continuous action, requires a change of thinking."
I don't know what to say about Americans' penchant for statistical analysis, but I do find that recording soccer on a digital video recorder, with its pause and instant replay functions, lets me segment the game at will. I recorded the France-Brazil game while I was otherwise occupied and watched it in two halves the next day, as time permitted. I even knew already who had won, and how, from the Sunday paper. I thought I might be bored, absent the usual suspense ... but, no. It was a marvelous game with two teams playing top-notch soccer, and the lack of nail-biting let me focus on Zidane and the finer points of the game.

Sunday, July 02, 2006

Pixel-Perfect 1080p from DVD?

Although I've recently come very close to deciding on a Pioneer Elite plasma TV (see My Bedroom: Crying Out for HDTV? and More on Pioneer's Elite PRO-1130HD) now I feel I ought to wait. The reason is that this $5,500 Pioneer model has only a 1280x768p screen. It will never yield pixel-perfect pictures from 1080p HD DVD or Blu-ray discs. The 50" Pioneer Elite PRO-FHD1, which fully supports 1080p, will do so, but it's a brand new model just being introduced at a way-high price of $10,000!

What do I mean by pixel-perfect pictures from high-definition DVDs? Both HDs (HD DVDs) and BDs (Blu-ray discs) apparently do/will contain video encoded at 1080p: progressively scanned, non-interlaced frames containing 1,080 lines at 1,920 pixels per line. Pixel-perfect images can result if those frames are transmitted from the DVD player to the TV as such, and displayed as such by the TV.

Instead, the initial crop of HD DVD players convert the 1080p frames on the discs to 1080i for transfer to the TV.

Specifically, they take (in the case of a movie that was shot at the standard frame rate of 24 film frames per second) a 1080p/24 image and make from it interlaced 1080i/60 frames, at the rate of 60 fields, or half-frames, per second.

The first of the two half-frames in each 1080i frame contains just the odd-numbered lines of pixels extracted from a given 1080p frame. The second contains just the even-numbered lines from either the same 1080p frame or an adjacent 1080p frame in the original sequence of frames. Not all 1080i/60 frames represent just a single 1080p frame, which of course does represent a single film frame.

That's because 1080i/60 video, with 60 fields per second, has 30 2-field frames each second, and 30 is not evenly divisible by 24. In converting 1080p/24 video to 1080i/60, a technique called 2:3 pulldown is used. One 1080p/24 frame is used to generate two 1080i/60 fields, then the next 1080p/24 frame spawns three fields, then back to two, then three, and so on. So some of the 1080i/60 frames (specifically, two frames out of every five) turn out to be interlaced hybrids of two 1080p/24 progressive frames.

When those hybrid frames are displayed on a CRT-based HDTV which is designed to handle interlaced video, everything is fine, since the two fields in each frame are temporally separated by 1/60 second. But a fixed-pixel HDTV such as a plasma flat panel has to re-integrate the two fields of each interlaced frame to come up with a full progressive frame each time. To do that properly when 2:3 pulldown has been done, its deinterlacing curcuits have to be smart enough to detect the 2-3 field cadence and perform what is known as inverse telecine on it.

That name comes from the device which has traditionally been responsible for doing film-to-video transfers, the telecine — though today the old-fashioned telecine is being replaced by the digital film scanner. The telecine (or scanner) is what normally does the 2:3 pulldown (called such because the film is jerkily pulled down such that the film's frames stay still for two, then three, then two, etc. video fields) when the video is to be recorded or transmitted in interlaced frames. When it's being recorded in progressive frames, as on HD DVD or Blu-ray discs, no 2:3 pulldown is needed.

By the way, 2:3 pulldown is often referred to as 3:2 pulldown, since a 3-2 field cadence is basically the same as a 2-3 cadence, once you get started.

It's easy for the 1080p HDTV with the right internal smarts to invert the 2-3 (or 3-2) cadence and reconstruct the original 1080p/24 video — provided it knows that's what it must do. It then can deliver the reconstructed 1080p/24 frames to its 1,920 x 1,080 screen at that frame rate, or at the rate of either 48 or 72 frames per second to avoid flicker; each frame is flashed either two or three times in succession.

Problems can arise, however, from the fact that the TV's internal circuits must inspect the incoming 1080i/60 fields to see if they possess telltale signs of the 2-3 cadence. The TV can be fooled briefly by a sequence of fields that don't lend themselves to that internal inspection logic, such as when there is a jump cut in the editing of the film, causing the TV to lose faith in the previously detected 2-3 cadence. When that happens, the TV is apt to stumble for a few frames and knit together two fields per frame that don't belong together. Result: unnecessarily jagged vertical and diagonal edges on objects that are in motion horizontally with respect to the borders of the picture.


Another alternative is to let the TV off the hook and have it display 1080i/60 at 60 frames per second, by generating a full 1080p/60 video frame from each and every incoming 1080i/60 field. It can do that by one of several methods, the simplest of which is to replicate each line in each field, line by line by line. For example, in a field where just odd-numbered lines are provided, line 1 becomes (also) line 2 of the newly generated full frame, line 3 becomes line 4, etc.

There are accordingly no jaggies that result from inappropriately knit-together fields, but an unfortunate side effect is that vertical resolution is effectively halved, from 1,080 lines to 540. Another unfortunate side effect is that a herky-jerky judder is introduced into the image. Objects in motion across the screen don't move at a constant rate, owing to the fact that information from each original group of 24 frames is being parceled out at the rate of 60 frames per second, and 60 is not an even multiple of 24.

Other, more complex methods of creating 1080p/60 from 1080i/60 are possible. In fact, some such method is absolutely necessary for the 1080p HDTV to perform when the original signal is 1080i/60 — say, a hi-def sports broadcast on NBC — and is not the result of 2:3 pulldown from film. It is even possible for some of these methods to smooth out the herky-jerky judder problem entirely. However, few if any of today's HDTVs use such advanced, processing-intensive methods yet.


So when the source is film, wouldn't it be nice if the 1080p/24 material on HD DVD or Blu-ray disc did not have to be subjected to the vagaries of on-the-fly 2:3 pulldown in the player and consequent inverse-telecine processing in the TV?

Then there would be no herky-jerky judder. No jaggies. No halving of vertical resolution. And none of the other so-called "interlace artifacts" that interlaced video — especially when it's not properly deinterlaced — is prone to.


You'd then have pixel-perfect 1080p from DVD.

To get it, first, you'd need a player that can be set to output 1080p/24 on an HDMI digital hookup to the TV. None of the initial HD DVD player models can do that, though it's promised for follow-on models. (The first Blu-ray players, for which aficionadoes are now anxiously waiting, are said to be able to output 1080p/24 on HDMI.)

You'd also need a TV that can both receive 1080p/24 over HDMI and display it as such (though possibly at 2X/3X frame rates for flicker avoidance) on its screen. Many of the so-called 1080p HDTVs being sold right now can't input 1080p at any frame rate. They have 1080p screens, but no 1080p inputs. (That's what I mean by saying the $10,ooo Pioneer Elite PRO-FD1 plasma "fully supports" 1080p. It has both the 1080p screen resolution and the 1080p input capability — at multiple frame rates, not just 24 fps.)


You might wonder how the DVD player would know to output 1080p/24 to the TV, by the way, since in some cases the original video would have been shot at, say, 1080i/60. Wouldn't the player be just as inclined to get mixed up by these various frame-rate/interlacing combinations as the TV?

Thankfully, no. As long as the DVD has been mastered/authored properly — which unfortunately is not a given, with standard-def DVDs today — there are flags and other information stored with the digitized video on even a standard-definition DVD which can clue the player in as to what kind of video source material it is dealing with.

Those flags have always been optional with standard-definition DVDs. When used at all, they have sometimes been misused. Which means progressive-scan DVD players, whose duty it is to deinterlace the video on the disc and send it in progressive form to the TV, sometimes get fooled and render smooth edges as jagged, etc. (When that happens, the cognoscenti say there is "flagging" in the picture, since the erroneously comb-like vertical edges resemble the stripes on an American flag.)

But that shouldn't be a problem with hi-def DVDs/players produced by either the HD DVD camp or the Blu-ray camp. The hi-def discs that are encoded at 1080p/24 have to be so identified, for the player to be able to work right at all. The only question is will the player convert their contents to 1080i/60 for transmission to the TV, or leave the contents at 1080p/24 for a pixel-perfect image on the screen.

As I say, such pixel-perfect 1080p images can happen only if the DVD player and the HDTV both do their part. The player has to (optionally) output 1080p/24, and the 1080p TV must accept it and display it at a user-selectable 24, 48, or 72 frames per second.

Right now, there are zero HD DVD players that output 1080p/24 ... as we still await the first Blu-ray players. Though there are some HDTVs that input and display 1080p/24 at its native frame rate or a multiple thereof, they tend to be brand new, pricey models such as the Pioneer Elite PRO-FHD1, not models for the masses.

Another thing: it's devilishly hard to find out what the input and frame-rate capabilities of a so-called 1080p HDTV are. Information such as this tends to be buried in owner's manuals, which can sometimes be obtained in PDF form online and inspected, but it is often not revealed in the technical specifications announced on the manufacturer web site.


That situation is sure to change, as consumers grow more savvy. By a year or so from now, enough people will have become aware that pixel-perfect movie-style images from 1080p/24-native DVDs are in store for them if they only get the right equipment and use it properly. They will demand such equipment, and that it be conspicuously labeled as having the end-to-end 1080p/24 capability needed for pixel-perfect hi-def pictures.

Moreover, prices on such "advanced" gear will come down from their present straosphere. Not that the most bargain-priced TVs will support the "24p" (or "48p" or "72p") 1,920 x 1,080 frame rate; it takes extra smarts to do that while still supporting the more standard "60i" or "60p" rate. Extra smarts cost extra bucks. But the price premium for the extra smarts will shrink as manufacturers build those smarts into more and more models.


So I think I've changed my mind yet again about 1080p. I said in My Bedroom: Crying Out for HDTV? that "the magic distance for a 50-inch 1080i/p 16:9 TV is about 6 to 7 feet. Any seating distance beyond that loses effective resolution. Somewhere between 9 and 10 feet, you can no longer tell the difference between 1080i/p and 720p." By that logic, 1080p didn't seem to hold that big an attraction for me.

That's still true. I'd be sitting (actually, reclining) at least 10 feet from my anticipated 50" bedroom screen, and my eyes wouldn't be able to see the difference between 1080p and 720p, resolution-wise. But I think I'd be able to see the artifacts that 1080i conversion in the hi-def DVD player and subsequent deinterlacing in the HDTV might introduce, and I figure why put up with them. No, better to wait until all the puzzle pieces are in place for an affordable, pixel-perfect 1080p/24 picture on my bedroom screen.

Thursday, June 29, 2006

Gamma, Again! (Part VI)

In Gamma, Again! (Part V) I expressed befuddlement at the fact that CRT-based studio monitors alter their native gamma figure, which is supposedly 2.5, to 2.2. I was citing Dr. Raymond Soneira's four-part series titled "Display Technology Shootout" in Widescreen Review magazine, Sept.-Dec. 2004, online in PDF form here and accessible directly as a web page here. Herein, more about the studio monitor issue.

To recapitulate my earlier posts, gamma is a number that tells how quickly the luminance (L) produced by a television or computer monitor's screen rises as the video signal's analog voltage or digital code level (V) steadily ascends from the minimum possible value (black) to the maximum, which is in video parlance "reference white," assuming all three primaries, red, green, and blue, are equally represented in the signal.

Mathematically, the equation

L = VƔ

(Ɣ is the Greek letter gamma) represents the transfer function of the monitor, assuming its BRIGHTNESS or BLACK LEVEL control has been carefully adjusted so that it produces minimum L precisely for minimum V.

If its BRIGHTNESS or BLACK LEVEL control has been set either too low or too high, the equation becomes
L = (V + e)Ɣ

where e represents the amount of the black-level adjustment error. Failure to take e into account leads to an erroneous assumption that Ɣ itself has changed. If black level is set too low, Ɣ seems to rise, as the picture seems to gain contrast. If black level is set too high, Ɣ seems to go down, as the image contrast seemingly lessens.


Video cameras are standardized with an inverse transfer function which, a bit oversimplified, looks like

L = V(1/Ɣ)

where Ɣ is (approximately) the assumed gamma of the TV monitor. The exponent here is for the purpose of gamma correction. It serves to (almost) neutralize the gamma of the TV, for an end-to-end power of (close to) one.

By "end-to-end power" I mean what you get when you multiply the mathematical power or exponent in the second equation by that in the first. I parenthesized the words "approximately," "almost," and "close to" above because considerations of rendering intent or viewing rendering dictate that the end-to-end power actually ought to be somewhat greater than one.

As I said in my earlier post, one reason for this is that a video display's luminance levels are tiny fractions of the real-world luminances that arrive at the camera's image sensor from the original scene. Another is that we customarily frame video images in unnaturally dark surrounds and view them in darkened or semi-darkened rooms. A third is that our TV screens usually cannot achieve the ultra-wide contrast ratios found in nature.

These ideas about rendering intent and end-to-end power come from Charles Poynton's excellent textbook, Digital Video and HDTV: Algorithms and Interfaces. Poynton is a video and color imaging guru who speaks with a great deal of authority about such matters. I contacted him by e-mail and asked him to comment on Dr. Soneira's notion that our TVs at home ought to emulate the 2.2 gamma of studio monitors.


The issue is one that, after all, boils down to the end-to-end power of the video delivery system. When gamma correction in the video source — a camera or film scanner — uses an exponent whose value is effectively 0.45, which is close to 1/2.2, to deliver a video signal to a home TV whose gamma is 2.5, the end-to-end power is 0.45 x 2.5, or 1.25. That tends to provide optimal results when the image is viewed in a dim-but-not-pitch-black environment, says Poynton's book.

But images that are viewed in total darkness ought to have 1.5 as their end-to-end power, Poynton says. If the original gamma-correction exponent is changed from 0.45 to 0.6, a gamma-2.5 TV yields that end-to-end power. (If the gamma correction stays the same, adjusting the TV's gamma to 3.33 would, my calculator tells me, have the same effect. But how many TVs can be adjusted to 3.33 gamma?)

So the effective gamma-correction exponent is crucial to rendering intent. But here's where the studio monitor, used by "the creative people involved in making a program [to] approve their final result," as Mr. Poynton so succinctly puts it in his e-mail reply to me, makes its crucial appearance.


The studio monitor has, of course, its own gamma exponent, which determines how much image contrast there is in movie scenes that are rendered on its screen. If the "creative people" in, say, a DVD post-production facility don't see enough contrast, they can in effect raise the original film-to-video scanner's gamma-correction exponent to provide a more contrasty result on the eventual DVD.

But what happens when the post house monitor has, say, 2.2 gamma and your TV's is fully 2.5? The end-to-end power of the video delivery system as a whole thereby rises above what it would otherwise be, right?

That's not necessarily bad, mind you. Remember the example I gave above, in which hiking the gamma-correction exponent from 0.45 to 0.6 made for an ideal image as viewed in a totally dark viewing environment on a gamma-2.5 TV? It suggests that "creative people" in post houses, who use (according to Dr. Soneira) gamma-2.2 studio monitors to tweak images as they are being viewed in the post facility under subdued lighting conditions, wind up producing just the right amount of image contrast for DVDs watched in pitch-dark home theaters whose displays have gamma figures notably higher than 2.2. True?


Well, maybe. Mr. Poynton now says, in his kind e-mail response to me, "Current practice — as far as I can determine, after a decade or more of work — is that studio monitors have 2.4 gamma" (!). He also suggests that he now finds 2.4 to be a "more realistic" estimate of the inherent gamma of a CRT, a fact of life upon which the need for gamma correction was originally based. Studio monitors, of course, are usually CRTs.

Meanwhile, owing to what are perhaps misinterpretations by TV makers of official standards for video-production engineers and television studios, consumer TVs may be getting built-in gamma exponents less than 2.4. Poynton:

Rec. 709 [the broadcast standard for modern digital HDTV] standardizes the factory setting of a camera's gamma correction, but fails to mention viewing rendering, and misleadingly includes an inverse (code-to-light) function. Inclusion of the inverse function suggests its use in a monitor, but actually the function would yield scene-referred values, not display-referred (rendered) values. And no video textbook — save mine — even mentions the issue! It's a mess.

I think that by "suggests its use in a monitor" he means, here, that Rec. 709 specifies an inverse function whose gamma-correction exponent amounts to an "advertised power" of 0.45, which is roughly equal to 1/2.2. "Advertised power," in Poynton's terms, refers to the fact that "taking into account the scaling and offset required to include the linear segment [at the lower end of the curve, the effective exponent] is effectively 0.51." But that's not the key thing here.

The key thing is, rather, that all manner of people, TV makers included, see that advertised exponent of roughly 1/2.2 or 0.45 codified in the Rec. 709 standard and think consumer HDTVs ought consequently to have a 2.2 gamma exponent.

So even CRT-based consumer HDTVs (what few of them there are) may be using digital signal processing (DSP) to change what would otherwise be an inherent 2.4 gamma to 2.2! And makers of non-CRT displays — plasmas, LCDs, etc. — are following suit. Their (DSP-imposed) gamma figures are basically the same as modern CRTs': 2.2, or thereabouts.


Mr. Poynton brings up another subtle but interesting point in his e-mail to me:

Rec. 709 has an advertised power of 0.45 but taking into account the scaling and offset required to include the linear segment [in the region at the lower end of the curve, near black] it is effectively 0.51. For 2.4-power display, end-to-end power is about 1.2. That's appropriate for a daylight scene with diffuse white at about 30,000 [cd/m2]. Viewing rendering needs to be reduced if the scene is shot at candlelight: End-to-end power should then drop to about 1.1, requiring effective 0.46 at the camera (requiring reducing advertised gamma to about 0.40).

My interpretation: in a brightly lit daylight scene, sunlight will reflect off a white sheet of paper with a luminance of about 30,000 candelas per square meter, or 30,000 cd/m2. A televised image of that scene needs an end-to-end power of about 1.2 when viewed (I assume) in dimly lit but not pitch-black environs.

But a scene shot in candlelight will have a maximum luminance lower than that by several orders of magnitude. The TV screen's output luminance will now be able to nearly match that of the original scene. Since one of the main reasons for using an end-to-end power well greater than 1.0 has disappeared for this particular scene, end-to-end power "should then drop to about 1.1."

Since the TV cannot be expected to make that gamma adjustment on the fly, the effective power or exponent of the camera (or film scanner or post-house tweaking station) ought to drop to 046. In view of the difference between effective power and advertised power, the latter ought to be reduced to 0.40 for a candlelit scene.


I admit that all this stuff about gamma may seem like material for a Ph.D. thesis. Again, why should we care?

The main reason is that the best front- and rear-projection HDTVs today, properly adjusted and calibrated and with excellently produced video source material, can produce images that are stunningly film-like. Flat-panel displays are not far behind. We are very close to home-theater nirvana.

Achieving proper end-to-end power figures will put us even closer.

It looks to me as if that holy grail requires co-operation between program producers such as home-video post houses and HDTV makers. The people responsible for scanning films and tweaking the image for consumer DVDs have some latitude to adjust their effective gamma-correction exponents on a scene-by-scene basis, as Mr. Poynton suggests. But because gamma correction has to stick to providing a digital signal that can be encoded without artifacts in just 8 bits per color per pixel, that latitude is limited.

So it seems to me that out HDTVs need gamma adjustment capabilities.


HDTVs and front projectors with the ability for the end user to tailor gamma already exist, of course. As far as I can tell, gamma adjustment is even becoming a common feature on pricey high-end HDTVs. With these TVs, users are able to change the gamma setting to take into account such things as how dark or light their viewing environment is and what their own preferences are concerning image contrast. Users can also change gamma for DVDs or other video sources they feel have been rendered too dark or too light.

Those end-user gamma adjustments ought now to enter the mainstream. And they ought to be implemented in such a way as to tell the user exactly which gamma exponent (2.2? 2.4?) the TV is using.

In fact, it would be nice if TV makers would include in their TVs' firmware test patterns and software routines similar to SuperCal by which to measure and calibrate gamma. For that matter, why not include calibrating patterns for black level, white level, hue and saturation, etc.?

Tuesday, June 27, 2006

Gamma, Again! (Part V)

In Gamma, Again! (Part IV), I fussed with trying to determine the actual native gamma of one of my HDTVs, a Hitachi plasma. Now I'd like to get back to the main subject: what is gamma, and why should we care?

Gamma is basically the nonlinear way in which the light output or luminance of a TV screen (a.k.a. it's intensity) represents the many possible levels of red, green, and blue, the three primary colors in the video signal.

The higher the display's gamma happens to be in a range from 1.0 to 2.5 or so, the darker and more contrasty the image.


Imagine a "ramp" test pattern:



In it, moving from the left edge of the screen to the right, the input signal rises in level from the minimum possible, for black, to the maximum possible intensity, for white, with all three color primaries present in equal amounts. As the signal level goes up, luminance lags behind. Due to this lag, the luminance output at, say, the halfway point across the screen, is actually a lot lower than it would seem by visual inspection.

That's because this lag is not apparent to the eye: the eye's lightness perception of the various levels of luminance is itself nonlinear. The human visual system tends to exaggerate the lightness variations at lower levels of luminance and compress those at higher levels. That's why this test pattern seems to reach its middle level of lightness right in the center of the left-to-right sweep.


If input signal level is V — for voltage, with analog signals; for video level, with digital signals — then the screen luminance L of the TV is given by the equation

L = VƔ

where Ɣ, the Greek letter gamma, represents gamma. This function is in effect computed three times for each separate pixel in the image: once for red, once for green, and once for blue.

But why? Why not use the simpler function L = V, where the gamma exponent is effectively 1?

There are several reasons, it turns out. The most basic of these reasons is that cathode ray tubes, which are inherently nonlinear, operate with an intrinsic gamma of 2.5 or thereabouts.

That's the most fundamental reason, then, why signals intended for display on CRTs have always been gamma-corrected. A video camera creates V for each color primary according to a function something like

L = V(1/Ɣ)

where Ɣ is (approximately) the assumed gamma of the TV.

I say "approximately" because the actual denominator of the exponent, in the gamma-correction equation, is typically 2.2, not 2.5. (Moreover, due to the fact that for very low values of L the functional relationship shown above is replaced with a straight line segment, the overall exponent is in effect slightly changed again; I'll ignore that nuance for now.)

Because the camera's actual gamma-correction exponent is roughly 1/2.2, or 0.45, gamma correction at the video camera serves to almost but not quite neutralize the gamma of a standard CRT display, which is nominally 2.5. Because the neutralization is incomplete, the final displayed image appears to have slightly more contrast than it would if the gamma correction were complete.


There are several reasons why the camera's gamma-correction exponent doesn't, and shouldn't, fully offset the actual display gamma. One reason is that a video display's luminance levels are tiny fractions of the real-world luminances that arrive at the camera's image sensor from the original scene. Another is that we customarily frame video images in unnaturally dark surrounds and view them in darkened or semi-darkened rooms. A third is that our TVs usually cannot achieve the ultra-wide contrast ratios found in nature.

All three of these reasons result in the need to "goose" image contrast. The best way to do that is to ensure that the gamma correction that is done in the camera does not fully offset the gamma of the display.


Yet according to Dr. Raymond Soneira's four-part series titled "Display Technology Shootout" in Widescreen Review magazine, Sept.-Dec. 2004, studio CRT monitors used in tweaking video images before they are broadcast or rendered on DVD typically have decoding gammas of 2.2, not 2.5. "Current CRTs," he writes in the second part of his series (in WR, Oct. 2004, p. 68; the article can be accessed directly as a web page here) typically have a native gamma in the range of 2.3 to 2.6, so the gamma of 2.20 for Sony (and Ikegami) CRT studio monitors is actually the result of signal processing."

Whatever it's the result of, a gamma of 2.20 seems to violate the maxim that camera inverse-gamma ought not to fully compensate the gamma of the display. If the camera exponent is approximately 1/2.2, or 0.45, and the display gamma is 2.2, then (roughly speaking, at least) full compensation does occur.

I simply can't yet explain why studio CRT-based monitors, using digital signal processing, alter their native gamma figure, which is nominally 2.5, to 2.2.


I mentioned above that the basic reason why gamma correction is done in the video camera and for all other video sources is that CRTs are inherently nonlinear: the luminance they produce is not a linear function of signal voltage.

I also mentioned that the eye's lightness response to luminance is itself nonlinear, such that lower/darker levels of luminance are exaggerated, in terms of their apparent lightness, while higher/brighter levels are more compressed. That was why the ramp test pattern shown above seems to place its middle lightness level right in the center of its horizontal sweep, although the actual luminance at that point is far less than half the luminance of white at the right edge of the ramp.

By a strange coincidence, the eye's own version of "gamma correction," a perceptual trick by which its lightness response is not a linear function of luminance, approximately matches that done in video signal encoding to offset the gamma inherent in CRT picture tubes!

That is, a scientist's graph of the eye's lightness response to luminance has very close to the same shape (and thus the relevant equation has approximately the same exponent, 0.4 or 1/2.5) as a graph of the video gamma correction function.

As a result, a gamma-corrected video signal bears an approximately linear relationship to perceived lightness — though, as I have already said, not to measurable luminance. This is a second reason why gamma correction is done in video. A camera that does gamma correction responds to luminance patterns focused on its image sensor much as the human visual system responds to luminance patterns focused on its retina.

Another way of stating it is to say that gamma-corrected video has perceptual uniformity. (I am drawing here from Charles Poynton's excellent book, Digital Video and HDTV: Algorithms and Interfaces.) Each successive increase in gamma-corrected digital code value over the available range from 0-255 (or 16-235) boosts perceived lightness (though not physical luminance) by the same barely detectable amount. (A similar statement is true for analog video signals expressed in IRE units from 0-100, though each step up in signal level — say, from 50 IRE to 51 IRE — involves a more-than-minimally-detectable boost in lightness.)


Perceptual uniformity in gamma correction works out nicely for two reasons. First, the visibility of video noise, especially troublesome in darker parts of the scene having luminances at the low end of the available range, is effectively minimized.

In the absence of display nonlinearity and gamma correction in the camera, digital video might instead be encoded in a "linear-light" domain. If 8 bits per primary color per pixel were used, the range of available code values would be (at most) 0-255. Suppose the "correct" code value for a gray pixel (ignoring color) were 50, but due to the presence of noise in the circuits of the video camea, it is instead encoded as 51. The seemingly tiny difference in code value would produce a 51/50 = 102/100 = 1.02 = 102% ratio of actual luminance to intended luminance.

That is, the actual luminance on the monitor screen would be 2% higher than it ought to be. But differences in luminance of just 1% can be detected by the eye, at least under certain conditions. So the noise in the non-perceptually uniform, linear-light signal is apt to be noticeable.

However, gamma correction of the luminance at the image sensor of a camera into a perceptually uniform signal domain according to a 1/2.5 power function compresses the low end of the tonal range especially much, and with it what I'll call the low-end noise. The luminance-plus-noise quantity which in the above exapmle prompted an erroneous code value of 51 might, with gamma correction, yield a number like 50.4. But since only integer codes are allowed, this would be rounded to 50, and the noise would disappear!

A similar logic also applies to analog video signals. Without gamma correction, low-end noise would be more of a problem than it is, simply because the eye is more sensitive to lightness variations at the low end of the tonal range than at the high end.


Noise at the high end of the tonal scale or lighntess range is much less of a problem. Again, imagine an 8-bit tonal scale with codes 0-255. If camera noise takes a "correct" pixel value up one level from 200 to 201, the ratio is just 201/200 = 100.5/100 = 1.005 = 100.5%. A mere 0.5% rise in luminance is not detectable to the eye, which under the best of circumstances needs a 1% jump in luminance for differences to be visible.

But there is a separate problem which affects the middle portion and high end of the tone scale in digital video. Poynton calls it the "code 100" problem, and it is the second reason why digital video needs to be gamma-corrected into a perceptually uniform domain.

The "code 100" problem has to do with the need to provide a minimum of a 30:1 contrast ratio between the brightest-possible parts of a scene and the darkest-possible parts. Without gamma correction, the codes from 0 to 100 in an 8-bit encoding scheme, with values from 0-255, have to be thrown out, for reasons similar to the discussion of noise above. That is, each successive code increment (say, code 50 to code 51) provides a much-more-than-barely-detectable boost in output luminance, in a linear-light encoding system.

Accordingly, what should be shades of color or gray that blend indistinguishably into one another instead exhibit banding or false contouring: visible striations that were not present in the original subject matter.

Thus, the codes from 0-100 have to be thrown out and never used. Black has to be identified with code 100, not code 0. (Remember, we are talking here about a hypothetical linear-light method of 8-bit digital encoding, not what is actually done in the real world of digital video.)

If white is at code 255 and black is at code 100, then the ratio between the two is only 255/100, or 2.55:1. That's way too low, when 30:1 is considered the minimum acceptable ratio.

In order to get a contrast ratio that meets or exceeds 30:1, you have to go to 12-bit linear-light coding. Then white is at code 4095, not 255, and black is at 100, for fully a 40.95:1 contrast ratio.

But many of the available codes are in effect wasted; they're not perceptually useful. For example, the eye can't see the difference between any two codes in the range from 4001 to 4040, because the luminance associated with the code at the top of the range is less than 1% above that associated with the code at the bottom.

Gamma-correcting the signal into a perceptually uniform lightness domain allows the same amount of perceptually useful information, with a similarly acceptable contrast ratio, to be shoehorned into pixels of just 8 bits per primary color, not 12 bits. The approximately 1/2.5 power function that converts camera luminance amounts into a gamma-corrected video signal effectively "squeezes out" the wasted code levels. This, then, is the solution to the "code 100" problem.

It solves that problem while also dealing with the low-level noise that would also plague a linear-light 8-bit system, if codes below 100 weren't tossed out. That's why Poynton says gamma correction allows video signals to make maximum effective use of digital channel bandwidths.


So we have seen several reasons for gamma-correcting a video signal:

  • To precompensate for the nonlinearity of a CRT
  • To suppress low-level video noise
  • To code for perceptual uniformity
  • To avoid the "code 100" problem
  • To avoid wasted digital codes
  • To reduce the number of bits needed per pixel
  • To maximize effective use of the bandwidth of the digital channel
  • To maximize effective use of the capacity of a digital recording device

Many of these are, of course, merely ways of saying the same things in different words, when you come right down to it. The first three apply to analog and digital video, while the others are digital-specific. In fact, the last six, all of which have to do with perceptual uniformity, show why gamma correction would need to be done even if the luminance-to-voltage curve of a CRT were perfectly linear.

That is, gamma correction would have to be done even if a CRT display's native gamma exponent were a linear 1.0, rather than around 2.5, simply because in the digital video age coding for perceptual uniformity pays off so handsomely.


At this point in the discussion we may justifiably take a moment to thank our lucky stars. For it is an extremely fortunate coincidence that the gamma-correction equation which best imposes perceptual uniformity on the digital video signal is for all intents and purposes identical to the equation which best precompensates the gamma of a CRT picture tube!

If this were not so, video engineers would have to choose between a camera transfer function with an exponent which best precompensates a CRT's inherent gamma (which under these hypothetical assumptions would not be 2.5) and one which, in Poynton's words on p. 258, "makes maximum perceptual use of the channel." The latter constraint, says Poynton, requires video coding of an image in such a way as "to minimize the visibility of noise, and to make effective perceptual use of a limited number of bits per pixel" — while at the same time sidestepping the "code 100" problem as it relates both to a too narrow contrast ratio and to wasted code values.

But since a CRT electron gun's intrinsic response to signal voltage very neatly mimics the eye's perceptual response to scene luminance, both gamma-correction goals can be served by the same camera transfer function!