New Algorithm To Compute The Discrete Cosine Transform
New Algorithm To Compute The Discrete Cosine Transform
TRANSACTIONS
theprematuretermination,
By theassumptioninSection
I,
f ( z ) should be the common factor of F1( z ) and F z ( z ) , or we
have D ( z ) = f ( z ) c ( z ) where c ( z ) is apolynomialfunction.
Then we can continue to test all zeros of f ( z ) byapplying
Property 3. Therefore,witbProperty2,thesufficientand
necessary conditions for all zeros
of f ( z ) c ( z ) being inside or
on the unit circle are that it is alwayspossible to obtain all
the real and positive Kis, for 0 i n - 1.
<<
Q.E.D.
(3,E, 9).
No prematureterminationoccurs;therefore,
zeros of D ( z ) are inside the unit circle and set
f ( z ) = 1.
S t e p 2:
@k(w>=
all
w6+2ws+5w4+4w3+5w2+2w+l
8w6 + 12w5 + I 2 w 4 - 12w2 - 12w - 8
-7%);
REFERENCES
(+;-).
~
< <
[ K i ] will be created
INTRODUCTION
During the past decade, the discrete cosine transform (DCT)
[ 11 has foundapplicationsinspeechandimageprocessing.
Various fast algorithms have been introduced for reducing the
number of multiplications involved in the transform [ 21 -[ 61.
Inthiscorrespondence
we proposeanadditionalalgorithm
which not only reduces the number of multiplications but also
has a simpler structure. We refer to this algorithm as the FCT
(fastcosinetransform),sinceit
is similar to the FFT (fast
Fourier transform). The number
of real multiplications it requires is about half thatrequiredbytheexistingefficient
algorithms.
ALGORITHM
DERIVATION
We denote the DCT of the data sequence x(k), k = 0 , 1 , . *
N - I,byX(n),n=O,l;..,N1. T h e n w e h a v e [ 1 1
Manuscript received August 15, 1983; revised February 2 9 , 1 9 8 4 .
The author is with the Granger Associates, Santa Clara, CA 95051.
IEEE
TRANSACTIONS
ON
ACOUSTICS,
SPEECH,
AND
SIGNAL
PROCESSING,
VOL.
ASSP-32,
1244
k=O,l;*-,N- 1
and
n=O
N
,
l
-1
because
(2k+ 1)2 ( N / 2 ) = (2k + 1) =
'2 N
C2
n=O,l;.*,Nwhere
e(n)=
[ ;;fi,
if n
Thus
(2)
0.
rewritten
be
ascan
(1 2)
=o,
otherwise.
n=O
Therefore,
we
haveindecomposed
N-point
IDCT
the
(5) into
(8b) the sum of two N/2-point
IDCT's in (1 8). By repeatingthis
n=O
further.IDCT
process,
the
decompose
we can
= o, 1, . . . , N/2 - 1, forms an ~ / 2 -IDCT,
~
~
i
We
~
can
~
also decompose the DCT in a similar manner. AlterClearly, g ( k ) ,
natively, the DCT can be obtained by "transposing" the IDCTsince
i.e., reversing the direction of the arrows in the flow graph of
(2k+1)2n = (2k+l)n = C(2k+ 1)n
c2 N
CN
2 (NI2)
IDCT,
the
since
(9)
DCTorthogonal
is an transform.
the
EXAMPLE
We rewrite h ' ( k ) in
With N = 8, ( 17)-( 19) yield
N/2-1 A
A
(2k + 1)n
h'(k)=
X'(2n + 1) CZ(N/2)
(lo)
G ( n ) = X(2n),
N/2-1
form
n=O
+ 1) + X(2n -
l),
n = 0, 1 ,2 , 3( 2 0 b )
and
3
g(k)( 2=1 4
G ( n ) C $ 2 k +l ) n ,
n= n
N/2-1
2cy;+l) h ' ( k ) =
H ( n ) = X(2n
X(2n
+ 1) Cp;+l)an
n=O
NI2-1
X(2n
+ 1) C p i + 1 ) 2 ( n + 1 () 1. 2 )
n=O
x(k) = g ( k ) + (1/(2C,26+'))h(k),
(22a)
x(7-k)=g(k)-(l/(2C126++1))h(k), k = 0 , 1 , 2 , 3 .
(' 3,
Equations (20) and (22) respectively form the first and the last
stages of the flow graph in Fig. 1. By repeating the above steps
AND
SIGNAL
1245
Fig. 1.
TABLE I
AND
CHONGKWAN UN
I. INTRODUCTION
The need for computing convolution of two functions arises
8
1024
1668
256
2690
2817
inmany diverseapplications.Theseincludedigitalfiltering,
spectrum analysis, time delay estimation, computation of dis6146
9
6401
512
2304
3844
crete Fourier transform (DFT) using circular correlation, mul10
1024
tiplicationoflargeintegers,polynomialtransforms,and
so
8708
5120
13826
14337
forth [ 1 1, [ 21. In computation of .various convolutions, the
11
2048
11264
19460
30722
31745
fast convolution approach using efficient computational algorithms of discrete transforms has proven to be useful[3].
12
4096
67506
21576
43012
69633
Recently,discretetransformsbasedonnumbertheoretic
concepts have received considerable attention as a method for
efficientanderror-freecomputationofdigitalconvolutions
on(21), we obtaintheFCTflowgraphforaneight-point
121. Unlike thefastFouriertransform(FFT),thenumber
IDCT as shown in Fig. 1.
theoretic transform (NTT) does not cause roundoff errors
in
arithmetic operations. Particularly, the Fermat number transCONCLUDINGREMARKS
form that is one of the NTTs requires only word shifts and
.additions, butnotmultiplications,northestorageof
basis
It follows from Fig. 1 that the flow graphs of the FCT and
FFT are similar. The number
of real multiplications thus apfunctions.Accordingly,
theNTThas severaldesirableproppears to be (N/2)log2N for an N-point FCT withN=
2 m , which erties in carrying out various convolution operations in comis about half the number required by existing efficient algoparison to the FFT.
rithms. The number of additions, however, is slightly higher
In this correspondence, we consider a class of convolutions
and given by (3N/2)log2N- N + 1. See Table I for a compar- that include forward and backward convolutions of two peri[ 41.
A
ison
with
algorithm
the in
odicsequencesandalsoforwardandbackwardcorrelations.
If Fig. 1 we also note that the input sequence
X ( n ) is in bit- Based on matrixformulation, we studytheirinterrelationreversed order. The order of the output sequence x(k) is gen- ships. Particularly, we show that they may be related to each
erated in the following manner: starting with the set
( 0 , l ) , other through a discrete transform such as DFT and NTT.
form a set by adding the prefix 0 t o each element, and then
11. INTERRELATIONSHIPS AMONGA C.LASS OF
obtain the rest of the elements by complementing the existing
CONVOLUTIONS
(00, 01, 1 1, 1.0), and by
ones. This process results in the set
repeatingit we obtain (000, 001, 011, 010, 111, 110, 100,
Here we discuss a class of circular operations based on ma101).Thus, wehave theoutputsequencex(O),x(l),
x ( 3 ) , trix formulation. In the following discussion it is assumed that
x(2), ~ ( 7 1~, ( 6 1x(4),
,
x(5) for the case N = 8; see Fig. 1 .
various arithmetic operations including matrix operations are
7
128
708
448
1154
1217
REFERENCES
[ l ] N. Ahmed, T. Natarajan, and K. R. Rao,Discretecosinetransform,IEEE nuns. Compur.,vol. C-23, pp. 90-94, Jan. 1974.
[2] M. R. Haralick, A storage efficient way to implementthe discrete