Method and device for the arithmetical calculation of two-dimensional transforms

Abstract: The method comprises two time steps of multiplication and accumulation, of which a first step is assigned to the product of the data and of the coefficient matrices and a second step is assigned to the subsequent product by the transposed coefficient matrix. Moreover preferably the data to be transformed and the corresponding coefficients are supplied to a first multiplication step in time succession, possibly after their storage in an appropriate memory. The device for the attainment of said method comprises two multipliers (31, 32) with their corresponding accumulator (33, 30), a RAM-type memory (34) for storing the data to be transformed and the transform coefficients, a multiplexer (39) which receives said data first from the input and then from the memory (34) and arranges them in a time succession for the supply to a first multiplier (31), and a shift register (38) which receives said transform coefficients from the memory (34) and arranges them for the supply to the second multiplier (32).

Description: The present invention relates to a method and a device for the arithmetical calculation of two-dimensional transforms. In many fields of technology there exists the need of executing coding for transmission and recording of numerical signals by means of two-dimensional transforms. This coding technique ensures the decorrelation of the original signal and executes its energy compacting. Such an operation reduces signal redundancy, allowing the minimization of the quantity of information necessary for coding. For any type of signal (voice, video, data), the optimum transform in terms of decorrelation capacity is the Karhunen-Loewe transform; unfortunately the computational complexity of the algorithm, and as a consequence the length of calculation time required, makes it difficult to use it within the ambit of industrial applications wherein it is required that the signal transform operation be carried out in real time (coding of images in motion). In practice different types of sub-optimum unitary transforms are used: discrete Fourier transform, discrete sine transform, discrete cosine transform, Hadamard transform, slant transform. The choice of a particular type of unitary transform is dictated by the statistical characteristics of the signal to be coded. EP-A- 289 629 discloses a method a-d a device for performing a two-dimensional transform. The object of the present invention is to design a method and a device for the arithmetical calculation of any two-dimensional unitary transform which allows operations in real time with a high speed of calculation and which has a particularly simple architecture. According to the invention such object is attained by means of a method as defined in claim 1. It has been possible to note that in this way a good compromise has been obtained between the occupation of silicon area and the speed of calculation. According to the invention there is further provided a device as defined in claim 3. With the introduction of the multiplexer it has been possible to attain considerable speeds of calculation, while the use of the RAM memory has allowed extreme operational flexibility allowing, as the case may be, to select the type of the transform most suitable for the particular problem to be solved. The transform's arithmetical calculation thus becomes programmable simply by varying the transform coefficients stored in the RAM. These and other features of the present invention shall be made evident by the following detailed description of an embodiment illustrated as a non-limiting example in the enclosed drawings, wherein: Fig. 1 shows the architecture of a device according to the invention; Fig. 2 shows the logic operating sequence of the device in compliance with the method according to the invention. Considering first Fig. 1, the device according to the invention essentially comprises two multipliers 31, 32, in series having 8x8 and 12x8 bits respectively, which both work in module and token. At the output of the multiplier 31 there is arranged a first accumulator, indicated in the figure with 33, which has the task of accumulating the first matrix product (data matrix by transform coefficient matrix). Internally said accumulator 33 contains, in a way not shown in the drawing, an adder/subtractor (piloted by the token bit and operating on the module coming from the multiplier 31) for the accumulation of the partial sums necessary for the first matrix operation, a second adder/subtractor for the reconversion to module and token, six registers for the reconversion of the data flow and two multiplexers necessary for accumulator reset. A dual-gate transposition RAM 34 with the possibility of partially writing each word's content is included for memorizing the coefficient matrix and that of the data; its dimensions (18 bits for 64 words) make it possible to have both the data and the coefficients available with just one address. Programming of RAM 34 is executed by varying the content of the part of RAM 34 containing the transform coefficients. The contents of the part of RAM 34 containing the data is varied each time a new matrix to be transformed arrives. The input lines to RAM 34 come from three registers, of which the registers indicated with 35 and 36 load the coefficients and the matrix data, respectively, transforming them from the twos complement notation to that of module and token. Said input data and coefficients are supplied to registers 35, 36 along input buses 40, 41. The third register indicated with 37 is controlled by a suitable microprocessor with which it communicates by means of connections 42, 43 and contains a programmable logic array (PLA) to generate the control signals for controlling the device's logic operation, a random logic supporting the PLA and a 9-bit counter to generate the RAM 34 addresses. A set of three connections depart from RAM 34, two of which are used to supply the coefficients of the transposed matrix to the multiplier 32 through a shift register 38 and to supply the data to be transformed to a two-to-one multiplexer register indicated with 39 with which it is possible to route to the first multiplier 31 the data coming from register 36 (for the first 64 clock cycles) or from RAM 34 (subsequent clock cycles), respectively. The third connection allows the RAM to supply the transform coefficients to multiplier 31. An accumulator 30 allows the accumulation of a second matrix product (first matrix product by transposed transform coefficient matrix) giving a twos complement output. Inside it, in a way not shown in the drawing, there are just one adder/subtractor (driven by the token bit and operating on the module coming from the output of accumulator 33), a multiplexer for reset and nine registers for the synchronization of the data flow. The output line 44 departs from said accumulator. Due to the effect of the described structure, during its operation the device occupies in succession a group of three states, wait, load, calculation, the transition between which is regulated by a group of commands by means of which the device executes the transform operation. The flow chart related to this group of commands is represented in Fig. 2. In it there are present three functional registers 21, 22, 23, corresponding to the steps of waiting, coefficient loading and transform calculation, and polling registers for loading 24, calculation 25, end of coefficient loading operation 26, end of calculation operation 27, respectively. There are also two registers, indicated with 28, 29, to signal that the coefficient loading step 22 or the calculation step 23 are under way, respectively. A suitable operational flag is placed on one during such steps. The letters Y and N indicate positive or negative replies at the output from registers 24, 25, 26, 27. More precisely, from the waiting step, functional register 21, inside which an operational flag is forced to 0, we go to the step of loading request, register 24, from which in case of a positive reply Y we go to the coefficient loading step, functional register 22, having previously signalled the start of this step by giving a value 1 to the operational flag inside register 29. The input register 35 of Fig. 1 then loads the transform coefficient into RAM 34. In case of a negative reply at the output of the loading polling register 24 we go to the calculation polling register 25. From this register, in case of a negative reply we return to the waiting step, functional register 21; in case of a positive reply, on the other hand, we go to functional register 23, corresponding to the calculation step, having previously signalled the start of this step by giving a value 1 to the operational flag inside register 28. There is thus started the operation of transform calculation using for the first 64 clock cycles the data loaded by the input register 36 of Fig. 1 and for the following the matrix data loaded in the meantime by the same register 36 into RAM 34. The calculation is executed by the two multipliers 31 and 32 of Fig. 1 with their corresponding accumulators 33 and 30, first executing the multiplication of the data matrix by the transform coefficient matrix and then the multiplication of the corresponding result by the transposed transform coefficient matrix. From the end of operation polling registers 26, 27 we finally return with a positive reply, that is to the completion of the corresponding operation, to the wait step, functional register 21, while in the case of a negative reply we continue the current operation returning through registers 29 and 28 to the loading and calculation functional registers 22 and 23. It should be noted that the calculation of the two-dimensional transform is programmable by varying only that part of RAM (34) which contains the matrix of the transform coefficients.

Claims: Method for the arithmetical calculation of two-dimensional transforms, characterised in that it comprises a first step of multiplication and accumulation for calculating the product of an input data matrix and a transform coefficient matrix and a second subsequent step of multiplication and accumulation for calculating the product of the transposed transform coefficient matrix and the product calculated in the first step, the method also comprising the steps of storing input data to be transformed and transform coefficients, and sequentially supplying firstly input data as it is input, and then the stored data, to the first multiplication step. Method according to claim 1, characterized in that the stored transform coefficients are supplied for the first multiplication step and then a transposed transform coefficient matrix is supplied with a preset time shift to the second multiplication step. Device for the arithmetical calculation of two-dimensional transforms, characterised in that it comprises a first multiplier-accumulator (31,33) connected to multiply a transform coefficient matrix and an input data matrix, a second multiplier-accumulator (32,30) connected to multiply the product calculated by the first multiplier-accumulator and the transposed transform coefficient matrix, a RAM memory (34) for the storage of said transform coefficient matrix and of said input data matrix, and a multiplier (39) for receiving input data from an input line (40) and from the RAM (34) and supplying them sequentially to the first multiplier-accumulator (31,33). Device according to claim 3, characterized in that it comprises a shift circuit (38) for delayed supply of the transposed transform coefficient matrix from the RAM (34) to the second multiplier-accumulator (32,30).

Inventors: LAVORGNA MARIO, POLUZZI RINALDO, RIZZOTTO GIANGUIDO, TALIERCIO MICHELE, LAVORGNA, MARIO, POLUZZI, RINALDO, RIZZOTTO, GIANGUIDO, TALIERCIO, MICHELE
Applicants: SGS THOMSON MICROELECTRONICS, SGS-THOMSON MICROELECTRONICS S.R.L.
Application year: 1990
Main classification: G06F17
IPC codes: G06F17