Professional Documents
Culture Documents
Fast DCT Algorithm
Fast DCT Algorithm
t i
Next: About this document ... Up: dct Previous: Definition of DCT
The DCT of a sequence can be implemented by FFT. First we define a new sequence
Then the DCT of can be written as the following (the coefficient is dropped for now for simplicity):
where the first summation is for all even terms and second all odd terms. We define for the second summation , then the limits of the
summation and for becomes and for , and the second summation can be written as
and take the real part of the result (and keep in mind that both and are real), we get:
http://fourier.eng.hmc.edu/e161/lectures/dct/node2.html 1/3
8/18/2018 Fast DCT algorithm
where is the DFT of (defined from ) which can be computed using FFT algorithm with time complexity .
step 2: Obtain DFT of using FFT. (As is real, is symmetric and only half of the data points need be computed.)
Inverse DCT
The most obvious way to do inverse DCT is to reverse the order and the mathematical operations of the three steps for the forward DCT:
step 1: Obtain from . In step 3 above there are N equations but 2N variables (both real and imaginary parts of ). However, note
that as are real, the real part of its spectrum is even (N+1 independent variables) and imaginary part odd (N-1 independent variables).
So there are only N variables which can be obtained by solving the N equations.
However, there is a more efficient way to do the inverse DCT. Consider first the real part of the inverse DFT of the sequence :
This equation gives the inverse DCT of all even data points . To obtain the odd data points, recall that
http://fourier.eng.hmc.edu/e161/lectures/dct/node2.html 2/3
8/18/2018 Fast DCT algorithm
can be obtained from the second half of the previous equation in reverse order .
step 2: Obtain from by inverse DFT also using FFT. (Only the real part need be computed.)
These three steps are mathematically equivalent to the steps of the first method.
t i
Next: About this document ... Up: dct Previous: Definition of DCT
Ruye Wang 2013-10-27
http://fourier.eng.hmc.edu/e161/lectures/dct/node2.html 3/3