Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DCT compression

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?

like image 465
maximus Avatar asked Apr 20 '26 22:04

maximus


2 Answers

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.

like image 108
flanglet Avatar answered Apr 24 '26 05:04

flanglet


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.

like image 40
usr Avatar answered Apr 24 '26 06:04

usr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!