Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Title formatting/syntax for proper bitdepth (Read 19960 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Re: Title formatting/syntax for proper bitdepth

Reply #150
@Case @Defender

"If they don't use PE or LLE, then they are effectively 100% plain CD" - effectively yes, decoding-wise yes...but to me those are still HDCDs...they are often mastered very loud (hence all those very high peaks that I never see with regular CDs) in order to be lowered by the player. If now the decoder marks them as non-hdcds we will not be able to halve them and they will be very, very loud - way louder than the rest of the CDs.
On the other hand my "really fake HDCD" (the one with only two tracks with "inactive HDCD") peaks around 0...which shows that it really is not a HDCD.
So we have two sides of the story here:
- decoding - whether ther is much or anything more than on normal CDs to be decoded - here I agree that only PE and LLE matter. Maybe someday TF would become decodable too?
- intention of the producer (call it what you will) - how loud was it produced and all those enormous Peaks on HDCDs or if the TF was used (even if it is useless in reality) - and that is why I am for %__hdcd_enabled% option when it comes to distinguishing HDCD vs. fakes.
Besides...what is wrong with decoding a HDCD that contains no features to 24bit by the component...it does not eat our disk space, does not use too much processing power etc. But we can see (even if there is nothing to be heard) that it is HDCD (as producer/band  intended).

Edit and PS. I did not want to write this for a long time (as it may be against the rules) but most of my HDCDs sound very good (really very good) even if they do not use any of the feature. So HDCD "sticker" is some kind of "guarantee" (to me and to my taste) that the album was well produced. If it is a matter of Pacific or HDCD feature or a good producer or some voodoo....hmmm...the fact that HDCDs sound good is enough for me and it is good to see HDCD logo in my foobar. This is just a private opinion.

Re: Title formatting/syntax for proper bitdepth

Reply #151
Just for info:
I have 79 HDCDs.
Out of those:
- 1 is fake (HDCD "not active" on 2 tracks, rest of the tracks not being HDCD at all)
All other 78 HDCDs are "active" and of those:
- 13 are HDCDs with no features
- 14 are TF only
- 15 are LLE only
- 24 are PE only
- 4 are PE and LLE
- 8 are PE and TF
- 0 are LLE and TF
- 0 have all three

Re: Title formatting/syntax for proper bitdepth

Reply #152
@wojak

I now have Neal Schon too and discovered I already have the HDCD version of Operation Mindcrime 2.
HDCD results are (of course) the same as you had.

Re: Title formatting/syntax for proper bitdepth

Reply #153
Did a few testings using this:
In the mean time I just uploaded a fresh build of foo_hdcd: https://foobar.hyv.fi/foo_hdcd.fb2k-component.

Revealing that there sometimes is stuff going on at track boundaries. Prominent example: Springsteen's: "Tracks" box. All 66 tracks are HDCD flagged, but only 5 have any "features", and, those are PE's in three three-second bursts with peaks around -80 dB - IOW useless:
30 + 31 PE packets in the last three seconds of track 3-13.
Track 3-14, which I split for further checks, have 2+2 PE packets in the first 0.2 seconds, none until the last 2 seconds where it has 20 + 20. Track 3-15 also has 2+2 PE packets in the first 0.2 seconds.
I checked these two tree-second periods,
On CD 4, there are 21+21 PE packets over one three-second period, end of track 12 to the first 0.2 seconds of track 13.


Similar thing was observed for TF packets, like NIN: The Fragile, where track 2 has TF packets: they stop 0.220 into track 3.


Re: Title formatting/syntax for proper bitdepth

Reply #154
@Case
I found my old DVD-Audio Panasonic s49 player which also has HDCD and played some HDCDs to check what would happen and the HDCD logo was always shown on all disks even those not using any features (PE, LLE or TF) but the one disk which shows HDCD "inactive" with your newest component. On those two tracks from that album the logo lights up for a second and then goes off.
All other disks (which are "active" with your component) always show the logo.
That convinces me that the exclusion should at least have an option to only exclude those "inactive" and not all not having PE/LLE.
If the hardware player acts like that I suppose it is by design.

Re: Title formatting/syntax for proper bitdepth

Reply #155
Or another way: an option to "halve only those that show "yes" with hdcd_active".That way we will see that the track reports itself as HDCD but is inactive in reality and will not be halved.

Re: Title formatting/syntax for proper bitdepth

Reply #156
The HDCD decoder chip has output signal for that logo light, it gets signaled as soon as those HDCD magic bits are detected in the dither noise. It doesn't change my opinion about discs without features not being true HDCD. But I will add customization options for the false positive exclusion feature.
That device seems to have S/PDIF output for audio. If you have means to record that bit-perfectly, you could do nice verifications by recording the playback of a track that uses just transient filters, then another recording of the same track but with HDCD signal replaced by random dither noise using for example Smart Dither component with default settings. The recording should probably be done at 88200 Hz or higher, if possible.

Re: Title formatting/syntax for proper bitdepth

Reply #157
The HDCD decoder chip has output signal for that logo light, it gets signaled as soon as those HDCD magic bits are detected in the dither noise. It doesn't change my opinion about discs without features not being true HDCD. But I will add customization options for the false positive exclusion feature.
That device seems to have S/PDIF output for audio. If you have means to record that bit-perfectly, you could do nice verifications by recording the playback of a track that uses just transient filters, then another recording of the same track but with HDCD signal replaced by random dither noise using for example Smart Dither component with default settings. The recording should probably be done at 88200 Hz or higher, if possible.

I think that I do not own any hardware to record such signals. Panasonic has Coaxial and Optical outputs and I have such cables but the only devices I have that have coax/optical input are AVR and DAC so I think this is insuffcient. I do not have any recorder nor PC with such input.

Re: Title formatting/syntax for proper bitdepth

Reply #158
HDCD sampler volume 2, @Case do you have that one?
The last track has "Intermittent" PE. I don't know if that is supposed to be.

Re: Title formatting/syntax for proper bitdepth

Reply #159
I don't have that disc. I tried to buy it now, but Reference Recordings won't let me log in, my "browser activity is suspicious". I tried with Firefox, Chrome and Edge and even with Safari on the phone using different internet connection. The payment page isn't working either, if I were to bypass my account.

Re: Title formatting/syntax for proper bitdepth

Reply #160
HDCD sampler volume 2, @Case do you have that one?
The last track has "Intermittent" PE. I don't know if that is supposed to be.
Managed to acquire the album. The very last HDCD packet on the left channel for some reason doesn't signal PE. The tool is correct that PE isn't used throughout the disc, but for all practical purposes that is irrelevant. The last 10 seconds is just fadeout + silence and PE has no work there.

Re: Title formatting/syntax for proper bitdepth

Reply #161
It isn't supposed to have HDCD over the entire album, since 10&11 are same without/with HDCD, and ditto for 12&13 and 14&15. Which makes it strange that a HDCD demo track 15 does behave that way. (I could have shared it.)

But here is a big issue about the HDCD component version of this reply https://hydrogenaud.io/index.php/topic,126955.msg1055958.html#msg1055958
It makes bitcompare fail - at least across codecs. Compared a FLAC with a WAVE, both are 10:26.800 long:
Differences found: length mismatch - 10:16.768980 vs 10:16.792200, 27199512 vs 27200536 samples.
... cutting off ten seconds plus, but format dependent. TTA vs WavPack:
Differences found: length mismatch - 10:16.701293 vs 10:16.397460, 27196527 vs 27183128 samples.
All "become identical" upon applying offset.
Uninstalling the HDCD component, and everything is fine.

Re: Title formatting/syntax for proper bitdepth

Reply #162
That was a bad bug, fixed version uploaded.

I don't understand your comment about tracks 10/11, 12/13 and 14/15. The non-HDCD tracks 10, 12 and 14 are not detected as HDCD.

Re: Title formatting/syntax for proper bitdepth

Reply #163
Which is the newest version? Do all earlier links connect with the same-newset one?

Re: Title formatting/syntax for proper bitdepth

Reply #164
All links in this thread point to the same file. The current version is 1.20+ preview 2024-12-22.

Re: Title formatting/syntax for proper bitdepth

Reply #165
@Case
could you please confirm that TruePeakScanner Real Bitdepth values for "strange" formats are correct (nearest to reality):
32fp for lossy and 64fp for DSD.
I do not imagine how lossy works but wouldn't "?" be more proper?
As for DSD wouldn't "1" be proper?
If 32fp for lossy reflects foobars internal decoding shouldn't it rather be 64fp for 64bit FB?
Generally I would expect that those values reflect what is in the file so for DSD "1 bit" seems natural. What happens then with decoding and DSD bypassing players audio path is another story. Or does TPS needs to "decompress" DSD to some form of PCM to be able to "measure it"?
 


Re: Title formatting/syntax for proper bitdepth

Reply #166
The scanner doesn't care what kind of source file you have, it always scans the output. The lossy formats you think about (like MP3, Opus or AAC) don't have defined bitdepth, but the decoder in question will decode them into something. Also other lossy formats do have defined bitdepths, like QOA or ADPCM codecs.
As you may have noticed, the built-in decoders for common audio formats use 32-bit floating point output. It's faster and there's no point in using more accuracy. 32-bit float has 150 dB lossless dynamic range and it doesn't clip, so it's more than good enough to use for lossy sources.
There are also fixed point decoders for same formats that may output just 16-bit or 24-bit integer PCM. True Peak scanner would reveal the difference if you had a decoder doing that.

The DSD input component is rarity as it uses the full 64-bit accuracy in its output. It might be faster if it used 32-bit floats too, though that depends on the design.

DSD is indeed just 1-bit, but foobar2000 never sees it in such way. If it passes through foobar2000 audio pipeline, it is either decoded into a PCM with defined bitdepth, or it looks like PCM but is actually DoP.

In short, what TPS shows is based on data coming from decoder component.

Re: Title formatting/syntax for proper bitdepth

Reply #167
@Case
could you please consider implementing and making always visible (even if decoded values are equal to "input" values) the following into your HDCD component:
a. $info(decoded_samplerate)
b. $info(decoded_bitspersample)
c. $info(decoded_channels)
d. $info(decoded_channel_mask)
I know that all three besides $info(decoded_bitspersample) would always be equal to "input" with HDCD files but such features have been implemented into input_sacd and udsd components (todays versions) and those enable us to see full set of input, decoded and output (using your output_component) values plus measured bitdepth (using your TPS). They are very informative and it would be very helpfull to have those for all kinds of signals.
e. Also addition of "halve output volume always when $info(hdcd_active)=yes" would be much apperciated as that would enable us to "see" that files have "hdcd flags" or "pretend to be hdcd" (which is useful information to me) but would not alter their volume (in my case the album with such tracks would be played with equal loudness).
f. I would also be for automatic tagging of hdcd files with "HDCD" mark although this one is probably rather a TPS feature.

Re: Title formatting/syntax for proper bitdepth

Reply #168
I didn't expect things to get so complicated when I joined this topic. There was just the underused "decoded_bitspersample" info field that had existed since the beginning of foobar2000.

Couple of things to note. Special tech info fields should only be filled if they contain valid data that differs from the normal fields.
The "decoded_bitspersample" field is standard documented field in foobar2000 SDK that has existed since the beginning. None of the fields you ask about are in use, even though they could have valid uses in some formats (but not in DSD).

The decoded_samplerate could be valid with MQA (if there was an MQA decoder) and with MP3 Pro and HE AAC that use spectral band replication. MQA is a lot like worse version of HDCD, regular PCM data with all the lowest bits used to hide higher frequency content. It works at normal sample rate everywhere but a special MQA decoder "unfolds" it into a higher sample rate version. And SBR enabled lossy formats work at half the sampling rate with legacy decoders, SBR-enabled decoders generate higher frequency content from hints and allow use of intented sample rate. With these formats I could see "decoded_samplerate" being valid, but foobar2000 has chosen not to utilize such field.

And "decoded_channels" could be valid with MP3 Surround. It looks like a regular stereo MP3 for normal decoders but MP3 Surround decoder finds it to be 5.1 surround file. If there was a decoder for this format the "decoded_channels" field would make sense. And if there are multiple channels then the channel mask field of course comes in handy.

I see no use for these fields with DSD or HDCD. Adding them would only add confusion.

I'm not sure what you mean with your "e." point. The option to always halve output is there, it works even with these fake files if you don't have the false-positive option enabled. And I promised configuration options to fine tune what is considered false positive, just haven't gotten around to do that.
The "f." part belongs in my opinion only in the HDCD component. A loudness scanner shouldn't care about peculiarities of the format it's dealing with.

Re: Title formatting/syntax for proper bitdepth

Reply #169
The "f." part belongs in my opinion only in the HDCD component. A loudness scanner shouldn't care about peculiarities of the format it's dealing with.
Because it is very efficient to write the tags when scanning with TPS, you detect it anyway within TPS.

I scan all tracks with TPS which writes pretty much all the values I care for except specific HDCD/SACD. SACD does not matter since those files are easy to spot not being FLAC.
HDCD matters. I have no way of knowing FLAC is actually HDCD unless I specifically scan with HDCD scanner or play the file. Which means I always have to run two scans (HDCD and TPS) and after detection have to add tags manually.

TPS knows it is a HDCD track, so simply just write a tag. You already write 19 other tags.

Re: Title formatting/syntax for proper bitdepth

Reply #170
@Case
ad. a-d. I am aware that what I have asked might seem strange and unnecessary for some users but as it turned out for DSD it is very useful. For example if I play DSD2,8MHz/1bit/6ch (FL FR....) file as nativeDSD it shows that input_sacd component decoded that file to DSD2,8MHz/1bit/6ch (FL FR....) but if I play the same file as PCM it shows that the component decoded it to 384kHz/64bit/6ch (FL FR....). Which in turn is equal to what your TPS measured (64bit for DSD) and is equal with your output_component (except for bitdepth which is set to 32 by my DAC). So all 4 "decoded_" functions show if the signal was altered or not. That kind of information is very useful to me. As for HDCD it shows that 16bit were decoded to 24bit (because the file contains 17 or 24 bits depending of HDCD features used). But because "decoded_bitspersmple" is the only 1 of 4 that work I do not see anything regarding samplerate, channels and mask. I know those stayed unaltered but it is just not visible and not verifiable. The worst is with "standard" files where nothing is shown. And I would very much like to see all those 4 values even if they would be the same as "input" with most of the files. Adding those fields would in my opinion not add confusion as only those who want to use them will use and see them. People not interested in such data would simply not add those functions to their layout, most of them will probably even not know if such features exist.
ad. e. You have recently added a new function $info(hdcd_active) which is not the same as $info(hdcd). I have some files that show $info(hdcd) but show $info(hdcd_active)=no (and those I personally treat as fake HDCDs). Accidentally those file are on albums that also contain nonHDCD track. So If I use "always halve" (and I always use that one) such albums are not equal in loudness - normal files play as they do and "Fake HDCD" files play quieter (on the same album) which is very inconvenient. That is why I would like to have additional option to "halve all those that show $info(hdcd_active)=yes. That way I would be able to see if files are or pretend to be HDCD but at the same time be able to listen to whole albums with equal loudness. The "exclude apparent false positive" does not let me do it because it treats some files as nonHDCD so I can't even see if those claim/pretend to be HDCD (which is again a useful information to me).
ad. f. I would like to be able to automatically tag all HDCD files (even those fake - so all that have $info(hdcd) should be tagged) as HDCD in order to ex. display such info in DUI Columns or Search for such files etc. Because hdcd plugin does not do tagging I (actually @Defender was first) thought that scanning with TPS for other values might do this one as well. Which would be complementary to scanning RealBitdepth and showing that such files are more than 16bits (because they are HDCD).

 

Re: Title formatting/syntax for proper bitdepth

Reply #171
I didn't expect things to get so complicated when I joined this topic.
Then of course, the topic has come to include a new and improved HDCD decoder. Maybe that is now so semi-mature that the discussion on that should be spun off to one of the HDCD threads?

In which case [pun not intended], what do you prefer? On one hand it is a foobar2000 specific code and could belong in this subforum - but I'd say that getting HDCD decoding closer to correct is a bigger thing, remember that ffmpeg started out from foo_hdcd.

Re: Title formatting/syntax for proper bitdepth

Reply #172
I don't mind keeping the HDCD tweak discussion in this topic. People who care about it know of its existence.
I uploaded a new build labeled "preview 2025-01-13" with fine tuning options for the false positive detection and about page includes titleformat field documentation and kode54's license text requirements.
Download https://foobar.hyv.fi/foo_hdcd.fb2k-component.

Re: Title formatting/syntax for proper bitdepth

Reply #173
I don't mind keeping the HDCD tweak discussion in this topic. People who care about it know of its existence.
I uploaded a new build labeled "preview 2025-01-13" with fine tuning options for the false positive detection and about page includes titleformat field documentation and kode54's license text requirements.
Download https://foobar.hyv.fi/foo_hdcd.fb2k-component.

@Case
I just tested the newest version (just with few tracks that caused different problems in previous versions). All seem to work correctly - my "fake" HDCD tracks (those that say "hdcd_active"=no) are seen as nonHDCD and are not lowered (just as the description says).... but...I still think that "halve when "hdcd_active"=yes" would be better than "Exclude when no HDCD code after beginning". The new reason (except not being able to see if the file pretends to be hdcd) is when I scan those files with TPS while "Exclude when no HDCD code after beginning" is enabled those show 16bits but when the same files are scanned with "Exclude when no HDCD code after beginning" disabled they show 17bits. In my opinion HDCD decoder or one of its features should not decide on this because those file are either 16 or 17 and that should be constant and independent.

Re: Title formatting/syntax for proper bitdepth

Reply #174
I don't understand what love you hold towards these fake HDCDs. If a track is not HDCD it should get absolutely no special HDCD processing done to it. You need to make up your mind what you consider a fake HDCD.

There is a slight logic error when you say that component setting shouldn't affect decoded bit depth. That is a direct result of the loudness halving. If you think that allowing user to configure it is a mistake, why then are you asking for more loudness halving options?
You need to remember that if bit depth is 17-bits, it just means 16-bits that has had its loudness halved. And that means it's a fake HDCD. Treating these as anything other than normal tracks is in my opinion nonsensical.