Skip to main content
Topic: HDCD Decoder (Read 218519 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HDCD Decoder

Reply #401
old kode54 vs new kode54, the only one without halving volume. Difference range of 0.0000026 to 0.0000153 should be interpreted accordingly.

Code: [Select]
Differences found in all track pairs.
Zero offset detected in 6 out of 6 non-identical track pairs.

Comparing:
"C:\£V03\01 ~ Larks' Tongues in Aspic, Part One.wav"
"G:\£V03\01 ~ Larks' Tongues in Aspic, Part One.wav"
Compared 35959140 samples.
Differences found: 6090809 values, starting at 0:00.104807, peak: 0.0000026 at 10:00.564195, 2ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\02 ~ Book of Saturday.wav"
"G:\£V03\02 ~ Book of Saturday.wav"
Compared 7755720 samples.
Differences found: 456573 values, starting at 0:00.033651, peak: 0.0000011 at 2:47.675488, 2ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\03 ~ Exiles.wav"
"G:\£V03\03 ~ Exiles.wav"
Compared 20324220 samples.
Differences found: 776787 values, starting at 0:00.052721, peak: 0.0000014 at 0:02.798934, 1ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\04 ~ Easy Money.wav"
"G:\£V03\04 ~ Easy Money.wav"
Compared 20859300 samples.
Differences found: 969334 values, starting at 0:00.024603, peak: 0.0000087 at 3:17.769456, 1ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\05 ~ The Talking Drum.wav"
"G:\£V03\05 ~ The Talking Drum.wav"
Compared 19650960 samples.
Differences found: 5789500 values, starting at 0:00.000000, peak: 0.0000060 at 2:09.109615, 1ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\06 ~ Larks' Tongues in Aspic, Part Two.wav"
"G:\£V03\06 ~ Larks' Tongues in Aspic, Part Two.wav"
Compared 18840696 samples.
Differences found: 1294054 values, starting at 3:51.635601, peak: 0.0000153 at 6:50.609546, 1ch
Detected offset as 0 samples.






hdcd.exe (the .wav.hdcd.wav files) vs new kode54, close except track 5
Code: [Select]
Differences found in all track pairs.
Zero offset detected in 6 out of 6 non-identical track pairs.

Comparing:
"C:\V03\01.wav.hdcd.wav"
"C:\V03\01 ~ Larks' Tongues in Aspic, Part One.wav"
Compared 35959140 samples.
Differences found: 8375504 values, starting at 0:00.104626, peak: 0.0000031 at 0:05.395986, 1ch
Detected offset as 0 samples.

Comparing:
"C:\V03\02.wav.hdcd.wav"
"C:\V03\02 ~ Book of Saturday.wav"
Compared 7755720 samples.
Differences found: 790220 values, starting at 0:00.033651, peak: 0.0000021 at 0:00.284966, 2ch
Detected offset as 0 samples.

Comparing:
"C:\V03\03.wav.hdcd.wav"
"C:\V03\03 ~ Exiles.wav"
Compared 20324220 samples.
Differences found: 1003446 values, starting at 0:00.052721, peak: 0.0000025 at 0:05.212608, 1ch
Detected offset as 0 samples.

Comparing:
"C:\V03\04.wav.hdcd.wav"
"C:\V03\04 ~ Easy Money.wav"
Compared 20859300 samples.
Differences found: 1314510 values, starting at 0:00.024603, peak: 0.0000041 at 3:17.882993, 1ch
Detected offset as 0 samples.

Comparing:
"C:\V03\05.wav.hdcd.wav"
"C:\V03\05 ~ The Talking Drum.wav"
Compared 19650960 samples.
Differences found: 7811623 values, starting at 0:00.000000, peak: 0.0004261 at 0:00.005850, 2ch
Detected offset as 0 samples.

Comparing:
"C:\V03\06.wav.hdcd.wav"
"C:\V03\06 ~ Larks' Tongues in Aspic, Part Two.wav"
Compared 18840696 samples.
Differences found: 1435872 values, starting at 3:51.635601, peak: 0.0000073 at 6:50.370000, 1ch
Detected offset as 0 samples.


That improves a tiny bit over the fairly close comparisons hdcd.exe vs. old kode54 - same issue with track #5:

Code: [Select]
Differences found in all track pairs.
Zero offset detected in 6 out of 6 non-identical track pairs.

Comparing:
"C:\£V03\01.wav.hdcd.wav"
"G:\£V03\01 ~ Larks' Tongues in Aspic, Part One.wav"
Compared 35959140 samples.
Differences found: 8582736 values, starting at 0:00.104626, peak: 0.0000026 at 10:55.775986, 1ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\02.wav.hdcd.wav"
"G:\£V03\02 ~ Book of Saturday.wav"
Compared 7755720 samples.
Differences found: 805810 values, starting at 0:00.033651, peak: 0.0000024 at 2:47.694104, 2ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\03.wav.hdcd.wav"
"G:\£V03\03 ~ Exiles.wav"
Compared 20324220 samples.
Differences found: 1047606 values, starting at 0:00.052721, peak: 0.0000024 at 0:05.137075, 1ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\04.wav.hdcd.wav"
"G:\£V03\04 ~ Easy Money.wav"
Compared 20859300 samples.
Differences found: 1352023 values, starting at 0:00.024603, peak: 0.0000057 at 3:17.770113, 1ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\05.wav.hdcd.wav"
"G:\£V03\05 ~ The Talking Drum.wav"
Compared 19650960 samples.
Differences found: 7964942 values, starting at 0:00.000000, peak: 0.0004264 at 0:00.005850, 2ch
Detected offset as 0 samples.

Comparing:
"C:\£V03\06.wav.hdcd.wav"
"G:\£V03\06 ~ Larks' Tongues in Aspic, Part Two.wav"
Compared 18840696 samples.
Differences found: 1484115 values, starting at 3:51.635601, peak: 0.0000091 at 6:50.608889, 1ch
Detected offset as 0 samples.


CUETools I am getting more problems with ...
Memento: this is Hydrogenaudio. Do not assume good faith.

HDCD Decoder

Reply #402
Oh. The reason why I reacted in the first place, were due to processing tracks vs. images. Update posted here: http://www.hydrogenaud.io/forums/index.php...mp;#entry905120

Comparing images:

HDCD.exe/CUETools output compared to official foo_hdcd:
Differences found: 21246657 values, starting at 0:00.104626, peak: 0.0000091 at 46:21.342222, 1ch

HDCD.exe/CUETools output compared to new foo_hdcd build:
Differences found: 20740436 values, starting at 0:00.104626, peak: 0.0000073 at 46:21.103333, 1ch

Diff old/new:
Differences found: 11208954 values, starting at 0:00.104830, peak: 0.0000076 at 46:21.342880, 1ch



A wishlist item, by the way: make it possible to sort and right-click for properties (or move to playlist) the output of scan-for-HDCD. (Or: auto-tagging those which employ any HDCD feature.)
Memento: this is Hydrogenaudio. Do not assume good faith.

HDCD Decoder

Reply #403
Great plugin. Gives Foobar2000 another advantage over other many audio software.

Output format:
In Foobar, the output format in Preferences - Playback - Output is 16-bit by default. I haven't seen a comment if this needs to be changed. To make use of the HDCD decoder, version 1.15, do I need to change the bit depth to 24-bit? Or can I just leave it at 16-bit?

View - Console:
The HDCD detection is displayed in the left bottom edge by the Syntax $if($info(hdcd),'HDCD'). It shows HDCD when a HDCD track is played. So if no HDCD tracks are played, the field simply is left blank. It works well so far. However, in View - Console, there is no information that a HDCD track has been detected. Do I need to change something, or is my installation faulty? Maybe this is not showed in the Console anymore?

Any other changes required after installation?
Is there anything that needs to be changed at all after the HDCD plugin has been installed from the Foobar Components homepage http://www.foobar2000.org/components/view/foo_hdcd? Under Links - Documentation, there is no information given for this plugin.

Many thanks for your support!


View -> Console: There is no information that a HDCD has been detected.
Is it correct?

HDCD Decoder

Reply #404
Bug report.  A quite strange issue. I converted some hundred GBs, and verified afterwards, and one file simply refused to verify identical with foo_bitcompare.

After throwing out components one by one, it boils down to foo_hdcd - and throwing out foo_hdcd eliminates what I thought was a brief dropout in the left channel. Note that I have disabled ("Never") halve volume.
Changing to the new build in post 401, eliminates the differences, but not the "dropout".

fb2k reports the apparent differences as 3072 values, starting at 0:13.061224, peak: 0.4141083 at 0:13.087098, 1ch

Scanning for HDCD it is reported as a "fake" one: HDCD yes, but no features. Why is it then processing the file?

(hdcd.exe does not report it as HDCD. I can get you the file.)
Memento: this is Hydrogenaudio. Do not assume good faith.

Re: HDCD Decoder

Reply #405
Having just discovered this plugin - which is excellent BTW - I have a couple of questions:

I have an MP3 version of an HDCD encoded CD which I purchased a few years ago from emusic. It is a RR HDCD classical CD - but emusic obviously did not decode it properly prior to creating the MP3 files. Obviously, the control bits for PCM are not in the MP3 file. Is it possible for you to allow HDCD processing to be enabled via an option such that a user can turn on PE for files that the user absolutely wants to process during playback? I would be happy to take the default - in other words - reduce gain by 6 dB and decompress the data above 3 dB back to its original 9 dB range.

Similarly, is it possible for you to provide an option to disable hdcd processing "on the fly" - so that one could hear the FLAC rip with and without HDCD processing. This would be useful when showing other audio guys what the HDCD stuff is all about ;-) It is not easy to do this at present as the whole component has to be deinstalled to play a file back "normally".

Many thanks,

Mike

Re: HDCD Decoder

Reply #406
Similarly, is it possible for you to provide an option to disable hdcd processing "on the fly" - so that one could hear the FLAC rip with and without HDCD processing. This would be useful when showing other audio guys what the HDCD stuff is all about ;-) It is not easy to do this at present as the whole component has to be deinstalled to play a file back "normally".
It seems excessive to change the plugin for such demonstration. I suggest you decode the track from HDCD to PCM (wav), disable the HDCD plugin (as you described) and compare between the original and decoded track.

Luckily HDCD is hardly used anymore and I hope it will disappear completely. Why? It distorts the sound when not decoded (as in most cases) and it makes no sense in the shift to downloads/streaming music.
In theory, there is no difference between theory and practice. In practice there is.

Re: HDCD Decoder

Reply #407
It seems excessive to change the plugin for such demonstration. I suggest you decode the track from HDCD to PCM (wav), disable the HDCD plugin (as you described) and compare between the original and decoded track.

Luckily HDCD is hardly used anymore and I hope it will disappear completely. Why? It distorts the sound when not decoded (as in most cases) and it makes no sense in the shift to downloads/streaming music.


So - you agree with me about one thing ;-) I want to hear the "undistorted" sound from my MP3 files of an HDCD transfer. I can handle the ability not to "turn it off" on the fly. I just thought if the developer was in there playing around with the code, that they could do two changes instead of one.

Agreed that HDCD is dead - for new recordings only! However, there are at least 5000 old recordings which one would like to be processed properly. The Reference Recording classical music HDCD are magnificent when played back in foobar2000 via this component. HDCD will not disappear completely - just like DVD-Audio did not disappear completely ;-)

Re: HDCD Decoder

Reply #408
It seems excessive to change the plugin for such demonstration. I suggest you decode the track from HDCD to PCM (wav), disable the HDCD plugin (as you described) and compare between the original and decoded track.

Luckily HDCD is hardly used anymore and I hope it will disappear completely. Why? It distorts the sound when not decoded (as in most cases) and it makes no sense in the shift to downloads/streaming music.


So - you agree with me about one thing ;-) I want to hear the "undistorted" sound from my MP3 files of an HDCD transfer. I can handle the ability not to "turn it off" on the fly. I just thought if the developer was in there playing around with the code, that they could do two changes instead of one.

Agreed that HDCD is dead - for new recordings only! However, there are at least 5000 old recordings which one would like to be processed properly. The Reference Recording classical music HDCD are magnificent when played back in foobar2000 via this component. HDCD will not disappear completely - just like DVD-Audio did not disappear completely ;-)


When I want to do a comparison, I load an HDCD-encoded track in Audacity then export it as AIFF. This makes the foo_hdcd plugin not decode the HDCD data.

Re: HDCD Decoder

Reply #409
When I want to do a comparison, I load an HDCD-encoded track in Audacity then export it as AIFF. This strips all HDCD information from the file.

The only reason it would do that is if you have dither enabled. Otherwise it will be identical to the original file (presumably WAVE).


Re: HDCD Decoder

Reply #411
New version, I have a little bug, in my status bar : %__hdcd% and $info(hdcd) reports "yes" even if I play a non HDCD track.

Re: HDCD Decoder

Reply #412
This should be fixed now. It was calling something uninitialized, which, when I changed it back to supporting arbitrary channel counts as well as the new stereo decoder mode, caused a crash.

Re: HDCD Decoder

Reply #413
Great, as far as I can tell, it's fixed now !
Good job :)

Re: HDCD Decoder

Reply #414
Hi, new to this forum. Joined because I'm trying to find out about how to decode HDCD into 20 (or 24) bit files. to then convert to FLAC. I want to do this so I can play HDCD enhanced files into a modern DAC and get the benefit of the 20 bit quality. I have a HDCD cd player that's pretty good but it won't live forever.

I am usually a Mac guy so I don't have a Windows PC or foobar but it appears this is the only way to do it. So I may need to get my hands on one.

Does this decoder need to play the HDCD files in real time to decode them? And then have to capture the output as it goes to new 24 bit files?

Or does it perform a decode process that can be saved as new files when finished? Or both?

Thanks!

Re: HDCD Decoder

Reply #415
This decoder can do both real time playback and quite rapid offline conversion. FFmpeg also employs the same converter now, but you must enable it in your conversion process.

Re: HDCD Decoder

Reply #416
This decoder can do both real time playback and quite rapid offline conversion. FFmpeg also employs the same converter now, but you must enable it in your conversion process.

Ah Ok thanks!

This has been a bit of a "thing" for at least 10 years now. I've come across many forum threads about it during that time and at least somewhere I saw comments to the effect that only the Pacific Microsonics chips running in real time did it 100% correctly. That may have been true at the time or entirely wrong. It sounds like there is absolute confidence that an offline foobar software decode is 100% correctly done too.

And then there's FFmpeg now, which is new to me. A quick look at that has me curious because it appears it can be run in OSX (yes?) but it is also a command line tool which would normally be beyond me. However it may be that very specific conversions (such as HDCD decoding of 44/16 PCM audio) calling for just one or two command lines might be something I could do with some guidance. FFmpeg appears to be extremely powerful and versatile which means it has a vast amount of configurations and settings to do all that it does. In other words, if it can run in OSX and setting it up to run HDCD decodes was relatively simple to explain, I would do it, but it sorting it out myself as I've never been a code guy or software engineer might be over my head.

Re: HDCD Decoder

Reply #417
I'm trying to add an HDCD display to the status bar, but I don't want to see yes/no strings, as the fields return, but rather something like this:

HDCD [PE/TF/0.0dB]
HDCD [__/__/0.0dB]

I tried this:

$if(%__hdcd%, | HDCD '['$if(%__hdcd_peak_extend%,PE,__)'/'$if(%__hdcd_transient_filter%,TF,__)'/'%__hdcd_gain%']',)

Unfortunately this approach always shows PE and TF as if they were active as the variables return a yes/no answer in text, which are both interpreted as "true" by $if().
$replace() doesn't seem to help here either because I would need to use two and a yes would result in "PEyes" or "TFyes%" and a "no" would yield "no__"

Is there a way to achieve this?

Re: HDCD Decoder

Reply #418
$replace(%__hdcd_peak_extend%,yes,PE,no,__)
$replace(%__hdcd_transient_filter%,yes,TF,no,__)

Re: HDCD Decoder

Reply #419
OK, I'm a dumbass and I completely missed that part in the wiki and didn't realize you could chain them within a single statement.
Doing too many unrelated things at a time sure develops a short attention span...

Thank you once more.

Re: HDCD Decoder

Reply #420
Tracks using peak extension should now be safe to play in album order, as it now looks ahead on track start and applies a detected status to the beginning of the track. No more funny volume bumps at the start of tracks in the middle of an album. It may need a bit of work, though.

Similar issue:  I have an album with tracks that have HDCD packets with peak extension at the beginning, but apparently the packets stop, as indicated by %__hdcd% changing to false mid-track.  (Maybe the mastering person wanted to set the HDCD peak extension setting at the beginning of the track and then replace the HDCD packets with a higher-quality, noise-shaped dither?)  This causes an unnatural volume increase in the middle of the track.  I have "Halve output volume" set to "Always," but I imagine the issue would be the same with any setting value.  Of course, I plan on using Replaygain to counter the HDCD volume change, but the mid-track jump seems to be a bug.

Re: HDCD Decoder

Reply #421
Also, %__bitspersample% displays "24" for HDCD.  I would expect it to be "20" or at least "16" to be consistent with the variable's meaning (source bits before 32-bit processing).

Re: HDCD Decoder

Reply #422
Returning "20" would nearly uniquely identify them, but AFAIK the "20" is marketing bogus.

As for your previous question:

Similar issue:  I have an album with tracks that have HDCD packets with peak extension at the beginning, but apparently the packets stop, as indicated by %__hdcd% changing to false mid-track.  (Maybe the mastering person wanted to set the HDCD peak extension setting at the beginning of the track and then replace the HDCD packets with a higher-quality, noise-shaped dither?) 

By "mid-track", do you mean farther out than some ten seconds?

If so, I imagine that it could be an "error" in the mastering: someone has spliced a part encoded with HDCD together with one part without.
Memento: this is Hydrogenaudio. Do not assume good faith.

Re: HDCD Decoder

Reply #423
Yeah, could be a mastering error for all I know, but it is a real CD.  How would I go about playing this CD with extended peaks if the HDCD codes stop after some seconds, without a volume disparity?  Maybe real HDCD hardware would maintain its state for the duration of the track, regardless.

About the bits per sample, yeah, the whole one-bit-isn't-exactly-6-dB thing.

Re: HDCD Decoder

Reply #424
How would I go about playing this CD with extended peaks if the HDCD codes stop after some seconds, without a volume disparity?

- How many seconds out in the track is it? If it is only ten, it could (for all that I know) be an unfortunate track boundary.
- Have you tried all three "halve volume" options?
- At least originally, foo_hdcd supported only the "CDDA, WAV, FLAC, and WavPack inputs" (ref. the first posting of this thread). Try to convert to a different lossless format then?
- Processing down to 15 bits resolution does kill the HDCD flags.


Maybe real HDCD hardware would maintain its state for the duration of the track, regardless.
I think it is supposed to reset after ten seconds.

About the bits per sample, yeah, the whole one-bit-isn't-exactly-6-dB thing.
No, in that the HDCD format expands by much less than four bits. As far as I remember, some of the "resolution enhancement" was either dithering or noise shaping which is not part of the format itself. But it was part of the HDCD chip, and therefore counted into the marketing of "HDCD" even if it could be achieved by other means.
Memento: this is Hydrogenaudio. Do not assume good faith.

 
SimplePortal 1.0.0 RC1 © 2008-2018