mp3 decoder tests

  8191+ / 100Hz bug test  

The mp3 specs are unclear as to the maximum value allowed in the Huffman "big_values" data. If an encoder generates larger values than a particular decoder is expecting, then the decoder may make audible errors decoding the file.
A 100Hz tone causes encoders to place the maximum allowed value into an mp3 file, so is a good test of encoder/decoder compatibility.

100Hz test results (gif image 25kB)

What are the important results of this test?

What's happening here?

Mp3 encoding generates relatively small audio files by discarding inaudible signal components, and then by packing the resulting data very efficiently. The data is packed using Huffman coding, and the mp3 specification is unclear as to what the maximum allowed value should be - 8191 or 8206. A decoder which accepts values up to 8206 can handle files from any encoder. However, any decoder that assumes there will be no values greater than 8191 may cause audible errors when trying to decode files containing values up to 8206. It's better to use a decoder that can handle the larger values, and hence decode any mp3 file correctly. (There is a more accurate explanation of this problem here).

It turns out that mp3 files of certain low frequency continuous tones are most likely to yield data that results in the maximum Huffman code value. For this reason, a 100Hz tone is used to show which encoders are generating mp3 files with the higher maximum, and which decoders cannot cope with these files.

Do we care?!

Some decoders make an audible mistake when processing mp3 files of a pure 100Hz tone, due to incorrect Huffman code decoding. You might not listen to 100Hz tones very often :-) so this might not seem relevant. However, this bug might cause the decoder to handle other signals unpredictably, so it's better to choose a decoder that passes this test.

How was this test carried out?

A wave file was generated containing a 100Hz tone. It was encoded and decoded. The resulting files were listened to. In some cases the 100Hz tone repeatedly cut out (red in the table); in some, it sounded OK, but comparison with a reference decode showed that there were still problems (yellow in the table), while in other cases there were no problems (blue in the table).

Is this test reliable?

Yes. It's totally repeatable. Generate your own 100Hz tone and test it for yourself.

FAQs

  1. What is a 100Hz tone?
    A tone (strictly we mean a sine wave) is the simplest possible audio signal (apart from silence!) - it consists of just one frequency. The frequency of 100Hz (100 oscillations per second) would be just over an octave below middle C on a piano keyboard.
  2. I don't listen to 100Hz tones!
    See "Do we care?" above. Also, if a decoder can't even handle a simple signal like this, it doesn't inspire much confidence, does it?
  3. Why use a 100Hz test tone?
    Simply, because it makes this decoder bug extremely obvious! Very little real music generates Huffman codes near the maximum value, but a 100Hz tone seems guaranteed to. These maximum values make certain decoders behave very badly. We don't have to listen carefully, or do any complex analysis - the results are obvious from displaying the waveform on the screen (it has gaps in it!) or listening briefly (the signal dies about once per second).
  4. Surely there's something wrong with the encoders?
    Please see the lame encoder site page about the 8191+ bug for more details. It's an encoder and decoder issue.
    It's worth noting that when the authors of Winamp finally decided to fix their decoder for version 2.7, they went back to the FhG code, which correctly handled 8206 values; then they added several speed improvements, which made the decoder choke on 8206 values; eventually they fixed this in alpha test version in_mp3_260_alpha13; the final release version handles the maximum values correctly, as our test shows.
  5. Can you show me an example where this bug makes an audible difference to a music track?
    Only for certain decoders. Some decoders have been shown to ruin low frequency sounds other than a 100Hz tone (see the individual decoder results for details), but others can only be caught out with a 100Hz tone, and other simple tones.
  6. Where to now?
    Go back to the list of tests or go forward to the next test.

counter