Help - Search - Members - Calendar
Full Version: Newbie question. Clipping.
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
vir
I've been reading HA formums for a long time. But still don't undestand where clipping comes from.
If I have a PCM stream ripped from a CD, there is no clipping, right? If I encode this stream to the MPEG Layer 3 some samples from this MP3 may clip, why? Encoding to MP3 converts every PCM sample to the floating point number from -1 to 1. And they are encoded following the encoder algorithm. On decoding the stream of floating point numbers are restored (with losses). If +1 is maped to 32767 and -1 is maped to -32767 then I've got a PCM similar to the original. Where does clipping comes from? What part of this process have flows?
kjoonlee
I think this belongs in the HA forums, not the fb2k forums.

> If I have a PCM stream ripped from a CD, there is no clipping, right?

It might have clipping if it wasn't properly mastered.

> If I encode this stream to the MPEG Layer 3 some samples from this MP3 may clip, why? Encoding to MP3 converts every PCM sample to the floating point number from -1 to 1.

No, data can go above 1 or below -1 when encoding. You have to take that into account when decoding.
Otto42
QUOTE (vir @ Aug 31 2005, 07:35 AM)
Encoding to MP3 converts every PCM sample to the floating point number from -1 to 1. And they are encoded following the encoder algorithm.

And the encoder algorithim can change those numbers such that they go outside the range of -1 to 1. Remember, the result of an encoder is something that is close to the original but compresses much better. Therefore it is actually changing that data, and the changed data isn't restricted to the range of -1 to 1.
Axon
For a very simplistic example: lowpass filtering of a square wave can lead to the peak value increasing by 10% due to the Gibbs phenomenon.
FrzzMan
Hmm, slightly off-topic, but what exactly clipping is? How does it affect sound? Sometimes my fb2k pop-up a warning about clipping detected. But I don't notice any sound artifact at all.
TSThomas
QUOTE (FrzzMan @ Aug 31 2005, 09:46 PM)
Hmm, slightly off-topic, but what exactly clipping is? How does it affect sound? Sometimes my fb2k pop-up a warning about clipping detected. But I don't notice any sound artifact at all.
http://wiki.hydrogenaudio.org/index.php?title=Clipping
FrzzMan
Thanks, I should search before ask, heh tongue.gif
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-2009 Invision Power Services, Inc.