Integer transform/the inverse transform method that is used for 4 I/O of encoding process
Technical field
The present invention relates to image encoding and decoding technique, particularly relate to integer transform/inverse transform method and device thereof in the image coding and decoding process, belong to the Image communicating technical field.
Background technology
Comprise high definition digital television, EVD, broadband network, WiMAX multimedia communication etc. these with information household appliances, communication equipment, industry that multimedia equipment is relevant, its common technology is to be the multimedia messages treatment technology of main contents with the digital video-audio encoding and decoding technique, and video coding and decoding technology is to realize high-quality, storage of low-cost multi-medium data and transmission key efficiently.In recent years, broadcasting, communication, development of computer network have also proposed more and more higher requirement for video coding and treatment technology.Coding method commonly used at present has predictive coding, orthogonal transform coding, vector quantization coding or the like, these methods all are based on signal processing theory, usually be also referred to as first generation coding techniques, popular image encoding international standard all is based on this coding theory now, the coding method that the motion compensation strategy, discrete cosine transform and the quantification that are based on the image block coupling of employing combines.
A complete video coding system generally includes: four main modular such as prediction, conversion, quantification and comentropy coding.The major function of prediction module is to utilize the encoded image of building of laying equal stress on that the current image encoded of wanting is predicted (inter prediction), perhaps utilizes in the image the encoded image block of building (or macro block) of laying equal stress on that the current image encoded piece (or macro block) of wanting is predicted (infra-frame prediction); The major function of conversion module is that the image block that will import transforms to the another one space, the energy of input signal is concentrated on the low frequency transform coefficient as much as possible, and then reduce the correlation between the image block interior element, helps compression; The major function of quantization modules is that the coefficient with conversion is mapped on the finite element collection that helps encoding; The major function of comentropy coding module is according to statistical law, and the conversion coefficient after quantizing is represented with variable length code.Similarly, video decoding system comprises similar module, mainly is the code stream of input is rebuild decoded picture by processes such as entropy decoding, inverse quantization, inverse transformations.Except above-mentioned module, also comprise some auxiliary coding toolses in the video coding and decoding system usually, these instruments equally also can contribute to the coding efficiency (compression ratio) of whole system.
Obviously, conversion/inverse transformation is the important component part of video coding and decoding system, the falling relevant effect and will directly influence the coding efficiency of encoder of conversion/inverse transformation.At present, Xian Jin video/audio encoding and decoding technology exists with the form of standard usually.Typically look at present (the Moving Picture Expert Group of Motion Picture Experts Group that audio compress standard has International Organization for Standardization to divide into, abbreviation MPEG) the MPEG series international standard of releasing, the H.26x series video compression recommendation that International Telecommunication Union proposes.In these video encoding standards, conversion commonly used has discrete cosine transform (DCT), wavelet transformation etc.Dct transform and wavelet transformation all have good encoding compression effect, but owing to need the computing of floating-point multiplication and addition, so complexity is than higher.Recent discovers that can use conversion coefficient all is the conversion of integer, as long as tie in quantized segment, under the situation that code efficiency does not reduce, still can reduce computational complexity greatly.
Joint video team (the Joint Video Team that ISO and ITU set up, abbreviation JVT) AVC (the Advanced Video Coding) video encoding standard of formulating is the video encoding standard of a new generation, it has adopted a series of novel coding techniquess, than all high many of the compression efficiency of existing any coding standard.The formal title of AVC standard in ISO is the tenth part of MPEG-4 standard, and the formal title in ITU is a standard H.264.The AVC standard has adopted a kind of integer transform of 4 I/O, shown in following matrixing.Because coefficient is very simple, only need just can realize that 4 * 4 two-dimensional transform only needs 16 displacements, 64 sub-additions altogether with addition and displacement.
In brief, integer transform has following characteristics:
Algorithm is simple and clear, is easy to hardware designs.
The operation result precision is high and can not overflow.When traditional dct transform is realized, different transformation results can be obtained in the device with nonidentity operation precision, therefore when carrying out coding and decoding video, not matching of direct transform and inverse transformation can be formed.And the integer transform coding can be combined closely with quantizing process, obtains the result of calculation of maximal accuracy under the prerequisite that data are not overflowed.
Integer arithmetic, fast operation.
Therefore, in the design Video Codec, adopt integer transform will become a kind of trend.There have been some integer orthogonal transforms to be used for video coding at present, but still can have designed new more efficiently integer transform.For existing digital of digital video data, the video data of low resolution particularly, as 176 * 144, the motion compensated prediction of employing 4 * 4 can obtain higher precision of prediction, adopt motion compensated prediction to become a kind of trend during the video of the low resolution of therefore encoding based on 4 * 4, correspondingly, adopt the integer transform of 4 I/O also can under the prerequisite that guarantees code efficiency, reduce computational complexity.There has been at present the integer transform of 4 I/O to exist, as the conversion/inverse transform method in the AVC standard.Although this conversion is very simple, only realize with displacement and addition, can not embody the statistical law of video data well.
Summary of the invention
The technical problem to be solved in the present invention is towards application such as high-definition digital video encoding and decoding, a kind of integer transform/inverse transform method and device thereof that is used for 4 I/O of encoding process proposed, the present invention can realize by addition and shifting function, when reducing complexity, can also guarantee code efficiency efficiently.
The integer transform method that is used for 4 I/O of encoding process of the present invention comprises following step:
The 1st step, the image parameter X=of reception prediction module output (x 3, x4) for x1, x2 ';
The 2nd step is to universal transformation matrix
, make among the W coefficient satisfy: a=b=1, the ratio of c and d is between 1.5-2; Can obtain a series of integer transform matrixes thus: one of them is:
In the 3rd step, T decomposes to transformation matrix, and the matrix after each is decomposed is convenient to the multiplication of matrices computing is converted into addition and shift operation;
The 4th step, utilize the result of above-mentioned matrix decomposition, carry out quick compute matrix Y=TX, obtained conversion Y=as a result (y1, y2, y3, y4) ', promptly frequency coefficient has been represented each frequency range signal intensity of input picture.
The above-mentioned integer transform method that is used for 4 I/O of encoding process, described the 3rd step decomposes transformation matrix T, and comprising: to one of wherein transformation matrix is that T decomposes:
Make T=PKB, wherein, B=B
1* B
2
Can obtain,
In the 1st step, use matrix
With
Priority premultiplication X; If the result who obtains be V=(v1, v2, v3, v4) ';
The 2nd step, establish U=(v3, v4) ', calculate G2*U; Wherein
The output result in this step is exactly y2 and y4;
Calculate G2*U and can be divided into following a few step:
1. calculate and use matrix
Premultiplication U promptly calculates
If the result is
W=(w
1,w
2)’,
2. the 1st two numbers that go on foot the inside of W as a result that obtains move to left one, obtain
Z=(2w1,2w2)’,
3. establish A=(v3 ,-v4) ', calculate A+Z and promptly obtained G2*U;
In the 3rd step, go on foot the result who obtains with P premultiplication the 2nd.
Wherein
Because T=PKB, so just finished the calculating of TX like this.T can have the matrix decomposition form of multiple equivalence.
The integral inverse transform method that is used for 4 I/O of decoding processing of the present invention comprises following step:
The first step, the coefficient Y=(y behind the reception inverse quantization
1, y
2, y
3, y
4) ';
Second step, by the transformation matrix of integer direct transform,
Obtaining its inverse transformation matrix is T ';
The 3rd step was that T ' decomposes to the inverse transformation matrix, and the matrix after each is decomposed is convenient to the multiplication of matrices computing is converted into addition and shift operation;
The 4th goes on foot, and utilizes the result of above-mentioned matrix decomposition, carries out quick compute matrix X=T ' Y, and the result who obtains conversion is: X=(x1, x2, x3, x4) ', the image of expression reconstruct or the residual image of reconstruct.
The above-mentioned integral inverse transform method that is used for 4 I/O of encoding process, described the 3rd step decomposes transformation matrix T ', comprising:
The first step is used P ' premultiplication Y.The result is R=(y
1, y
3, y
2, y
4) '
Wherein
Second step, the result who uses K ' the premultiplication first step to obtain,
(because G
2=G
2', so K '=K)
If U=is (y
2, y
4) ', then K ' * R comprises G
2* the calculating of U, wherein
Calculate G
2* U can be divided into following a few step:
1. calculate and use matrix
Premultiplication U promptly calculates
If the result is
W=(w
1,w
2)’,
2. the 1st two numbers that go on foot the inside of W as a result that obtains move to left one, obtain
Z=(2w
1,2w
2)’,
3. establish A=(v
3,-v
4) ', calculate A+Z and promptly obtained G
2* U; In the 3rd step, with matrix B 1 ', B2 ' is premultiplication Y successively, promptly calculates B1 ' Y successively, B2 ' (B1 ' Y).Wherein
Because T '=B ' K ' P ', so so just finished the calculating of T ' Y, T ' can have the matrix decomposition form of multiple equivalence.
From technical scheme of the present invention as can be seen, the present invention has following advantage:
This conversion/inverse transform method can be realized by addition and shifting function, is easy to hardware designs, reduces cost of hardware design.
The operational precision of this conversion and inverse transformation is high and can not overflow, and does not have the unmatched phenomenon of direct transform and inverse transformation.
For 8 bit video datas, the residual block of input can represent that the input block of 4 * 49 bits is made two-dimensional transform with method of the present invention with 9 bits, and dateout can be represented with 16 bits, when therefore method of the present invention is used for video coding, can realize with 16 bit arithmetic devices.
Integer transform/the inverse transform method of 4 I/O of the present invention meets the statistical property of digital video, has better to fall relevant effect.
Description of drawings
Fig. 1 is the computing block diagram by the fast algorithm of the direct transform of the integer transform of the coefficient relation that satisfies the present invention's regulation of butterfly computation decomposition.
Fig. 2 is the computing block diagram by the fast algorithm of the inverse transformation of the integer transform of the coefficient relation that satisfies the present invention's regulation of butterfly computation decomposition.
Fig. 3 is the realization block diagram of the fast algorithm of G2 and G2 '.
Fig. 4 is the schematic diagram that the method for the invention is applied to video coding and decoding system.
Embodiment
The integer transform method that is used for 4 I/O of encoding process of the present invention, can conclude following basic step:
The first step is set up transformation matrix;
In second step, T decomposes to transformation matrix, and the matrix after each is decomposed is convenient to the multiplication of matrices computing is converted into addition and shift operation;
The 3rd step, utilize the result of above-mentioned matrix decomposition, carry out quick compute matrix Y=TX, obtained conversion Y=as a result (y1, y2 ..., y4) ', promptly frequency coefficient has been represented each frequency range signal intensity of input picture.
Described transformation matrix is decomposed, its process is as follows:
Be shown below, W is the general formula of one 4 * 4 integer transform.A wherein, b, c, d are integer.For input X=(x1, x2, x3, x4) ', the output Y=WX of conversion.For inverse transformation, transformation matrix is W ', promptly for input Y=(y1, y2, y3, y4) ', the output X=W ' Y of conversion.
According to the dct transform principle, get a=b=d=1 in the JVT standard, c=2.Integer transform in the past is owing to all be based on the dct transform principle, so c: d is more than or equal to 2.
Among the present invention, make a=b=1, the ratio of c and d can obtain higher code efficiency like this between 1.5-2.
Can obtain a series of integer transform matrixes thus, such as:
Can also for:
Be c, d is integer not necessarily, as long as meet ratio between 1.5-2, and can realize promptly thinking requirement according to the invention with integer arithmetic.Such as
In divided by 2 operation, just can be with the realization that once moves to right.
To one of wherein transformation matrix is that T decomposes:
Make T=PKB, wherein, B=B
1* B
2
Can obtain,
In the 1st step, use matrix
With
Priority premultiplication X; If the result who obtains be V=(v1, v2, v3, v4) ';
The 2nd step, establish U=(v3, v4) ', calculate G2*U; Wherein
The output result of this one is exactly y2 and y4;
Calculate G2*U and can be divided into following a few step:
In the 1st step, calculate and use matrix
Premultiplication U promptly calculates
If the result be W=(w1, w2) ',
In the 2nd step, two numbers of the W as a result the inside that the 1st step obtained move to left one, obtain Z=(2w1,2w2) ',
If A=(v3 ,-v4) ', calculate A+Z and promptly obtained G2*U,
The 3rd step, calculate v1+v2 and v1-v2, the output result is exactly y1 and y3.
Fig. 1 has provided the computing block diagram of fast algorithm of direct transform of the integer transform that is the coefficient relation that satisfies the present invention's regulation of decomposing by butterfly computation.With transformation matrix T
1Be example, suppose to be input as X=(1,2,3,4) ', then export Y and be: Y=T
1X=(10 ,-11,0 ,-3) '.Y1=(x1+x4)+(x2+x3)
Provided inverse transform method among Fig. 2,
T ' decomposes to transformation matrix, comprising:
The 1st step, establish W=(y2, y4) ', calculate G2*W; Wherein
If the output result in this step is u3 and u4;
The 2nd step, establish V=(y1, y3) ', calculate
If the output result in this step is u1 and u2;
The 3rd step, establish U=(u1, u2, u3, u4) ' calculate
The result who obtains is exactly X.
From Fig. 2, transformation relation wherein as can be seen, for example:
x1=y1+y3+out1,(out1,out2)’=G2*(y2,y4)’。
Among Fig. 3, calculate G2*U and can be divided into following a few step:
Calculate w1=u1+u2, w2=u1-u2;
W1 and w2 two numbers move to left one, obtain 2w1 and 2w2;
Calculate 2w1+u1 and 2w2-u2.The result is exactly the output of G2*U.
As shown in Figure 4, the method for the invention can be used as a module and is used for general video coding and decoding system, and concrete encoding and decoding comprise following step:
In the cataloged procedure, estimate the motion of decoded picture in present image and the buffer memory, and obtain predicted picture, deduct current input image, obtain the residual image of motion compensation according to movable information;
The residual image that obtains is input to conversion module, obtains conversion coefficient;
Conversion coefficient is quantized;
Adopt the conversion coefficient after the output of comentropy encoder quantizes, the bit stream after obtaining to compress;
In the decode procedure, utilize the comentropy decoder that the bit stream of input is converted to conversion coefficient after the quantification; Utilize inverse quantization module, obtain the conversion coefficient of reconstruct;
Conversion coefficient is input to inverse transform block, adopts the inventive method, obtain the error image of rebuilding;
The image of having decoded according to movable information and buffer memory Shen obtains predicted picture, adds the error image of reconstruction, obtains the decoded picture of rebuilding.
It should be noted last that: above embodiment is the unrestricted technical scheme of the present invention in order to explanation only, although the present invention is had been described in detail with reference to the foregoing description, those of ordinary skill in the art is to be understood that: still can make amendment or be equal to replacement the present invention, and not breaking away from any modification or partial replacement of the spirit and scope of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.