Help - Search - Members - Calendar
Full Version: Is there any MP3 encoder supports HDCD
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
Pages: 1, 2
lbj12
huh.gif I mean wav files ripped from HDCD.
As is known,uncompressed HDCD is 20 actually bit ( when the tracks are played by the device which supports HDCD),but the cd ripper ( EAC) got a 16 bit compressed wav ( normal 16 bit and some compressed information as inaudible noise).
Any idea to encode the HDCD wav as a 20 bit wav rather than a 16 bit wav?
mithrandir
Nope, no lossy codec could support HDCD. HDCD works by fooling around with the 16th bit, using it as some kind of morse code to tell the HDCD decoder what to do. A lossy codec is just going to throw that bit away.
Pio2001
We don't know any software decoder. It should be easy to make one if the specs were available.
Pio2001
Not so easy, after all...
I suppose the filters are described in the pictures, I couldn't access them.
M
Mmm? According to this, the new Windows Media 9 Series is HDCD compatible:

High-resolution, 20-bit HDCD® Playback
Previously only available on high-end and professional CD and DVD players, Microsoft's patented HDCD audio enhancement technology delivers full 20-bit playback with HDCD encoded compact discs.

Don't know whether that means anything good or not, however. Who would want to use Media Player as their default? Although perhaps a plugin for Winamp (or a DLL for foobar2000?) could be written to access this functionality....

- M.
mmortal03
I read in another thread here that all HDCD information is retained when the cd is ripped to WAV:
http://www.hydrogenaudio.org/forums/index....&t=4533&hl=hdcd

As for WMA9 compatibility, I would assume that this is only for the lossless mode, or that could also just be a plug for Microsoft's ownership of the HDCD format now, because though that is a WMA page, I see no direct connection between the HDCD comment and WMA9 compression.

From page:
QUOTE
WMA 9 Pro supports 24-bit, 96khz audio with support for 5.1+ channel audio as low as 128Kbps.


Ok, so maybe it is compatible, but for 16-bit, 44.1khz there would be hardly any point in lossy besides "correct" downsampling and such. The lossy compression would by no means take advantage of the HDCD methods directly, if at all.

In another note, I have read that while HDCD has its high points, it really has no upperhand to simply a regular album that is recorded correctly and done well.
Pio2001
As I understand it, it's Windows Media Player 9, that will support HDCD playback.
mmortal03
QUOTE
As I understand it, it's Windows Media Player 9, that will support HDCD playback.


Yeah, same here.
lbj12
thx for great ideas.
it seems that hdcd only can be playback with wmp9,but can't be compressed now.
M
A few clarifications:

Yes, it is Windows Media Player 9 that supports HDCD; however, if you use Exact Audio Copy to extract the tracks from an HDCD-encoded CD, the resultant WAV files are still "HDCD". That is, they are HDCD-encoded audio, and if you re-write them to a CD-R, your new disc will still have all the aural quality of the original HDCD.

This leads one wonder how Windows Media Player 9 would handle such WAV files... would it recognize them as HDCD material, or does the player require that they be CDA tracks?

Since HDCD data is essentially "encoded" within the rest of the audio (yes, it is effectively 20-bit audio, but that is done through bit-twiddling and interpretation, and not through an actual word-length) any manipulation of the amplitude in the original WAV - such as would be applied by WaveGain - destroys the HDCD data. In the same way, the process of encoding the music via a lossy compression scheme also destroys the HDCD data. (Lossless compression, on the other hand, does not affect an HDCD-encoded WAV.)

You can compress HDCD-encoded material just like you would any other CD-quality audio. Just because the compressor cannot make use of the HDCD-encoded instructions does not mean it will have any difficulty processing the WAV; lossy-compressors should handle HDCD audio just as any wave editor or non-HDCD CD player would, by interpreting the straightforward (unencrypted) information. (HDCDs are backward-compatible with the RedBook CD spec, for anyone who might not have realized this.)

As for the supposed advantages of the format, HDCD reissues tend to receive more careful attention than whatever reissues had immediately preceded them. Not to say that they are all well done, because they aren't. Some are dreadful, but by-and-large a well-mastered HDCD should still sound quite nice when using non-HDCD compatible playback. However, dual-layer SACDs offer more of an actual improvement in resolution, while maintaining backward compatibility... all without the need to "interpret" any additional information.

- M.
Uosdwis R. Dewoh
As for software decoding -

one thing a software decoder can never do, is switch between a set of hardware filters in realtime. This is one of the real sonic advantages of HDCD, but it does need a proprietary chip. Unless we see soundcards popping out with these chips on them, complete and true decoding, using a computer only, will not happen.

Software decoders, like WMP9, can spot the HDCD signal (actually, any app can do this, if it knows what to look for. WMP8 does.) and can probably decode one aspect of the HDCD encoding, namely expansion of compressed parts of the signal (much like how Dolby Noise Reduction works). This lowers signal floor by up to 6 dB, and raises headroom by up to 6 dB as well. This process, along with subtractive dithering (don't know if that's implemented in software) yields a dynamic range close to what a 20 bit signal has, and a proper 18/20 bit signal is often what is sent to the DAC.

Cheers,
Uosdwis
Pio2001
QUOTE (Uosdwis R. Dewoh @ Dec 26 2002 - 01:36 PM)
one thing a software decoder can never do, is switch between a set of hardware filters in realtime.

I thought these filters were just 44.1->88.2 kHz filters. It is perfectly possible to convert from 44.1 to 88.2 kHz sample rate in software.
lbj12
ohmy.gif is it possible to simulate the hdcd decode & filter chip (PMD100 made by PMI.co)in software? (as is known,matlab can simulate filter and networks)
for reference:
http://www.hdcd.com/partners/proaudio/articles.html

ps:even if it is impossible to playback in realtime,the hdcd rip also makes a great value.since a majority of people only have 16 bit soundcard,to playback hdcd on computer becomes self-blinded in some sense. sad.gif
but we can compress the 20bit hdcd wave into mp3,which will be better
than 16 bit. wink.gif
Uosdwis R. Dewoh
From "Process Overview":
QUOTE
...the HDCD processors' real-time analysis allows the anti-alias filter's transition band characteristics to be dynamically optimized to preserve the program signal's content—reducing distortion and producing a more sonically accurate 44.1-kHz signal.
...

This signal then is interpolated to 96 or 88.2 kHz using a filter that is complementary to the anti-alias filters used in the A/D filter-switching process. The signal can be output at 96 or 88.2 kHz or further interpolated to four or eight times over sampled frequency to drive popular 18-bit to 24-bit D/A converters.


My understanding of this is that for this to work as intended, for the decoding filter(s) to be "complimentary" to the set of filters used during encoding, means that the PMD100 (or whatever) has to be the one and only filter in the DAC signal chain. It's possible you can reap some benefits simulating it in software, but when the decoded signal hits the filter of any other DAC, it will do its own filtering. To me this almost sounds like asking to simulate a DAC in software. wink.gif

The AES paper, also found on the HDCD site, really isn't more explanatory, but perhaps the patent application will give more in-depth info for those interested. I don't have an URL for that, though.

lbj12: a HDCD rip will always be 16 bit. You can get a more dynamic range than out of a normal 16 bit wave, but only if amplitude encoding was applied by the mastering engineer (many choose not to), and only if you have proper amplitude decoding of the signal. In your computer, encoded to mp3 or not, HDCD will provide no benefits over any other properly mastered and dithered 16 bit wave, in my opinion.

/ Uosdwis

Edit: Err, URL for the patent filed is in a post above. rolleyes.gif
Gabriel
It is perfectly possible to decode hdcd in software in something like a 24bits wav. WMP is doing that.
However the problem is that the exact specifications are not publically available, so only wmp can handle it...
Pio2001
So DSPGuru's link was not the specifications sad.gif
DSPguru
QUOTE (Pio2001 @ Jan 2 2003 - 03:26 PM)
So DSPGuru's link was not the specifications sad.gif

it's the patent registration, not the spec sad.gif.
m99
Any news of a ripper/decoder who can save the files as 18-20-24-whatever bits? When Windows Media Player can output it with the extra bits to a soundcard whom support more than 16-bit, then a solution for saving it should be possible to?
Yes, I know it is only 16 "physicals" bits on the CD.
Patsoe
QUOTE (m99 @ Feb 8 2003 - 07:29 PM)
When Windows Media Player can output it with the extra bits to a soundcard whom support more than 16-bit, then a solution for saving it should be possible to?

Yeah, that could be an option; creating some sort of dummy soundcard driver, that in fact does diskwriting... then again, WMP will probably be heavily integrated with WinXP, to ensure HDCD encoding only works with certified soundcard drivers. Or something of the sort.
tigre
QUOTE (Patsoe @ Feb 12 2003 - 04:42 PM)
QUOTE (m99 @ Feb 8 2003 - 07:29 PM)
When Windows Media Player can output it with the extra bits to a soundcard whom support more than 16-bit, then a solution for saving it should be possible to?

Yeah, that could be an option; creating some sort of dummy soundcard driver, that in fact does diskwriting... then again, WMP will probably be heavily integrated with WinXP, to ensure HDCD encoding only works with certified soundcard drivers. Or something of the sort.

Virtual Audio Cable is the solution for this. (I don't know any other.) Details in this thread.
mmortal03
Yeah, that would be nice, AND you could then easily compare the output to the ripped audio and see if any changes occurred. Does anybody know what one might be looking for when comparing the two?
tigre
QUOTE (mmortal03 @ Feb 12 2003 - 05:22 PM)
Yeah, that would be nice, AND you could then easily compare the output to the ripped audio and see if any changes occurred.  Does anybody know what one might be looking for when comparing the two?

Take the quietest part of a song (the gap between tracks would be cheating IMO) and listen if there's a audible difference in noise floor. You need a soundcard capable of 24bit output for this (or you have to amplify by something like +20dB, which could be considered as cheating too).
Pio2001
Substract the ripped wav from the decoded one. As the gain is variable, in parts where an HDCD gain setting was applied, music should be audible.
Patsoe
QUOTE (Pio2001 @ Feb 13 2003 - 12:22 PM)
Substract the ripped wav from the decoded one. As the gain is variable, in parts where an HDCD gain setting was applied, music should be audible.

Wouldn't that require that you convert the undecoded file to 20 bit, using the same process wmp uses?
tigre
QUOTE (Patsoe @ Feb 13 2003 - 10:08 AM)
Wouldn't that require that you convert the undecoded file to 20 bit, using the same process wmp uses?

Yes. CEP, as an example, does this automatically if you substract files with different resolution. I guess Pio2001 didn't mention this as it seems to be obvious.

@Pio2001: Good idea, BTW. Compared to mine it'll save one from listening test fatigue. smile.gif
Patsoe
Well, I'd think if you convert to 20bit using a different process, there will always be differences when substracting, right?
So if you don't know how WMP does the conversion, there will always be a nonzero difference, or?
tigre
I did a short test trying to simulate it: I took a wav file ripped from an ordinary CDA, converted it to 32 bit resolution, amplified by -24dB which is ~ 4 bit. This is file 1 which simulates a HDCD file because it should have information besides noise down to the 20th bit now. The second file for comparison I created by dithering to 16 bit and changing resolution back to 32 bit. This file simulates the same song ripped from a CDA (not HDCD). Substracting both files and amlifying the result so that it was clearly audible, gave noise (no surprise). This noise seemed to be bumping slightly in the ryhtm of the original song and to contain some high chirping sounds. The differences to "ordinary" noise are very low, not noticable without focussing (but abxable). This reminds me of this type of seance where you copy an empty audio-tape over and over again until you hear your dead grandmother speaking. wink.gif

So in case this test is not based on wrong assumptions, Pio2001's method works.
Patsoe
Wow, you're cool. That was quick.

Sorry for getting you to listen to noise smile.gif
Pio2001
The volume gain defined in HDCD can be up to +6 db at -9 db, that is boosting -15 db to -9 db.
So
20 log (10^(-9/20)-10^(-15/20)) = -15 db

thus substracting a decoded HDCD from a raw wav, you can hear, depending on how it was mastered, music up to -15 db.
tigre
I thought 20bit-16bit = 4bit; 2^4=16; 20*log(16) = 24dB. Different preconditions - different results. What's wrong about mine?

Is my test more realistic if I amplify by -15dB - or is it not realistic at all? Have you tried it with a real HDCD or is this just theory? I'm not sure (theoretically) that you get something you can call "music" if you substract decoded HDCD from raw wav, because all signals from 0db to around -90db are cut away by substracting. What's left is (dithering/quantization) noise from raw wav mixed with some signal from HDCD. (?)

- edited: some too fast written BS after "because" wink.gif
Pio2001
QUOTE (tigre @ Feb 14 2003 - 05:05 PM)
I thought 20bit-16bit = 4bit; 2^4=16; 20*log(16) = 24dB. Different preconditions - different results. What's wrong about mine?

You're talking about the difference in audio definition (16 bits vs 20 bits), that are very small : below the noise floor of a CD.
I'm talking about the "peak extend/gain scaling" feature, that applies dynamics DSP (like Dolby noise reduction for tapes). According to this link, a -3 db sample can be decoded at -9 db, while a 0 db is always decoded at 0, thus increasing the dynamics.
Thus my calculus must be redone : the result is a difference of -9 db and not -15.
tigre
Pio2001 - from your link:
QUOTE
First, the Model 1 is used to convert and process the audio data. The Model 1 is an extremely accurate, dual channel 24 bit A/D converter, Digital Processor, and decimation filter that performs the conversion of the source material to HDCD encoded 16 bit digital data. The Model 1 has several options available to the recording engineer to increase dynamic range during decoded playback, Peak Extend among them. It is very important to remember that the use of Peak Extend is optional at the time of recording.

So Peak Extend is "one of several options" to increase the dynamic range of HDCD. I think I understood and want to explain by an example - correct me, if I'm wrong.
Let's say we have a recording (in studio, high resolution (24bit), digitally stored). We normalize it that way that maximum sample value is maximum possible (maximum amplification without clipping). Now we apply Peak Extend, that means every sample value is doubled. This would introduce clipping, on the other hand you "lift" some quiet parts of the signal out of the "dithering-to-16bit-noise" because you amplify everything by 6db. Actually Peak Extend doesn't double all values. Starting from input_value = 0.4*max_value the curve flattens. So it is a limiter, isn't it? There'll be no clipping anymore, so peaks won't sound as much distorted, but there'll be still distortion caused by limiting if you play a peak extended HDCD in an ordinary CD player. If you agree with me on that, I'd like to do another test simulating this. (If not it's not worth while, so I'll wait for your answer.)

Another possibility - If anyone of you ppls has a HDCD - I'd like to get a short lossless compressed sample of it. I'm ready to install WMP9 and do some "real" tests as described in previous posts. (Afterwards I'll restore my system from a backup to get rid of WMP. laugh.gif )

I don't know much about the other "several options" yet, but my simple idea is that maximum loudness is always 0dB, so if you increase the dynamic range, you'll have information at e.g. -100dB where otherwhise would be noise. That's what my ideas/tests have based on until now. Your statement doesn's say right or wrong but I've got the impression that it's rather right.
Uosdwis R. Dewoh
QUOTE (tigre @ Feb 14 2003 - 11:59 PM)
Another possibility - If anyone of you ppls has a HDCD - I'd like to get a short lossless compressed sample of it.

I can send you one, if .ape will do. I'll use a clip from 'Wrecking Ball' by Emmylou Harris, that I'm pretty sure utilizes the gain scaling (I read that in an interview somewhere). Just tell me how long you'd like the clip to be and where to send it.

Cheers,
Uosdwis
Pio2001
QUOTE (tigre @ Feb 15 2003 - 01:59 AM)
So it is a limiter, isn't it? There'll be no clipping anymore, so peaks won't sound as much distorted, but there'll be still distortion caused by limiting if you play a peak extended HDCD in an ordinary CD player.

Looking at Samplitude, the curve match the one they call "compr. max." (maximized compression ?), not the "limiter" one (that clips the audo at a given threshold).
I'd rather call it dynamics compression, but yes, this is in a strictly meaning, a kind of distortion of the original signal.
tigre
Thanks for the explanation, Pio2001 - I think I know how it works and what it causes, but I have to read a little bit in order to use words like "compressor" and "limiter" the right way.
I've already PMed Uosdwis R. Dewoh about the sample, but I have a question about it:

To find differences caused by Peak Extend, there should be several samples bigger than 0.8*max_samplevalue =+/- 26215, best would be if there were several places where 2 or more samples like this in a row occured. On the other hand I don't know if the HDCD decoder is able to start decoding at any position of a file, so it would be safest to take the first few seconds from the first track of the CD. Otherwise, perhaps the sample burned to disk wouldn't be recognized as HDCD properly by WMP9. Unfortunately I found that the beginning (~30 seconds) of the first track "Where will I be" (p2p download, mp3@96khz) doesn't contain any sample values that big.

So do you think it would work just to cut a test sample from the loudest part of the CD?
Pio2001
Since the curve (figure 1 page 3 ) is outside the diagonal exept at 0 and 1, and sample should be scaled exept 0 and clip.
I remember the main article (http://www.hdcd.com) giving the synch time, but I don't remember it. It must have been several times a second.
Patsoe
QUOTE (tigre @ Feb 15 2003 - 02:32 AM)
On the other hand I don't know if the HDCD decoder is able to start decoding at any position of a file, so it would be safest to take the first few seconds from the first track of the CD. Otherwise, perhaps the sample burned to disk wouldn't be recognized as HDCD properly by WMP9.

Well, according to the Decoder FAQ at http://www.hdcd.com/partners/proaudio/articles.html the decoder should listen for synchronization patterns in the lsb continuously. There is no mention of an infoblock at the beginning of the disc/track.
ProtectYaNeck36
So, do WAV files preserve the HDCD material so then it can be possibly burned back to a CD for audio playback in an HDCD compatible CD player? Also, can the HDCD material be preserved using an application such as CloneCD?
Pio2001
1 yes
2 What is special with CloneCD ? It's a normal audio ripper.
Gabriel
I remember a few months ago, some pointed to a program that would specifically destroy the HDCD info (on purpose). So this means that the hdcd signal can be identified (even if the question is still how to interpret it).

It was either here, or on doom9.
Uosdwis R. Dewoh
I haven't heard of any ripper that will destroy the HDCD code on purpose. But any ripper (or other app) that's doing something destructive to the audio while ripping - scaling for instance - will ruin the code.

-- Uosdwis
Patsoe
QUOTE (Gabriel @ Feb 17 2003 - 09:06 AM)
I remember a few months ago, some pointed to a program that would specifically destroy the HDCD info (on purpose). So this means that the hdcd signal can be identified (even if the question is still how to interpret it).

Well, you could destroy hdcd simply by flopping the lsb at a smaller than 40bit interval (since hdcd codes are 40bit long). Or re-dither, or whatever, without knowing the codes.
user
there was a thread at old r3mix forum, I participarted, should be found by search.

In that thread somebody offered a tool, to remove lsb.

bryant has that tool:

http://www.audiofora.com/yabbse/index.php?...y;threadid=2852

and I had sent an ape sample of a HDCD to ff123, he had posted it.


http://www.ff123.net/samples/dpl2/


here is still the HDCD sample.
tigre
Finally I wanted to do the test today. I took a win98 box, installed WMP9, NTONYX VirtualAudioCable and CEP, burned the two hdcd test samples I got (one from Uosdwis R. Dewoh, theo other from user's link - thanks!) To CD-RW and played them back. A little HDCD sign was visible, so WMP9 seems to recognise samples taken from the middle of HDCD tracks correctly.

So far so bad sad.gif

Even though VAC and CEP are capable of capturing/transferring/recording 24bit audio, I didn't manage WMP9 to spit out more than 16bit, no matter what settings I tried. (I'm very patient!) There's no 24bit soundcard installed on that system, but even when removing the 16bit soundcard (only VAC remains as sound device) it didn't work.

So my question is: Does anyone know if WMP9 is capable of 24bit output - If yes: How to activate it?

Obviously it won't be useful to substract WMP9 output from wav file right now, because the HDCD extra resolution (if there is any) will be cut away because of 16bit output. The only thing that could be shown is if the [I]peak extend/gain scaling feature[/b] leads to differences in the test samples I got. So I'll do the wav substraction next and post the results soon.

Again: Please tell me, if you know something about WMP9 and 24bit output.
tigre
QUOTE (tigre @ Feb 26 2003 - 08:09 AM)
Finally I wanted to do the test today.
...
So I'll do the wav substraction next and post the results soon.

Finished. Believe it or not:

Nada - the files are bit-identical! headbang.gif WTF?!

They show this nice HDCD symbol, but there's not even the smallest difference, not even dither! It's just plain CD playback. The take-home message of this test seems to be this: On two 15 second tracks burned at 2x speed on a CD-RW, played back on a Plexwriter121032A, WMP9 hasn't made a single DAE error! biggrin.gif Respect!

-edited: grammar, "arts"
Pio2001
Thank you for the test, Tigre smile.gif I suspected it from the beginning
thomaspf
I am sure you checked the "output 24bit data for HDCD" option in the properties page and had a sound card installed that actually registers with the system as having 24bit capabilities? As you are probably all aware Microsoft owns HDCD.

24bit playback for HDCD seems to work fine on my machine with an M-audio DIO 24/96. However, the quality is below playing the same disc in 16bit using Winamp with ASIO due to the kmixer problem on XP.

Thomas
tigre
QUOTE (thomaspf @ Feb 26 2003 - 12:48 PM)
I am sure you checked the "output 24bit data for HDCD" option in the properties page ...

"What is this guy talking about?" I thought ... So started the box running wmp9 once again. These settings don't exist. Read the helpfile: Special feature, only supported in WinXP.

rolleyes.gif Sometimes just a few hours of trial and error debugging can save minutes of reading manuals. wink.gif

I don't have XP and I don't want it. If anyone knows how to fool wmp9 to use the features - please tell me (I have a box running 2000 if this is a step in the right direction). Or if someone else wants to do the test (or at least the part I can't) I'll do everything to help.
KikeG
QUOTE (thomaspf @ Feb 26 2003 - 09:48 PM)
24bit playback for HDCD seems to work fine on my machine with an M-audio DIO 24/96. However, the quality is below playing the same disc in 16bit using Winamp with ASIO due to the kmixer problem on XP.

This is not true in my case (M-Audio Audiophile). 24 bit output with either waveout or directsound is measurably better than 16 bit with ASIO. In fact, 16 bit w/waveout or directsound is undistinguishable from ASIO from a measurement point of view, sorry.

Just try and make some loopback RMAA tests (http://audio.rightmark.org).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.