Question

How does the DCT (Discrete Cosine Transform) help to compress sound (or any wave-like data)? According to the DCT transform there are N input values and N output values as a result. Where is the compression achieved and how?

Was it helpful?

Solution

Think about the sequence 1,2,3,4,5,.. It will not compress using LZ (zip) at all because there is zero repetition. Now encode the sequence as differences: 1,1,1,1,1,... Zip will compress it 99% now. Every algorithm detects a certain pattern well. DCT helps to encode the data into a format that is well compressible.

OTHER TIPS

The DCT does not compress. The size of the DCT output is the same as the size of the input signal. What the DCT does, however, is compact the energy of the signal. Roughly speaking, you end up with a small subset of big coefficients and a lot of small coefficients in the frequency domain. This situation is perfect for an entropy encoder that can remove the redundancies in the DCT output, thus providing compression.

IMO it's an analysis of repetitions of certain values of the input (wave) presented in the form of frequencies (frequence + amplitude + repetition). For example if you have many low noise in the audio (bass) a DCT will oupout many values (=similar values) with low frequencies (i.e. think of an Equalizer-Band). This can be exploited for any compression algorithm. And also a DCT is loseless and reversible.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top