title
Products            Buy            Support Forum            Professional            About            Codec Central
 

HDCD not working with WMA Lossless?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iangrant
    dBpoweramp Enthusiast

    • Nov 2007
    • 94

    HDCD not working with WMA Lossless?

    I've been converting my CDs to WMA 9.2 Lossless, and I just noticed that a CD with HDCD gave 16-bit WMAs, rather than 24-bit, which the HDCD decoding plugin should produce, so I did some investigation.

    I took a 16-bit WAV rip of the track, with no DSP plugins or tags, and then converted it to a variety of formats, with and without the HDCD plugin. I then converted the formats back to WAV (again, no DSP) and calculated MD5 hashes on the files.
    Here are the results:

    First, for reference, the original WAV converted to 24-bit with the HDCD DSP plugin:
    Code:
    B5EB64FC234758F85C6C179715C5AF67 Original 16-bit WAV rip
    EAD76AD5CB8F72B021BA84ABD2487FD3 Original > WAV (with HDCD, so 24-bit)
    D94A859A25FF48EFA8B71792B1B2E81C Original > WAV (no DSP, so 16-bit) [Henceforth labelled as Original (2)]
    EAD76AD5CB8F72B021BA84ABD2487FD3 Original (2) > WAV (with HDCD, so 24-bit) [Henceforth Original-HDCD]
    Strangely, I found that simple WAV>WAV conversion with no DSP gave two files that should be the same but have different hashes. Perhaps this is because of some meta-data (even though I removed all tags). In any case, converting both of these files to 24-bit with the HDCD plugin yields identical results.

    Secondly, converting to FLAC:
    Code:
    D94A859A25FF48EFA8B71792B1B2E81C Original > FLAC (no DSP, so 16-bit)
    D94A859A25FF48EFA8B71792B1B2E81C Original (2) > FLAC (no DSP, so 16-bit)
    EAD76AD5CB8F72B021BA84ABD2487FD3 Original > FLAC (with HDCD, so 24-bit)
    EAD76AD5CB8F72B021BA84ABD2487FD3 Original-HDCD > FLAC (no DSP, but 24-bit))
    The output hashes matched the WAV references above, and 16-bit or 24-bit files were produced automatically, depending on the HDCD plugin (or source file), so it appears the HDCD DSP works fine for FLAC.

    Thirdly, converting to WMA (9.2 Lossless). In the options for WMA 9.2 Lossless, you can manually select the sample rate and bit depth of the output. I think this might be affecting the HDCD DSP. I had thought that selecting 16-bit and enabling the HDCD plugin would produce 16-bit WMAs with normal CDs, but 24-bit WMAs with HDCDs, however, it always produces 16-bit WMAs. Similarly, selecting 24-bit always produces 24-bit WMAs (even for non-HDCD CDs), which defeats the purpose of the plugin. In any case, this raises the question: if you select 24-bit, does the HDCD decoding work? That is, are the files that are produced the same as those from HDCD decoding above?
    Code:
    D94A859A25FF48EFA8B71792B1B2E81C Original > 16-bit WMA (no DSP)
    D94A859A25FF48EFA8B71792B1B2E81C Original (2) > 16-bit WMA (no DSP)
    ED49DA6B2F4691A156B504B7D62E055B Original > 16-bit WMA (with HDCD)
    ED49DA6B2F4691A156B504B7D62E055B Original (2) > 16-bit WMA (with HDCD)
    1C497AD0814A96098A9ADF4A601A7847 Original > 24-bit WMA (no DSP)
    1C497AD0814A96098A9ADF4A601A7847 Original (2) > 24-bit WMA (no DSP)
    69830F53BF0C8BD5D81B2C93907C62B1 Original > 24-bit WMA (with HDCD)
    69830F53BF0C8BD5D81B2C93907C62B1 Original (2) > 24-bit WMA (with HDCD)
    69830F53BF0C8BD5D81B2C93907C62B1 Original-HDCD > 24-bit WMA (no DSP)
    Converting WAV to WMA produces different results depending on the HDCD DSP plugin, whether 16-bit or 24-bit. Crucially, the 24-bit WMA output with HDCD is not the same as the 24-bit output from WAV or FLAC. Neither is it the same as 24-bit WMA output without the HDCD plugin (i.e. simple increasing bit-depth).

    What if we convert those 24-bit WMAs back down to 16-bit?
    Code:
    ED49DA6B2F4691A156B504B7D62E055B 24-bit WMA (from HDCD, 6983... above) > 16-bit WMA (no DSP)
    D94A859A25FF48EFA8B71792B1B2E81C 24-bit WMA (no HDCD, 1C49... above) > 16-bit WMA (no DSP)
    So the WMA bit-depth increase process is reversible.

    Am I missing something, or does it look like 24-bit doesn't work properly with WMA? Because if I have a 24-bit WAV, convert it to 24-bit WMA, and then back to 24-bit WAV, the hashes don't match! Although the verification check in dBPowerAmp doesn't report any failures.

    Would really appreciate some authoritative input on this one...
  • Spoon
    Administrator
    • Apr 2002
    • 44507

    #2
    Re: HDCD not working with WMA Lossless?

    Microsoft designed thier codec that way, you have to specify all at 24 bit or not.
    Spoon
    www.dbpoweramp.com

    Comment

    • iangrant
      dBpoweramp Enthusiast

      • Nov 2007
      • 94

      #3
      Re: HDCD not working with WMA Lossless?

      Originally posted by Spoon
      Microsoft designed thier codec that way, you have to specify all at 24 bit or not.
      Sure, but that doesn't prevent dBPowerAmp from programmatically selecting 24-bit or 16-bit after any HDCD decoding.

      It also doesn't explain why the hashes are different for 24-bit FLAC and WMA files from HDCD decoding of the same WAV file, nor why converting a 24-bit WAV to 24-bit WMA then back to WAV results in a non-matching hash!

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44507

        #4
        Re: HDCD not working with WMA Lossless?

        We cannot guess the special configuration string to enable this, again a MS design, the config values would change depending on which WMA version was installed, and even which windows version.
        Spoon
        www.dbpoweramp.com

        Comment

        • iangrant
          dBpoweramp Enthusiast

          • Nov 2007
          • 94

          #5
          Re: HDCD not working with WMA Lossless?

          Originally posted by Spoon
          We cannot guess the special configuration string to enable this, again a MS design, the config values would change depending on which WMA version was installed, and even which windows version.
          I'm not sure I understand, it's possible for the user to specify 24-bit or 16-bit in the GUI for the WMA encoder, why isn't it possible for dBpowerAmp to select this according to the result of HDCD decoding?

          Also, do you have any comment on the HDCD decoding with 24-bit WMA? It looks as though it doesn't work, but the HDCD plugin doesn't warn this of course.

          Comment

          • Spoon
            Administrator
            • Apr 2002
            • 44507

            #6
            Re: HDCD not working with WMA Lossless?

            The HDCD DSP can only work with 16 bit, it cannot work with 16 bit which is 24 bit.
            Spoon
            www.dbpoweramp.com

            Comment

            • iangrant
              dBpoweramp Enthusiast

              • Nov 2007
              • 94

              #7
              Re: HDCD not working with WMA Lossless?

              Originally posted by Spoon
              The HDCD DSP can only work with 16 bit, it cannot work with 16 bit which is 24 bit.
              Again, I don't understand what you're saying there.

              I discovered that MD5 hashing is not necessarily a good way of verifying lossless-ness (I'm sure other people knew this, but I had to go elsewhere to find out), and have been using the bit-compare plugin in foobar2000.
              Thankfully, 24-bit WMAs produced with HDCD decoding do match with FLAC or 24-bit WAV output.

              16-bit WMAs with HDCD decoding are different from those without the HDCD decoding (presumably the 24-bit post-HDCD data is converted back down to 16-bit), so it's not entirely safe to use the HDCD DSP with WMA (except in the case of specifying 24-bit WMA output, in which case if the CD isn't HDCD, the 24-bit WMA is just wasting space, but is not technically detrimental to the audio).

              So the only problem remains with dBpowerAmp forcing 16-bit or 24-bit for WMA. What happens when the user selects 24- or 16-bit in the WMA GUI? Is a flag or option is passed to the WMA encoder? This is where I am suggesting dBpowerAmp should be able to set this flag not depending on what the user chose in the GUI, but rather on whether the bit-depth of the data to be converted (that comes from the HDCD DSP) is 16- or 24-bit.
              This thread here seems to suggest the same feature about a year ago, but the last post when unanswered:

              I wanted to convert music into lossless, and selected WMA Lossless. However, I noticed additional options in settings which the other lossless formats don't have: I selected 44 KHZ and 2 channel 16 bit VBR. Does that mean I lost information compared to other choices (such as 2 channel 24 bit VBR)? What are the proper
              Last edited by iangrant; November 22, 2008, 11:53 AM. Reason: Link to thread from search

              Comment

              • Hobizal

                • Dec 2008
                • 42

                #8
                Re: HDCD not working with WMA Lossless?

                I just ran into this problem as well using WMA-L. On one of my CD's, I was getting "Error" on all tracks. The log said verification failed for the tracks. I changed the encoder setting to 24-bit, and then all tracks ripped okay.

                Can dbpoweramp be made to automatically switch between 16bit and 24bit when HDCD is detected? Or do I have to manually look for a rip-status of "error" and make sure the CD says HDCD on it?

                Comment

                • Spoon
                  Administrator
                  • Apr 2002
                  • 44507

                  #9
                  Re: HDCD not working with WMA Lossless?

                  You can turn onthe Technical column in CD Ripper to look for a CD which is HDCD before ripping.
                  Spoon
                  www.dbpoweramp.com

                  Comment

                  • iangrant
                    dBpoweramp Enthusiast

                    • Nov 2007
                    • 94

                    #10
                    Re: HDCD not working with WMA Lossless?

                    Originally posted by Hobizal
                    Can dbpoweramp be made to automatically switch between 16bit and 24bit when HDCD is detected?
                    dBpoweramp can't automatically select 16- or 24-bit output with WMA-L, the user must manually select the bit depth.

                    Originally posted by Spoon
                    You can turn onthe Technical column in CD Ripper to look for a CD which is HDCD before ripping.
                    If you enable HDCD decoding with WMA-L, you need to be aware that you should set the bit depth to 24-bit. If you leave it at 16-bit, any CDs that are HDCD will be decoded to 24-bit (or 20-bit, IIRC), and then dithered back down to 16-bit, which is a waste of time in my opinion.
                    On the downside, if you select 24-bit and your CD is not HDCD, then you are just wasting space by storing 16-bit data at 24-bit.

                    Comment

                    • Jeff Flowerday
                      dBpoweramp Enthusiast

                      • Mar 2008
                      • 105

                      #11
                      Re: HDCD not working with WMA Lossless?

                      I've ripped a bunch of HDCDs without the HDCD DSP to 16 bit wma lossless.

                      Since I didn't have the DSP turned on, can I run the converter with the HDCD DSP and make them 24 bit or is the HDCD extra data already lost? I've tried a conversion from wma lossless to flac with the DSP turn on and the resultant flac was still 16 bit. I then converted one wma lossless trac back to wave and ran eac3to on it and it indicated that it was HDCD.

                      So as you can see I'm a little confused.

                      I'd prefer not having to go and dig through my 5000 cds and rerip the HDCD ones.

                      Comment

                      • Jeff Flowerday
                        dBpoweramp Enthusiast

                        • Mar 2008
                        • 105

                        #12
                        Re: HDCD not working with WMA Lossless?

                        Originally posted by Jeff Flowerday
                        I've ripped a bunch of HDCDs without the HDCD DSP to 16 bit wma lossless.

                        Since I didn't have the DSP turned on, can I run the converter with the HDCD DSP and make them 24 bit or is the HDCD extra data already lost? I've tried a conversion from wma lossless to flac with the DSP turn on and the resultant flac was still 16 bit. I then converted one wma lossless trac back to wave and ran eac3to on it and it indicated that it was HDCD.

                        So as you can see I'm a little confused.

                        I'd prefer not having to go and dig through my 5000 cds and rerip the HDCD ones.
                        Never mind, I tried it again and the result was a 24 bit flac. Now to just go back through the library and convert to 24 bit with HDCD add in where appropriate.
                        Last edited by Jeff Flowerday; March 25, 2009, 08:31 PM.

                        Comment

                        Working...

                        ]]>