title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Bit-inaccurate reproduction of WAVs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gadgetphile

    • Aug 2008
    • 5

    Bit-inaccurate reproduction of WAVs

    Question for you all, on accuracy.

    I've just started using dBpoweramp CD ripper, and quite like it. About ~50 albums ripped so far. I especially like being able to encode in Apple Lossless, in order to embed metadata. But I was a bit worried about a 3rd party implementation of the apple codec, and wanted to check.

    So I tried a few tests to make sure everything worked.

    1) Rip "So What", the 1st track on Miles Davis, Kind of Blue, in .wav
    2) Edit down to just 1.8 secs, about 315 kB, using Audacity, save as .wav, just to make the file easier to handle
    3) Encode .wav to apple lossless using dBpoweramp
    4) Decode apple lossless back to .wav using dBpoweramp
    5) Bit-compare the encoded-decoded .wav final file to the original .wav file.

    I also tried this using foobar2000 to decode the apple lossless back to a .wav file. And I tried this using iTunes to decode the apple lossless back to a .wav file as well.

    Of the three:
    iTunes => binary identical to original file
    foobar => binary identical to original file
    dBpoweramp => does NOT match original file. same number of samples, but different length (increased from 315 kB to 317 kB). Looking at the files there are a few bytes different.

    What's up with that? Can I not trust dBpoweramp to decode what it encodes?
  • gadgetphile

    • Aug 2008
    • 5

    #2
    Re: Bit-inaccurate reproduction of WAVs

    Here are the screenshots to show you what I mean. All were encoded with dBpoweramp.

    foobar2000 decode:


    iTunes decode:


    dBpoweramp decode:


    This seems to indicate the cycle wav -> apple lossless -> wav using dBpoweramp for both encode & decode is bit inaccurate, while using foobar or iTunes for the final decode is bit accurate. why?
    Last edited by gadgetphile; August 05, 2008, 03:25 AM.

    Comment

    • LtData
      dBpoweramp Guru

      • May 2004
      • 8288

      #3
      Re: Bit-inaccurate reproduction of WAVs

      Probably a tagging difference. If you are using dBpoweramp Reference, use the "[Calculate Audio CRC]" utility codec to compare just the audio.

      Comment

      • bhoar
        dBpoweramp Guru

        • Sep 2006
        • 1173

        #4
        Re: Bit-inaccurate reproduction of WAVs

        Originally posted by LtData
        Probably a tagging difference. If you are using dBpoweramp Reference, use the "[Calculate Audio CRC]" utility codec to compare just the audio.
        Well...if it's true it's the two to four bytes after the four bytes at the beginning ("RIFF") then it's the length. It's probably just saying that there are more samples and, that's what you see, more null samples at the end.

        Depending on CRC method, that might still show as a match, even though the data is different (but, other than length, not *audibly* different).

        -brendan

        Comment

        • gadgetphile

          • Aug 2008
          • 5

          #5
          Re: Bit-inaccurate reproduction of WAVs

          LtData,

          Thanks. Audio CRC for all files is "F74139AC", i.e. they are identical for the audio data. So difference is in non-audio / tagging data.

          Didn't know there was any tagging data in a .wav file -- thought that was the whole drawback to them, no metadata.

          So dBpoweramp inserts metadata into wav files? I didn't know that was possible, thought there was no room in the standard. So what all can be added?

          Comment

          • gadgetphile

            • Aug 2008
            • 5

            #6
            Re: Bit-inaccurate reproduction of WAVs

            bhoar,

            ah. thanks, makes sense. I obviously need to read up on the format of .wav files.

            appreciate the explanation.

            cheers.

            Comment

            • bhoar
              dBpoweramp Guru

              • Sep 2006
              • 1173

              #7
              Re: Bit-inaccurate reproduction of WAVs

              Note that I'm not saying that dbpoweramp is doing "the right" thing or "the expected" thing. I'm not sure what is supposed to happen. It doesn't appear that what it is doing is very bad, but it might have an impact if you're working with tracks that are supposed to be gapless when transitioning to other tracks.

              It may simply be that dbpoweramp's core and/or the codec is working in fixed sized chunks that are require slightly more audio data than the original sample? I wonder what would happen if you started feeding it four more bytes of audio at a time, if it would occasionally match the other methods...

              -brendan

              Comment

              • Spoon
                Administrator
                • Apr 2002
                • 44506

                #8
                Re: Bit-inaccurate reproduction of WAVs

                We write two tag types to Wav files, perfectly valid, not hugely used by other programs. You can disable the tag writing in dBpoweramp Configuration >> Codecs >> Advanced
                Spoon
                www.dbpoweramp.com

                Comment

                • gadgetphile

                  • Aug 2008
                  • 5

                  #9
                  Re: Bit-inaccurate reproduction of WAVs

                  Aha. Behold two tags at the end of the file, followed by 0-padding:



                  The two bytes different at the beginning of the file are the length / chunk size difference due to the tags:



                  and the reason it's just bytes 5 and 6, and not all 4 bytes (therefore bytes #5,6,7, and 8) that define the chunk-size, is because Windows is little-endian. right?

                  Mystery solved.

                  thanks, all.

                  Comment

                  • bhoar
                    dBpoweramp Guru

                    • Sep 2006
                    • 1173

                    #10
                    Re: Bit-inaccurate reproduction of WAVs

                    In that case, it's doing exactly the right thing. Cool.

                    -brendan

                    Comment

                    Working...

                    ]]>