CN102780885A - Rate distortion optimization method - Google Patents
Rate distortion optimization method Download PDFInfo
- Publication number
- CN102780885A CN102780885A CN2012102559444A CN201210255944A CN102780885A CN 102780885 A CN102780885 A CN 102780885A CN 2012102559444 A CN2012102559444 A CN 2012102559444A CN 201210255944 A CN201210255944 A CN 201210255944A CN 102780885 A CN102780885 A CN 102780885A
- Authority
- CN
- China
- Prior art keywords
- frame
- coding unit
- rate
- distortion
- sigma
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000005457 optimization Methods 0.000 title claims abstract description 67
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000013139 quantization Methods 0.000 claims description 10
- 230000004075 alteration Effects 0.000 description 5
- 230000003044 adaptive effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000000205 computational method Methods 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 238000011002 quantification Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention relates to a rate distortion optimization method, which comprises the following steps: obtaining a block layer Lagrange parameter of each basic coding unit in a current frame and a frame layer Lagrange parameter of the current frame; acquiring a final Lagrange parameter of each basic coding unit in the current frame according to the Lagrange parameter of the block layer and the Lagrange parameter of the frame layer; according to the final Lagrange parameter, rate distortion optimization coding is carried out on each basic coding unit in the current frame to obtain a code rate value and a distortion value of each basic coding unit in the current frame, and then the code rate value and the distortion value of the current frame are obtained; and establishing a frame layer rate-distortion model according to the code rate values and the distortion values of at least two basic coding units in the current frame, and estimating the frame layer Lagrange parameters of the next frame according to the frame layer rate-distortion model and the code rate values and the distortion values of the current frame. The rate distortion optimization method realizes the optimal rate distortion optimization of video contents by integrating the rate distortion optimization of a frame layer and the rate distortion optimization of a basic coding unit layer.
Description
Technical field
The present invention relates to image/video encoding and decoding field, more particularly, relate to a kind of rate-distortion optimization method.
Background technology
With international standard H264 is reference, when encoded in the basic coding unit, can select the different coding pattern.The selection of coding mode comprises the selection to infra-frame prediction mode or inter prediction mode; Also can comprise the selection of partitioning scheme to the basic coding unit (routine INTRA-4x4, INTRA-8x8, INTRA-16x16, SKIP, DIRECT, INTER-16x16, INTER-16x8, INTER-8x16, INTER-8x8, can further be divided into INTER-8x8, INTER-8x4, INTER-4x8, INTER-4x4), can also comprise selection predict blocks position (routine Intra_4x4_Vertical, Intra_4x4_Horizontal, Intra_4x4_Diagonal_Down_Left, Intra_4x4_Diagonal_Down_Right, Intra4x4_Vertical_Right, Intra_4x4_Hori_zontal_Down, Intra_4x4_Vertical_Left, Intra_4x4_Horizontal_Up, Intra_4x4_DC) to INTER-8x8.Confirming of coding mode is that the percent of pass aberration optimizing realizes that wherein rate-distortion optimization is the process that following cost function J is minimized,
J(s,c,mode|QP)=D(s,c,mode|QP)+λ
modeR(s,c,mode|QP),
Wherein D is a distortion value; R is the code check value; S and c represent former figure and the corresponding basic coding unit of handling through encoding and decoding of building image again respectively; Mode representes the coding mode selected of basic coding unit, and QP is a quantization parameter, and λ mode is used for the Lagrangian parameter of compromise distortion value and code check value.
Rate-distortion optimization is under the fixed condition of quantization parameter QP, confirms the mode that can make above-mentioned cost function J minimum.In the H264 standard, λ mode is promptly had by quantization parameter QP decision
λ
mode=0.85×2
(QP-12)/3,
Above-mentioned rate-distortion optimization mode is a statistical approximation result, lacks the adaptive ability to video content, does not have the continuity of content between considered frame, the rate distortion between successive frame is concerned the restriction that has no.So might cause the rate distortion between successive frame uneven, cause distortion or code check between successive frame to rise and fall excessive.
So, be necessary to provide a kind of rate-distortion optimization method, to solve the existing in prior technology problem.
Summary of the invention
The technical problem that the present invention will solve is; Can not carry out the defective of adaptive optimization to video content to rate-distortion optimization method of the prior art; Provide a kind of, realize rate-distortion optimization method the optimal ratio aberration optimizing of video content through the rate-distortion optimization of comprehensive frame layer and the rate-distortion optimization of basic coding elementary layer.
The technical solution adopted for the present invention to solve the technical problems is: the present invention relates to a kind of rate-distortion optimization method, it comprises step:
The frame layer Lagrange parameter of A, the piece layer Lagrange parameter of obtaining each basic coding unit in the present frame and present frame;
B, according to the frame layer Lagrange parameter of the piece layer of said basic coding unit Lagrange parameter and said present frame, obtain the final Lagrangian parameter of each basic coding unit in the said present frame;
C, based on said final Lagrangian parameter; Each basic coding unit in the said present frame is carried out the rate-distortion optimization coding; Obtain each basic coding unit corresponding code rate value and distortion value in the said present frame, and then obtain present frame corresponding code rate value and distortion value;
D, based at least two basic coding unit corresponding code rate values in the said present frame and distortion value; Set up frame layer rate-distortion model; Based on said frame layer rate-distortion model and said present frame corresponding code rate value and distortion value, the frame layer Lagrange parameter of estimation next frame;
Wherein said step B is specially: obtain said final Lagrangian parameter through following formula,
λ
mode,n=w
1λ
B,n+w
2λ
F,0+w
3,
λ wherein
Mode, nBe the final Lagrangian parameter of n basic coding unit, λ
F, 0Be the frame layer Lagrange parameter of present frame, λ
B, nBe the piece layer Lagrange parameter of n basic coding unit, w
1, w
2, w
3Be corresponding weight coefficient, said weight coefficient w
1, w
2, w
3Obtain according to the coding result of said present frame and the coding result of nearest M frame, M is a positive integer.
In rate-distortion optimization method of the present invention, obtain said weight coefficient w through following steps
1, w
2, w
3:
Store the frame layer Lagrange parameter lambda of said present frame
F, 0, the nearest frame layer Lagrange parameter lambda of M frame
F, mAnd intermediate parameters w
23, m, w wherein
23, mObtain through following formula:
X wherein
nBe the piece layer Lagrange parameter of n basic coding unit of m frame, y
nBe the final Lagrangian parameter of n basic coding unit of m frame:
x
n=λ
B,n,
y
n=λ
mode,n,
Piece layer Lagrange parameter x according to n basic coding unit of said m frame
nFinal Lagrangian parameter y with n basic coding unit of said m frame
n, calculate w
1:
Frame layer Lagrange parameter lambda according to present frame
F, 0, the nearest frame layer Lagrange parameter lambda of M frame
F, mWith said intermediate parameters w
23, m, calculate w
2And w
3,
u
m=λ
F,m,
v
m=w
23,m,
Wherein, m is more than or equal to 0, smaller or equal to the integer of M, and N is the number of the said basic coding unit selected.
In rate-distortion optimization method of the present invention, the piece layer of said each basic coding unit Lagrange parameter is:
λ
B=0.85×2
(QP-12)/3,
λ wherein
BBe the piece layer Lagrange parameter of said each basic coding unit, QP is the quantization parameter of said basic coding unit.
In rate-distortion optimization method of the present invention, said step C comprises: obtain the minimum code cost of rate-distortion optimization of the said basic coding unit of said present frame through following formula,
J(s,c,mode|QP)=min[D(s,c,mode|QP)+λ
modeR(s,c,mode|QP)],
Wherein J is the minimum code cost; D is a distortion value, and R is the code check value, and s representes the basic coding unit of former figure; C representes the corresponding basic coding unit of building image again through the encoding and decoding processing; Mode representes the coding mode selected of said basic coding unit, and QP is the quantization parameter of said basic coding unit, λ
ModeBe corresponding final Lagrangian parameter;
According to said minimum code cost, obtain corresponding forced coding pattern, the said basic coding unit of said present frame is carried out the rate-distortion optimization coding.
In rate-distortion optimization method of the present invention, said step D comprises: according to the code check value and the distortion value of at least two said basic coding unit of said present frame, adopt following formula to set up said frame layer rate-distortion model,
R=aln(b/D),
Wherein R is the code check value, and D is corresponding distortion value, and a, b are model parameter.
In rate-distortion optimization method of the present invention, when the code check value and the distortion value that use two said basic coding unit, when setting up said frame layer rate-distortion model, said model parameter obtains through following formula,
R wherein
1And R
2Be the code check value of said two basic coding unit, D
1And D
2Be corresponding distortion value.
In rate-distortion optimization method of the present invention, when the code check value and the distortion value that use N said basic coding unit, when setting up said frame layer rate-distortion model, said model parameter obtains through following formula,
a=-p,
b=e
-q/p,
x
n=lnD
n,y
n=R
n,
N>2,
R wherein
nBe the code check value of said n basic coding unit, D
nBe corresponding distortion value.
In rate-distortion optimization method of the present invention, said step D also comprises: through the frame layer Lagrange parameter of following formula estimation next frame,
λ
F=-(D(A
1)-D(A
2))/(R(A
1)-R(A
2)),
R (A wherein
1) be the code check value of first intersection point, R (A
2) be the code check value of second intersection point, D (A
1) be the distortion value of first intersection point, D (A
2) be the distortion value of second intersection point, said first intersection point is R=R in R~D plane
AWith said rate-distortion model the intersection point of definite curve, said second intersection point is D=D
AWith said rate-distortion model the intersection point of definite curve, R
ABe frame layer bit rate value, D
ABe frame layer distortion value.
In rate-distortion optimization method of the present invention, said frame layer bit rate value R
ABe the code check value sum of all basic coding unit in the said frame, said frame layer distortion value D
AThrough asking mean square error to obtain to the former figure of said frame and the image of building again of said frame.
The rate-distortion optimization method of embodiment of the present invention has following beneficial effect: through the rate-distortion optimization of comprehensive frame layer and the rate-distortion optimization of basic coding elementary layer, realize the optimal ratio aberration optimizing to video content.Avoided the rate-distortion optimization method of prior art can not carry out the technical problem of adaptive optimization to video content.
Description of drawings
Below in conjunction with accompanying drawing and embodiment the present invention is described further, in the accompanying drawing:
Fig. 1 is the flow chart of first preferred embodiment of rate-distortion optimization method of the present invention;
Fig. 2 is the idiographic flow block diagram of first preferred embodiment of rate-distortion optimization method of the present invention;
Fig. 3 is the sketch map that obtains the frame layer Lagrange parameter of next frame in the rate-distortion optimization method of the present invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Please with reference to Fig. 1, Fig. 1 is the flow chart of first preferred embodiment of rate-distortion optimization method of the present invention.This rate-distortion optimization method starts from:
Step 101 is obtained the piece layer Lagrange parameter of each basic coding unit in the present frame and the frame layer Lagrange parameter of present frame;
Step 102 according to the piece layer Lagrange parameter of said basic coding unit and the frame layer Lagrange parameter of said present frame, is obtained the final Lagrangian parameter of each basic coding unit in the said present frame;
Please see figures.1.and.2, Fig. 2 is the idiographic flow block diagram of first preferred embodiment of rate-distortion optimization method of the present invention.Pass through the practical implementation process of the detailed explanation rate-distortion optimization method of the present invention of Fig. 2 below.
At first; Before step 101, import an absolute coding part of video to be encoded, such as GOP (picture group; Group of Pictures) frame in is to code device; Wherein each frame can have the different coding mode in the GOP, and according to existing video encoding standard, coded system can be divided into I frame mode, P frame mode and B frame mode.Rate-distortion optimization method of the present invention can be applicable to I frame, P frame and B frame respectively, for the simplicity of explaining is no longer distinguished I frame, P frame and B frame here, and is to use uniform way to describe.
After image frame is input to code device, this image frame is divided into the basic coding unit, can be divided into frame the macro block of 16x16 pixel size simply by basic coding unit acquiring unit, with each macro block as a basic coding unit.Here do not get rid of the dividing method that adopts other, as adopting band as the basic coding unit.Then all coding modes selected of basic coding unit are selected one by one; Can select coding mode to each; Accomplish respective coding and decoding processing; Obtain the basic coding unit corresponding build image again, the processing method of Code And Decode can be carried out according to various video encoding standards.Such as, encoding process can be carried out following each step successively: confirm predict blocks, residual computations, dct transform (discrete cosine transform, Discrete Cosine Transform), quantification, entropy coding.Decoding processing then is the reverse operating to above-mentioned each step.The concrete grammar that rate-distortion optimization method of the present invention is handled this Code And Decode does not limit.
Come step 101 subsequently, in step 101, obtain the piece layer Lagrange parameter lambda of each basic coding unit in the present frame
BAnd the frame layer of present frame Lagrange parameter lambda
FWherein the piece layer of basic coding unit Lagrange parameter is:
λ
B=0.85×2
(QP-12)/3,
λ wherein
BBe the piece layer Lagrange parameter of said basic coding unit, QP is the quantization parameter of said basic coding unit.It is pointed out that can there be different λ each basic coding unit
BWith the QP value, but, do not use λ here for interest of clarity with making any distinction between
BRepresent the piece layer Lagrange parameter and the quantization parameter of a basic coding unit with QP.The frame layer Lagrange parameter lambda of present frame
FCoding result by to previous frame confirms that the concrete grammar hereinafter is set forth in detail.If present frame is the initial frame of a coded system (being I frame, P frame or B frame mode), then desirable λ
FBe a designation number, for example 0.
Come step 102 subsequently, in step 102, according to the piece layer Lagrange parameter lambda of each basic coding unit in the present frame
B, nFrame layer Lagrange parameter lambda with present frame
F, obtain the final Lagrangian parameter lambda of each said basic coding unit
Mode, nBe specially the final Lagrangian parameter of obtaining each basic coding unit through following formula,
λ
mode,n=w
1λ
B,n+w
2λ
F,0+w
3,
λ wherein
Mode, nBe the final Lagrangian parameter of n basic coding unit, λ
FThe frame layer Lagrange parameter of present frame, λ
B, nBe the piece layer Lagrange parameter of n basic coding unit, w
1, w
2, w
3Be corresponding weight coefficient, said weight coefficient w
1, w
2, w
3Obtain according to the coding result of present frame and the coding result of nearest M frame, M is a positive integer, and concrete grammar is set forth below in detail.If present frame is an initial frame, then can be taken as designation number, for example w
1Be 1, w
2Be 0, w
3Be 0 etc.
Come step 103 subsequently; In step 103; According to each basic coding unit final Lagrangian parameter separately, each basic coding unit in the present frame is carried out the rate-distortion optimization coding, obtain corresponding code rate value and distortion value; And further obtain present frame corresponding code rate value and distortion value, set up the frame layer rate-distortion model of present frame simultaneously.Specifically comprise:
Obtain the minimum code cost of the rate-distortion optimization of a basic coding unit in the said present frame through following formula,
J(s,c,mode|QP)=min[D(s,c,mode|QP)+λ
modeR(s,c,mode|QP)],
Wherein J is the minimum code cost; D is a distortion value, and R is the code check value, and s representes the basic coding unit of former figure; C representes the corresponding basic coding unit of building image again through the encoding and decoding processing; Mode representes the coding mode selected of said basic coding unit, and QP is the quantization parameter of said basic coding unit, λ
ModeBe corresponding final Lagrangian parameter;
Find the minimum code cost of rate-distortion optimization through following formula, can from optional coding mode, find the forced coding pattern of each basic coding unit like this, adopt this forced coding pattern to be encoded in this basic coding unit then.Above-mentioned coding has all been accomplished in all basic coding unit in a frame, and then the coding of this frame is accomplished.
Simultaneously, adopt above-mentioned forced coding pattern, can obtain this basic coding unit corresponding code rate value and distortion value the basic coding cell encoding.
The distortion value of above-mentioned basic coding unit can obtain through the MSE (mean square error, Mean Squared Error) that calculates former figure and build again between the corresponding basic coding unit of image.
Subsequently, according to above-mentioned coding, can obtain present frame corresponding code rate value and distortion value to each basic coding unit in the present frame.Wherein, the code check value is the code check value sum of all basic coding unit in the present frame, and distortion value is through to the former figure of entire frame with build image again and ask MSE to obtain.
Come step 104 subsequently, in step 104,, adopt following formula to set up the frame layer rate-distortion model of descriptor frame layer rate distortion relation according to the code check value R and the distortion value D of at least two basic coding unit in the present frame,
R=aln(b/D),
Wherein R representes the code check value, and D representes distortion value.A, b are model parameter.
Be specially, when the code check value of using two basic coding unit and distortion value were set up frame layer rate-distortion model, available following formula obtained the model parameter of frame layer rate-distortion model
R wherein
1And R
2Be said two basic coding unit corresponding code rate values, D
1And D
2Be the corresponding distortion value in said two basic coding unit.
When the code check value of using N basic coding unit and distortion value were set up frame layer rate-distortion model, available following formula obtained the model parameter of frame layer rate-distortion model
a=-p,
b=e
-q/p,
x
n=lnD
n,y
n=R
n,
N>2,
R wherein
nBe n (the individual basic coding of n=1~N) unit corresponding code rate value, D
nBe the corresponding distortion value in this basic coding unit.
According to the frame layer rate-distortion model of present frame, and present frame corresponding code rate value and distortion value, the frame layer Lagrange parameter of estimation next frame and the corresponding weight coefficient w of next frame
1, w
2, w
3
As shown in Figure 3, Fig. 3 is the sketch map that obtains the frame layer Lagrange parameter of next frame in the rate-distortion optimization method of the present invention.Curve among Fig. 3 is the determined curve of said frame layer rate-distortion model, and wherein the A coordinate of ordering is present frame corresponding code rate value R
AWith distortion value D
ACoordinate in this coordinate system, as previously mentioned, code check value R
ABe the code check value sum of all basic coding unit in the present frame, distortion value D
AThrough to the former figure of entire frame with build image again and ask mean square error to obtain.What supposed that A orders is A1 point and A2 point with the intersection point of curve respectively with horizontal straight line vertically, and wherein the A1 coordinate of ordering is (R (A
1), D (A
1)), the coordinate that A2 is ordered is (R (A
2), D (A
2)), the straight slope that A1 point and A2 point constitute just can be used as the frame layer Lagrange parameter lambda of next frame
FBut also arrive the nearest point that A is ordered on the calculated curve here, curve promptly can be used as the frame layer Lagrange parameter lambda of next frame at the slope of this point
F
Particularly, can estimate the frame layer Lagrange parameter of next frame through following formula,
λ
F=-(D(A
1)-D(A
2))/(R(A
1)-R(A
2)),
R (A wherein
1) be the code check value of first intersection point, R (A
2) be the code check value of second intersection point, D (A
1) be the distortion value of first intersection point, D (A
2) be the distortion value of second intersection point, first intersection point is R=R in R~D plane
AWith the frame layer rate-distortion model of above-mentioned present frame the intersection point of definite curve, second intersection point is D=D
AWith above-mentioned rate-distortion model the intersection point of definite curve, R
ABe above-mentioned present frame corresponding code rate value, D
ABe the corresponding distortion value of above-mentioned present frame.
Weight coefficient w
1, w
2, w
3Computational methods following,
At first pass through the λ of N basic coding unit in the present frame
B, nAnd λ
Mode, nObtain w
1With intermediate variable w
23, m,
x
n=λ
B,n,
y
n=λ
mode,n,
Subsequently, again through the Lagrangian parameter lambda of the frame layer of present frame
F, 0, the nearest frame layer Lagrange parameter lambda of M frame
F, mThe frame layer Lagrange parameter w corresponding with every frame
23, m(m=0~M), calculate w
2And w
3, specific as follows:
u
m=λ
F,m,
v
m=w
23,m,
In the above calculating formula, λ
Mode, nBe the final Lagrangian parameter of n basic coding unit of present frame, λ
F, mBe the frame layer Lagrange parameter of m frame, λ
F, 0Be the frame layer Lagrange parameter of present frame, λ
B, nBe the piece layer Lagrange parameter of n basic coding unit in the frame, w
1, w
2, w
3Be corresponding weight coefficient, N is the basic coding unit number from a frame, selected, and M is the quantity of the nearest frame selected.
The weight coefficient that will use in the time of can obtaining to calculate the final Lagrangian parameter of each basic coding unit of next frame through following formula like this.
In sum, rate-distortion optimization method of the present invention has guaranteed the continuity of the rate distortion characteristic between successive frame through the rate-distortion optimization of comprehensive frame layer and the rate-distortion optimization of basic coding elementary layer, realizes the optimal ratio aberration optimizing to video content.The simultaneity factor aberration optimizing can be realized according to the type (being I frame, P frame or B frame) of frame coding is independent separately; Rate-distortion optimization method of the present invention has well avoided the rate-distortion optimization method of prior art can not carry out the technical problem of adaptive optimization to video content.
The above is merely embodiments of the invention; Be not so limit claim of the present invention; Every equivalent structure transformation that utilizes specification of the present invention and accompanying drawing content to be done, or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.
Claims (9)
1. a rate-distortion optimization method is characterized in that, comprises step:
The frame layer Lagrange parameter of A, the piece layer Lagrange parameter of obtaining each basic coding unit in the present frame and present frame;
B, according to the frame layer Lagrange parameter of the piece layer of said basic coding unit Lagrange parameter and said present frame, obtain the final Lagrangian parameter of each basic coding unit in the said present frame;
C, based on said final Lagrangian parameter; Each basic coding unit in the said present frame is carried out the rate-distortion optimization coding; Obtain each basic coding unit corresponding code rate value and distortion value in the said present frame, and then obtain present frame corresponding code rate value and distortion value;
D, based at least two basic coding unit corresponding code rate values in the said present frame and distortion value; Set up frame layer rate-distortion model; Based on said frame layer rate-distortion model and said present frame corresponding code rate value and distortion value, the frame layer Lagrange parameter of estimation next frame;
Wherein said step B is specially: obtain said final Lagrangian parameter through following formula,
λ
mode,n=w
1λ
B,n+w
2λ
F,0+w
3,
λ wherein
Mode, nBe the final Lagrangian parameter of n basic coding unit, λ
F, 0Be the frame layer Lagrange parameter of present frame, λ
B, nBe the piece layer Lagrange parameter of n basic coding unit, w
1, w
2, w
3Be corresponding weight coefficient, said weight coefficient w
1, w
2, w
3Obtain according to the coding result of said present frame and the coding result of nearest M frame, M is a positive integer.
2. rate-distortion optimization method according to claim 1 is characterized in that, obtains said weight coefficient w through following steps
1, w
2, w
3:
Store the frame layer Lagrange parameter lambda of said present frame
F, 0, the nearest frame layer Lagrange parameter lambda of M frame
F, mAnd intermediate parameters w
23, m, w wherein
23, mObtain through following formula:
X wherein
nBe the piece layer Lagrange parameter of n basic coding unit of m frame, y
nBe the final Lagrangian parameter of n basic coding unit of m frame:
x
n=λ
B,n,
y
n=λ
mode,n,
Piece layer Lagrange parameter x according to n basic coding unit of said m frame
nFinal Lagrangian parameter y with n basic coding unit of said m frame
n, calculate w
1:
Frame layer Lagrange parameter lambda according to present frame
F, 0, the nearest frame layer Lagrange parameter lambda of M frame
F, mWith said intermediate parameters w
23, m, calculate w
2And w
3,
u
m=λ
F,m,
v
m=w
23,m,
Wherein, m is more than or equal to 0, smaller or equal to the integer of M, and N is the number of the said basic coding unit selected.
3. rate-distortion optimization method according to claim 1 is characterized in that, the piece layer Lagrange parameter of said each basic coding unit is:
λ
B=0.85×2
(QP-12)/3,
λ wherein
BBe the piece layer Lagrange parameter of said each basic coding unit, QP is the quantization parameter of said basic coding unit.
4. rate-distortion optimization method according to claim 1 is characterized in that, said step C comprises: obtain the minimum code cost of rate-distortion optimization of the said basic coding unit of said present frame through following formula,
J(s,c,mode|QP)=min[D(s,c,mode|QP)+λ
modeR(s,c,mode|QP)],
Wherein J is the minimum code cost; D is a distortion value, and R is the code check value, and s representes the basic coding unit of former figure; C representes the corresponding basic coding unit of building image again through the encoding and decoding processing; Mode representes the coding mode selected of said basic coding unit, and QP is the quantization parameter of said basic coding unit, λ
ModeBe corresponding final Lagrangian parameter;
According to said minimum code cost, obtain corresponding forced coding pattern, the said basic coding unit of said present frame is carried out the rate-distortion optimization coding.
5. rate-distortion optimization method according to claim 1 is characterized in that, said step D comprises: according to the code check value and the distortion value of at least two said basic coding unit of said present frame, adopt following formula to set up said frame layer rate-distortion model,
R=aln(b/D),
Wherein R is the code check value, and D is corresponding distortion value, and a, b are model parameter.
6. rate-distortion optimization method according to claim 5 is characterized in that, when the code check value and the distortion value that use two said basic coding unit, when setting up said frame layer rate-distortion model, said model parameter obtains through following formula,
R wherein
1And R
2Be the code check value of said two basic coding unit, D
1And D
2Be corresponding distortion value.
7. rate-distortion optimization method according to claim 5 is characterized in that, when the code check value and the distortion value that use N said basic coding unit, when setting up said frame layer rate-distortion model, said model parameter obtains through following formula,
a=-p,
b=e
-q/p,
xn=lnD
n,y
n=R
n,
N>2,
R wherein
nBe the code check value of said n basic coding unit, D
nBe corresponding distortion value.
8. rate-distortion optimization method according to claim 5 is characterized in that, said step D also comprises: through the frame layer Lagrange parameter of following formula estimation next frame,
λ
F=-(D(A
1)-D(A
2))/(R(A
1)-R(A
2)),
R (A wherein
1) be the code check value of first intersection point, R (A
2) be the code check value of second intersection point, D (A
1) be the distortion value of first intersection point, D (A
2) be the distortion value of second intersection point, said first intersection point is R=R in R~D plane
AWith said rate-distortion model the intersection point of definite curve, said second intersection point is D=D
AWith said rate-distortion model the intersection point of definite curve, R
ABe frame layer bit rate value, D
ABe frame layer distortion value.
9. rate-distortion optimization method according to claim 8 is characterized in that, said frame layer bit rate value R
ABe the code check value sum of all basic coding unit in the said frame, said frame layer distortion value D
AThrough asking mean square error to obtain to the former figure of said frame and the image of building again of said frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210255944.4A CN102780885B (en) | 2012-07-23 | 2012-07-23 | Rate distortion optimization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210255944.4A CN102780885B (en) | 2012-07-23 | 2012-07-23 | Rate distortion optimization method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102780885A true CN102780885A (en) | 2012-11-14 |
CN102780885B CN102780885B (en) | 2014-12-31 |
Family
ID=47125628
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210255944.4A Expired - Fee Related CN102780885B (en) | 2012-07-23 | 2012-07-23 | Rate distortion optimization method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102780885B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112601073A (en) * | 2020-11-30 | 2021-04-02 | 北京金山云网络技术有限公司 | Encoder evaluation method, encoder evaluation device, computer equipment and storage medium |
CN114915789A (en) * | 2022-04-13 | 2022-08-16 | 中南大学 | Inter-frame Lagrange multiplier optimization method, system, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340593A (en) * | 2008-08-13 | 2009-01-07 | 武汉大学 | Rate distortion optimizing method in error tolerant video code conversion |
CN101389012A (en) * | 2008-09-28 | 2009-03-18 | 湖北科创高新网络视频股份有限公司 | Method and device for rate distortion rate control |
US20110142124A1 (en) * | 2009-12-15 | 2011-06-16 | National Taiwan University | Perceptual-based video coding method |
CN102148973A (en) * | 2010-02-04 | 2011-08-10 | 成都市世嘉电子实业有限公司 | Three-layer rate control method based on Lagrange's multiplier factors |
-
2012
- 2012-07-23 CN CN201210255944.4A patent/CN102780885B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340593A (en) * | 2008-08-13 | 2009-01-07 | 武汉大学 | Rate distortion optimizing method in error tolerant video code conversion |
CN101389012A (en) * | 2008-09-28 | 2009-03-18 | 湖北科创高新网络视频股份有限公司 | Method and device for rate distortion rate control |
US20110142124A1 (en) * | 2009-12-15 | 2011-06-16 | National Taiwan University | Perceptual-based video coding method |
CN102148973A (en) * | 2010-02-04 | 2011-08-10 | 成都市世嘉电子实业有限公司 | Three-layer rate control method based on Lagrange's multiplier factors |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112601073A (en) * | 2020-11-30 | 2021-04-02 | 北京金山云网络技术有限公司 | Encoder evaluation method, encoder evaluation device, computer equipment and storage medium |
CN112601073B (en) * | 2020-11-30 | 2023-05-05 | 北京金山云网络技术有限公司 | Encoder evaluation method, encoder evaluation device, computer device, and storage medium |
CN114915789A (en) * | 2022-04-13 | 2022-08-16 | 中南大学 | Inter-frame Lagrange multiplier optimization method, system, equipment and medium |
CN114915789B (en) * | 2022-04-13 | 2023-03-14 | 中南大学 | Method, system, device and medium for optimizing Lagrange multiplier between frames |
Also Published As
Publication number | Publication date |
---|---|
CN102780885B (en) | 2014-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100739714B1 (en) | Method and apparatus for intra prediction mode decision | |
CN102611892B (en) | Method and device for realizing adaptive quantization in coding process | |
US8144770B2 (en) | Apparatus and method for encoding moving picture | |
CN107046645B9 (en) | Image coding and decoding method and device | |
EP2202986A1 (en) | An adaptive predicting device and method | |
CN102196256B (en) | Video encoding method and device | |
US20090225834A1 (en) | Method and apparatus for image intra prediction | |
CN102752596A (en) | Rate distortion optimization method | |
EP2249571A1 (en) | Method and device for encoding an image frame comprising macroblocks | |
CA2218866A1 (en) | Mpeg encoder that concurrently determines video data encoding format and rate control | |
KR20110018189A (en) | Method and apparatus for encoding video, and method and apparatus for decoding video | |
CN107566846B (en) | Video coding skipping mode decision method, device, equipment and storage medium | |
CN104041045A (en) | Secondary boundary filtering for video coding | |
CN101674472A (en) | Multistage code rate control method of video code with a plurality of visual points | |
CN105120282A (en) | Code rate control bit distribution method of temporal dependency | |
CN104902276B (en) | Converter unit partitioning method and device | |
CN104853192A (en) | Prediction mode selection method and device | |
CN103929652A (en) | Intra-frame prediction fast mode selecting method based on autoregressive model in video standard | |
CN102780886A (en) | Rate distortion optimization method | |
CN104333761A (en) | HEVC basic unit level code rate allocation method | |
CN102547257B (en) | Method for obtaining optimal prediction mode and device | |
CN102075751B (en) | Macro block motion state-based H264 quick mode selection method | |
CN102780884B (en) | Rate distortion optimization method | |
CN102780885B (en) | Rate distortion optimization method | |
US10015484B2 (en) | Adaptive scan device and method for scanning thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220511 Address after: 510530 No. 10, Nanxiang 2nd Road, Science City, Luogang District, Guangzhou, Guangdong Patentee after: Guangdong Guangsheng research and Development Institute Co.,Ltd. Address before: 518057 6th floor, software building, No. 9, Gaoxin Zhongyi Road, high tech Zone, Nanshan District, Shenzhen, Guangdong Province Patentee before: SHENZHEN RISING SOURCE TECHNOLOGY Co.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20141231 |