Method and device for obtaining in real time the two-dimensional discrete cosine transform

Abstract: Especially applicable to the compression of video signals. The method, which makes use of the possibility of breaking down one two-dimensional transform into two one-dimensional transforms, is characterised in that the two one-dimensional transforms are computed in time-overlapped processes, the first of these generating data for the second and the second using the data previously supplied by the first. The device consists of two multiplier sections (6, 12) separated one from the other by two FIFO memories (9, 11) which act as temporary stores, and of the selection logic (10) required to allocate at each moment the read or write function to each FIFO memory.

Description: This invention, as stated in the title of this specification, consists of a method and a device for obtaining in real time the two-dimensional discrete cosine transform. In the field of signal compression, and especially in that of video signal compression, the use of the discrete cosine transform (DCT) is widely employed as a key element in the compression process. To date, many procedures have been proposed to obtain fast algorithms that perform the calculation of the discrete cosine transform which are based on reducing the number of operations required by taking advantage of the characteristics of the transform itself. The effectiveness of these fast algorithms is simulated on computers, however their use is presently prohibitive for video applications in real time. For the compression of a video signal in real time, the computation of a discrete cosine transform by software implies complex architectures in signal processors. As a result, the present trend is to perform these fast algorithms by means of specific VLSI circuits. Nevertheless, these types of specific VLSI circuits are not yet commercially available, consequently they cannot be used for immediate applications. Based on the mathematical theory, an orthogonal transform in two dimensions of a data set can be broken down into two one-dimensional transforms applied successively to the said data, in such a way that the two-dimensional transform is equal to the coefficients matrix multiplied by the input data matrix and multiplied by the transposed coefficients matrix. The device that performs the method corresponding to EP-A-0 254 824, is formed by two multiplier circuits, two memories and a selection logic that at each moment allocates to each of the memories the read function for column wise reading the recently calculated matrix row or the write function for row wise writing the new row to be calculated. The method of obtaining the two-dimensional discrete cosine transform in real time, according to this invention, takes also advantage of the possibility of breaking a two-dimensional transform down to two one-dimensional transforms. This is made practical through a structure in two stages that operate simultaneously with respect to the rows of the intermediate result matrix, the first stage generating the data for the second stage and the second stage using the data that have been supplied to it by the first stage. The method is characterised in that the effective time employed in calculating the two-dimensional discrete cosine transform is almost the same as the time taken to calculate the one-dimensional cosine transform. Consequently the structure of the method permits working in real time with real sequences and images, making use of components that are already commercially available. In addition, the method offers great accuracy in the operations, with respect to both intermediate and final results. In order to make this specification more easily understood, and forming an integral part thereof, a series of figures are attached which illustrate in a non-limiting manner, the following features: Figure 1, illustrating a schematic diagram of a way to calculate a two-dimensional transform. Figure 2, illustrating the structure of a device to implement the method object of the invention. As mentioned above, the method of the invention uses the possibility of breaking a two-dimensional transform down into two one-dimensional transforms. As is well known, an orthogonal transform in two dimensions of a data set can be broken down into two one-dimensional transforms applied in succession to the said data, as given by the expression: [T] = [C] [X] [C] t where, T = Two-dimensional transform C = Coefficients matrix C t = Transposed coefficients matrix X = Input data matrix The method of the invention carries out the calculation of the expression above by multiplying the coefficients matrix 1 by the input data matrix 2, which gives as a result a new intermediate matrix 3. Carrying out this operation in the form of rows of the coefficients matrix 1 multiplied by columns of the input data matrix 2, gradually produces the rows of the intermediate matrix 3, in accordance with that shown in figure 1. Once matrix 3 has been obtained, the product is calculated of the intermediate matrix and the transposed coefficients matrix 4, in order to obtain the two-dimensional transform 5, so that by multiplying rows of the intermediate matrix 3 by the columns of the transposed coefficients matrix 4, the two-dimensional transform 5 is obtained row by row. As soon as the result of the first row in intermediate matrix 3 has been obtained, and while the result of the second row of the said matrix 3 is being obtained, the contents of the said first row of intermediate matrix 3 are used to obtain the elements of row one of the transformed two-dimensional matrix. The same procedure is used with the rest of the rows of intermediate matrix 3. The result is that the time employed in calculating the two-dimensional discrete cosine transform is effectively almost the same as that required in calculating a one-dimensional discrete cosine transform, with the consequent saving in process time given that when the last row of the intermediate matrix 3 is being obtained, the last but one row of the two-dimensional transformed matrix has been obtained simultaneously and the only thing left to calculate is the last row in this matrix. In terms of real time, the time taken in calculating this last row of the two-dimensional transformed matrix becomes merely an initial delay after which there is no difference between the time used in calculating one-dimensional and two-dimensional transforms. Figure 2 shows the structure of the device which permits the practical implementation of the method described above The mechanism of the invention is formed by two multiplier circuits, 6, 12 two FIFO (first-in, first-out) memories 9, 11 as well as the selection logic 10 which, at each moment, allocates the read function for the most recently calculated row or the write function for the new row to be calculated to each of the FIFO memories 9 and 11. In initial conditions, the logic 10 configures FIFO memory 9 as a write element for the output of multiplier 6, FIFO memories 9 and 11 being empty. Firstly, the coefficients of the first row of the coefficients matrix 1 are introduced at input 7 of multiplier 6, while to input 8 are applied the columns of input data matrix 2; the results of this operation (the elements of the first row of intermediate matrix 3) are progressively stored in the registers of the FIFO memory 9. The selection logic 10 assigns FIFO memory 11 to be the read memory for the multiplier 12 however, since FIFO memory 11 is empty, the multiplier 12 receives no feed and no output is produced (elements of the rows of the final two-dimensional transformed matrix 5). When processing of the elements of the first row of the coefficients matrix 1 has been completed, selection logic 10 interchanges the roles of FIFO memories 9 and 11, and hence the results of the operation of the coefficients of the second row of the coefficients matrix 1 with the input data from the input data matrix 2 are stored in FIFO memory 11. At the same time as the preceding operation, the multiplier 12 computes the first row of the final two-dimensional transformed matrix using, to do so, the elements of the first row of the intermediate matrix 3 stored in FIFO memory 9 and the coefficients, by columns, of the transposed coefficients matrix 4, said data being introduced through input 13. The process is repeated until, at a given moment, the multiplier 6 has obtained and loaded the elements of the last row of the intermediate matrix 3 into one of the FIFO memories whilst, simultaneously, multiplier 12 obtains the elements of the last but one row of the final two-dimensional transformed matrix, using for this the coefficients, by columns, of the transposed coefficients matrix 4 and the elements of the last but one row of the intermediate matrix 3, which have been stored in the other FIFO memory. Consequently, when multiplier 6 has obtained the elements of the last row of the intermediate matrix 3 (which would be the result in the case of a one-dimensional discrete cosine transform) multiplier 12 has obtained all the rows of the final two-dimensional transformed matrix except the last one. It is therefore necessary to continue the process only for this last one, so achieving a great saving of time in the process.

Claims: Method for obtaining in real time the two-dimensional discrete cosine transform of input signals, especially applicable to the compression of video signals, in real time with actual sequences and images, this method making use of the possibility of breaking a two-dimensional transform down into two one-dimensional transforms, the first one-dimensional discrete cosine transform matrix [P] = [C] * [X] being calculated on a row by row basis, where [ P ] is the intermediate result matrix, [C] is the coefficients matrix and [X] is the input data matrix, the method being characterised in that the second one-dimensional discrete cosine transform matrix [T] = [P] * [C t ] is calculated on a row by row basis too, from the rows of the first one-dimensional discrete cosine transform, where [T] is the final result matrix of the second one-dimensional discrete cosine transform and [C t ] is the transposed coefficients matrix, so that a row of the two-dimensional discrete cosine transform is obtained from a row of the input signals only after twice the time necessary for calculating a row of a one-dimensional discrete cosine transform, and that a full two-dimensional discrete cosine transform is obtained only after the time necessary for calculating a full one-dimensional discrete cosine transform, increased by the time necessary for calculating a row of a one-dimensional discrete cosine transform. Device for applying the method of claim 1 and being formed by a first multiplier circuit (6) for calculating calculate successive rows of the first one-dimensional discrete cosine transform, that is connected to two FIFO (first in, first out) memories (9, 11), each one to store one row of the one-dimensional discrete cosine transform, which in turn are connected to a selection logic circuit (10), so that when said first multiplier circuit (6) has calculated a first row of a first one-dimensional discrete cosine transform, the result is stored into a first FIFO memory (9), and then, when said first multiplier circuit (6) has calculated a second row of said first one-dimensional discrete cosine transform, the result is stored into a the second FIFO memory (11), the device also including a second multipler circuit (12) characterized in that said second multiplier circuit (12) calculates a first row of a second one-dimensional discrete cosine transform, so that to provide one row of the final two-dimensional discrete cosine transform, as from the contents of said second FIFO memories (11), whereas said first FIFO memory (9) is storing one row of said first one-dimensional discrete cosine transform from said first multipler circuit (6), and then to calculate a second row of said second one-dimensional discrete cosine transforme, i.e. of the final two-dimensional discrete cosine transform, as from the contents of said first FIFO memories (9), whereas said second FIFO memory (11) is storing a second row of said first one-dimensional discrete cosine transform from said first multipler circuit (6), and so on.

Inventors: SANJUAN FLORES TOMAS C O ALCAT, SANJUAN FLORES, TOMAS C/O ALCATEL STANDARD ELECTR.
Applicants: ALCATEL NV, ALCATEL STANDARD ELECTRICA, ALCATEL N.V., ALCATEL STANDARD ELECTRICA, S.A.
Application year: 1989
Main classification: G06F17
IPC codes: G06T9, G06F17