Number Theoretic Transform
Other FFT Algorithms
Other FFT Algorithms   Index   Search

## The Discrete Cosine Transform (DCT)

In image coding (such as MPEG and JPEG), and many audio coding algorithms (MPEG), the discrete cosine transform (DCT) is used because of its nearly optimal asymptotic theoretical coding gain.A.3For 1D signals, one of several essentially equivalent DCT definitions is given by

 DCT (A.2)

where

Note that is the DFT frequency for a length DFT (as opposed to ).

For real signals, the real part of the DFT is a kind of DCT:

Thus, the real part of a double-length FFT is the same as the DCT except for the half-sample phase shift in the sinusoidal basis functions (and a scaling by 2 which is unimportant).

In practice, the DCT is implemented using the same basic efficiency techniques as the FFT. In Matlab, the functions dct and dct2 are available for the 1D and 2D cases, respectively.

Exercise: Using Euler's identity, expand the cosine in the DCT defined by Eq. (A.2) above into a sum of complex sinusoids, and show that the DCT can be rewritten as the sum of two phase-modulated DFTs:

DCT

where DFT denotes the length DFT of .

Number Theoretic Transform
Other FFT Algorithms
Other FFT Algorithms   Index   Search

Mathematics of the Discrete Fourier Transform (DFT), with Music and Audio Applications'', by Julius O. Smith III, W3K Publishing, 2003, ISBN 0-9745607-0-7.

(Browser settings for best viewing results)
(How to cite this work)
(Order a printed hardcopy)