Help - Search - Members - Calendar
Full Version: Is AAC prone to clipping?
Hydrogenaudio Forums > Lossy Audio Compression > AAC > AAC - General
dcorban
MP3s are prone to clipping, due to the combination of 16 bit decoding and loud samples. This is why programs such as MP3gain exist.

Does AAC have the same weakness?
Mike Giacomelli
QUOTE(dcorban @ Apr 6 2008, 15:24) *

MP3s are prone to clipping, due to the combination of 16 bit decoding and loud samples. This is why programs such as MP3gain exist.

Does AAC have the same weakness?


MP3 doesn't actually use 16 bit samples FYI.

But yes, MP3, AAC, and all lossy formats can potentially introduce clipping if they do not scale the volume in someway.
lvqcl
QUOTE(dcorban @ Apr 7 2008, 00:24) *
MP3s are prone to clipping, due to the combination of 16 bit decoding and loud samples. This is why programs such as MP3gain exist.

Does AAC have the same weakness?

Yes. MP3, Vorbis, AAC, WMA, Musepack...
But player can decode them (except WMA?) to floating point samples, determine highest peak and prevent clipping. (http://en.wikipedia.org/wiki/Audio_normalization)
j7n
QUOTE
(except WMA?)

Blame Microsoft that they didn't release a normal decoder.
Mike Giacomelli
QUOTE(j7n @ Apr 6 2008, 20:26) *

QUOTE
(except WMA?)

Blame Microsoft that they didn't release a normal decoder.


No it works with WMA as well. See foobar2000 or rockbox.
Egor
QUOTE(Mike Giacomelli @ Apr 7 2008, 09:57) *
No it works with WMA as well. See foobar2000 or rockbox.

No, it does not: the maximum peak level you'll ever see is 1.000000
dcorban
It is my understanding that due to the way the data is stored in an MP3, when it is decoded into 16bit sound, the waveform can actually end up larger (louder) than the original, which causes clipping on music which was originally recorded at or near the peak level of zero. It is also my understanding that 24bit decoding prevents the clipping, for MP3, anyway.

So, you are saying that every format has this limitation? In other words, none of them can 100% accurately reproduce the original waveform at its original peak levels? They all clip with borderline samples?
Mike Giacomelli
QUOTE(Egor @ Apr 6 2008, 23:25) *

QUOTE(Mike Giacomelli @ Apr 7 2008, 09:57) *
No it works with WMA as well. See foobar2000 or rockbox.

No, it does not: the maximum peak level you'll ever see is 1.000000


I meant you can still use replaygain, though apparently the automatic clipping prevention feature won't work (unless you use ffmpeg as the decoder anyway).

QUOTE(dcorban @ Apr 20 2008, 19:05) *

So, you are saying that every format has this limitation?


Every lossy format.

QUOTE(dcorban @ Apr 20 2008, 19:05) *

In other words, none of them can 100% accurately reproduce the original waveform at its original peak levels?


Exactly. If the got every sample exactly right they'd be lossless codecs. The clipping is just quantization noise added by the lossy compression step pushing the signal level above 1.0.

The only way to avoid it would be to have the decoder apply replaygain automatically (which is probably not as good an idea as letting the user control it) or else to scale the volume before encoding so that its low enough that clipping becomes unlikely (lame can actually do this with its scale option).
dcorban
Thank you for the informative reply!
j7n
QUOTE
apparently the automatic clipping prevention feature won't work (unless you use ffmpeg as the decoder anyway).

I am looking for a more or less usable WMA decoder for the case if any WMA's come around. Is the ffmpeg code available as a Foobar or Winamp plugin?
Gabriel
QUOTE(dcorban @ Apr 21 2008, 01:05) *

So, you are saying that every format has this limitation? In other words, none of them can 100% accurately reproduce the original waveform at its original peak levels? They all clip with borderline samples?

MP3/AAC/WMA/Vorbis formats share the same behavior there.
Regarding if they can "accurately" reproduce the original waveform, you first have to think about what you are naming "accurately". We are talking about lossy codecs there, so waveform will not be 100% identical, clipping or not.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.