Method for inverse discrete cosine transform

Abstract: An inverse discrete cosine transform apparatus comprises operation units for operating combination of plural basic operation matrixes such as rearrangement, addition and subtraction and multiplication. Coefficient C n of multiplication is defined as C n = cos (nπ/16) (n:integer), and the basic operation matrixes are represented by equation (6), and operations (202;204) of matrixes of addition and subtraction are carried out prior to operations (203;205) of respective matrixes of multiplication at all times.

Description: FIELD OF THE INVENTION AND RELATED ART STATEMENT 1. FIELD OF THE INVENTION The present invention relates to an inverse discrete cosine transform method and apparatus which is used for a band width compression processing system of the video signal. 2. DESCRIPTION OF THE RELATED ART In DCT (discrete cosine transform) and IDCT (inverse DCT) which are used for MPEG (moving picture image coding experts group) of a conventional band width compression process of a video signal, a circuit can be configured by an LSI by using a fast algorithm to reduce amount of computation. An example of the fast algorithm is disclosed in the prior art of a paper of "Fast Algorithms for the Discrete Cosine Transform", written by Ephraim Feig and Shmuel Winograd, IEEE Transaction on Signal Processing, September 1992. According to the paper, the amount of computation is reduced by decreasing frequencies of addition and subtraction, multiplication operations. As to the order of the computations in the fast algorithm, the addition and subtraction is carried out after the multiplication. All multipliers in the multiplications are coefficients of cosine, therefore an error is produced by the multiplication. The error produced by the multiplication is accumulated in a subsequent addition and subtraction as an error of computation result. In order to keep a predetermined accuracy in a final output signal, the number of bits for the coefficient of cosine must be increased, and the number of bits of resultant data of the computation must be also increased. Consequently, there is a problem that a scale of circuit inevitably increases when the computation is carried out by a hardware. OBJECT AND SUMMARY OF THE INVENTION The present invention is to solve the above-mentioned problems in the prior art. An object of the present invention is to provide an inverse discrete cosine transform method and apparatus which is capable of decreasing the number of bits after basic operation matrixes and keeping a predetermined accuracy in a final output signal. In particulor, object of the present invention is to provide an inverse discrete cosine transform method and apparatus including a two-dimensional inverse discrete cosine transform apparatus for attaining the above-mentioned object and decreasing the number of operating units by improving a low-column transposition method. In order to attain the above-mentioned objects, an inverse discrete cosine transform apparatus is configured by combining plural operating units for basic operation matrixes such as rearrangement matrix, addition and subtraction matrix and multiplication matrix, such that the operations of addition and subtraction matrix are carried out prior to operation of the multiplication matrix at all times. Consequently, a frequency of the addition and subtraction after the multiplication can be reduced, and accumulation of an error after the addition and subtraction decreases. BRIEF DESCRIPTION OF THE DRAWINGS FIG.1 is a diagram representing process of signals in the inverse discrete cosine transform apparatus in accordance with the present invention; FIG.2 is a flow chart representing an order of processing steps in a two-dimensional inverse discrete cosine transform apparatus in accordance with the present invention; FIG.3A and FIG.3B in combination show a detailed block diagram of the two-dimensional inverse discrete cosine transform apparatus in accordance with the present invention; FIG.4 is a block diagram of the two-dimensional inverse discrete cosine transform apparatus of an embodiment in accordance with the present invention; FIG.5 is an explanation drawing of transposition of row-column in an embodiment in accordance with the present invention; FIG.6 is a diagram representing process of signals of the inverse discrete cosine transform apparatus of an embodiment in accordance with the present invention; FIG.7 is a block diagram of the two-dimensional inverse discrete cosine transform apparatus of an embodiment in accordance with the present invention; FIG.8 is a block diagram of an two dimentional addition processing apparatus of an embodiment in accordance with the present invention; FIG.9A and FIG.9B in combination show a detailed block diagram of the two-dimensional inverse discrete cosine transform apparatus of an embodiment in accordance with the present invention; FIG.10 is a block diagram of the two-dimensional inverse discrete cosine transform apparatus of an embodiment in accordance with the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention is described with reference to FIG.1, FIG.2 and FIG.3. It is known that there are four kinds of inverse discrete cosine transform (hereinafter is referred to as inverse DCT), namely a first kind through a fourth kind. The present invention relates to the inverse DCT of the second kind. A coefficient of an eight inputs inverse DCT in the first embodiment is represented by equation (1). Equation (2) representing a fast algorithm of the prior art is derived by expanding the equation (1). In equation (2), a third matrix M 13 , a fourth matrix M 14 , a fifth matrix M 15 and a sixth matrix M 16 are elaborated and equation (3) is derived. Matrixes G 1 , G 2 and G 3 in equation (3) are modified to 2 rows and 2 columns matrixes G 1 and G 2 and 4 rows and 4 columns matrix G 3 as shown in equation (4) so that operation of a multiplication matrix is carried out after operation of an addition and subtraction matrix. Equation (5) is derived by combining three matrixes G 1 , G 2 and G 3 in equation (4) and replacing with the matrixes M 13 , M 14 , M 15 and M 16 from the third to the sixth in equation (2). Hereupon, equation (5) is substantially identical with equation (6) cited in Claim 1. In equations (2)and (5), a matrix M 21 in equation (5) is identical with a matrix M 11 in equation (2), in a similar manner, a matrix M 22 is identical with a matrix M 12 , a matrix M 25 is identical with the matrix M 14 and a matrix M 27 is identical with a matrix M 17 . An embodiment in accordance with the present invention is described with reference to FIG.4, FIG.5, FIG.6, FIG.7, FIG.8 and FIG.9. In a two-dimensional inverse discrete cosine transform apparatus according to the present invention The IDCT coefficient matrix is decomposed in a plurality of matrixes and thereafter, a row-column transposition method is applied to a part of said plurality of matrixes such as addition and subtraction matrixes, Tensor product operation is applied to other matrixes in the two-dimensional inverse discrete cosine transform apparatus. For example, as shown in equation (7), four basic operation matrixes of 8 rows and 8 columns are represented by A, B, C, D. Y = DCBA *X*A T B T C T D T Furthermore, transposed matrixes of the basic operation matrixes A, B, C, D are represented by A T , B T , C T , D T , respectively. When an output Y of 8 rows and 8 columns is produced from an input X of 8 rows and 8 columns, the tensor product operation is applied to the basic operation matrix C, and the basic operation matrixes A, B, D are operated by the row-column transposition method. In this case, the two-dimensional inverse discrete cosine transform apparatus is configured as shown in FIG.4. Referring to FIG.4, a tensor product C' in an operating unit 356 is a matrix of 64 rows and 64 columns. A matrix of 64 rows and 1 column is inputted to the operating unit 356, and a matrix of 8 rows and 8 columns is output therefrom. Operations of the basic operation matrixes A, B, D are carried out with respect to an input of 8 rows and 8 columns. It means that an output of 8 rows and 8 columns is obtained by performing operations of eight times with respect to eight inputs in the row direction or column direction. Moreover, as shown in FIG.5, the tensor product operation is carried out in a manner that an input of 8 rows and 8 columns is transposed to an input of 64 rows and 1 column. A resultant output is transposed from the output of 64 rows and 1 column to the output of 8 rows and 8 columns. Particularly in the transposition, if the matrix derived by tensor product operation is a diagonal matrix, a holding device such as a latch or a memory is unnecessary. An inverse discrete cosine transform apparatus for carrying out operation of matrixes as shown by equation (8) is described hereafter. Equation (8) is derived by elaborating equation (6). In equation (8), multiplication matrixes become diagonal matrixes which do not include addition and subtraction operation. Consequently, tensor product operation is simplified, and the multiplication matrixes become diagonal matrixes after the tensor product operation. In the diagonal matrix, as mentioned above, a doring device such as the latch or memory is unnecessary when compared with an apparatus computing equations (5) and (6). Therefore, the circuit scale can be reduced. Derivation of equation (8) is described hereafter. Matrixes as shown by equation (9) are derived by operations of the matrixes M 12 , M 13 , M 14 , M 15 and M 16 in equation (2), Two matrixes L 1 and L 2 of 4 rows and 4 columns in equation (9) are deformed to matrixes L 1 and L 2 as shown by equation (10), respectively. Two matrixes L 1 and L 2 in equation (10) are combined, and are substituted for the matrixes M 12 --- M 16 from the second to the sixth of equation (2). Consequently, equation (2) is represented by equation (11). Referring to equation (11), multiplication matrixes M 32 , M 33 , M 35 and M 37 are diagonal matrixes. Though the multiplication matrixes M 32 and M 33 can be combined to one orthogonal matrix, for convenience of description, the multiplication matrixes M 32 and M 33 are represented by separate orthogonal matrixes. In equation (11), respective addition and subtraction matrixes are operated prior to operation of each multiplication matrix at all times. The addition and subtraction matrix M 34 is operated prior to operation of the multiplication matrixes M 32 and M 33 . Furthermore, the addition and subtraction matrix M 36 is operated prior to operation of the multiplication matrix M 35 . The addition and subtraction matrix M 38 is operated prior to operation of the multiplication matrix M 37 . FIG.6 is a diagram representing a flow diagram of the processing of the inverse discrete cosine transform apparatus corresponding to equation (11). Referring to FIG.6, a sign "+" represents addition by an adder. A numeral "-1" represents inversion of a sign by a sign inverter (not shown). C 1 , C 2 , C 3 , C 4 , C 5 , C 6 and C 7 represent multipliers in multiplication. The multipliers C n (n:integer) is represented by C n = cos (nπ/16) in general. As shown in FIG.6, the inverse discrete cosine transform apparatus produces a first output signal y 0 , a second output signal y 1 , a third output signal y 2 , a fourth output signal y 3 , a fifth output signal y 4 , a sixth output signal y 5 , a seventh output signal y 6 and eighth output signal y 7 from a first input signal x 0 , a second input signal x 1 , a third input signal x 2 , a fourth input signal x 3 , a fifth input signal x 4 , a sixth input signal x 5 , a seventh input signal x 6 and an eighth input signal x 7 . Operations in columns which are sectioned by dotted lines and indicated by M 31 ---M 39 correspond with the operations of the basic operation matrixes M 31 ---M 39 in equation (11), respectively. In the signal processing of the inverse discrete cosine transform apparatus in FIG.6, operations of a part of plural basic operation matrixes are carried out on the basis of two-dimensional matrixes which are derived by tensor product operation. Operations of other basic operation matrixes are carried out by a row-column transposition method. FIG.7 is a block diagram of a two-dimensional inverse discrete cosine transform apparatus for carrying out the above-mentioned operation. Referring to FIG.7, an operating unit 371 of matrixes M 34 ---M 39 which operates on the basis of the row-column transposition method carries out operations in the columns of M 34 ---M 39 in FIG.6. An operating unit 374 of the matrixes M 31 ---M 33 which operates on the basis of two-dimensional matrixes derived by tensor product operation carries out operations in the columns of M 31 ---M 33 in FIG.6. As to the matrixes M 31 ---M 33 in equation (11), a hardware for operating two-dimensional matrixes derived by tensor product operation is described hereafter. First, in the matrix M 33 , since all elements on a diagonal are C 4 (=cos(π/4)), the tensor product of the matrix M 33 is a diagonal matrix of 64 rows and 64 columns, and the elements on the diagonal are multiplied by 1/2. In an actual tensor product operation, a multiplier is not needed because the operation can be carried out by shifting one bit. Moreover, since all inputs of 64 rows and 1 column are multiplied by 1/2, the multiplication can be carried out at an arbitrary operation step. In a manner similar to the matrix M 33 , the matrix M 32 becomes a diagonal matrix of 64 rows and 64 columns by tensor product operation. A hardware for realizing the operation can be configured by one multiplier because the inputs of 64 rows and 1 column can be multiplied every input of a clock signal in sequence. The matrix M 31 becomes a matrix of 64 rows and 64 columns by tensor product operation. As shown in FIG.8, a hardware for carrying out the tensor product operation requires two addition-and-subtraction units 392 and 394, and further, two holding apparatus 391 and 393 such as a latch and a RAM. A hardware which carries out operation based on the row and column transposition method of one-dimensional matrix is described hereafter. When data are inputted in synchronism with a clock signal, eight inputs of one unit in the direction of a row or a column are inputted by input of 8 clock signals. In this operation, a part of one-dimensional operation forms pipelines for carrying out parallel operations of eight steps. That is, when the addition and the multiplication are carried out in synchronism with the clock signal, one adder and one multiplier are capable of operating eight times. Referring to FIG.6, as to multiplications of the matrixes M 35 and M 37 , the number of multiplications is 7 in total. There are three coefficients 2C 4 , 1/2C 2 and 1/2C 6 for these multiplications. Three multiplications by the coefficient 2C 4 which are equivalent to operation of the matrix M 37 are carried out by input of 8 clock signals in one-dimensional operation. Therefore, in the two-dimensional operation, six multiplications of twice of three are carried out. Since the number of pipelines for carrying out parallel operations is eight, six multiplications by input of 8 clock signals can be carried out by using one multiplier. Moreover, since the coefficient 2C 4 does not change, the multiplier can be configured by a small scale circuit using only an adder and a shift circuit. In a similar manner, as to multiplications by two coefficients 1/2C 2 and 1/2C 6 which are equivalent to operation of the matrix M 35 , four multiplications are carried out in one-dimensional operation. That is, eight multiplications are carried out in two-dimensional operation. Therefore, the multiplier can be configured by a small scale circuit using a multiplexer, an adder and a shift circuit. For example, in the article of the prior art, as described in equations (77)---(80) of the article, twenty-nine additions and thirteen multiplications are carried out in the one-dimensional inverse discrete cosine transform. Therefore, in order to perform these operations by input of 8 clock signals, four adders and two multipliers must be used. Consequently, in order to configure apparatus for two-dimensional inverse discrete cosine transform using the row-column transposition method, eight adders and four multipliers are required because two units of the one-dimensional inverse discrete cosine transform apparatus are required. As to addition in FIG.6, operating units of the matrixes M 34 and M 36 can be configured by a selector, an addition-and-subtraction unit for outputting an operation result of addition or subtraction of two inputs, a multiplexer, and a latch for holding the operation result. An operation unit of the matrix M 38 can be configured by a selector, one adder and a latch for holding an operation result. Eight adders and three multipliers must be used for operations in FIG.6. Two of three multipliers carry out multiplication by a particular coefficient. In comparison with the above-mentioned prior art which requires eight adders and four multipliers, one multiplier is reduced in the second embodiment. Moreover, a circuit scale can be reduced by using an exclusive multiplier in comparison with the prior art. FIG.9A and FIG.9B in combination show a block diagram of the two-dimensional inverse discrete cosine transform apparatus of the second embodiment. Referring to FIG.9A and FIG.9B, the number of bits which is required to operation of each basic operation matrix is indicated by a numeral value 12.0, for example. In numeral value 12.0, for example, the integral part represents the number (m) of bits of data of integer, and the decimal part represents the number (n) of bits of data of decimal (m and n are integers). The integers m and n represent the numbers of bits which are required for output data after operation of each basic operation matrix. Moreover, as to multiplications of the matrixes M 32 , M 33 , M 35 and M 37 by an inverse DCT coefficient, the numbers of bits of inverse DCT coefficients are indicated under respective arrows representing outputs of inverse DCT coefficient generating units 404, 407, 413, 416 and 419. The indicated number of bits is required in the case that an operating unit is not an exclusive multiplier which is configured by an adder and a shift circuit, but a conventional multiplier. The matrixes M 31 , M 32 and M 33 having prime "'" represent tensor products of the respective matrixes. Referring to FIG.9A and 9B, the number of bits which is required to each operating unit is described hereafter. First, as to operating units of addition and subtraction of one-dimensional operation, an operating unit 402 of the matrix M 38 requires 13 bits. An operating unit 405 of the matrix M 36 and an operating unit 408 of the matrix M 34 require 17 (=13+4) bits. An operating unit 411 of the matrix M 38 and an operating unit 414 of the matrix M 36 require 18 (=14+4) bits. An operating unit 417 of the matrix M 34 requires 19 (=15+4) bits. As to an operating unit of addition and subtraction of two-dimensional operation, an operating unit 420 of the matrix M 31 ' requires 36 bits twice of 18 bits, and a signal of 18 bits is inputted and a signal of 9 bits is output. In the inverse discrete cosine transform apparatus in the prior art of the paper, it is estimated by the inverter's simulation that four addition and subtraction units of 21 bits and four addition and subtraction units of 19 bits are required. Therefore, it is recognized that the number of bits is reduced as a whole in comparison with the above-mentioned prior art. Description is made to multiplier hereafter. As to respective operating units 415 and 412 of multiplications of the matrixes M 35 and M 37 which are carried out by one-dimensional operation, the number of bits of input data is 14.4 bits. The operating unit 415 comprises an adder, a shift circuit and a rounding circuit (these are not shown) so that the input data are multiplied by an inverse DCT coefficient of 2.12 bits output from the inverse DCT coefficient generating unit 416 and output data of 14.4 bits are obtained. The operating unit 412 also comprises an adder, a shift circuit and a rounding circuit (these are not shown) so that the input data are multiplied by an inverse DCT coefficient of 2.14 bits output from the inverse DCt coefficient generation unit 413 and output data of 14.4 bits are obtained. The operating unit 418 of matrixes (M 32 * M 33 )' of two-dimensional operation requires one multiplier so that input data of 15.4 bits are multiplied by an inverse DCT coefficient of 2.11 bits output from the inverse DCT coefficient generating unit 419 and output data of 11.7 bits are obtained. Assessment result of the second embodiment is shown in table 1. Range of random members Peak mean square error for any of IDCT output pels Overall mean square error of 64 IDCT output pels Peak mean error for any of 64 IDCT output pels mean error of 64 IDCT output pels -256∼255 0.030300 0.015877 0.003200 0.000108 -5∼5 0.027500 0.014764 0.003100 0.000011 -300∼300 0.020700 0.009533 0.002800 0.000003 H.261 standard values 0.06 and below 0.02 and below 0.015 and below 0.0015 and below It is recognized that the result of the second embodiment meets the H.261 standard. If the numbers of bits of the output data after operations of the respective matrix are reduced to smaller values than the above-mentioned numbers of bits, a peak error of each of 64 (=8×8) IDCT output pels exceeds 1. Therefore, the assessment result of the second embodiment does not meet the H.261 standard. As mentioned above, the number of multipliers can be reduced by combining the operation based on the row-column transposition method and the two-dimensional operation which applies the tensor product operation to a part of plural basic operation matrixes. Moreover, the number of bits of data after operations of the respective basic operation matrixes can be reduced keeping a desired operation accuracy. Consequently, a circuit scale of the inverse discrete cosine transform apparatus can be reduced. Another embodiment in accordance with the present invention is described with reference to FIG.10. In the two-dimensional inverse discrete cosine transform apparatus of which a part of the basic operation matrixes is operated by two-dimensional operation based on the tensor product operation and other basic operation matrixes are operated by the row-column transposition method, a circuit which operates on the basis of the row-column transposition method is shown in FIG.10. Referring to FIG.10, input data of 8 rows and 8 columns are transmitted to an operating unit 453 of one-dimensional matrix through a selector 452 and operated. Resultant output data are transmitted to a transposition RAM 456 through a multiplexer 454. The data of 8 rows and 8 columns are inputted to the transposition RAM 456, and the rows and the columns are interchanged in the output. The data output from the transposition RAM 456 are transmitted to the operating unit 453 of one-dimensional matrix through the selector 452, and again operated thereby. Resultant output data are transmitted to an operating unit 455 of tensor product for carrying out two-dimensional operation through the multiplexer 454 and operated thereby. The selector 452 for switching between the input data and the data output from the transposition RAM 456 is controlled by a timing control circuit 451. The multiplexer 454 for switching the output of the operating unit 453 of one-dimensional matrix between the operating unit 455 and the transposition RAM 456 is also controlled by the timing control circuit 451. In the third embodiment as mentioned above, the operation by the row-column transposition method is repeated twice by using one operating unit 453 of one-dimensional matrix, and thereby, the two-dimensional operation is attained. Therefore, a circuit scale of the operating unit 453 of one-dimensional matrix is reduced. Accordingly, it is intended that the appended claims are covering all alterations and modifications as fall within the invention.

Claims: An inverse discrete cosine transform method for carrying out inverse discrete cosine transform of a video signal by combining plural basic operation for operating matrix transposition, addition and subtraction, multiplication and shift, said inverse discrete cosine transform method comprising the steps of: setting a plurality of inverse discribe transform coeffecients Cn in said basic operation for generating a first to an eighth output data from a first to an eighth input video signal data to as follows: Cn = cos (nπ/16) where, n is an integer, elaborating all multiplication matrixes so as to be a diagonal matrix shown by the following equations : wherein operations of matrixes addition and subtraction are carried out prior to respective operation of matrixes multiplication. An inverse discrete cosine transform method of claim 1 further comprising the steps of: applying tensor product operation to a part of said plural basic operation matrixes and applying to the remaining part Row-column tranposition operations, producing two-dimensional output signal of 8 rows and 8 columns from two-dimensional input video signal data of 8 rows and 8 columns of said tensor product. An inverse discrete cosine transform method of claim 1 further comprising the steps of: applying tensor product operation to a part of multiplication matrixes in said plural basic operation matrixes and applying to the remaining part row-column transposition operations, and producing two-dimensional output signal of 8 rows and 8 columns from two-dimensional input video signal data of 8 rows and 8 columns of said tensor product.

Inventors: NADA TAKATOSHI, OHGOSE HIDEYUKI, NADA, TAKATOSHI, OHGOSE, HIDEYUKI
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1995
Main classification: G06F17
IPC codes: H04N1, H04N7, G06F17