Skip to main content

Topic: HDCD Decoder (Read 197079 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • SoNic67
  • [*][*][*]
HDCD Decoder
Reply #350
Seems to be fixed in 1.2.5b1.

Yes it is fixed (1.2.3, 1.2.4).
PS: My status bar is:
Code: [Select]
%codec% | %bitrate% kbps | %samplerate% Hz | $if(%__bitspersample%,%__bitspersample% bit | ,) %channels% | %playback_time%[ / %length%] | $if($info(hdcd),'(HDCD:',) $if($info(hdcd_gain),Gain= $info(hdcd_gain) Peak Extend=$info(hdcd_peak_extend) Transient Filter=$info(hdcd_transient_filter)')',)
  • Last Edit: 13 April, 2013, 08:22:26 AM by SoNic67

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
HDCD Decoder
Reply #351
can anyone tell me what settings I should use to try to decode the HDCDs? Or do you just have to play around with it to get the best settings? I'm entirely new to this.


Defaults are OK. If you don't use ReplayGain proper HDCD files will play at half the volume compared to your regular CDs. If you change the volume halving setting to Never, then peak extension utilizing tracks would clip. If you use ReplayGain then the setting doesn't matter, as long as albums are re-replaygained if the halving setting is toggled.

Quote
could I use this plugin with a WAV rip of an HDCD? SInce I'd like to use EAC to make sure it's accurate and all.


Absolutely. Infact if you ripped with foobar2000 with this component installed, you'd have to be careful not to cripple the files unintentionally.

  • Despair
  • [*]
HDCD Decoder
Reply #352
So I should just set the volume halving to only if peak extension is enabled? And I'm not seeing an option for replaygain.

  • SoNic67
  • [*][*][*]
HDCD Decoder
Reply #353
Don't worry about replay gain. Is another foobar component, not part of HDCD. Worthless for CD sources in my opinion.
  • Last Edit: 13 April, 2013, 02:56:21 PM by SoNic67

  • Despair
  • [*]
HDCD Decoder
Reply #354
Alright, but as it stands I can't seem to do anything with the WAV files. the HDCD scanner confirms they're HDCD, but I don't see any option to converting them to the higher bits

  • EpicForever
  • [*][*][*][*][*]
HDCD Decoder
Reply #355
You can. Use built in Coverter and in Processing section configure it to "Enable decode postprocessing". I'm not sure whether you have to manually select bit depth for output files or it will be set automatically in such situation - test it on your own.

  • Despair
  • [*]
HDCD Decoder
Reply #356
Not seeing any difference. If both the peak extension and the transient filters are disabled, I'm guessing there is no change, right? In that case both my HDCD's are useless as HDCD

  • lukpac
  • [*]
HDCD Decoder
Reply #357
Not seeing any difference. If both the peak extension and the transient filters are disabled, I'm guessing there is no change, right? In that case both my HDCD's are useless as HDCD


The filters don't matter for decoding. What *do* matter are peak extension and low level range extend.

  • Despair
  • [*]
HDCD Decoder
Reply #358
Not seeing any difference. If both the peak extension and the transient filters are disabled, I'm guessing there is no change, right? In that case both my HDCD's are useless as HDCD


The filters don't matter for decoding. What *do* matter are peak extension and low level range extend.


Right, but if the scanner says peak extension is disabled doesn't that mean there's no change? I'm not seeing/hearing any low level extension either so I'm assuming that's the case.

  • Porcus
  • [*][*][*][*][*]
HDCD Decoder
Reply #359
The filters don't matter for decoding.


What do they do then? I know that there is no software implementation (not foo_HDCD, not hdcd.exe, not WMP), but what are they really there for? Anyone?

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #360
I had heard that it merely indicated which filter the ADC chose for that block, and that the resulting digital signal was meant to be played with a filter that was a balance between the two. Or something like that. Maybe you'll have some luck digging that up from this or other HDCD topics on this forum?

  • Porcus
  • [*][*][*][*][*]
HDCD Decoder
Reply #361
Right, but if the scanner says peak extension is disabled doesn't that mean there's no change? I'm not seeing/hearing any low level extension either so I'm assuming that's the case.


If the scanner says no peak extension and no low level extension (and no filters), then this HDCD just has a flag saying “I'm a HDCD and the following features are used:” (with nothing listed). Then a HDCD decoder will just pass it through (unless you have set the 6dB reduction to “always”).

If the scanner says no peak extension and no low level extension but transient filters applied (not that I have ever encounted one), then it is for all practical purposes the same as without the filters, as long as you stick to software solutions.

  • EpicForever
  • [*][*][*][*][*]
HDCD Decoder
Reply #362
I'm still wondering how likely is false poitive report of HDCD file by HDCD plugin? Especially when there are no HDCD features reported. Is there a method that is intended to check whether file is being HDCD encoded with least 95% certainty?

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #363
A full scan would be necessary. The current playback detection requires at least two consecutive HDCD packets to continue decoding at least until the end of the track, otherwise it gives up. It also rewinds to the start of the track and restarts decoding from the beginning, in case the first packet is delayed well into the audible portion, so that any peak extension or gain level adjustment is applied continuously.

  • SoNic67
  • [*][*][*]
HDCD Decoder
Reply #364
If the scanner says no peak extension and no low level extension (and no filters), then this HDCD just has a flag saying “I'm a HDCD and the following features are used:” (with nothing listed). Then a HDCD decoder will just pass it through (unless you have set the 6dB reduction to “always”).

Yes. I already said, there are discs that where mastered on HDCD recording equipment, because of the ADC filters quality. However, the sound engineer choose not to use dynamic range extension (virtual 20 bit), in order to sound the same on any HDCD or CD player or from other reasons (transients). However, the last bit that is used to encode HDCD will be lost.
Does it matter? On some recordings it does not, because the total dynamic of source is below the 15 bit level. It's up to the recording engineer to determine that.

Remember, 15bit of real resolution equal to a THD+N=0.003%. How many players reach that number?
  • Last Edit: 16 April, 2013, 08:48:58 PM by SoNic67

  • EpicForever
  • [*][*][*][*][*]
HDCD Decoder
Reply #365
I'm not sure whether to post it here or just sent a private message to you kode54. But OK, I decided to clearly explain my problem in public.
So the history goes like this:
My friend got PSP and a game Ridge Racers PSP. I loved the music, I wanted CD and yes, it was released in Japan of course, in 2005 under cat# KICA 1366-1367. But it was out of print at the time when I wanted to get it. So I downloaded whole 2CD compilation illegaly from the internet in form of FLAC files with additional cuesheet. I listened to it and it was fine. In 2007 this compilation was re-released under cat# KICA 1441-1442 with bit different coverart. I was lucky to buy original copy of re-release version in about 2009. However I haven't deleted my first illegal copy. In ca. 2010 I started upgrading foobar. One of upgrades was adding HDCD support as I own 4 original CDs with HDCD remastered albums of Mike Oldfield - Amarok, Tubular Bells, Incantations and Ommadawn. That was the only option for me to decode HDCD signal as my CD players were always inexpensive. After some time things changed, HDCD decoder wasn't DSP anymore, I got problems with dterminating whether my foobar installation really decodes HDCD or not, that's how I came to this forum. Some time has passed from that moment. And suddenly, several weeks ago I discovered that the old, illegal copy of first Ridge Racers PSP soundtrack (KICA 1366-1367) reports being HDCD encoded. But not all the tracks, some of them are loosing HDCD status after several seconds, and all the rest reports that it uses any of the HDCD features - gain is 0, PE is disabled and TF is of course disabled. Re-released version (KICA 1441-1442) is not HDCD encoded. Any track. All the tracks that are present on these CDs were produced digitally, on computers using software synthesizers - there was no transfer from analog to digital, so I don't think that it could even be passed through HDCD equipment to catch any benefit of it's glorious ADC converters. But first edition shows up as HDCD. Even after full scan. And even the tracks that loose their HDCD status during playback shows up as HDCD in full scan report. Because of differencies in ripping process tracks from both editions have bit different durations and definitely there are shifted beginnings of the tracks (tracks from KICA1366-1367 start after ~1 sec. of silence, tracks from my EAC Secure rip starts immediately).Because of that I can not perform simple comparison of the tracks. I wanted to know for sure whether there are so big differencies between both editions. I wanted to know for shure whether first edition was really HDCD encoded which seems strange to me. What should I do kode54? Send you an e-mail with links to uploaded all files from all discs of both compilations ? Please, give me some advice... I don't have and I never had any access to hardware HDCD player so I can't just burn CD and check it in such way.
  • Last Edit: 17 April, 2013, 01:10:50 PM by EpicForever

HDCD Decoder
Reply #366
A full scan would be necessary. The current playback detection requires at least two consecutive HDCD packets to continue decoding at least until the end of the track, otherwise it gives up. It also rewinds to the start of the track and restarts decoding from the beginning, in case the first packet is delayed well into the audible portion, so that any peak extension or gain level adjustment is applied continuously.


Hello Kode54,

Please note that (unless I am misunderstanding your post) your playback detection method is not necessary and inefficient.

If you read the Instruction Manual for the HDCD Encoder (PM me and I can e-mail you a copy), in the section labeled "Compact Disc Release Mastering" it states:


"HDCD Silence
When producing HDCD release masters, at least 200 milliseconds (1/5 second or 6 NTSC
video frames) of “HDCD Silence” must be provided before the beginning of each segment of
program audio. HDCD Silence is simply an HDCD signal with no program content. “Digital
(Video) Black” may be inserted prior to the 200 msec of HDCD Silence and immediately
following the end of HDCD program audio. The 200 msec of HDCD Silence allows HDCD
playback equipment time to perform any necessary switching or level adjustment."

This means that if any song has any HDCD process applied to it that there will be at least 200 milliseconds of HDCD signal in the pre-track gap.

You do not need to scan the entire song -- only the silence between the songs. This will be sufficient to inform the decoder if any decoding is required.

Also it is extremely rare for a commercial disc to have a mix of HDCD and non-HDCD tracks. Only a few test discs, and perhaps some compilation discs that were made from different mastering sessions. On the other hand, compilations made by users could easily have a mix of HDCD and non-HDCD tracks. Furthermore, the pre-track gap would probably not have the HDCD code that is required by a commercially released compilation.

Hope this helps,
Charles Hansen
  • Last Edit: 05 June, 2013, 09:13:20 PM by Charles Hansen

HDCD Decoder
Reply #367
I had heard that it merely indicated which filter the ADC chose for that block, and that the resulting digital signal was meant to be played with a filter that was a balance between the two. Or something like that. Maybe you'll have some luck digging that up from this or other HDCD topics on this forum?


Hello Kode54,

There is no explicit documentation for this anywhere, but the datasheet for both the original Pacific Microsonics PMD-100 HDCD decoder/digital filter chip and the later 192/24 capable PMD-200 (PM me if you would like a copy e-mailed) shows only one frequency response curve.

I therefore contacted one of the developers regarding the topic of the embedded flag that shows which anti-aliasing filter (of the two available) was used during a given section of the recording. He confirmed that there was only ever one playback filter. When I e-mailed him again to ask why the flag was included, he never replied. I assume that they had planned to use it but either could not find a good way to do so (eg, it would interfere with proper playback on a non-HDCD player) or they simply ran out of time and/or money to do so.

Therefore there are only two relevant processes that require decoding:

1) Peak Extend-- this is constant for the entire track and compresses the top 9 dB of signal into only 3 dB of bits of a linear scale (normal) recording.

2) Low Level Extension -- this is a dynamically varying amount of gain that is applied to the track, but only takes effect when the recorded signal level is below -45 dBFS. This is extremely rare in any recording. On pop music, I have only ever seen this activated in the fade-out between tracks, and in classical music only during a very quiet passage with only one or two instruments playing. In fact it is so rarely used, that it is almost not worth decoding it.

On the other hand, every recording made with this A/D converter will light the HDCD inidcator, ever if neither of the two features above was enabled during the recording process. I call these "fake HDCD's". Some examples are the Grateful Dead re-issues. The mastering engineer chose to use the Pacific Microsonics converter for personal reasons, but did not enable any features that require decoding. Yet when played on a HDCD-capable player, the HDCD light will come on, apparently in an attempt to scare people into thinking that they need to purchase an HDCD-capable CD player....  Sleazy marketing practice at best, although that converter was very well engineered and had higher performance than any other converter of its day.

Best regards,
Charles Hansen
  • Last Edit: 05 June, 2013, 09:14:20 PM by Charles Hansen

  • lukpac
  • [*]
HDCD Decoder
Reply #368
2) Low Level Extension -- this is a dynamically varying amount of gain that is applied to the track, but only takes effect when the recorded signal level is below -45 dBFS. This is extremely rare in any recording. On pop music, I have only ever seen this activated in the fade-out between tracks, and in classical music only during a very quiet passage with only one or two instruments playing. In fact it is so rarely used, that it is almost not worth decoding it.


It's rare that any pieces will have long passages at levels that low. But I'd argue that short sections (mostly fades, but also pauses within songs) aren't rare at all, and can be quite noticeable. For years I wondered why the hiss on the Buffalo Springfield HDCD remasters got noticeably louder during the fades. Turns out it was LLE.

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #369
This means that if any song has any HDCD process applied to it that there will be at least 200 milliseconds of HDCD signal in the pre-track gap.

And foobar2000 itself does not decode the track pre-gap. And I've seen HDCD continue across track boundaries on gapless albums.

The whole purpose of detection is so that my component does not run on non-HDCD content longer than it has to, as it definitely slows decoding down, although not by a margin noticeable by means other than unthrottled benchmarking.

  • Porcus
  • [*][*][*][*][*]
HDCD Decoder
Reply #370
Charles Hansen: Thanks for the info on the filter. I've been curious enough to google quite a bit around for that piece of information.


This means that if any song has any HDCD process applied to it that there will be at least 200 milliseconds of HDCD signal in the pre-track gap.

You do not need to scan the entire song -- only the silence between the songs. This will be sufficient to inform the decoder if any decoding is required.


But a CD player does not start at the pregap, it starts at index 01. Index 00 is only played if one plays across the last index of the previous track, or rewind. It is quite common upon ripping to append the pregap to the previous track. Therefore, when you skip to track X, the pregap won't even be noticed, as kode54 points out.

(Do ordinary CD players even read the audio of the pregap when skipping to a given track?)
  • Last Edit: 10 June, 2013, 12:36:55 PM by Porcus

  • rbbert
  • [*]
HDCD Decoder
Reply #371
...
On the other hand, every recording made with this A/D converter will light the HDCD inidcator, ever if neither of the two features above was enabled during the recording process. I call these "fake HDCD's". Some examples are the Grateful Dead re-issues. The mastering engineer chose to use the Pacific Microsonics converter for personal reasons, but did not enable any features that require decoding. Yet when played on a HDCD-capable player, the HDCD light will come on, apparently in an attempt to scare people into thinking that they need to purchase an HDCD-capable CD player....  Sleazy marketing practice at best, although that converter was very well engineered and had higher performance than any other converter of its day.

Best regards,
Charles Hansen


Actually, the overwhelming majority of the GD releases have PE and LLE enabled.  The two most recent ones don't, which may represent a trend.

  • EpicForever
  • [*][*][*][*][*]
HDCD Decoder
Reply #372
But a CD player does not start at the pregap, it starts at index 01. Index 00 is only played if one plays across the last index of the previous track, or rewind. It is quite common upon ripping to append the pregap to the previous track. Therefore, when you skip to track X, the pregap won't even be noticed, as kode54 points out.

(Do ordinary CD players even read the audio of the pregap when skipping to a given track?)


Why are so sure about CD starting exactly at block 0 of second 0 of given track? I used many CD players - my own, my friends', my parents', my uncles' etc. They got lots of differences - some of them were starting several blocks/frames after real start of track (it was audible when track was starting with strong beat as first sound at very beginning - that beat was always cut at the beginning), and some of them were starting several blocks/frames before track was starting (it was audible on mixed CDs with electronic music, when some beat from previous track was audible as a short crackle in next track). I assume that all CD players suffer the same thing as computer CD-ROMs, which need to be set to start reading for example at +102 or +667 samples (my LG drives). Other thing is that I don't see a problem with CD player reading pre-track gap silently, and starting playing audio after certain point. Of course there is a question if anyone made such algorithm working inside of any CD, but maybe those capable of HDCD are working this way?
Anyway - it seems that HDCD is a regular product for audiophiles. Seems it never really works (like most of products for audiophiles - golden power sockets for example) because of audio signal properties, it was never properly finished at engineering stage, but it cost more than regular CD player (the aim of all audiophile products - higher price). And it seems that it's able to produce false positive reports (like with my Ridge Racers CD).

HDCD Decoder
Reply #373
I discovered that with tracks from Talking Heads – Stop Making Sense  - Special New Edition the output level is halved in the middle of the track when "Only if peak extension is enabled" is selected. The Scan for HDCD tracks reports that some songs have intermittent peak extension on some not at all (disabled).

Moreover, Beck – Beck contains only one HDCD track (without peak extension).

These (exceptions) require another approach for halving the output level, probably tag based. Else, 'Always halve the output' seems to be the one I need.

Oh well...

Cheers,
Adriaan.


I've found an odd CD. It's Madonna's GHV2. Only 2 tracks are HDCD - "Don't Cry for Me Argentina" and "Beautiful Stranger".

In "Don't Cry for Me Argentina", the Transient Filter status constantly flickers between 'yes' and 'no' during some sections of the song.

Also it isn't consistent. For example, around 3:15, Transient Filter says 'yes'. The song plays on for a while, then I drag the foobar slider back to 3:15. Now the Transient Filter says 'no'.

Another problem is a drop-out at 3:27, when Madonna sings the word "Argentina". One of the channel drops out momentarily if decoded with the HDCD decoder, for both the 'Always' and 'Never' halve volume settings. If I don't use the HDCD decoder, then there is no problem, it plays smoothly.

For "Beautiful Stranger", the Peak Extend status is 'yes'. But looking at the waveforms for both the non-decoded and decoded version, the only difference is the decoded version is quieter. If I zoom in, there doesn't seem to be any extra dynamics at all.
Also, they both sound the same when ReplayGain matched, I can't ABX them at all.

  • drSeehas
  • [*]
HDCD Decoder
Reply #374
... If the scanner says no peak extension and no low level extension but transient filters applied (not that I have ever encounted one), ...

Hm, look at this:
Code: [Select]
HDCD Detected
Decoding Statistics:
  Packets Processed              : 941
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 3091
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 2430
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 1834
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 1290
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 2708
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 1792
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 1669
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 4471
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 1780
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 2542
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
HDCD Detected
Decoding Statistics:
  Packets Processed              : 2452
  Peak extend                    : Never enabled
  Minimum gain                   : 0.0dB
  Maximum gain                   : 0.0dB
  Transient filter (Unsupported) : Enabled intermittently
...