What Is HDCD?
High Definition Compatible Digital (HDCD) is a proprietary audio encode-decode process developed by Pacific Microsonics and released commercially in 1995. It is designed to deliver increased dynamic range over standard 16-bit CD audio while remaining fully backward-compatible with conventional CD players. Listeners without an HDCD decoder still hear a normal 16-bit playback; listeners with a decoder recover the additional encoded information.
Microsoft acquired the technology in 2000. At its peak, over 5,000 titles were available on HDCD-encoded CDs, spanning artists such as Neil Young, the Beach Boys, and the Grateful Dead. Microsoft’s official HDCD website was discontinued in 2005, and the format is no longer in active production, though a substantial back-catalogue of HDCD titles exists and continues to be ripped and archived in lossless formats such as FLAC.
HDCD works by embedding hidden control packets into the least significant bit (LSB) of the 16-bit audio data. These packets are inserted only 2β5% of the time and are effectively inaudible on standard playback. When decoded, the recovered signal yields up to 20 bits of dynamic range. The encoding process involves up to three distinct features:
Peak Extend (PE) β A reversible soft limiter applied during mastering that increases headroom by up to 6 dB without clipping. On decode, the peaks are precisely restored. Because this compresses average levels, Peak-Extended recordings will sound approximately 6 dB quieter than non Peak Extended recordings unless the decoder compensates.
Low-Level Range Extend / Transient Filter (TF) β A high-frequency filter applied to improve low-level signal reproduction and transient accuracy. This feature is detected by foo_hdcd but note that, per the open-source implementation on which foo_hdcd is based, the transient filter is detected and flagged but not fully applied in software decoding. Hardware HDCD decoders implement this fully.
Gain Adjustment (Target Gain) β A precise volume correction baked into the HDCD data, expressed as a value between β7.5 dB and 0.0 dB in 0.5 dB steps (for discs mastered after approximately 1995). This allows the mastering engineer to set an exact reference level that the decoder reproduces.
The HDCD data payload is a standard 44.1 kHz, 16-bit Red Book-compatible stream. No special disc pressing or hardware is required to store or distribute HDCD content, any lossless rip of an HDCD CD will preserve the encoded data intact.
About foo_hdcd
foo_hdcd is a foobar2000 component that automatically decodes HDCD streams contained in lossless audio files. It was originally written by Christopher Snowhill (kode54) and has since been substantially developed and maintained by Case. The component is open-source, released under the 3-Clause BSD licence.
This component automatically decodes HDCD streams contained in several supported lossless containers, including .WAV, .FLAC, .WV (WavPack), and .TAK. It also supports scanning files for HDCD features in use and reporting the results in a list.
foobar2000.org/components/view/foo_hdcd
Current version: 1.22, released 2025-09-08
Developer: Case (based on kode54’s original work)
Component: foobar.hyv.fi/?view=foo_hdcd
System requirements: Windows 7 or newer, 32-bit or 64-bit; foobar2000 v1.5 or newer.
Installation:
Download the .fb2k-component file from either the foobar2000 components repository or directly from the developer’s page at foobar.hyv.fi. Install by dragging the file onto foobar2000, or via:
File β Preferences β Components β Install
Restart foobar2000 when prompted. No additional configuration is required for basic HDCD decoding β the component activates automatically during playback of compatible files.
Note: foo_hdcd is a PCM postprocessor component. It operates within foobar2000’s decode chain and does not function as a standalone utility.
How It Works
When foobar2000 plays a supported lossless file (WAV, FLAC, WV, or TAK), foo_hdcd inspects the incoming 16-bit PCM stream for embedded HDCD control packets. If valid HDCD encoding is detected, decoding activates automatically β no user action is required.
The component is bit-accurate with the reference Windows Media Player decoder when output is truncated to 20 bits. Internal processing accuracy is 24 bits. The practical output depth depends on your foobar2000 output configuration and the capabilities of your DAC or audio interface.
Important: $info(bitspersample) continues to report the original source bit depth (16-bit) and is not modified by the component. Use $info(decoded_bitspersample) to confirm the actual decoded output depth.
HDCD Info Variables
foo_hdcd exposes the following title-formatting fields for use in the status bar, playlist columns, or title bar:
| Field | Returns |
|---|---|
| $info(hdcd) | Overall HDCD detection status for the track |
| $info(hdcd_active) | Whether HDCD codes are currently present in the stream |
| $info(hdcd_active2) | Whether HDCD codes are present and actively affecting output |
| $info(decoded_bitspersample) | The actual decoded bit depth |
| %__hdcd_peak_extend% | Peak Extend status |
| %__hdcd_transient_filter% | Transient Filter status |
| %__hdcd_gain% | Gain Adjustment value |
Recommended: Use $info(hdcd_active2) rather than $info(hdcd) to flag HDCD tracks in your display strings. It confirms that HDCD codes are both present and influencing the audio output, avoiding false-positive indicators.
The HDCD status is also retrievable with %__hdcd% or $info(hdcd) for general detection status.
Status Bar and Title Formatting
The following formatting strings can be used in foobar2000’s Preferences β Display β Status Bar or in a DUI/CUI title bar. All examples have been verified against the current component version.
Full HDCD detail string (status bar):
%codec% | %bitrate% kbps | %samplerate% Hz | %channels% | %playback_time%[ / %length%]$if($info(hdcd_active2),’ | HDCD β Peak Extend: %__hdcd_peak_extend% | Transient Filter: %__hdcd_transient_filter% | Gain: %__hdcd_gain%’,)
Minimal HDCD indicator:
$if(%__hdcd_active2%,HDCD,)
Legacy formatting examples (from the original Hydrogenaudio discussion threads β still functional):
$if(%__hdcd%,’ (‘HDCD β pe:%__hdcd_peak_extend% tf:%__hdcd_transient_filter% gain:%__hdcd_gain%’)’,)
%codec% | %bitrate% kbps | %samplerate% Hz | %channels% | %playback_time%[ / %length%] $if(%__hdcd%,’ ‘HDCD – Peak Extend: %__hdcd_peak_extend% Transient Filter: %__hdcd_transient_filter% Gain: %__hdcd_gain%’ ‘,)
Source: hydrogenaud.io/index.php/topic,79427.msg716302.html#msg716302 and hydrogenaud.io/index.php/topic,79427.msg716575.html#msg716575
Using the HDCD Scanner
The HDCD scanner allows batch-checking of a selection of tracks for HDCD content without playing them in full.
To run the scanner:
- Select the tracks you want to scan in your playlist.
- Right-click and select HDCD Scanner from the context menu.
- The scanner processes each file and presents results in a sortable list.
The scanner reports for each track:
- Whether HDCD encoding is present
- Which features are in use (Peak Extend, Transient Filter, Gain Adjustment)
- Detailed information about what HDCD decoding will do to that track
- The concluded HDCD state (genuine HDCD, potential false positive, non-HDCD)
As of v1.21, the scanner supports dark mode and results are sorted and sortable by any column.
Scanner tagging: The scanner can tag files according to their concluded HDCD state. For example:
- False positive tracks can be tagged as “off” so they are not incorrectly decoded on future plays.
- Non-HDCD tracks in a mixed HDCD/non-HDCD compilation can be forced to use the same volume settings as the HDCD tracks, preserving consistent playback levels across the album.
The tag fields, values, and tagging behaviour are fully customisable in Preferences β Advanced. Tag treatment behaviour is also configurable using title formatting.
False Positive Handling
Not every file that triggers HDCD detection contains genuine HDCD content. Some 16-bit recordings can contain bit patterns that coincidentally resemble HDCD control codes. Since v1.21 foo_hdcd includes automatic false positive prevention.
If you suspect a track is being incorrectly decoded:
- Run the HDCD Scanner on the affected track.
- Review the scanner output β it will show whether the detected codes are actively affecting the output ($info(hdcd_active2)).
- Use the scanner’s tagging function to mark the track as non-HDCD, preventing incorrect decoding on future plays.
Since v1.22, the false-positive-related configuration options have been simplified in the UI, though the underlying behaviour is unchanged from v1.21.
Output Chain Considerations:
For maximium benefit, the following points are worth bearing in mind:
- Output bit depth: Set your foobar2000 output to 24-bit to take full advantage of HDCD decoding. Go to Preferences β Playback β Output, select your output device, and verify the bit depth setting. If your output is set to 16-bit, the additional dynamic range recovered by HDCD decoding will be discarded by truncation.
- DAC capability: foo_hdcd only delivers its full benefit if your DAC or audio interface can reproduce the additional dynamic range. Most modern USB DACs and audio interfaces support 24-bit without issue.
- Peak Extend and volume: Decoded Peak-Extended recordings will sound approximately 6 dB quieter than non-Peak-Extended recordings, because the Peak Extend process compresses average levels at the mastering stage. The decoder restores the peaks but does not raise average levels. This is by design.
- ReplayGain interaction: If HDCD Gain Adjustment is encoded into a track, applying ReplayGain on top may be redundant or counterproductive. Check the scanner output to see what gain values are embedded before applying ReplayGain to HDCD content.
- Hybrid encoded files: As of v1.22, foo_hdcd supports hybrid encoded files.
Hydrogenaudio Discussion
The original development thread and community discussion is at:
hydrogenaud.io/index.php/topic,79427.0
Those FLACs should still contain HDCD information, and the %__hdcd% info tag should be showing as much in the status bar. (Or in the playlist, if you have a playlist view that updates with dynamic metadata.)
hydrogenaud.io/index.php/topic,79427.msg720656.html#msg720656
Images:
HDCD (PNG) | freebiesupply.com/logos/hdcd-logo
References:
- foobar2000.org/components/view/foo_hdcd
- foobar.hyv.fi/?view=foo_hdcd β Developer home page
- wiki.hydrogenaudio.org β foo_hdcd component page
- en.wikipedia.org/wiki/High_Definition_Compatible_Digital
- wiki.hydrogenaudio.org β HDCD
Post Changelog
This post was originally published 31 March 2022. The following changes were made during the 2026 revision:
| # | Change | Reason |
|---|---|---|
| 1 | Supported formats updated. Original post listed CDDA, WAV, FLAC, and WavPack. Current supported containers per the official component page are WAV, FLAC, WV (WavPack), and TAK. CDDA is no longer separately listed in the official description; TAK support was added after the original post. | Outdated. |
| 2 | Output bit depth corrected. Original post stated the component processes “16-bit PCM data into 20-bit PCM.” Since v1.21, internal processing accuracy is 24-bit. Output at 20-bit truncation remains bit-accurate with the WMP reference decoder, but stating “20-bit PCM” as the output is no longer correct as a standalone claim. | Outdated / incomplete. |
| 3 | Info variables updated. Original post listed %__hdcd%, %__hdcd_peak_extend%, %__hdcd_transient_filter%, and %__hdcd_gain% as the available fields. Since v1.21, $info(hdcd), $info(hdcd_active), $info(hdcd_active2), and $info(decoded_bitspersample) are the current canonical fields. Legacy variables remain functional and are retained in the Formatting Examples section for reference. | Incomplete / partially superseded. |
| 4 | Version number updated. No version was cited in the original post. Current version is 1.22, released 2025-09-08. | Not previously included. |
| 5 | Developer attribution updated. The component was originally by kode54 (Christopher Snowhill). It has since been substantially developed and is currently maintained by Case. | Not previously included. |
| 6 | Scanner description updated. The original post described a simple scanner processing up to 5 seconds per track. The scanner has been substantially overhauled as of v1.21: it now supports dark mode, sortable columns, detailed per-track decoding information, and the ability to tag files by HDCD state. | Outdated. |
| 7 | False positive handling added. This feature was introduced in v1.21 and did not exist at the time of the original post. | New information. |
| 8 | Minimum foobar2000 version clarified. The HA wiki lists v1.5; the foobar2000.org component page states v1.6. The developer’s own page at foobar.hyv.fi states v1.5. v1.5 is used as the stated minimum, being the developer’s own figure. | Clarification. |
| 9 | HDCD background section added. No background on the HDCD format itself was included in the original post. | New section. |
| 10 | Tutorial / usage section added. Installation, operation, output chain considerations, and scanner usage were not covered in the original post. | New section. |




