CN102104778A - Method and device for code rate control in picture coding - Google Patents
Method and device for code rate control in picture coding Download PDFInfo
- Publication number
- CN102104778A CN102104778A CN 200910261033 CN200910261033A CN102104778A CN 102104778 A CN102104778 A CN 102104778A CN 200910261033 CN200910261033 CN 200910261033 CN 200910261033 A CN200910261033 A CN 200910261033A CN 102104778 A CN102104778 A CN 102104778A
- Authority
- CN
- China
- Prior art keywords
- mrow
- msub
- group
- pictures
- mtd
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000013139 quantization Methods 0.000 claims abstract description 109
- 238000012545 processing Methods 0.000 claims description 17
- 238000004364 calculation method Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 102100037812 Medium-wave-sensitive opsin 1 Human genes 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012417 linear regression Methods 0.000 description 2
- 230000033001 locomotion Effects 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention provides a method and device for code rate control in picture coding, wherein the method comprises the following steps: A, distributing a coding length for the basic unit of the current picture; B, comparing the coding length of the basic unit of the current picture with the practical coding length of the basic unit of a previous picture; and C, in accordance with the corresponding relationship between a pre-set comparison result and a quantization parameter-adjusted step length, determining a quantization parameter-adjusted step length corresponding to the comparison result of step B, adjusting the quantization parameter of the basic unit of the previous picture based on the determined quantization parameter-adjusted step length, and determining the quantization parameter of the basic unit of the current picture for coding the basic unit of the current picture, wherein the basic unit of picture is a picture frame or a macroblock. By utilizing the method and the device, the operational complexity of code rate control can be greatly reduced, and the power consumption of coding apparatus can be reduced.
Description
Technical Field
The present invention relates to video encoding and decoding technologies, and in particular, to a method and an apparatus for controlling a code rate in image encoding.
Background
In order to save transmission bandwidth and storage space and support applications such as digital television broadcasting, remote monitoring, digital video on demand, wireless multimedia communication, and the like, video coding has become one of the hot spots of domestic and foreign research and industrial applications. The current video coding standard mainly involves coding techniques including: intra prediction, inter prediction, integer transform, reconstructed image, rate control, quantization and entropy coding, and deblocking filtering, etc., as shown in fig. 1.
Rate control is an indispensable technology in video coding, and any standard leaving rate control is limited in application, for example, in a transmission process under a bandwidth constraint condition, if an appropriate rate control method is not available, a client buffer may overflow. The purpose of the code rate control is to ensure that the optimal image quality can be achieved under the condition of generating the specified target code rate and ensure that the encoding and decoding buffer area does not overflow. The main output of the rate control is the Quantization Parameter (QP), so that the QP parameter is used to obtain the quantization step size for image quantization in the encoding process.
The process of code rate control mainly comprises the following steps: firstly initializing a code rate control parameter, then allocating a coding length for the current image frame according to a target code rate and a buffer area state, and finally calculating the QP of the current image frame by using the coding length allocated for the current image frame.
In the prior art, a 2-pass model is used The QP for the current image frame is calculated. Where T is the estimated target code rate x1And x2Is a 2-time modelThe two constant parameters of (2) can be obtained by a linear regression method. PMAD is the predicted mean absolute error value of the current image frame, and can be calculated using a linear model: PMAD ═ a1×MAD+a2The MAD is the average absolute error value of the previous image frame. a1 and a2 are 2 parameters of the model, and are also estimated by a linear regression method.
In the prior art, parameters of the model need to be updated for each image frame for 2 times, and calculation is performed according to the 2-time model, including operations such as squaring and division, that is, complex operation processes are required for both model solution and parameter update, so that power consumption of the encoding device is increased, and the encoding device cannot be used for encoding devices with low calculation capability or limited power consumption.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for controlling a code rate in image coding, so as to reduce power consumption of a coding device by using a simple operation process.
A method of rate control in image coding, the method comprising:
A. allocating a coding length for a current image basic unit;
B. comparing the code length allocated to the current image basic unit with the actual code length of the last image basic unit;
C. b, according to the preset corresponding relation between the comparison result and the quantization parameter adjustment step length, determining the quantization parameter adjustment step length corresponding to the comparison result in the step B, adjusting on the basis of the quantization parameter of the previous image basic unit by using the determined quantization parameter adjustment step length, and determining the quantization parameter of the current image basic unit to be used for encoding the current image basic unit;
wherein, the image basic unit is an image frame or a macro block.
An apparatus for rate control in image coding, the apparatus comprising: the device comprises an encoding processing unit, a comparison processing unit and a parameter determining unit;
the encoding processing unit is used for distributing encoding length to the current image basic unit;
the comparison processing unit is used for comparing the code length allocated to the current image basic unit with the actual code length of the previous image basic unit;
the parameter determining unit is configured to determine a quantization parameter adjustment step corresponding to the comparison result of the comparison processing unit according to a preset correspondence between the comparison result and the quantization parameter adjustment step, perform adjustment based on the quantization parameter of the previous image basic unit by using the determined quantization parameter adjustment step, and determine the quantization parameter of the current image basic unit for encoding the current image basic unit;
wherein, the image basic unit is an image frame or a macro block.
According to the technical scheme, the method only needs to compare the code length distributed for the current image basic unit with the actual code length of the previous image basic unit, determine the quantization parameter adjustment step length corresponding to the comparison result according to the preset corresponding relation, and adjust on the basis of the quantization parameter of the previous image basic unit by using the parameter adjustment step length to determine the quantization parameter of the current image basic unit. In the process, only simple operations such as comparison and adjustment need to be executed, complex calculation according to a 2-time model in the prior art is not needed, the operation complexity is greatly reduced, and the power consumption of coding equipment is reduced, so that various video coding standards can be widely applied to various coding equipment, such as handheld equipment and other equipment with limited power consumption.
Drawings
FIG. 1 is a block diagram of a conventional functional encoder framework;
FIG. 2 is a flow chart of the main method provided by the present invention;
FIG. 3 is a flowchart of a detailed method provided by an embodiment of the present invention;
FIG. 4 is a block diagram of an apparatus according to the present invention;
FIG. 5 is a graph comparing the performance curves of the method of the present invention and the conventional AVS method.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The method provided by the present invention can be as shown in fig. 2, when performing code rate control on each image basic unit, the following steps can be executed:
step 201: the encoding length is allocated to the current picture elementary unit.
Step 202: the code length allocated for the current picture elementary unit is compared with the actual code length of the previous picture elementary unit.
Step 203: determining the quantization parameter adjustment step length corresponding to the comparison result of step 202 by using the preset corresponding relationship between the comparison result and the quantization parameter adjustment step length, adjusting the quantization parameter adjustment step length based on the quantization parameter of the previous image basic unit by using the determined quantization parameter adjustment step length, and determining the quantization parameter of the current image basic unit for encoding the current image basic unit.
Since the rate control can calculate the quantization parameter for the image frame or the macro block, that is, the above-mentioned image basic unit is the image frame or the macro block, the following embodiments of the present invention will be described by taking the example of calculating the quantization parameter for the image frame.
The implementation of the above method is described in detail below by referring to a specific embodiment, and fig. 3 is a flowchart of a method provided by an embodiment of the present invention, and as shown in fig. 3, the method may include the following steps:
step 301: initializing rate control parameters, including: quantization parameter initial value QPinitialTarget code rate initial value bit _ rate (0) and buffer state initial value V1(1)。
Wherein the quantization parameter initial value QPinitialThe initial value bit _ rate (0) of the target code rate can be set by a user according to actual needs or empirical values, the buffer area involved in the embodiment of the invention is used for buffering the coded image, the state of the buffer area is usually expressed by adopting an actual use proportion or an actual use size, and the initial value V of the state of the buffer area1(1) May be set to 0.
Step 302: allocating a coding length R to a current group of pictures (GOP) according to a current target code rate bit _ rate (m)i。
The GOP may contain one picture or multiple pictures.
Code length R allocated for current GOP numbered iiCan be as follows:
(1) wherein bit _ rate (m) is the target code rate, and m represents all the coded picturesThe number of frames, total _ frame is the number of image frames contained in all GOPs to be encoded, frame _ rate is the frame rate of the image sequence of the GOP, ri-1Is the error of the actual coding length and the assigned coding length of the previous GOP, which can be calculated using the following equation:
total _ gopnpumber is the number of GOPs that need to be encoded and can be calculated using the following equation:
the GOP _ length is the number of image frames included in one GOP.
In summary, it is possible to obtain:
step 303: calculating the quantization parameter GOP _ QP of the current group of pictures by using the quantization parameter of the last group of picturesi。
If the image group is the first image group, the initial quantization parameter is used as the quantization parameter of the current image group. I.e. when i is 1, the quantization parameter GOP _ QP of the current group of picturesiIs QPinitial。
Otherwise, calculating according to the following method:
wherein, SumQPi-1Is the sum of the quantization parameters, Np, of the P frames in the previous group of picturesi-1The number of P frames in the last group of pictures.
The quantization parameter GOP _ QP of the current GOP can be takeniIs GOP _ QPi′。
Preferably, the quantization parameter calculated according to formula (5) can be further adjusted to obtain GOP _ QPi:
When GOP _ QPi′>QPi-1(Nplast) -2, then GOP _ QP is determinedi=GOP_QPi′-1;
Otherwise, GOP _ QPi=max{GOP_QPi-1-α,min{GOP_QPi-1+α,GOP_QPi'}}. In the prior art, the value of α is 2, and since the encoding quality can be improved in the method of the present invention, α can take a wider range of constant values, for example, α can take 10.
Wherein, QPi-1(Nplast) For the quantization parameter of the last P frame in the last GOP, GOP _ QPi-1The quantization parameter of the last GOP.
Step 304: quantizing parameter QP of the first image frame in the current GOPi(1) Using GOP _ QPi。
Step 305: judging whether an uncoded image frame still exists in the current GOP, if so, turning to step 307; otherwise, step 306 is performed.
Step 306: judging whether a next GOP needing to be coded exists, if so, turning to step 302; otherwise, the flow ends.
Step 307: utilize asCoding length R of current GOP allocationiState of buffer Vi(j) And the remaining coding length B in the current group of picturesi(j) Assigning a coding length T to the current image framei(j) Where j is the number of the current frame in the current GOP.
Assigning a code length Ti(j) Can be calculated by the following procedure:
wherein, both beta and gamma are constants, preferably 0.5; npiIs the number of remaining uncoded P frames in the current GOP; the number m of already encoded image frames is i × j; b isi(j) Is the remaining coding length in the current GOP, calculated using the following equation:
is the actual code length of the k-th frame. I.e. the remaining coding length B in the current GOPi(j) Comprises the following steps: the difference between the allocated coding length for the current GOP and the actual sum of the coding lengths of the already coded image frames in the current GOP.
Si(j) Is the target state of the buffer area, which may be the preset target usage ratio or target usage size of the buffer area, Vi(j) The actual state of the buffer area may be the actual usage ratio or the actual usage size of the buffer area, and is calculated by using the following formula:
Ti(j) can be used forTo get Ti' (j) value.
More preferably, T can be treatedi' (j) is further adjusted to give Ti(j):
Wherein Z isi(j) And Ui(j) Upper and lower limit values for the code length:
The above steps are implemented in substantially the same manner as in the prior art.
Step 308: coding length T to be allocated for the current image framei(j) And the actual coding length of the previous image frameComparing, determining the quantization parameter adjustment step corresponding to the comparison result, and using the determined quantization parameter adjustment step to adjust the quantization parameter QP of the previous image framei(j-1) and determining the quantization parameter QP of the current image framei(j)。
The method for determining the quantization parameter of the current image frame in this step is completely different from the prior art, and only needs to be the current image frameAssigned code length Ti(j) And the actual coding length of the previous image frameComparing, and adjusting based on the quantization parameter of the previous image frame by using the comparison result to determine the quantization parameter QP of the current image framei(j)。
If the code stream length of the actual coded image is similar to the code stream length allocated in advance, the quantization parameter is appropriate and does not need to be adjusted. In this case, the ratio of the code stream length allocated in advance to the code stream length obtained by actual encoding fluctuates around 1. If the code stream length of the actual coded image is smaller than the pre-allocated code stream length, the quantization parameter is larger, and the adjustment is needed to be reduced. In this case, the ratio of the pre-allocated code stream length to the code stream length obtained by actual encoding is greater than 1. If the code stream length of the actual coded image is larger than the pre-allocated code stream length, the quantization parameter is smaller, and the adjustment is needed to be increased. In this case, the ratio of the pre-allocated code stream length to the code stream length obtained by actual encoding is less than 1. Therefore, the quantization parameter QP of the current image frame can be determined according to the following formulai(j):
Psi 1, psi 2, psi 3 and psi 4 are set thresholds, and the value range can be: 0 < psi 4 < psi 3 < 1 < psi 2 < psi 1 < 2. For example, typical values for ψ 1, ψ 2, ψ 3, and ψ 4 may be 1.382, 1.236, 0.764, and 0.618, respectively;the actual coding length of the last image frame; QPi(j-1) quantization parameter, QP, for the previous image framei(j) The value of the quantization parameter for the current image frame to be encoded is usually limited to the range specified by the video encoding standard, for example, h.264 is between 0 and 51, and AVS is between 0 and 63.
Step 309: updating rate control parameters, including buffer actual state Vi(j +1) and remaining coding length B in GOPi(j +1), go to step 305.
total _ frame _ encoded _ frame is the number of uncoded image frames in the current GOP.
The above is a detailed description of the method provided by the present invention, and the following is a detailed description of the corresponding apparatus provided by the present invention. Fig. 4 is a structural diagram of an apparatus according to an embodiment of the present invention, and as shown in fig. 4, the apparatus may include: an encoding processing unit 400, a comparison processing unit 410, and a parameter determination unit 420.
And an encoding processing unit 400 for allocating an encoding length to the current image elementary unit.
And a comparison processing unit 410, configured to compare the code length allocated to the current image elementary unit with the actual code length of the previous image elementary unit.
A parameter determining unit 420, configured to determine, by using a preset correspondence between the comparison result and the quantization parameter adjustment step, a quantization parameter adjustment step corresponding to the comparison result of the comparison processing unit 410, adjust the quantization parameter of the previous image basic unit based on the determined quantization parameter adjustment step, and determine the quantization parameter of the current image basic unit for encoding the current image basic unit.
The image basic unit may be an image frame or a macro block.
The encoding processing unit 400 may specifically include: a group encoding length allocation module 401, a group quantization parameter determination module 402, a frame quantization parameter determination module 403, a first judgment module 404, a second judgment module 405, and a frame encoding length determination module 406.
A group code length allocating module 401, configured to allocate a code length R to the current group of pictures according to the current target code rate bit _ rate (m)i(ii) a Where m is the number of all already coded picture elementary units and i is the number of the current group of pictures.
A group quantization parameter determination module 402, configured to determine a quantization parameter GOP _ QP of the current group of pictures when the current group of pictures is the first coded group of picturesiIs an initialization value; when the current group of pictures is not the first coded group of pictures, the quantization parameter GOP _ QP of the current group of pictures is calculated by using the quantization parameter of the previous group of picturesi。
A frame quantization parameter determination module 403, configured to determine the quantization parameter QP of the first picture elementary unit of the current group of picturesi(1) Determined as GOP _ QPiA judgment notification is sent to the first judgment module 404.
A first judging module 404, configured to, after receiving the judgment notification, judge whether there is an uncoded image basic unit in the current image group, and if yes, send a calculation notification to the frame coding length determining module 406; otherwise, a judgment notification is sent to the second judgment module 405.
A second determining module 405, configured to determine whether a next image group to be encoded exists after receiving the determination notification, and if so, trigger the group encoding length allocating module 401 to allocate an encoding length for the next image group; otherwise, the operation is ended.
A frame encoding length determining module 406, configured to receive the calculation notification and use the encoding length R allocated for the current group of picturesiState of buffer Vi(j) And the remaining coding length B in the current group of picturesi(j) Assigning a coding length T to a current picture elementary uniti(j) (ii) a Wherein j is the number of the current image basic unit in the current image group.
At this time, the apparatus may further include: a parameter updating unit 430, configured to update the state V of the buffer after the parameter determining unit 420 determines the quantization parameter of the current image elementary uniti(j +1) and the remaining encoding length B in the current group of picturesi(j +1), sending a judgment notification to the first judgment module 404.
Specifically, the group encoding length assignment module 401 assigns the group encoding length according to the number of the current group of pictures when the current group of pictures is the first group of pictures to be encoded <math><mrow><msub><mi>R</mi><mi>i</mi></msub><mo>=</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow><mo>×</mo><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac></mrow></math> Determination of RiWhen the current group of pictures is not the first group of pictures to be encoded, the method is as follows <math><mrow><msub><mi>R</mi><mi>i</mi></msub><mo>=</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow><mo>×</mo><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac><mo>-</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>R</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub></mrow></math> Determination of Ri(ii) a Where m is the number of all image elementary units that have completed encoding, GOP _ length is the number of image elementary units contained in each group of pictures, frame _ rate is the frame rate of the image sequence of the current group of pictures,is the actual coding length, R, of the last group of picturesi-1The coding length allocated for the last group of pictures.
A group quantization parameter determination module 402 for determining GOP QP if the current group of pictures is not the first encoded group of picturesi=GOP_QPi', or, in GOP _ QPi′>QPi-1(Nplast) When-2, determine GOP _ QPi=GOP_QPi' -1, in GOP _ QPi′≤QPi-1(Nplast) When-2, determine GOP _ QPi=max{GOP_QPi-1-α,min{GOP_QPi-1+α,GOP_QPi' }; wherein, <math><mrow><mi>GOP</mi><mo>_</mo><mi>Q</mi><msup><msub><mi>P</mi><mi>i</mi></msub><mo>′</mo></msup><mo>=</mo><mfrac><mrow><mi>SumPQ</mi><msub><mi>P</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub></mrow><msub><mi>Np</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub></mfrac><mo>-</mo><mi>min</mi><mo>{</mo><mn>2</mn><mo>,</mo><mfrac><mrow><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mn>15</mn></mfrac><mo>}</mo><mo>,</mo></mrow></math> SumPQPi-1is the sum of the quantization parameters, Np, of the P frames in the previous group of picturesi-1For the number of P frames in the last group of pictures, QPi-1(Nplast) GOP _ QP, the quantization parameter for the last P frame in the last group of picturesi-1Alpha is a constant for the quantization parameter of the last image group.
Frame code length determination module 406 to determine Ti(j)=Ti' (j) or, at Ti′(j)>Zi(j) When T is determinedi(j)=Zi(j) At Zi(j)≤Ti′(j)≤Ui(j) When T is determinedi(j)=Ti' (j) at Ti′(j)<Ui(j) When T is determinedi(j)=Ui(j) (ii) a Wherein, <math><mrow><msup><msub><mi>T</mi><mi>i</mi></msub><mo>′</mo></msup><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>=</mo><mi>β</mi><mo>×</mo><mfrac><mrow><msub><mi>B</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow></mrow><msub><mi>np</mi><mi>i</mi></msub></mfrac><mo>+</mo><mrow><mo>(</mo><mn>1</mn><mo>-</mo><mi>β</mi><mo>)</mo></mrow><mo>×</mo><mrow><mo>(</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac><mo>)</mo></mrow><mo>+</mo><mi>γ</mi><mo>×</mo><mrow><mo>(</mo><msub><mi>S</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>-</mo><msub><mi>V</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>)</mo></mrow><mo>,</mo></mrow></math> beta and gamma are constants, npiIs the number of remaining uncoded P frames, B, in the current group of picturesi(j) Is the remaining coding length, S, in the current group of picturesi(j) Is the target state of the buffer, Vi(j) Is the actual state of the buffer, Zi(j) For the upper limit of the code length, Ui(j) Is the lower limit value of the code length.
In addition, the parameter determination unit 420 in the apparatus may be specifically according to <math><mrow><msub><mi>QP</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>=</mo><mtable><mtr><mtd><mfenced open='{' close=''><mtable><mtr><mtd><msub><mi>QP</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>-</mo><mn>2</mn></mtd><mtd><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>></mo><mi>ψ</mi><mn>1</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr><mtr><mtd><msub><mi>QP</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>-</mo><mn>1</mn></mtd><mtd><mi>ψ</mi><mn>1</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>≥</mo><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>></mo><mi>ψ</mi><mn>2</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr><mtr><mtd><msub><mi>QP</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd><mtd><mi>ψ</mi><mn>2</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>≥</mo><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>></mo><mi>ψ</mi><mn>3</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr><mtr><mtd><msub><mi>QP</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>+</mo><mn>1</mn></mtd><mtd><mi>ψ</mi><mn>3</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>≥</mo><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>></mo><mi>ψ</mi><mn>4</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr><mtr><mtd><msub><mi>QP</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>+</mo><mn>2</mn></mtd><mtd><mi>ψ</mi><mn>4</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>≥</mo><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow></mtd></mtr></mtable></mfenced></mtd></mtr></mtable></mrow></math> Determining quantization parameter QP for current picture elementary uniti(j) (ii) a Wherein, Ti(j) Allocating a coding length, QP, to a current picture elementary uniti(j-1) is the quantization parameter of the last picture element,0 < ψ 4 < ψ 3 < 1 < ψ 2 < ψ 1 < 2, which is the actual encoding length of the last picture element.
Preferably, ψ 1 may be 1.382, ψ 2 may be 1.236, ψ 3 may be 0.764, ψ 4 may be 0.618.
From the above description, it can be seen that the method and apparatus provided by the present invention have the following advantages compared to the prior art:
1) the invention only needs to compare the code length distributed for the current image basic unit with the actual code length of the previous image basic unit, determines the quantization parameter adjusting step length corresponding to the comparison result according to the preset corresponding relation, and determines the quantization parameter of the current image basic unit by adjusting the parameter adjusting step length on the basis of the quantization parameter of the previous image basic unit. In the process, only simple operations such as comparison and adjustment need to be executed, complex calculation according to a 2-time model in the prior art is not needed, the operation complexity is greatly reduced, and the power consumption of coding equipment is reduced, so that various video coding standards can be widely applied to various coding equipment, such as handheld equipment and other equipment with limited power consumption.
2) The method of the invention can not only obtain the expected target code rate of the code, but also greatly improve the quality of the coded image. The following is a description based on specific experimental data.
Comparing the mode of the invention with the mode of the digital audio video coding and decoding technology standard (AVS) in the prior art, 5 test sequences with the size of QVGA are tested: akiyo, Stefan, Container, Crew and Foreman. Wherein Akiyo is a local motion, simple background sequence; stefan is a fast-moving, complex background sequence; crew is a plurality of target movement and scene brightness change sequences; foreman has scene cuts and camera jitter. The compression was performed at target code rates of 64Kbps, 128Kbps, 192Kbps, 256Kbps, 384Kbps and 512Kbps, respectively, to obtain the results shown in fig. 5, and the alignment conditions are shown in table 1.
In fig. 5, LCRC represents a performance curve obtained by using the present invention, AVS represents a performance curve obtained by using an AVS method, the horizontal axis of each curve represents bit rate, the vertical axis represents peak signal-to-noise ratio (PSNR), PSNR represents encoded image quality, and higher PSNR represents better encoded image quality. As can be seen from FIG. 5, for a complex image, such as Stefan, the method of the present invention greatly improves the quality of the encoded image compared with the AVS method under the condition of low code rate. For simple images, such as Akiyo, the method of the invention also improves the quality of the coded images under the condition of high code rate. For other sequences, the method of the invention can obtain better coding quality than the AVS mode under the condition of low code rate.
Error! No reference source is found. The comparison of the encoding performance of the present invention and the AVS scheme is shown. The average coding code rate deviation of the invention is 0.16Kbps, and the average coding code rate deviation of the AVS mode is 4.29 Kbps. The average encoding quality variance of the present invention is 1.47db, and the average encoding quality variance of the AVS scheme is 1.96 db. It can be seen that the method of the present invention is superior to the quantization parameter calculation method in the AVS mode while reducing the calculation amount.
TABLE 1
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for rate control in image coding, the method comprising:
A. allocating a coding length for a current image basic unit;
B. comparing the code length allocated to the current image basic unit with the actual code length of the last image basic unit;
C. b, according to the preset corresponding relation between the comparison result and the quantization parameter adjustment step length, determining the quantization parameter adjustment step length corresponding to the comparison result in the step B, adjusting on the basis of the quantization parameter of the previous image basic unit by using the determined quantization parameter adjustment step length, and determining the quantization parameter of the current image basic unit to be used for encoding the current image basic unit;
wherein, the image basic unit is an image frame or a macro block.
2. The method according to claim 1, wherein the step a specifically comprises:
a1, distributing the coding length R for the current group of pictures according to the current target code rate bit _ rate (m)i(ii) a Wherein m is the number of all coded image basic units, and i is the number of the current image group;
a2, if the current group of pictures is the first group of pictures coded, determining the quantization parameter GOP _ QP of the current group of picturesiIs an initialization value; if the current group of pictures is not the first group of pictures to be coded, the quantization parameter GOP _ QP of the current group of pictures is calculated using the quantization parameter of the previous group of picturesi;
A3, quantizing parameter QP of the first image basic unit in current image groupi(1) Determined as GOP _ QPi;
A4, judging whether there is still uncoded image basic unit in the current image group, if yes, executing step A6; otherwise, go to step A5;
a5, judging whether a next image group needing to be coded exists, if so, turning to the step A1 aiming at the next image group; otherwise, ending the flow;
a6, using the coding length R allocated to the current group of picturesiState of buffer Vi(j) And the remaining coding length B in the current group of picturesi(j) Assigning a coding length T to a current picture elementary uniti(j) (ii) a Wherein j is the number of the current image basic unit in the current image group;
after performing the step C, performing a step D: update buffer status Vi(j +1) and the remaining encoding length B in the current group of picturesi(j +1), go to execute the A4.
3. The method according to claim 2, wherein in step A1, if the current group of pictures is the first group of pictures to be encoded <math><mrow><msub><mi>R</mi><mi>i</mi></msub><mo>=</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow><mo>×</mo><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac><mo>;</mo></mrow></math> If the current group of pictures is not the first group of coded pictures, then <math><mrow><msub><mi>R</mi><mi>i</mi></msub><mo>=</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow><mo>×</mo><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac><mo>-</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>R</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub><mo>;</mo></mrow></math> Where m is the number of all image elementary units that have completed encoding, GOP _ length is the number of image elementary units contained in each group of pictures, frame _ rate is the frame rate of the image sequence of the current group of pictures,is the actual coding length, R, of the last group of picturesi-1The coding length allocated to the last group of pictures;
in step a2, if the current group of pictures is not the first group of pictures to be encoded, then GOP _ QP is seti=GOP_QPi', or, in GOP _ QPi′>QPi-1(Nplast) GOP _ QP at-2i=GOP_QPi' -1, in GOP _ QPi′≤QPi-1(Nplast) GOP _ QP at-2i=max{GOP_QPi-1-α,min{GOP_QPi-1+α,GOP_QPi' }; wherein, <math><mrow><mi>GOP</mi><mo>_</mo><mi>Q</mi><msup><msub><mi>P</mi><mi>i</mi></msub><mo>′</mo></msup><mo>=</mo><mfrac><mrow><mi>SumPQ</mi><msub><mi>P</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub></mrow><mrow><mi>N</mi><msub><mi>p</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub></mrow></mfrac><mo>-</mo><mi>min</mi><mo>{</mo><mn>2</mn><mo>,</mo><mfrac><mrow><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mn>15</mn></mfrac><mo>}</mo><mo>,</mo></mrow></math> SumPQPi-1is the sum of the quantization parameters, Np, of the P frames in the previous group of picturesi-1For the number of P frames in the last group of pictures, QPi-1(Nplast) GOP _ QP, the quantization parameter for the last P frame in the last group of picturesi-1The quantization parameter of the last image group, alpha is a constant;
in the step A6, Ti(j)=Ti' (j) or, at Ti′(j)>Zi(j) When, Ti(j)=Zi(j) At Zi(j)≤Ti′(j)≤Ui(j) When, Ti(j)=Ti' (j) at Ti′(j)<Ui(j) When, Ti(j)=Ui(j) (ii) a Wherein, <math><mrow><msup><msub><mi>T</mi><mi>i</mi></msub><mo>′</mo></msup><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>=</mo><mi>β</mi><mo>×</mo><mfrac><mrow><msub><mi>B</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow></mrow><mrow><mi>n</mi><msub><mi>p</mi><mi>i</mi></msub></mrow></mfrac><mo>+</mo><mrow><mo>(</mo><mn>1</mn><mo>-</mo><mi>β</mi><mo>)</mo></mrow><mo>×</mo><mrow><mo>(</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac><mo>)</mo></mrow><mo>+</mo><mi>γ</mi><mo>×</mo><mrow><mo>(</mo><msub><mi>S</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>-</mo><msub><mi>V</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>)</mo></mrow><mo>,</mo></mrow></math> beta and gamma are constants, npiIs the number of remaining uncoded P frames, B, in the current group of picturesi(j) Is the remaining coding length, S, in the current group of picturesi(j) Is the target state of the buffer, Vi(j) Is the actual state of the buffer, Zi(j) For the upper limit of the code length, Ui(j) Is the lower limit value of the code length.
4. Method according to claim 1, 2 or 3, wherein in step C, the quantization parameter QP of the current picture elementary uniti(j) Comprises the following steps:
5. The method of claim 4, wherein ψ 1 is 1.382, ψ 2 is 1.236, ψ 3 is 0.764, and ψ 4 is 0.618.
6. An apparatus for rate control in image coding, the apparatus comprising: the device comprises an encoding processing unit, a comparison processing unit and a parameter determining unit;
the encoding processing unit is used for distributing encoding length to the current image basic unit;
the comparison processing unit is used for comparing the code length allocated to the current image basic unit with the actual code length of the previous image basic unit;
the parameter determining unit is configured to determine a quantization parameter adjustment step corresponding to the comparison result of the comparison processing unit according to a preset correspondence between the comparison result and the quantization parameter adjustment step, perform adjustment based on the quantization parameter of the previous image basic unit by using the determined quantization parameter adjustment step, and determine the quantization parameter of the current image basic unit for encoding the current image basic unit;
wherein, the image basic unit is an image frame or a macro block.
7. The apparatus according to claim 6, wherein the encoding processing unit comprises:
a group code length distribution module for distributing code length R for the current image group according to the current target code rate bit _ rate (m)i(ii) a Wherein m is the number of all coded image basic units, and i is the number of the current image group;
a group quantization parameter determination module for determining a quantization parameter GOP _ QP of the current group of pictures when the current group of pictures is the first coded group of picturesiIs an initialization value; when the current group of pictures is not the first coded group of pictures, the quantization parameter GOP _ QP of the current group of pictures is calculated by using the quantization parameter of the previous group of picturesi;
Frame quantization parameter determination module forQuantization parameter QP for the first picture element of the current group of picturesi(1) Determined as GOP _ QPiSending a judgment notice to a first judgment module;
the first judging module is used for judging whether the current image group has uncoded image basic units after receiving the judgment notice, and if so, sending a calculation notice to the frame coding length determining module; otherwise, sending a judgment notice to the second judgment module;
the second judgment module is used for judging whether a next image group needing to be coded exists after receiving the judgment notice, and if so, triggering the group coding length allocation module to allocate the coding length for the next image group; otherwise, ending the operation;
a frame coding length determining module for receiving the calculation notice and utilizing the coding length R allocated for the current image groupiState of buffer Vi(j) And the remaining coding length B in the current group of picturesi(j) Assigning a coding length T to a current picture elementary uniti(j) (ii) a Wherein j is the number of the current image basic unit in the current image group;
the device further comprises: a parameter updating unit for updating the state V of the buffer after the parameter determining unit determines the quantization parameter of the current image basic uniti(j +1) and the remaining encoding length B in the current group of picturesi(j +1) sending a judgment notification to the first judgment module.
8. The apparatus of claim 7, wherein the group coding length assignment module is configured to assign the group coding length according to a current group of pictures as a first group of pictures to be coded <math><mrow><msub><mi>R</mi><mi>i</mi></msub><mo>=</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow><mo>×</mo><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac></mrow></math> Determining the RiIn the case where the current group of pictures is not the first group of pictures to be encodedWhen it is in accordance with <math><mrow><msub><mi>R</mi><mi>i</mi></msub><mo>=</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow><mo>×</mo><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac><mo>-</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>R</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub></mrow></math> Determining the Ri(ii) a Where m is the number of all image elementary units that have completed encoding, GOP _ length is the number of image elementary units contained in each group of pictures, frame _ rate is the frame rate of the image sequence of the current group of pictures,is the actual coding length, R, of the last group of picturesi-1The coding length allocated to the last group of pictures;
the group quantization parameter determination module determines a GOP _ QP if the current group of pictures is not the first encoded group of picturesi=GOP_QPi', or, in GOP _ QPi′>QPi-1(Nplast) When-2, determine GOP _ QPi=GOP_QPi' -1, in GOP _ QPi′≤QPi-1(Nplast) When-2, determine GOP _ QPi=max{GOP_QPi-1-α,min{GOP_QPi-1+α,GOP_QPi' }; wherein, <math><mrow><mi>GOP</mi><mo>_</mo><mi>Q</mi><msup><msub><mi>P</mi><mi>i</mi></msub><mo>′</mo></msup><mo>=</mo><mfrac><mrow><mi>SumPQ</mi><msub><mi>P</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub></mrow><mrow><mi>N</mi><msub><mi>p</mi><mrow><mi>i</mi><mo>-</mo><mn>1</mn></mrow></msub></mrow></mfrac><mo>-</mo><mi>min</mi><mo>{</mo><mn>2</mn><mo>,</mo><mfrac><mrow><mi>GOP</mi><mo>_</mo><mi>length</mi></mrow><mn>15</mn></mfrac><mo>}</mo><mo>,</mo></mrow></math> SumPQPi-1for the last image groupSum of quantization parameters of mid-P frames, Npi-1For the number of P frames in the last group of pictures, QPi-1(Nplast) GOP _ QP, the quantization parameter for the last P frame in the last group of picturesi-1The quantization parameter of the last image group, alpha is a constant;
the frame encoding length determining module determines Ti(j)=Ti' (j) or, at Ti′(j)>Zi(j) When T is determinedi(j)=Zi(j) At Zi(j)≤Ti′(j)≤Ui(j) When T is determinedi(j)=Ti' (j) at Ti′(j)<Ui(j) When T is determinedi(j)=Ui(j) (ii) a Wherein, <math><mrow><msup><msub><mi>T</mi><mi>i</mi></msub><mo>′</mo></msup><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>=</mo><mi>β</mi><mo>×</mo><mfrac><mrow><msub><mi>B</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow></mrow><mrow><mi>n</mi><msub><mi>p</mi><mi>i</mi></msub></mrow></mfrac><mo>+</mo><mrow><mo>(</mo><mn>1</mn><mo>-</mo><mi>β</mi><mo>)</mo></mrow><mo>×</mo><mrow><mo>(</mo><mfrac><mrow><mi>bit</mi><mo>_</mo><mi>rate</mi><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow></mrow><mrow><mi>frame</mi><mo>_</mo><mi>rate</mi></mrow></mfrac><mo>)</mo></mrow><mo>+</mo><mi>γ</mi><mo>×</mo><mrow><mo>(</mo><msub><mi>S</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>-</mo><msub><mi>V</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>)</mo></mrow><mo>,</mo></mrow></math> beta and gamma are constants, npiIs the number of remaining uncoded P frames, B, in the current group of picturesi(j) Is the remaining coding length, S, in the current group of picturesi(j) Is the target state of the buffer, Vi(j) Is the actual state of the buffer, Zi(j) For the upper limit of the code length, Ui(j) Is the lower limit value of the code length.
9. The apparatus of claim 6, 7 or 8, wherein the parameter determination unit is arranged to determine the parameters in accordance with <math><mrow><mi>Q</mi><msub><mi>P</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>=</mo><mfenced open='{' close=''><mtable><mtr><mtd><mi>Q</mi><msub><mi>P</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>-</mo><mn>2</mn></mtd><mtd><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>></mo><mi>ψ</mi><mn>1</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr><mtr><mtd><mi>Q</mi><msub><mi>P</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>-</mo><mn>1</mn></mtd><mtd><mi>ψ</mi><mn>1</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>≥</mo><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>></mo><mi>ψ</mi><mn>2</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr><mtr><mtd><mi>Q</mi><msub><mi>P</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd><mtd><mi>ψ</mi><mn>2</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>≥</mo><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>></mo><mi>ψ</mi><mn>3</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr><mtr><mtd><mi>Q</mi><msub><mi>P</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>+</mo><mn>1</mn></mtd><mtd><mi>ψ</mi><mn>3</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>≥</mo><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow><mo>></mo><mi>ψ</mi><mn>4</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr><mtr><mtd><mi>Q</mi><msub><mi>P</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>+</mo><mn>2</mn></mtd><mtd><mi>ψ</mi><mn>4</mn><mo>×</mo><msub><mover><mi>R</mi><mo>~</mo></mover><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>≥</mo><msub><mi>T</mi><mi>i</mi></msub><mrow><mo>(</mo><mi>j</mi><mo>)</mo></mrow></mtd></mtr></mtable></mfenced><mo>,</mo></mrow></math> Determining quantization parameter QP for current picture elementary uniti(j) (ii) a Wherein, Ti(j) Allocating a coding length, QP, to a current picture elementary uniti(j-1) is the quantization parameter of the last picture element,0 < ψ 4 < ψ 3 < 1 < ψ 2 < ψ 1 < 2, which is the actual encoding length of the last picture element.
10. The apparatus of claim 9, wherein ψ 1 is 1.382, ψ 2 is 1.236, ψ 3 is 0.764, and ψ 4 is 0.618.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200910261033 CN102104778A (en) | 2009-12-17 | 2009-12-17 | Method and device for code rate control in picture coding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200910261033 CN102104778A (en) | 2009-12-17 | 2009-12-17 | Method and device for code rate control in picture coding |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102104778A true CN102104778A (en) | 2011-06-22 |
Family
ID=44157248
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200910261033 Pending CN102104778A (en) | 2009-12-17 | 2009-12-17 | Method and device for code rate control in picture coding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102104778A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102868883A (en) * | 2012-06-26 | 2013-01-09 | 中国科学技术大学 | Code rate control method for video encoding |
CN104079933A (en) * | 2014-07-09 | 2014-10-01 | 上海君观信息技术有限公司 | Low-latency code rate control method and bit number distribution method suitable for HEVC |
CN106331704A (en) * | 2015-07-07 | 2017-01-11 | 杭州海康威视数字技术股份有限公司 | Video code rate control method and video coding device |
CN110087078A (en) * | 2019-05-10 | 2019-08-02 | 东华大学 | A kind of measurement end observation efficiency regulation method towards image component masses compressed sensing |
CN110830801A (en) * | 2018-08-13 | 2020-02-21 | 华为技术有限公司 | Video coding rate control method and related device |
CN116389759A (en) * | 2022-05-27 | 2023-07-04 | 上海玄戒技术有限公司 | Image coding method, device, electronic equipment, chip and storage medium |
-
2009
- 2009-12-17 CN CN 200910261033 patent/CN102104778A/en active Pending
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102868883B (en) * | 2012-06-26 | 2013-11-13 | 中国科学技术大学 | Code rate control method for video encoding |
CN102868883A (en) * | 2012-06-26 | 2013-01-09 | 中国科学技术大学 | Code rate control method for video encoding |
CN104079933A (en) * | 2014-07-09 | 2014-10-01 | 上海君观信息技术有限公司 | Low-latency code rate control method and bit number distribution method suitable for HEVC |
CN104079933B (en) * | 2014-07-09 | 2018-07-27 | 上海君观信息技术有限公司 | Low delay bit rate control method and bits allocation method suitable for HEVC |
US10542254B2 (en) | 2015-07-07 | 2020-01-21 | Hangzhou Hikvision Digital Technology Co., Ltd | Video bit rate control method and video coding device |
CN106331704A (en) * | 2015-07-07 | 2017-01-11 | 杭州海康威视数字技术股份有限公司 | Video code rate control method and video coding device |
WO2017004863A1 (en) * | 2015-07-07 | 2017-01-12 | 杭州海康威视数字技术股份有限公司 | Video code rate control method and video encoding apparatus |
CN106331704B (en) * | 2015-07-07 | 2019-10-22 | 杭州海康威视数字技术股份有限公司 | A kind of video code rate control method and video coding apparatus |
CN110830801A (en) * | 2018-08-13 | 2020-02-21 | 华为技术有限公司 | Video coding rate control method and related device |
CN110830801B (en) * | 2018-08-13 | 2021-10-01 | 华为技术有限公司 | Video coding rate control method and related device |
CN110087078A (en) * | 2019-05-10 | 2019-08-02 | 东华大学 | A kind of measurement end observation efficiency regulation method towards image component masses compressed sensing |
CN110087078B (en) * | 2019-05-10 | 2023-06-02 | 东华大学 | Image component block compressed sensing-oriented measurement end observation efficiency regulation and control method |
CN116389759A (en) * | 2022-05-27 | 2023-07-04 | 上海玄戒技术有限公司 | Image coding method, device, electronic equipment, chip and storage medium |
CN116389759B (en) * | 2022-05-27 | 2024-06-25 | 上海玄戒技术有限公司 | Image coding method, device, electronic equipment, chip and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100942395B1 (en) | Rate Control for Multilayer Video Designs | |
JP5676705B2 (en) | Improved video rate control for video coding standards | |
KR100304103B1 (en) | Method for finding re-quantization step sizes resulting in abrupt bit-rate reduction and rate control method using it | |
KR101518358B1 (en) | Buffer-based rate control using frame complexity, buffer level and location of intra frames in video coding | |
US8406297B2 (en) | System and method for bit-allocation in video coding | |
CN100401782C (en) | Method and device for controlling video sequence rate and video encoding device | |
JP2006509444A (en) | Rate control with picture-based look-ahead window | |
US20070140334A1 (en) | Method and apparatus for dynamically adjusting quantization offset values | |
CN102647586B (en) | Code rate control method and device used in video coding system | |
CN1274446A (en) | Appts. and method for macroblock based rate control in coding system | |
WO2009121234A1 (en) | A video compression code rate control method | |
CN108702513B (en) | Apparatus and method for adaptive computation of quantization parameters in display stream compression | |
CN101518088A (en) | Method for rho-domain frame level bit allocation for effective rate control and enhanced video encoding quality | |
CN1902939A (en) | Encoding method, decoding method, and encoding apparatus for a digital picture sequence | |
CN101835042A (en) | Wyner-Ziv Video Coding System and Method Based on No Feedback Rate Control | |
CN101677398A (en) | Scene switching code rate control method | |
CN102104778A (en) | Method and device for code rate control in picture coding | |
US20120002724A1 (en) | Encoding device and method and multimedia apparatus including the encoding device | |
CN100358364C (en) | Code rate control method for subtle granule telescopic code based on H.264 | |
Sun et al. | Rate distortion modeling and adaptive rate control scheme for high efficiency video coding (HEVC) | |
CN100448297C (en) | A code rate control method | |
CN100448295C (en) | A Low Complexity Integral Code Rate Control Method | |
JP2004320707A (en) | Video information simultaneous encoding device | |
Ringenburg et al. | Global MINMAX interframe bit allocation for embedded video coding | |
CN1219403C (en) | MPEG video code rate conversion method based on visual model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20110622 |