Skip to main content
Topic: fb2k's foo_hdcd not as good as hdcd.exe? (Read 752 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

fb2k's foo_hdcd not as good as hdcd.exe?

Recently, I got a CD that has HDCD on it. I decoded a track from it using the HDCD decoder (foo_hdcd) in foobar2000. And...nothing happened. In fact, it had the same Replaygain level as the 16bit source file. But with hdcd 0.2? The total opposite happened! Here's the stats:

01. -8.28 (16bit) Whenever It Rains.wav
02. -8.28 (24bit) Whenever It Rains.24bit.01.wav (foo_hdcd)
03. -2.26 (24bit) Whenever It Rains.24bit.02.wav (hdcd.exe 0.2)

WTF? Obviously, foo_hdcd isn't working, and hdcd.exe 0.2 is I guess I'm better off creating a folder with BAT file, putting all my HDCD files into it and converting everything that way.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #1
foo_hdcd has a preference "Halve output volume". And IIRC hdcd.exe always lowers the volume.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #2
foo_hdcd is broken for other reasons: it takes ten seconds to switch on. And the developer pretends it is supposed to be that way, because a hardware HDCD processor takes ten seconds to switch OFF.
https://hydrogenaud.io/index.php/topic,79427.msg957859.html#msg957859
Memento: this is Hydrogenaudio. Do not assume good faith.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #3
Sheesh. I only did that to prevent false positives, which are a dime a dozen when it comes to the HDCD format. If you don't like it, I can just make it always process, and never auto detect, and you'll just notice that all of your lossless formats decode slower than 500-600 times real time, skewing any benchmarks that people love to tout about their machines. Because this decoder is slow, even with these optimizations.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #4
This is the only option I see in the preferences:

Quote
Additional decoding:

Enable decode postprocessing - for decoding DTS, HDCD, etc.
Refer to the documentation of installed optional components for details.


Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #5
For the hell of it, I tried fb2k's foo_hdcd component on a song from an album that has HDCD PE. First, I converted the original to WAV, made two copies from it with each decoder, then compared them side by side in iZotope. This time, it worked. In fact, the two 24bit files were identical. So the problem with foo_hdcd seems to be with the component not detecting CD's with just HDCD.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #6
This is the only option I see in the preferences:
File -> Preferences -> Advanced -> Decoding -> HDCD Decoder -> Halve output volume.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #7
Under "Halve Output Volume" I chose the Always option. Didn't work.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #8
Sheesh. I only did that to prevent false positives, which are a dime a dozen when it comes to the HDCD format.
There probably were, when foo_hdcd reacted to single-channel flags. That bug was fixed some three years ago?

Doubling volume 10 seconds into the the track is an audibly BIG error. According to https://hydrogenaud.io/index.php/topic,79427.msg836348.html#msg836348 , a HDCD decoder should need no more than 200 milliseconds to switch on. According to https://hydrogenaud.io/index.php/topic,30999.msg778685.html#msg778685 , it would work less-than-perfect for the first 145 ms into a cut+paste ...

If you don't like it, I can just make it always process, and never auto detect

If I can suggest something, let it respond to the <HDCD> tag as follows:
"ALWAYS": switch HDCD on at the beginning of the track
"YES": mimic a HDCD DAC as close as practically possible.
"RESET xxxx": switch HDCD off and ignore the first xxxx ms. That fixes wrong track transitions. Likely most useful for scanning.
"NO": ignore HDCD (= never process this track) upon playback - but invoke when scanning.
"NEVER": ignore HDCD upon playback and upon scanning, like today's "NO".


The "ideal" thing to do (cf. quotes by Charles Hansen above) would be to check the pregap. But that requires foo_hdcd to utilize the previous track, given the common practice of appending pregaps, and that maybe isn't straightforward unless fb2k plays two consecutive tracks from the same album.
But if the user scans an entire album and finds that tracks N-1 and N are both HDCD, then the ALWAYS would handle that.
Memento: this is Hydrogenaudio. Do not assume good faith.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #9
Hi. The HDCD decoder can only have two processing effects: Gain level adjustment, and peak extension. There is no other magic processing that can have any effect on the signal. Halving the volume level and converting to 24 bit really has no effect, other than halving the volume.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #10
And which of these effects benefit from kicking in ten seconds into the song?
Memento: this is Hydrogenaudio. Do not assume good faith.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #11
None of them. I don't kick in "10 seconds into the song". It enables the decoder if there are consecutive frames within the first 10 seconds of the song. It also rewinds back to the beginning and applies the effects from the start. Or at least it's supposed to.

It only scans the first 10 seconds, because otherwise, it would have to be enabled at all times, and would only start to take effect on tracks the moment the first audio packet is discovered.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #12
*sighs*

*reading your answers from the other thread*
*installing foo_hdcd again*
*checking file with foo_hdcd, which claims HDCD but max gain 0.0*
*checking file with ffmpeg, which reports gain of -4.0*
*putting ffmpeg at -v debug and finding two consecutive -4.0's in the first second, and packets per second 14, 20, 20, 20, 20, 20, 20, 20, 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20*
*checking my earlier splicing & looping*

*reading your replies in that other thread, trying to make them consistent with anything*

Nopes.

*checking a really badly HDCD'ed CD to see if it foo_hdcd protects against false positives*

Nopes.

*cleaning up a few hundred junk files*

Memento: this is Hydrogenaudio. Do not assume good faith.

Re: fb2k's foo_hdcd not as good as hdcd.exe?

Reply #13
Delete my component and make a better one, I'm sure just piping it through FFmpeg will be way better anyway.

Hell, it's open source, but I don't see anyone but the developer of the last v2 decoder contributing to it.

E: Which reminds me. One whole reason this decoder is better than hdcd.exe, this decoder is faster.

 
SimplePortal 1.0.0 RC1 © 2008-2019