Discrete cosine transformer

Information

  • Patent Grant
  • 4797847
  • Patent Number
    4,797,847
  • Date Filed
    Wednesday, February 4, 1987
    37 years ago
  • Date Issued
    Tuesday, January 10, 1989
    35 years ago
  • Inventors
  • Examiners
    • Malzahn; David H.
    Agents
    • Larson & Taylor
Abstract
The device is applicable to data compression. It computes the discrete cosine transform X of a signal x represented by N digitized samples x, . . . x, . . . x, where N is a power of 2: ##EQU1## the device includes a convolver for convolution between the samples xi and a stored sequence of samples wi (N) and a set of identical elementary circuits grouped in serveral banks. Each circuit is a "butterfly" having two inputs and two outputs one of which delivers the sum and the other the difference of the two inputs. The elementary circuits of the first bank receive at their two inputs the samples of the convolution product whose indices are separated by N/2 from each other.
Description

BACKGROUND OF THE INVENTION
1. Field of the Invention
The invention relates to the processing of sampled digitilized signals for providing a discrete cosine transform (DCT).
2. Description of the Prior Art
For a long time fast discrete transforms have been used for the time or spatial compression of data to be transmitted or to be stored. Simple transforms have more especially been used, such as the Walsh-Hadamard transform which has the advantage of requiring only simple circuits but on the other hand only provides a low compression rate.
The need is now felt for fast transforms allowing high compression rates to be reached but however only requiring circuits of acceptable complexity and able to operate in real time.
The use has more particularly been proposed of the DCT, in particular for videotext systems, because it appreciably increases the compression rate. But, even for small length transforms, it is difficult to construct integrated circuits able to operate in real time at the sampling frequencies required, even when the latest algorithms proposed are used, which reduce the complexity of the calculation. In practice, sampling frequencies of 10 MHz can be barely reached for transforms of a length of eight.
A device is also known (document U.S. Pat. No. 4,385,363) for calculating the DCT of a signal. This device uses elementary circuits providing the sum and difference of two inputs. But the device has a pipelined construction with several stages each of which includes adders and multipliers. It implements the Chen and Fralick algorithm and this conception leads to complex architecture.
SUMMARY OF THE INVENTION
The invention aims at providing a sampled signal processing device capable of delivering the DCT of the signal, having a simpler architecture than that of known devices and implementing for this a new algorithm obtained by causing a partial equivalence to appear between DCT and cyclic convolution, requiring no more multiplications than the calculation of a cyclic convolution of the same length.
To this end, the invention provides a device for calculating the discrete cosine transform X.sub.k of a signal x represented by N digital samples x.sub.0, . . . x.sub.i, . . . x.sub.N-1, where N is a power of 2: ##EQU2## characterized in that it comprises convolving means for convolution between the samples x.sub.i and a stored sequence of samples w.sub.i (N) and further includes a set of identical elementary circuits grouped in several banks, each having two inputs and two outputs one of which delivers the sum and the other the difference of the two inputs, the elementary circuits of the first bank receiving at their inputs samples of the convolution product whose indices are separated by N/2 from each other.
In the following, capital letters will denote the transformed samples or sequences.
In a first embodiment, using conventional convolving means, for example a systolic convolver, the elementary circuits of the first bank will supply directly the uneven (odd) values X.sub.1, X.sub.3, . . . and the circuits of the following banks, by combination of said uneven values, the successive even values at the subtraction outputs.
In another embodiment, the cyclic convolving means is built by means of the number theoretic transforms (NTT) of the samples; in this case, the coefficients X of the transform appear naturally during the convolution calculation, even before the final result of this latter. It becomes useless to perform the reverse(NTT.sup.-1) transform completely, on most of the coefficients X.
The invention will be better understood from reading the following description of particular embodiments of the invention, given by way of non limitative examples.





SHORT DESCRIPTION OF THE DRAWINGS
FIG. 1 is a general diagram showing the elements to be added to a cyclic convolving means, which may be of conventional construction, so a to form a device providing the cosine transform;
FIG. 2 is a diagram showing the usual implementation of a convolving means from the NTTs of the signal samples and of the generated or stored sequence;
FIG. 3 shows schematically the simplifications intervening in the NTT.sup.-1 for obtaining the DCT of the samples of a signal before complete calculation of the convolution; and
FIG. 4, similar to FIG. 2, shows a variant illustrating the "encoding" and "base change" blocks possibly required for simplifying the modulo arithmetic intervening in the NTT.





DETAILED DESCRIPTION OF THE INVENTION
Before describing devices in accordance with the invention, it is necessary to give the mathematical approach showing the equivalence between DCT and cyclic convolution, which justifies the architecture of the devices.
By two successive variable changes we pass from the conventional expression of the DCT (formula 1 above) to a cyclic convolution of the form: ##EQU3##
The first variable change is intended to cause to appear, in the cosine term, the value 4i+1 which is more readily generated than the value 2i+1. It consists in substituting for x, in the formula (1) the variable x' such that: ##EQU4##
This variable change distributes the values x' into two groups, one corresponding to the even values x.sub.2i of x, the other to the odd values to x.sub.2i+1.
We then obtain: ##EQU5##
A second variable change will then cause the difference of two indices instead of a product to intervene in the definition of the transform. Thus we arrive at the conventional formulation (2) of the cyclic convolution, with its term h.sub.n-i.
In order to obtain this result, use is made of the correspondance between the set of integers congruent to 1, modulo 4 and less than 2.sup.n+2, and the set of integers less than 2.sup.n. It is possible to write:
4i+1=5.sup.u i modulo 2.sup.n+2 (4)
for i=0, 1, . . . , 2.
Subsequently, in order to facilitate writing of the equations, the following notation will be used:
4i+1=<5.sup.u i>.sub.2.sbsb.n+2
Formula (3) then becomes: ##EQU6##
In this formula, the factor x'.sub.i may be written, while taking into account the equivalence indicated by formula (4): ##EQU7## and by assuming: ##EQU8## we find: ##EQU9##
To better show the equivalence between DCT and cyclic convolution, a polynomial notation will now be used introducing a mute or "dummy" variable z allowing X to be put in the form of a polynomial. Two polynomials U and V are defined comprising N terms, each term corresponding to a power of z between 0 and N-1: ##EQU10##
X.sub.k will then be the constant term of the polynomial product of U(z.sup.-1) and of V.sub.k (z). In other words, X is the constant term (corresponding to Z) of the product:
U(z.sup.-1).multidot.V.sub.k (z) modulo (z.sup.N -1) (10)
It can be shown that all odd terms, that is to say of the form V.sub.2k+1 (z), belong to the same family of polynomials offset with respect to each other by a power of z modulo z.sup.N -1. That follows from the preceding calculations for the expression (1) (when it is written for the odd values k=2k'+1) is symmetrical in i and k.
If we know V.sub.1, all the other uneven values V.sub.2k+1 may then be deduced.
To facilitate the calculations, the following sequence will now be introduced: ##EQU11## where n is the same power of 2 as that determining the required length N and j is an incrementation index different from i.
This sequence w.sub.i may then be calculated once and for all and stored in a DCT computation device.
We will now see that the DCT may be obtained by cyclic convolution of the sequence (x.sub.i) of the samples of the signal with the sequence (w.sub.i) stored and a few extra additions.
For that, it is sufficient to remark that the polynomial W(z), whose w's are the coefficients of the successive powers of the mute variable z, is written: ##EQU12## and all the V.sub.k 's of z may be obtained by adding successive shifted versions of W(z), since:
2V.sub.1 (z)=W.sup.(N) (z)-z.sup.N/2 .multidot.W.sup.(N) (z) modulo (z.sup.N -1) (13)
Now, it was mentioned above that all odd terms V.sub.2k'+1 belong to the same family and are deduced from each other by shifting. All the odd terms V.sub.2k'+1 are therefore deduced from V.sub.1 (z) by shifting. Similarly, all the even terms V.sub.2(2k'+1) (z) are deduced from V.sub.2 by shifting. In fact, the similarity may be noted between the expression 2V.sub.1 (z), given by the formula (13), and that of 2W.sup.(N/2) (z):
2W.sup.(N/2) (z)=W.sup.(N) (z)+z.sup.N/2 .multidot.W.sup.(N) (z) modulo (z.sup.N -1) (14)
and we may then draw therefrom the terms congruent to 2 mod 4 of the cosine transform:
2V.sub.2 (z)=W.sup.(N/2) -z.sup.N/4 .multidot.W.sup.(N/2) (z) (15)
and all the V.sub.2(2k'+1) (z)s by successive shifts of V.
By iteration, we will thus obtain successively
V.sub.2k'+1 (z)
V.sub.2(2k'+1) (z)
V.sub.2 l.sub.(2k'+1) (z)
V.sub.N/2 (z)
V.sub.N (z)=V.sub.0
that is to say, for N=8, successively:
V.sub.1,V.sub.3,V.sub.5,V.sub.7
V.sub.2,V.sub.6
V.sub.4
V.sub.0
Expressed in another form, V.sub.k (z) may be presented in the form: ##EQU13## where .alpha..sub.l is a "mute" variable.
The formula (16) shows that all the V.sub.k s are formed by the sum of shifted versions, in the polynomial sense (that is to say derived from each other by multiplying by z).
It is sufficient to know the polynomial product Y(z): ##EQU14## for finding X.sub.k, a constant term (i.e. a factor corresponding to the zero power of z) of the product U(z.sup.-1). W(z) since, if we consider the formula (16): ##EQU15## and according to (17): ##EQU16##
Now, the polynomial product U(z.sup.-1).multidot.W(z) is another way of writing the cyclic convolution of u.sub.i by ##EQU17## which may be compared to the conventional formula (2) of the cyclic convolution.
To sum up, it can be seen that the DCT may be obtained by carrying out in sequence:
a conventional cyclic convolution operation on the input samples x and the values w which may be calculated and stored once and for all, for each value of N;
the operations represented by equations (15) and (16) which are limited to additions and may be represented in the form of "butterflies" used for FFTs, a and b being the inputs: ##STR1##
FIG. 1 shows, by way of example, a possible construction of a DCT device using a cyclic convolver which may have any of the known conventional constructions. It may more particularly be a cyclic convolver of systolic type such as the one described in the article by H. Barral et al "Circuits for Digital Signal Processing", Proceedings of ICASSP 84, paper No. 44-9, completed with connections to make it cyclic. The convolver 10 shown is provided so as to perform a cosine transform of length N=8. It comprises eight inputs intended to receive the samples x.sub.0, . . . x.sub.7 and eight inputs w.sub.0, . . . w.sub.7 intended to receive the values w, stored in an ROM 12. The output values y.sub.0, . . . y.sub.7 delivered by the convolver are those given by the above formula (19). These values must be combined by operators which only carry addition or subtraction operations. A first bank of "butterfly" type operators 14, corresponding to the above algorithm (13), delivers directly the double of the values of X.sub.1, X.sub.5, X.sub.7, and X.sub.3 (odd terms). A second bank, 16, formed of two operators identical to the four operators 14, delivers, from the addition outputs of operators 14, the quadruple of the value of X.sub.2 and of X.sub.6. Finally, a last operator 18 delivers the octuple of the value of X.sub.0 and of X.sub.4.
The existence of an equivalence between DCT and cyclic convolution allows the multiplicative complexity of DCTs of any length 2.sup.n to be calculated, that is to say the minimum number of multiplications required for calculating a DCT of length 2.sup.n. Since the passage from the convolution to the DCT does not require multiplication, the DCT and the convolution have the same multiplicative complexity:
.mu.(conv. 2.sup.n)=2.sup.n+1 -n-1
Furthermore, it should be noted that one of the multiplications is trivial, that is to say consists of a multiplication by a factor belonging to the set of rational integers. Consequently:
.mu.(DCT 2.sup.n)=2.sup.n+1 -n-2.
In the example chosen above of a length N=8=2.sup.3, it will be necessary to carry out 2.sup.4 -3-2=11 multiplications.
The present current technologies allow a multiplication to be carried out at a rate of 10 MHz. If we desire to provide the same rate in circuits for complying for example with the requirements of photovideotext systems, it will be necessary to implement in the circuit at least two multiplications, and often more because of the lack of regularity of the products.
For 12 bit input words, with a single complete convolver of the above described kind, a speed may be reached of about 300 KHz.
In the modified embodiment shown in FIG. 2, the device uses a number theoretic transformer 20. The values (x.sub.n) are applied to the input of a number theoretic transformer or NTT which delivers a sequence (A.sub.k): ##EQU18## where .alpha. is an nth positive radix of the unit modulo M.
The device also includes a memory 22 in which are stored the number theoretic transform (B.sub.k) of the sequence (w.sub.n) of value w. The values B are calculated once and for all by the formula ##EQU19##
The number theoretic transforms are applied to a modulo M multiplier 24 which delivers the number theoretic transform of the result sequence (y.sub.n) which is obtained by means of a reverse number theoretic transform or (NTT.sup.-1)26.
By suitably choosing N and M, we may have a simple value of .alpha.. A value of .alpha. may more particularly be taken equal to a power of 2. In this case, the NTT and NTT.sup.-1 transformers do not comprise any multiplication, but only shifts which simplifies the implementation of the circuit.
In addition, the use of number theoretic transformers provides an additional simplification if we consider that the reductions of y(z)=.SIGMA.y.sub.n .multidot.z.sup.n modulo (the cyclotomic polynomials) intervene as intermediate variables inside the NTT algorithms. The calculation of NTT.sup.-1 occuring in FIG. 2 may be interrupted before its end.
FIG. 3 is a graph of a cosine transform computing device which uses the simplified algorithm, for a length N=8. On the graph are shown the groups of butterfly operators 28, 30, 32 and 34 having the same construction as those used in FIG. 1. However, the operators of FIG. 1 are current operators whereas those of FIG. 3 deliver the modulo M result and may be of the kind described in the European application No. 0 175 623 (Duhamel et al). The multipliers B.sub.0 to B.sub.7 receive, on the one hand, the sequence of values delivered by the transformers 28 and 30 from values x.sub.0, . . . x.sub.7 and, on the other hand, the values B.sub.0, . . . B.sub.7 (i.e. the NTT of the corresponding values w). These values B, . . . B may be supplied by an ROM or be determined by the multipliers themselves, from the values w.
The transformer of FIG. 3 has the advantage of only requiring one general multiplication (modulo M) per point. Consequently, the circuits may be formed so as to operate at a sampling rate equal to the timing rate of the multiplier which may be of 10 MHz with the technologies available at the present time. By using particular multiplier diagrams such as the one shown in FIG. 11 of European application No. 0 175 623 and in the corresponding U.S. Pat. Ser. No. 778,963 (Duhamel et al), the rate may be further increased.
Devices may be formed similar to that of FIG. 3, but corresponding to other values of N. It is particularly interesting, in all cases, to adopt particular values of M which result in a simplication of the architecture. This is particularly the case when a Fermat number 2.sup.2.spsp.q +1, a pseudo Fermat number 2.sup.2q +1, or a number of the type M=2.sup.2q -2.sup.q +1 is adopted for M. For example, for a number of the latter type with q=12, .alpha.=2.sup.9, any multiplication by a power of .alpha. is formed solely by rotations, complementations and, possibly, an addition.
In a modified embodiment of the invention, the number theoretic transformation is performed using a base change and encoding of the type described in European Pat. No. 0 175 623. In this case, the general diagram of the DCT may be limited to that shown in FIG. 4.
The device of FIG. 4 includes, upstream of the number theoretic transformer 20, a coding and base change circuit 36. The sequence {B} applied to multiplier 24 is also obtained by encoding, base change and NTT. The output sequence of multiplier 24 has not been subjected to the whole of the reverse NTT, since the reductions of Y(z) intervene as intermediate variables. The calculation is stopped at this stage, which simplifies the NTT.sup.-1 transformer 38. The results obtained are subjected to a shift and return to the initial base in a circuit 40, which delivers the sequence (X.sub.k).
The components 20, 24 and 38 of FIG. 4 may then be formed by the circuit shown with a continuous line in FIG. 3, which should normally be completed by the broken line components. The inputs x.sub.i are applied to this circuit after encoding at 36 and the coded values Ny.sub.i would be obtained at the output; this broken line part is not required and it is the X.sub.i values which are applied to decoder 40.
The whole of the circuit shown in FIG. 3 (including the broken line part) may form a convolver 10 usable in the device of FIG. 1.
The convolver constructions mentioned above are not the only ones possible. A convolver may in particular be used having circuits using distributed arithmetic such as that described in "Digitial Filter Structures Described by Distributed Arithmetic", C. Sydney Burrus, IEEE Transactions on Circuits and Systems, cas. 24, No. 12, December 77, pp. 674-680 and in "A Prime Factor FTT Algorithm using Distributed Arithmetic" by Shuni Chu et al, IEEE Transactions on Acoustics, Speech and Signal processing Vol. ASSP-30, no. 2, April 82, pp 217-226.
Claims
  • 1. A device for computing the discrete cosine transform X.sub.k of a signal x represented by N digitized samples x.sub.0, . . . , x.sub.i . . . x.sub.N-1, where N is a power of 2: ##EQU20## comprising: means for storing a predetermined sequence of samples w.sub.i (N);
  • convolving means connected to receive said N digitized samples x.sub.i, and said predetermined sequence of samples w.sub.i (N) and arranged to carry out a convolution between the samples x.sub.i and said stored sequence of samples w.sub.i (N) and to provide N convolution products having indices i from 0 to N-1; and
  • a set of identical elementary circuits distributed into a plurality of serially connected banks, each circuit having two inputs and two outputs one of which delivers the sum and the other the difference of the two inputs, each of the elementary circuits of the first bank being connected to receive, on its two inputs, samples of the convolution products whose indices are separated by N/2 from each other.
  • 2. A device as claimed in claim 1, wherein the elementary circuits of the first bank are connected to deliver the odd values (X.sub.1, X.sub.3, . . . ) of said discrete cosine transform on their outputs and the circuits of the following bank are connected to combine said odd values, to provide successive even values (X.sub.0, . . . X.sub.8) of the transform at their subtraction outputs.
  • 3. A device for computing the discrete cosine transform X.sub.k of a signal x represented by N digital samples x.sub.0, . . . , x.sub.i, . . . , x.sub.N-1, where N is a power of 2: ##EQU21## comprising: means for subjecting said samples x.sub.i to a NTT and delivering a sequence A.sub.k : ##EQU22## being a constant value, means for storing a predetermined sequence B.sub.k representing the number theroretic transforms of a predetermined sequence of N values, using said constant .alpha.;
  • means for forming the modulo M product between the N terms of sequence A.sub.k and the N respective terms of the sequence B.sub.k as samples having indices 0, . . . , N-1; and
  • a set of identical elementary circuits distributed into a plurality of serially connected banks, each circuit having two inputs and two outputs, one of which delivers the sum and the other the difference of the two inputs, wherein each of the elementary circuits of the first bank is connected to receive on its two inputs two samples of the modulo M product whose indices are mutually separated by N/2, namely 1 and (N/2)+1; . . . ; (N/2)-1 and N-1, and the outputs of indices 0 and N/2 of the means for forming the modulo M product directly deliver the values X.sub.0 and X.sub.N/2 of the discrete cosine transform.
Priority Claims (1)
Number Date Country Kind
86 01629 Feb 1986 FRX
US Referenced Citations (6)
Number Name Date Kind
3920974 Means Nov 1975
4152772 Speiser et al. May 1979
4196448 Whitehouse et al. Apr 1980
4385363 Widergren et al. May 1983
4449194 Wilhelm May 1984
4675836 Arnould et al. Jun 1987
Non-Patent Literature Citations (1)
Entry
Chen et al., "A Fast Computational Algorithm for the Discrete Cosine Transform" IEEE Trans. on Communications, vol. COM-25, No. 9, Sep. 1977, pp. 1004-1009.