This post is to collect some web resources on HDCD. See bottom of post for the resource list.
Why?
In short, HDCD is a technology to encode a 20 bit audio signal to a CD-compatible 16 bit audio signal. While ripping some old audio CDs of mine, I stumbled across two records with the HDCD logo:
- The B-52’s – Time Capsule – Songs for a Future Generation
- Dire Straits – Sultans of Swing – The Very Best of Dire Straits
Both releases are from the year 1998, when the HDCD technology was rather common. Also, both releases are compilations. Determined to extract the audio in the best possible quality, I wanted not only to rip the CDs, but also decode the HDCD audio.
I have ripped the CDs with Exact Audio Copy to 44,1 kHz/16 bit WAV files. Since the PCM WAV format is lossless and uncompressed, the HDCD information packets remain intact. After that, I have used FFmpeg with the filter option -af hdcd
to decode the HDCD audio. Because HDCD audio has a bit depth of 20 bits, it’s a good idea to store the audio lossless in 24 bit WAV files. You can do this with FFmpeg by using this command:
ffmpeg -i input-16bit.wav -af hdcd -acodec pcm_s24le output-24bit.wav
One of the HDCD features is called peak_extend, and this is what it does:
The top 9dB is soft-limited, or “squashed”, into the top 3dB in the 16-bit stream. When HDCD is being decoded, the top 9dB is reconstructed.
https://wiki.hydrogenaud.io/index.php?title=High_Definition_Compatible_Digital#Function_and_features
In other words: When you master an HDCD-enabled audio CD, the mastering processor transforms a 20 bit audio signal into a 16 bit audio signal by squashing the peaks of the signal. With a conventional CD player, the peaks are distorted and only with an HDCD-compatible CD player, the original peaks are restored and played.
It turned out, that the B-52’s audio indeed contains HDCD packets, but no HDCD features are enabled. FFmpeg says, that the peak_extend
flag is never enabled and there is no max gain adjustment.

This must have been disappointing for the few people that bought this CD in order to enjoy superior HDCD quality. The output file sounds exactly the same as the input file (except for having a different overall amplitude because of the added bit depth).
What about the other CD?
At least the Dire Straits CD audio has an enabled HDCD feature: the peak_extend
flag is enabled permanently.

The difference is subtle, but it is there: The HDCD audio has a little higher peak-loudness ratio, it is more dynamic and less squashed.

Bottom: HDCD decoded audio
Both WAV files have been peak normalized
There is no real advantage in HDCD, in my opinion. I completely agree with Jim Lesurf, who writes:
On the positive side, some HDCDs do sound excellent when played as HDCD and still sound good when played as a normal CD. And some discs […] do sound better to my ears when played as an HDCD than as a CD. However I can’t help feeling that it might have sounded just as good if it had simply been mastered onto CD at a slightly lower level so that the peaks hadn’t needed to be HDCD squashed to fit. That way the sound would have been available to a wider audience to appreciate.
Jim Lesurf – http://www.audiomisc.co.uk/HFN/HDCD/Examined.html
Resources
- Wikipedia article: https://en.wikipedia.org/wiki/High_Definition_Compatible_Digital
- A more detailed introduction, including commands for decoding HDCD audio: https://wiki.hydrogenaud.io/index.php?title=High_Definition_Compatible_Digital
- A very well informed opinion peace with lots of technical info: http://www.audiomisc.co.uk/HFN/HDCD/Enigma.html and http://www.audiomisc.co.uk/HFN/HDCD/Examined.html
- A (not comprehensive) list of HDCD CDs: http://wiki.hydrogenaud.io/index.php?title=List_of_HDCD-encoded_Compact_Discs
- The source code of the HDCD decoder in FFmpeg: https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/af_hdcd.c