Skip to main content

Topic: Comparator—differences between lossy file and pre-decoded version—why? (Read 1153 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • EpicForever
  • [*][*][*][*][*]
Comparator—differences between lossy file and pre-decoded version—why?
Hello,

I got problem with official Binary Comparator component. There's something I can't understand. I decoded several AAC and MP3 files to PCM/WAV. Then I've made bit-comparison between encoded and decoded versions. And unfortunately component reports differences between them :/ . Why? When I compare WAV with FLAC made from this WAV everything works OK - both decoded streams are identical. Then why stream decoded directly from mp3/aac is different than decoded from wave made of this mp3/aac? I thought that I can use Binary Comparator to detect weather FLAC was made from iTunes AAC or MP3 with lowpass filtering disabled while encoding but it's impossible... Why?

  • foosion
  • [*][*][*][*][*]
  • Moderator
Comparator—differences between lossy file and pre-decoded version—why?
Reply #1
The Binary Comparator works best for lossless file. The most likely reason why a lossless file may differ from the lossy file from which it was created is that the conversion introduced clipping. Lossy encodings like MP3 and AAC encode the frequency content of the audio. When this is converted to samples, some sample amplitudes may exceed digitial full scale. These samples will be clipped when encoded in WAV or FLAC. Another reason might be the quantization in the lossless version.
http://foosion.foobar2000.org/ - my components for foobar2000

  • EpicForever
  • [*][*][*][*][*]
Comparator—differences between lossy file and pre-decoded version—why?
Reply #2
Thanks for the info... Is there anything that I can do to bit-compare lossy with lossless ? Change bit-depth of decoded .wav to 32 bit? Source files are "16 bit-like" (I mean - AAC and MP3 were originally 16 bit before they were encoded).

  • EpicForever
  • [*][*][*][*][*]
Comparator—differences between lossy file and pre-decoded version—why?
Reply #3
OK - when I use 32-bit WAVE file as output file, then both AAC/MP3 and decoded WAV are identical for Binary Comparator component - tested.
Simple question - is there a way to distinguish pure FLAC from FLAC encoded from iTunes AAC? Not necesarilly based on foobar? As far as I know (from my experience) auCDtect isn't capable to properly distinguish them...
  • Last Edit: 02 November, 2012, 02:27:47 PM by EpicForever

  • Dynamic
  • [*][*][*][*][*]
Comparator—differences between lossy file and pre-decoded version—why?
Reply #4
Bit-compare means to compare the exact decoded sample values.

If they're lossy, they're different from the lossless files they were encoded from. If they were the same, they'd have been lossless.

You could try to decode your lossy to WAV or, say FLAC and compare that to another decode to WAV or FLAC at the same bit depth but you might still expect to find differences in random dither noise used properly to accomplish the bit-depth reduction.
Dynamic – the artist formerly known as DickD