why DCT transform is preferred over other transforms in video/image compression

mrsatish picture mrsatish · Apr 20, 2013 · Viewed 13.6k times · Source

I went through how DCT (discrete cosine transform) is used in image and video compression standards.

But why DCT only is preferred over other transforms like dft or dst?

Answer

Douglas Bagnall picture Douglas Bagnall · Apr 21, 2013

Because cos(0) is 1, the first (0th) coefficient of DCT-II is the mean of the values being transformed. This makes the first coefficient of each 8x8 block represent the average tone of its constituent pixels, which is obviously a good start. Subsequent coefficients add increasing levels of detail, starting with sweeping gradients and continuing into increasingly fiddly patterns, and it just so happens that the first few coefficients capture most of the signal in photographic images.

Sin(0) is 0, so the DSTs start with an offset of 0.5 or 1, and the first coefficient is a gentle mound rather than a flat plain. That is unlikely to suit ordinary images, and the result is that DSTs require more coefficients than DCTs to encode most blocks.

The DCT just happens to suit. That is really all there is to it.