Video image coding method
A kind of video encoding method
Technical field
It is a kind of video encoding method specifically the present invention relates to field of video processing.Technical background
At present, the rapid technological improvement of video field, technical scheme on Video coding is a lot, but because cosine transform has preferable decorrelation energy, and it is easy and fast to realize, therefore, application widely has been obtained in field of video encoding, existing video compression standard MPEG -1, MPEG -2, MPEG -4 (Part 2), 8x8 dct transforms H.261, are H.263 all based on, its general processing block schematic illustration is as shown in Figure 1.
H.263 coding compression frame as shown in Fig. 2 " T " therein refer to be exactly view data or prediction difference data 8x8 dct transforms.
The mode that typicallys represent of cosine transform is:
F(u) = c(u)Y f(x) cos 2X + l)u7t , 11 = 0, ' · · , n
v n
x=0, In is wherein: C(u)
[1, it is other
Because dct transform will carry out the floating-point operation of complexity, also there is the not high problem of precision caused due to mismatch in IDCT, therefore, some experts propose the integer transform method that some properties are converted close to DCT respectively, to reduce computation complexity, transduced precision is improved.
' in document 1 [Antti Hallapuro, Marta Karczewicz, " Low Complexity Transform and. Quantization-Part I:Basic Implementation ", ISO/IEC JTC1/SC29/WG11 and ITU-T SG16 Q.6 Document JVT-B038, January 2002.] a kind of 2D 4x4 DCT-like integer transform methods are given, its transformation matrix is:
Give corresponding inverse transformation, quantization and inverse quantization method.Transformation matrix element cylinder is single, only addition and shifting function in conversion meter processing, and it is easy that hardware is realized, this method has been applied to video compression standard H.264 in MPEG-4 (Part 10), and it is as shown in Figure 3 that it encodes block diagram.
2D 4x4 DCT-like integer transform methods given by document [1], although its property relatively Chu dct transform, but its transformation results differs larger compared with DCT, so that property and compression efficiency can be reduced.^ is invented to hold
The purpose of ^ inventions has been to provide a kind of video encoding method based on 4x4 DCT-like integer transforms, therefore, the present invention is adopted the following technical scheme that:
A kind of video encoding method, Bao includes Yi Xia Bu Sudden:
A, inputted video image is divided into 16x16 macro blocks, and frame in pixel prediction carried out to I two field pictures and processing is repaid in fore-telling, to P two field pictures progress inter frame motion estimation and motion compensation process;
B, converter carry out conversion process to input prediction difference data;
C, conversion coefficient is quantified and entropy code processing, and encoding code stream is passed into receiving terminal;D, receiving terminal carry out entropy decoding to encoding code stream and re-quantization is handled;
E, inverse converter carry out inversion process to coefficient after re-quantization;
F, frame in pixel compensation or inter motion compensation are carried out to the view data after inversion process, and decoded video image is exported;
It is characterized in that described step b, carries out conversion process, its transformation calculations uses equation below using 2D 4x4 DCT-li.ke integer transform methods to video image:
Y = {CXCT )® E
The step e that Households is stated, inversion is carried out using 2D 4x4 IDCT-like inverse transformation methods to video image
Processing is changed, its inverse transformation is as with equation below:
X=CTY E) and C wherein X be view data matrix or prediction difference data matrix, Y be corresponding conversion coefficient matrix,<The element multiplication of two matrix correspondence positions is represented, E is a flexible matrix.
Described video encoding method, can do such as lower aprons value: ^ = 2.5 , , c=2.
c 2
1 1 1 1
5 2-2 -5
C =
1 -1 -1 1
2 - -5 5 - 2」
'0.25 0.0657 0.25 0.0657
0.0657 0.0172 0.0657 0.0172
E
0.25 0.0657 0.25 0.0657
、0.0657 0.0172 0.0657 0.0172
Described video encoding method, can do such as lower aprons value:
1 1 1 1
1 2-2 - 1
C =
1 -1 -1 1
2 -1 1 -2
Described video image code method, can do such as lower aprons value: -
3 2-2
C =
1 one 1 one 1
2 -3 3
0.0981、
0.0385
E =
0.0981
Described video encoding method, can be with ^ text such as lower aprons value:2.4, α=-
2 2 ,
1 1 1 1
12 5-5 - -12
C =
1-- 1 one 11
5-- 1,212 one 5-
'0.25 0.0272 0.25 0.0272、
0.0272 0.0030 0.0272 0.0030
E
0.25 0.0272 0.25 0.0272
、0.0272 0.0030 0.0272 0.0030
Described video encoding method can be done such as lower aprons value:
13 5-5
c =
1 one 1 one 1
5 -1313
'0.25 0.0254 0.25 0.0254
0.0254 0.0026 0.O254 0.0026
E
0.25 0.0254 0-25 0.0254
、0.0254 0.0026 0.O254 0.0026
The flat code methods of described figure ^, can do such as lower aprons value: a =―
c
3 1 -1
c =
1 one 1 one 1
1 - 3 3 ac a ac (025 0.1118 0.25 0.1118
c2 ac c2 0.1118 0.0500 0.1 118 0.0500
E =
ac a1 ac 0.25 0.1118 0.25 0.1118
Video encoding method described in ac c ac c 0.1118 0.0500 0.1 118 0.0500, can be ^!Mouth lower aprons value: = 3. a =—
4 1-1 1
C- 1 -1 -1 1
1 -4 4 -1 a 0.0857 0.25 0.0857、
0.0294 0.0857 0.0294
0.0857 0.25 0.0857
1 Shang 1.
0.0294 0.0857 0.0294
Described video encoding method, but the first row of Matrix C as given above and the third line element are multiplied by a positive integer k respectively, and second and fourth line element Matrix C is not changed into
C k are positive integer;
Matrix E is changed accordingly to
E=E Shang
And real transform result Y does not change, i.e.,: Υ = (CXCT )®E = (c, C,r) E, will be described " E, multiplication processing is incorporated into quantization and re-quantization processing procedure.
Integer transform method given by the present invention is suitable with prior art on performance is calculated, conversion process relates only to addition and multiplying, but closer to DCT property, so as to the preferable decorrelation energy similar to DCT, with more excellent property, can ^ obtain more preferable video compress effect.
Brief description of the drawings
Fig. 1 is the video coding framework schematic diagram based on DCT;
Fig. 2 is H.263 Video coding schematic diagram in the prior art;
Fig. 3 is H.264 & MPEG-4 (Part 10) video coding framework schematic diagram;
Fig. 4 is the schematic diagram that the present invention carries out coded treatment to video image;
Fig. 5 is the flow chart that the present invention carries out coded treatment to video image.
Embodiment
Illustrate the embodiment of the present invention with reference to Figure of description.
As shown in Figures 4 and 5, be schematic diagram and flow chart that the present invention carries out coded treatment to video image, it can be seen that the main Bao of the present invention include Yi Xia Bu Sudden:
A, inputted video image is divided into 16x16 macro blocks, and frame in pixel prediction and compensation are carried out to I two field pictures, inter frame motion estimation and motion compensation are carried out to P two field pictures;
B, converter carry out conversion process to input prediction difference data;
C, conversion coefficient is quantified and entropy code processing, and encoding code stream is passed into receiving terminal;D, receiving terminal carry out entropy decoding to encoding code stream and re-quantization is handled;
E, inverse converter carry out inversion process to coefficient after re-quantization;
F, frame in pixel compensation or interframe movement are carried out to the view data after inversion process foretell to repay, and decoded video image is exported.
For b and e, in the present invention, using a kind of new transform method and corresponding inverse transformation ^ " methods, propose a kind of new 2D 4x4 DCT-like integer transform methods and corresponding quantization method, below body introduce:Wherein X is 4x4 image data matrixs or prediction difference data matrix, and Y is corresponding 4x4 transform coefficient matrixs, the transposition of T representing matrixs.
It is known that 2D 4x4 forward direction dct transform methods are:
2D 4x4 inverse DCT transform methods are:
X=Α Α wherein A are transformation matrix,c
(1) formula can be rewritten as:
Y = BCXCTB
Wherein represent the element multiplication of two matrix correspondence positions
In document [1], the approximate Qu Wei Shang in general=^-1=0.41421 ... can be obtained by=/ again:
B 2 is so as to obtain following transform method:
Positive-going transition:
Y =
Transformation by reciprocal direction:
Due to=+ 1=2.41421., compare(2) 、 (3) formula can be seen that(3) integer transform in formula is equivalent to taking 2, it is clear that excessively coarse, in order to further improve transduced precision, makes
C properties take closer to DCT, this patent《^=2.5, then can be obtained by ^: b=
c 2
C=2. therefore, by(2) following transform method can be obtained:
58
Positive-going transition
Its multiplication processing can be incorporated into during the quantification treatment to conversion coefficient below by two
Example 1:4x4 images
Its dct transform knot
By(3) formula is calculated
With DCT error
By(5) formula is calculated
( 0.0000 -0.0136 0.0000 —0.0009
0.0491 0.1460 0.1144-0.0449 and DCT error is J 12
0.0000 -0.0571 0.0000 0.0373 -0.0405 -0.0449 0.0047 -0.1460
464.0000 20.7129 23.5000 5.2178
- 6.1664 80.8000 10.9099-11.1000 by(3) result that formula is calculated is y21
36.5000 13.7559 -12.0000 -14.0721
-7.4314 -1.1000 -17.8669 -8.8000
0.0000 0.3178 0.0000 -1.4814、
-0.5113 -1.3129 -1.2940 -6.2744
Error with DCT is Ζ ^ -21
0.0000 -1.0322 0.0000 - 0.9397
V 0.4558 -6.2744 -0.7284 1.3129
^464.0000 21.0747 23.5000 3.4796
- 6.7623 79.1724 9.3884-18.4310 by(5) result that formula is calculated is: r22 =
36.5000 12.5398 -12.0000 -15.1659
- 6.8936-8.4310-18.7112-7.1724 and DCT error is y
2.-:τ,
The basic thought of the present invention as described above, but the other values that ^ can be taken as in [0,6] so that c
To corresponding transformation matrix.For example:
b
(1)=0.5 is taken:Then obtain following transformation matrix and Ε matrixes are:
1 1 1 1
1 2-2 1
C =
1 one 1 one 11
2 -1 1 -2
(2) it is c to take=1. to obtain following transformation matrix and E matrixes
1 1 1 1
3 2-2 -3
c =
1 -1 -1 1
2 -3 3 — 2
(3)=2.4 are taken, then obtains following transformation matrix and E matrixes is
1 1 1 1
12 5-5 -12
C
1 -1 -1 1
5 -12 12 -5
0.0272 0.25 0.0272、
0.0030 0.0272 0.0030
0.0272 0.25 0.0272 0.0030 0.0272 0.0030
y
(4)=2.6 are taken, then it is c to obtain following transformation matrix and E matrixes
Γ -5 Γ the Τ of one, b=13
2 / 97 ' c = 2 97 '
0.0254 0.25 0.0254
0.0026 0.0254 0.0026
E:
0.0254 0.25 0.0254 0.0026 0.0254 0.0026
(5) ^ 3.0 is taken, then obtains following transformation matrix and E matrixes is
C
1 1 1 1
3 1-1 -3
C
1 -1 -1 1
1—3 3 -1
a
2 ac a
2 ac '0.25 0.1118 0.25 0.1118 ac c
1 ac c
2 0.1118 0.0500 0.1118 0.0500
E =
^2
a ac a2 ac 0.25 0.1118 0.25 0.1118 ac c1 ac c2 、0.1118 0.0500 0.1118 0.0500
(6)=3.5 are taken, then obtains following transformation matrix and E matrixes is
C
1 1 1 1
7 2- -2 -7
1 -1. -1 1
2 -7 7 -2
0.25 0.0486 0.25 0.0486
0.O486 0.0094 0.0486 0.0094
0.25 0.0486 0.25 0.0486
0.O486 0.0094 0.0486 0.0094
(7)=4.0 are taken, then following transformation matrix and E matrixes are:
a
2 ac a
2 ac 0.25 0.0857 0.25 0.0857
ac c2 ac c2 0.0857 0.0294 0.0857 0.0294
E =
a2 ac a2 ac 0.25 0.0857 0.25 0.0857
ac c2 ac c2 .0.0857 0.0294 0.0857 0.0294yContrast(3 )、 (4) with(5), (6), and the calculating performance that can be seen that DCT-like integer transform methods described in this patent by example above is suitable with document [1] methods described, but closer to DCT property.
It is described above; the only present invention preferably embodiment, but protection scope of the present invention is not limited thereto, any one skilled in the art the invention discloses technical scope in; the change or replacement that can be readily occurred in, Po should be included within the scope of the present invention.Therefore, protection scope of the present invention should want the protection domain of agriculture book to be defined by right.