POV-Ray : Newsgroups : povray.off-topic : Data compression : Data compression Server Time
26 Sep 2024 17:45:10 EDT (-0400)
  Data compression  
From: Invisible
Date: 10 May 2011 11:32:25
Message: <4dc95a89@news.povray.org>
I've got a CD at home. When I first got it, I noticed that certain 
passages sound very slightly strange. Today, ten years later, I know 
exactly what it sounds like: it sounds like lossy audio compression.

This raises two interesting questions:

1. Why the hell would you put compressed audio onto a CD rather than the 
uncompressed original source?

2. If I can tell that it's compressed, despite not having the 
uncompressed original to compare to, doesn't that mean that there's more 
redundancy in the signal than the codec is taking advantage of?

Now I don't actually know which codec was used here. [Asking whether you 
can tell the codec by the compression artefacts is another interesting 
question.] But in this instance, there are long echo tails which are 
getting audibly chewed up. Not drastically so, but enough to be noticeable.

The only audio codecs I've looked at seem to work exclusively in the 
frequency domain. The general algorithm seems to be

- Chop the signal into chunks.
- Apply some Fourier-based transform to each chunk, taking it into the 
frequency domain.
- Use a psychoacoustic model to priorities each element of the spectrum.
- Adjust the resolution of each spectrum sample in proportion to 
priorities and available bandwidth.
- Encode each spectrum sample with the requisite number of bits.
- Apply an entropy coder to cram the results into the smallest available 
space.

All of this makes no use whatsoever of the striking similarity between 
consecutive audio chunks. That's the equivalent of a video codec which 
encodes each individual frame completely separately, without reference 
to the previous frames. (I really hope no serious video codes do this!)

This disregard for temporal redundancy is presumably why I can tell the 
difference between compressed and uncompressed audio, even with no 
reference to compare to. Interestingly, this /also/ suggests that it 
might perhaps be possible to /recover/ the lost information. I mean, if 
I can tell it's gone, perhaps it's possible to deduce what it was?

Perhaps a more interesting question is "how can we make a better codec?" 
My personal feeling would be to split the audio into many narrow-band 
signals, map the amplitude curve of each one, and store a compressed 
description of these curves.

Now I just need to go implement that... HA! o_O


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.