7–54
Altera Corporation
Stratix Device Handbook, Volume 2
September 2004
Discrete Cosine Transform (DCT)
Figure 7–32. A 2-D DCT is a Separable Transform
This section uses a standard algorithm proposed in [1].
Figure 7–33shows the flow graph for the algorithm. This is similar to the butterfly
computation of the fast fourier transform (FFT). Similar to the FFT
algorithms, the DCT algorithm reduces the complexity of the calculation
by decomposing the computation into successively smaller DCT
components. The even coefficients (y0, y2, y4, y6) are calculated in the
upper half and the odd coefficients (y1, y3, y5, y7) in the lower half. As a
result of the decomposition, the output is reordered as well.
Figure 7–33. Implementing an N=8 Fast DCT
Stage 1
Stage 4
Stage 3
Stage 2
x0
x7
x6
x5
x4
x3
x2
x1
y0
y7
y5
y3
y1
y6
y2
y4
yk = cm1s31 + cm2s32 + ... + cmns3n
cx = cos
(
16
x
π)
Multiplied by -1
b
a
Sum a and b
Multiply-addition block
Cm1
yk
S32
S31
Cm2
Cmn
.
S3n
C7
C5
C3
C1
C6
C2 C6
-C2
C4
-C5
-C1
-C7
C3
C7
-C1
C5
-C1
C3
-C5
C7
Stage 3 output (S3)
Matrix coefficent (Cmn)
where