Discrete Cosine Transform


The DCT is conceptually similar to the DFT, except:

For most images, after transformation the majority of signal energy is carried by just a few of the low order DCT coefficients. These coefficients can be more finely quantized than the higher order coefficients. Many higher order coefficients may be quantized to 0 (this allows for very efficient run-level coding).  

Formulae for DCT and inverse DCT:      

In the formulas, F(u,v) is the two-dimensional NxN DCT.  

u,v,x,y = 0,1,2,...N-1

x,y are spatial coordinates in the sample domain.

u,v are frequency coordinates in the transform domain.

C(u), C(v) = 1/(square root (2))  for u, v  = 0.

C(u), C(v) = 1 otherwise.


MPEG specifies the spatial samples to be represented in 9 bits and the coefficients to be represented in 12 bits.  The dynamic range of the coefficients is specified as [-2048:+2047].

Compression Tools Topics:

MPEG 2 Quantization

MPEG 2 Prediction

Discrete Cosine Transform

Huffman/Run-Level Coding

Zig-Zag Scanning Patterns


Up to MPEG 2 Video Compression Topics