Skip to main content

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

0 Members and 1 Guest are viewing this topic.
  • d125q
  • [*][*]
HDCD Decoder
Reply #375
How come I am unable to read $info(hdcd) from within a WSH panel? Trying to use something like fb.TitleFormat("$info(hdcd)").EvalWithMetadb(fb.GetNowPlaying()) simply doesn't work.

EDIT: Okay, I assume that the WSH simply isn't aware of the HDCD decoding that is going on. Putting fb.TitleFormat("$info(bitspersample)").EvalWithMetadb(fb.GetNowPlaying()) on a HDCD-encoded track yields 16, whereas $info(bitspersample) in the status bar yields 24 (since the status bar is completely aware of HDCD and can also use $info(hdcd) and so on). Can anyone confirm this?
  • Last Edit: 10 February, 2014, 07:19:56 AM by d125q

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #376
Obviously, WSH panels are unaware of dynamically generated track information, which is updated after the file starts playing.

  • marc2003
  • [*][*][*][*][*]
HDCD Decoder
Reply #377
Quote
// Dynamic info (VBR bitrate etc) change
function on_playback_dynamic_info() {}

// Per-track dynamic info (stream track titles etc) change. Happens less often than on_playback_dynamic_info().
function on_playback_dynamic_info_track() {}

// Called every second, for time display
// time - float value, in sec
function on_playback_time(time) {}


edit: you should try fb.TitleFormat("$info(hdcd)").Eval() rather than EvalWithMetadb.
  • Last Edit: 10 February, 2014, 10:31:12 PM by marc2003

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #378
Oh good, I love when it's merely user error and not a shortcoming in the relevant component.

  • krabapple
  • [*][*][*][*][*]
HDCD Decoder
Reply #379
FWIW, the HDCD remaster of Mike Oldfield's Ommadawn is only semi-HDCD; the indicator light goes off during the last track ('On Horseback') .  An odd mastering decision.....

HDCD Decoder
Reply #380
Hmm, having the hdcd decoder plugin active, all my HDCD rips* fail the integrity check. Removing the plugin results in passing.
Is it possible to make the decoder not decode HDCD when running an integrity check? If not, then maybe an option to temporary turn it off to be able to verify the rip.

*those with peak extend.
  • Last Edit: 26 February, 2014, 11:16:30 AM by ChronoSphere

  • Porcus
  • [*][*][*][*][*]
HDCD Decoder
Reply #381
Hmm, having the hdcd decoder plugin active, all my HDCD rips* fail the integrity check.


You mean the AccurateRip verification? They don't show up as decoding failed?


FWIW, the HDCD remaster of Mike Oldfield's Ommadawn is only semi-HDCD; the indicator light goes off during the last track ('On Horseback') .  An odd mastering decision.....


What features are enabled on the last track? As pointed out by someone, it goes on if it goes through a particular processor often found in studios, even when no features are enabled.

HDCD Decoder
Reply #382
No, I mean the integrity verification which decodes the track and compares it with the checksum stored in the file. Obviously, the file contains the checksum of the "redbook version" while hdcd decoder decodes the "hdcd version", so audio checksums don't match.

edit: though I guess it's the same foo_verfier plugin for both integrity and accuraterip. Accuraterip also fails for the same reason...
  • Last Edit: 26 February, 2014, 01:55:37 PM by ChronoSphere

HDCD Decoder
Reply #383
http://en.wikipedia.org/wiki/For_the_Masses, track #2


I have found another album like the one lvqcl mentions that has the same problem - 12 Rounds' "Pleasant Smell" single. The right channel is quieter than the left one in all channels, no matter which HDCD Halve output volume setting I use (when I use "Never", both channels become louder, but the right one still isn't as loud as the left one).

Here's a screenshot from foobar's Waveform Seekbar of one track from "Pleasant Smell" when decoded with HDCD Decoder:


Here's the same track loaded in Audacity:


I can confirm the same thing happens with the "For the Masses" album. lvqcl posted a 15-second sample of the song "Fly on the Windscreen" two pages back, and it also happens with all the other tracks in the album. I can post a 15-second sample of a "Pleasant Smell" track too, if needed.

Edit: This does not happen with any other HDCD's I've tested.
  • Last Edit: 15 May, 2014, 09:09:09 PM by torturesauce

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #384
Neat, an HDCD that only encodes the signaling information in one of the stereo channels. I'm open to suggestions as to how to deal with this.

HDCD Decoder
Reply #385
Would it make sense to apply the signaling information to both channels? If not, then dropping that information seems best to me.

  • Porcus
  • [*][*][*][*][*]
HDCD Decoder
Reply #386
This has HDCD flags in one channel (and the same, continuously)?

If so:
A first feature request would be scan/detect/report.
A second would be a playback-by-tag.

Maybe one should have two or three tag fields to deal with this. Like:

<HDCD_DETECTED>: This writes a "comprehensive" report of what a scan finds, enough to know what you would do upon decoding. Should not be written unless the track is completely scanned (i.e. not from scanning just the first part). Could even - in a more advanced version - report whether the HDCD decoding would actually do anything. To keep the length of the HDCD_DETECTED tag down, it could prescribe e.g. HDCD=SCAN or PE=FULLSCAN, which effectively tells the component to read it from a scan every time it wants to know it.

<HDCD_DECODE>: This specifies what to actually do. Values could be e.g. PE=YES; LLE=LEFTONLY or e.g. HDCD=NO. Default for each switch would be whatever information is read out from the HDCD_DETECTED tag, and in the absence of such, default to scanning (like today).

The HDCD_DETECTED tag need not be there if the user is satisfied with having a HDCD_DECODE tag that does not tell whether it is an override or a scan result. If HDCD_DETECTED present, then the component could report an error if it does not match the actual content (e.g. if it is changed by mistake, or in the hypothetical situation that the component has had a necessary bugfix).

  • mysterix
  • [*]
HDCD Decoder
Reply #387
I use ReplayGain with an "Processing: Prevent clipping according to peak" option. So, gain itself is not used and ReplayGain does nothing  without it on lossless sources. Will HDCD-decoder work in this case? I loaded an HDCD-album and the decoder recognized it by $info(hdcd) bit during playing.
P.S. Are you planning to add Monkey's audio and ALAC support?
  • Last Edit: 24 June, 2014, 03:56:39 AM by mysterix

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #388
Monkey's Audio and ALAC support are out of my control, as they need to be implemented by the decoder component, not mine.

  • mysterix
  • [*]
HDCD Decoder
Reply #389
And what about my previous question? I mean that I use ReplayGain for clipping protection in mp3's only and just leave option enabled when listen to lossless. But seems you wrote that HDCD decoder will not work with ReplayGain enabled. So, that is my question - will HDCD-decoder work when no gain really used but just with an "Prevent clipping according to peak" option ticked on? Does true value of $info(hdcd) during playback mean that HDCD-decoder works in my case?
  • Last Edit: 24 June, 2014, 04:50:36 AM by mysterix

  • drbeachboy
  • [*][*][*][*][*]
HDCD Decoder
Reply #390
Monkey's Audio and ALAC support are out of my control, as they need to be implemented by the decoder component, not mine.

ALAC is supported in fb2k. All my HDCD's decode fine in ALAC or am I missing something else that the OP is questioning?
Surf's Up!
"Columnated Ruins Domino"

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #391
The HDCD decoder works regardless of ReplayGain support. However, changing the gain settings around will break existing ReplayGain tags.

  • jacobacci
  • [*]
HDCD Decoder
Reply #392
I have been struggling a bit, getting the foobar HDCD plugin to work and would like to make sure that I am doing this correctly.

I have loaded up the undecoded FLAC files and when I play them the status line of foobar shows HDCD = yes and the relevant HDCD parameters. So everything seems to be installed correctly.

Now I would like to convert / HDCD decode these files.
Right click, open the convert dialogue. Check the tick box "additional decoding" under processing.
Output format FLAC.

Now for my problem:
If I chose AUTO for the output bit depth of FLAC, the conversion result is a FLAC file, which the foobar status line lists as 24bit/44.1kHz HDCD=yes
If I chose 24bit for the output bit depth of FLAC, the conversion result is a FLAC file, which the foobar status line lists as 24bit/44.1kHz HDCD=no

The second file seems to be decoded, the first one not.
It this a bug?

Thanks a lot

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #393
The first file is also decoded, but it's still 16 bits, and apparently the decoding did not have any impact on the actual bit depth, as the least significant bit at 16 bits is still passing through HDCD information.

  • Paesc
  • [*]
HDCD Decoder
Reply #394
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!

HDCD Decoder
Reply #395
Neat, an HDCD that only encodes the signaling information in one of the stereo channels. I'm open to suggestions as to how to deal with this.


Hi Kode,

Sorry for the late reply. Basically the answer is that if the code is only present in one channel, it is NOT valid. Here is an extract from the AES paper presented by Keith Johnson:

The arrival of a valid packet for a channel resets a code detect timer for that channel. If both
channels have active timers, then code is deemed to be present and the filter select data is
considered valid immediately. However, any command data which would effect the level of the
signal must match between the two channels in order to take effect. The primary reason for this is
to handle the case where an error on one channel destroys the code. In such a case, the decoder
will mistrack for a short time until the next command comes along, which is much less audible
than a change in gain on only one channel, causing a shift in balance and lateral image
movement. If either of the code detect timers times out, then code is deemed not to be present,
and all commands are canceled, returning the decode system to its default state. If the conditions
on the encoder side are not changing, then command packets are inserted on a regular basis to
keep the code detect timers in the decoder active and to update the decoder if one starts playing a
selection in the middle of a continuous recording.

Hope this helps!

  • Porcus
  • [*][*][*][*][*]
HDCD Decoder
Reply #396
Neat, an HDCD that only encodes the signaling information in one of the stereo channels. I'm open to suggestions as to how to deal with this.


Hi Kode,

Sorry for the late reply. Basically the answer is that if the code is only present in one channel, it is NOT valid.


OK, per specification invalid, but then: what the [hell|HDCD] does this invalid code mean in practice?

If there was some known misimplementation that someone chose to deal with, how was it dealt with?
If HDCD has been applied in an intermediate step (and, I think I got this from you: some devices would leave HDCD code by default) and then there has been additional processing, what then? If the DAC they used to play it back when listening to the master did process the HDCD, what then?


  • Porcus
  • [*][*][*][*][*]
HDCD Decoder
Reply #397
I have some issues with foo_hdcd vs CUETools vs hdcd.exe on tracks with only low-level gain. Posted in the CUETools thread: http://www.hydrogenaud.io/forums/index.php...700#entry904751
Wombat cannot reproduce my results though, so there might be human error.

@kode54: I have uploaded a test file, I'll pm you the URL and the password.

If anyone else is interested in testing this, let me know.

  • kode54
  • [*][*][*][*][*]
  • Administrator
HDCD Decoder
Reply #398
Perhaps the results will be more in line with what's expected if the optimized hdcd_decode.c has SHITTY_ARITHMETIC defined at compile time? Otherwise, it's just doing its own pow calculation function for the gain table, which follows the spec's 0.5 dB steps between settings, but isn't binary accurate.

  • Porcus
  • [*][*][*][*][*]
HDCD Decoder
Reply #399
Perhaps the results will be more in line with what's expected if the optimized hdcd_decode.c has SHITTY_ARITHMETIC defined at compile time? Otherwise, it's just doing its own pow calculation function for the gain table, which follows the spec's 0.5 dB steps between settings, but isn't binary accurate.


That was all Greek to me ... if you compile a test version, I can run a bitcompare or five.