Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: mp3-editor?
From: Brian Wolven (Brian.Wolven_at_verizon.net)
Date: 2003-03-26


Matthew P. OReilly wrote:
> What is it about re-compression that causes quality loss? If
> something is compressed, uncompressed, then compressed again,
> shouldn't it be a function of the quality of the recompression
> algorithm whether or not it loses any quality? If one is going from,
> say, 16-bit to 24-bit and back to 16-bit (uncompressed), all you're
> losing is the 8 least significant bits in the 24->16 conversion,
> which would be all zeroes anyway from the 16->24 bit conversion. I
> know that compression adds more complexity to that mix, but I don't
> understand why it necessitates a loss of quality... if I compress the
> same uncompressed data twice, shouldn't it be the same as if I
> compressed, uncompressed, and compressed again?

It does depend on the compression algorithm. Any lossless compression algorithm
will permit you to compress and decompress repeatedly with no loss of
data/fidelity. Lossy algorithms (JPEG, MP3, etc.) may or may not degrade after
repeated applications; it depends on the way in which they are implemented. If
you imagine a simple-minded scheme that simply tosses out all frequencies above
a certain threshold, you'd have a lossy scheme that could be applied repeatedly.
Once you've tossed out the high frequency info, it's gone and it stays gone, but
it doesn't get any worse. MP3 compression is a bit more sophisticated than this.
I'm not really familiar with the details of the algorithm, but the info that is
retained in each application of the compression must be shaped by the entrire
signal, including stuff that isn't kept. The next time around, the decompressed
source material is different, and the resulting compressed signal has changed as
well. I suppose I should google a little and learn more - or maybe read the lame
source code. =P



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa