Halcyon
Dec 29 2005, 11:31
http://www6.head-fi.org/forums/showthread.php?t=153206especially the post:
http://www6.head-fi.org/forums/showpost.ph...02&postcount=17Don't shoot me. I'm just the messenger.
I was under the impression that due to the way mp3 encoders store values (i.e. NOT absolute levels as integers), clipping under some circumstances was unavoidable.
What say you?
Yes, I have searched and read the earlier discussion, but I seem unable to deduce the final say on this.
An MP3 decoder cannot avoid clipping and still be a compliant decoder.
Even making an encoder that (guarantees it) doesn't generate a clipping MP3 would be very tricky (and senseless). I don't know of any encoder (including LAME) that does this.
The poster on head-fi is a flaming idiot that doesn't understand what he is talking about.
Clipping on decoding occurs in the time domain. Any operation in the frequency domain can cause effects in the time domain. Notably, removing (or quantizing) information in the frequency domain, which an encoder does, can lead to an INCREASE of sample values in the time domain.
If the original file starts out with sample values near full-scale (almost clipping), the encoding->decoding process can cause the results to exceed full-scale and clip.
The chance of this happening is bigger as the operations in the frequency domain are more intruisive, and particularly so if the souce data was dynamically compressed to a large extent (think metal music).
You can easily verify this experimentally. Encode a very loud metal track that is near clipping with a variety of encoders and bitrates. The chance that you get clipping on the output gets larger as you lower the bitrates of the encoder, or move to a more advanced technology. Just try HE-AACv1 or HE-AACv2, and be surprised.
Halcyon
Dec 29 2005, 22:23
Thanks Garf.
Your explanation confirmed my vague memory about the issue.
I have no time to experiment with the issue personally right now, but will definitely try it later.