CN1190969C - Method for controlling video coding bit rate - Google Patents
Method for controlling video coding bit rate Download PDFInfo
- Publication number
- CN1190969C CN1190969C CNB03118748XA CN03118748A CN1190969C CN 1190969 C CN1190969 C CN 1190969C CN B03118748X A CNB03118748X A CN B03118748XA CN 03118748 A CN03118748 A CN 03118748A CN 1190969 C CN1190969 C CN 1190969C
- Authority
- CN
- China
- Prior art keywords
- conversion ratio
- coding
- parameter
- ratio parameter
- code bit
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/004—Predictors, e.g. intraframe, interframe coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The present invention discloses a method for controlling a video coding bit rate. The favorable linear relationship which exists between coding bit number and a conversion ratio parameter and the favorable information source weak correlation which exists between a coding distortion factor and the conversion ratio parameter are simultaneously utilized, so that the quick and accurate estimation or prediction of a coding bit rate is realized through the conversion ratio parameter; the bit number of goal coding is determined according to the predication result and the size of a coding buffer area; then, through the relation between the conversion ratio parameter and a quantization parameter, the coding quantization parameter is adjusted, and the control for the coding bit rate is realized; a coding parameter is adjusted according to a distortion factor of a coding macro-block. The present invention can realize the quick and accurate prediction of the coding bit rate, the quick and accurate optimization of coding bit allocation, and the quick control of the coding bit rate.
Description
Technical field
The invention belongs to the transmission and the process field of the video information in the digital video communications field, be specifically related to a kind of video code bit rate control method.
Background technology
1948, Shannon proposed the coding thinking that interrelates with certain fidelity criterion.Deliver relevant paper in nineteen fifty-nine again afterwards, information source coding problem had been done the statement of essence, pointed out the theoretical boundary that rate distortion theory can the specified data compression, thus the basis of further having established rate distortion theory.After people's such as Jelinek, Gallager, Berger development has formed qualification distortion source encoding theory.
In limiting distortion source encoding theory, rate distortion (R-D) function R (D) is defined as: given information source message probability distribution { P (xi) } and average distortion function allow under the prerequisite of distortion D, these information source message of coding transmission, and when making its distortion level in allowed band, the minimum of needed information coding transmission coding bit rate.Based on the definition of R (D) function, can obtain to draw a conclusion: under the condition that allows certain distortion, coding bit rate can reduce, and needed channel capacity also can correspondingly reduce simultaneously.And the distortion factor that allows is big more, and then coding bit rate is can compressed degree also big more.On the other hand, from information source itself, if the distortion factor that allows is big more, then the incidence of information source (being the time entropy of information source) is can compressed degree also big more.This has just drawn the information source coding problem that limits distortion, also is the rationale of rate-distortion optimization in the digital signal encoding method.
In the digital video coding system, the coding bit rate of encoder is all relevant with quantization parameter with image fault, for the ease of analyzing, the general relation that adopts coding bit rate-quantization function R (q) to describe coding bit rate and quantization parameter adopts the relation between coding distortion-quantization function D (q) description image fault and the quantization parameter equally.By analysis, carry out the rate-distortion optimization of digital signal encoding, thereby realize coding bit rate control these two functions.Yet this coding bit rate function and distortion function based on quantization parameter all has very strong nonlinear characteristic, and very strong with the correlation of information source.Adopting this Mathematical Modeling is that coded system realizes coding bit rate-distortion analysis exactly, must set up very complicated coding bit rate function and distortion function.As U.S. Patent No. 6,366,704, No.6,356,668, No.6,212,302, No.6,037,987, No.6,072,831 and No.6,167, in 162, when solving coding bit rate control problem, all adopted coding bit rate-distortion model based on quantization parameter, these models or fairly simple, the second order polynomial approximate description non-uniform encoding bit rate function of employing quantization parameter makes its accuracy be subjected to certain limitation; Very complicated, adopt higher order polynomial to describe non-uniform encoding bit rate function, its accuracy is improved, but computation complexity is very high again, be difficult to be applied in the actual coded system.
Summary of the invention
The object of the present invention is to provide a kind of video code bit rate control method that can overcome above-mentioned defective, this method can realize coding bit rate control quickly and accurately.
For achieving the above object, a kind of video code bit rate control method is characterized in that comprising following step:
1. set up the mapping table between quantization parameter and the conversion ratio parameter, the corresponding relation between quantization parameter and the conversion ratio parameter passes through formula
Obtain; Wherein, D
0(X) and D
l(X) discrete cosine transform coefficient that is respectively intraframe coding and inter-coded macroblocks distributes, and x is the value of the conversion coefficient after quantizing, and q is a quantization parameter, and p is corresponding conversion ratio parameter, and M is the pixel count of present image;
2. determine the target code bit number of present image according to the size of encoding buffer;
3. utilize given conversion ratio parameter and quantize after the average information entropy of conversion coefficient between ratio, determine to reach the size of the corresponding conversion ratio parameter of target code bit number;
4. according to the mapping table between quantization parameter and the conversion ratio parameter, determine the quantization parameter of present image coding;
5. adjust the conversion ratio parameter of next macro block according to the distortion factor of current macro;
6. according to the mapping table between quantization parameter and the conversion ratio parameter, determine the quantization parameter of next macroblock coding; 5. repeating step finishes until all macroblock codings of a frame;
7. determine the target code bit number of next frame image according to the size of encoding buffer;
8. conversion ratio parameter value that is adopted according to present image coding and the ratio between the actual coding bit number
Be worth, determine the size of the conversion ratio parameter of next frame image encoding;
9. according to the mapping table between quantization parameter and the conversion ratio parameter, determine the next frame image encoding
Quantization parameter;
10. repeating step 5.-9., up to end-of-encode.
The present invention is used for the digital video coding system, on the basis of the rate-distortion model that encoding bit rate control method adopted of traditional video coding based on quantization parameter, the new rate-distortion model that adopted the neotectonics of conversion ratio parameter renegotiation, and the corresponding relation by quantization parameter and conversion ratio parameter, realize coding bit rate control quickly and accurately.The present invention has following major advantage:
One. have good linear relationship between conversion ratio parameter and the number of coded bits, help realizing coding bit rate prediction quickly and accurately.
They are two years old. and have the weak correlation of good information source between conversion ratio parameter and the coding distortion degree, help realizing coded-bit allocation optimized quickly and accurately.
They are three years old. and there is corresponding relation between conversion ratio parameter and the quantization parameter,, can realizes the control of coding bit rate fast by the mode of look-up table according to this corresponding relation.
Description of drawings
The flow chart of Fig. 1 encoding bit rate control method of the present invention.
Embodiment
Video code bit rate control method provided by the invention is mainly used in the digital video coding system of solution based on conversion, realizes coding bit rate control quickly and accurately.Specific implementation method is finished according to the following steps.
The first step: set up the mapping table between quantization parameter and the conversion ratio parameter.
The conversion ratio parameter p is: original image has the number N of the coefficient (not being quantified as zero coefficient) of coding practical significance through after the discrete cosine transform
TWith the original pixels number N
0Ratio, i.e. p=N
T/ N
0Corresponding relation between quantization parameter and the conversion ratio parameter passes through formula
Obtain.Wherein, D
0(X) and D
l(X) discrete cosine transform coefficient that is respectively intraframe coding and inter-coded macroblocks distributes, and x is the value of the conversion coefficient after quantizing, and q is a quantization parameter, and p is corresponding conversion ratio parameter, and M is the pixel count of present image.
Second step: the target code bit number of determining present image according to the size of encoding buffer.
Adopt formula
Obtain the target code bit number of present image.Wherein, it is channel width that B has used buffer size, C for coding, and F is a frame per second, B
TBe buffer sizes, R
MVAnd R
HBe respectively the number of coded bits of motion vector and header.Also can adopt formula
Obtain the target code bit number of present image.Its objective is according to the full state of buffer empty and adjust present image preassignment number of coded bits.This step 1 aspect is the control channel transmission delay effectively, can adjust each frame preassignment number of coded bits in conjunction with channel actual speed rate state on the other hand, can effectively utilize the channel current bandwidth.As B=0.2 * B
T, promptly the encoding buffer fullness degree is 20% o'clock of total buffer size, present frame preassignment bit number R
TEqual average number of coded bits
B>0.2 * B
TThe time, preceding frame preassignment bit number R
TLess than average number of coded bits
To prevent the encoding buffer overflow, can effectively control coding transmission and postpone; B<0.2 * B
TThe time, preceding frame preassignment bit number R
TGreater than average number of coded bits
To prevent the encoding buffer underflow, can effectively utilize current transmission bandwidth;
The 3rd step: utilize the ratio between the average information entropy of conversion coefficient after given conversion ratio parameter and the quantification, determine to reach the size of the corresponding conversion ratio parameter of target code bit number.
Pass through formula
Determine the size of the pairing conversion ratio parameter of target code bit number, wherein p
TBe the size of the pairing conversion ratio parameter of target code bit number, R
TBe target code bit number, p
0For quantization parameter is made as the size of 16 o'clock pairing conversion ratio parameters, H
0For quantization parameter is made as 16 o'clock average information entropys through the conversion coefficient after quantizing.
The 4th step:, determine the quantization parameter of present image coding according to the mapping table between quantization parameter and the conversion ratio parameter.
The 5th step: the conversion ratio parameter of adjusting next macro block according to the distortion factor of current macro.
For first macro block of current encoded image, adopt the conversion ratio parameter of present image to encode.For the conversion ratio parameter of next coded macroblocks, by formula
Obtain.Wherein, θ
i=R
i/ p
i, R
iBe the actual coding bit number of current macro, p
iBe the conversion ratio parameter of current macro,
σ
iBe the standard deviation of current macro, D
iBe the distortion factor of current macro, R
TBe the target code bit number, the macroblock number of L for having encoded.
The 6th step:, determine the quantization parameter of next macroblock coding according to the mapping table between quantization parameter and the conversion ratio parameter.
The 7th step: the target code bit number of determining the next frame image according to the size of encoding buffer.Specific implementation method is identical with second step.
The 8th step: conversion ratio parameter value that is adopted according to present image coding and the ratio between the actual coding bit number, determine the size of the conversion ratio parameter of next frame image encoding.Pass through formula
Determine the conversion ratio parameter of next frame image encoding, wherein P
N+lBe the conversion ratio parameter of next frame image encoding, R
TBe target code bit number, P
nBe the conversion ratio parameter that the present image coding is adopted, R
nActual bit number for the present image coding.
The 9th step:, determine the quantization parameter of next frame image encoding according to the mapping table between quantization parameter and the conversion ratio parameter;
The tenth step repeated the 5th and went on foot for the 9th step, up to end-of-encode.
Can see that the operand of above method mainly concentrates in the distributed process that obtains conversion coefficient, the calculating in other link has only addition and multiplying.With respect to whole encoding process process, computation complexity is very low.
The bit-rate control method that this patent proposes can be used for the video coding system of various criterion.Here be example with MPEG-2 TM5 coded system, the effect of this video code bit rate control method is described.In MPEG-2 TM5 coded system, the video code bit rate control method that adopts this patent to propose substitutes original method, and cycle tests " Foreman ", " Salesman ", " Tabletennis " and " Coastguard " are encoded respectively.
In order to describe the execution efficient of coding bit rate control, definition control corresponding error is:
Wherein R and R
TReality and the target code bit number of representing every two field picture respectively.Listed experimental result in the table 1 respectively.As can be seen, the video code bit rate control method that this patent proposes has effectively realized the control of coding bit rate under the condition of given target code bit rate, and departure has been compared obvious reduction with original MPEG-2TM5 system, is less than about 2% greatly.Simultaneously, picture quality also is significantly improved.Mean P SNR has improved 0.87dB.
Table 1 is used for this method the coding bit rate control result of MPEG-2 TM5
Video sequence | Foreman | Salesman | Tabletennis | Costguard | Coastguard | |
Target bit rate | 288000 | 288000 | 288000 | 288000 | 1024000 | |
The actual coding bit rate | The former method of TM5 | 289024 | 289089 | 288208 | 288895 | 1024273 |
This method | 288203 | 288170 | 288008 | 288169 | 1024152 | |
Departure | The former method of TM5 | 12.8% | 4.9% | 15.2% | 6.5% | 2.9% |
This method | 0.9% | 1.3% | 0.7% | 0.8% | 0.3% | |
PSNR(dB) | The former method of TM5 | 32.96 | 36.58 | 32.24 | 31.38 | 38.37 |
This method | 33.84 | 37.20 | 33.12 | 32.20 | 39.64 | |
Improve | 0.88 | 0.62 | 0.88 | 0.82 | 1.17 |
Claims (6)
1. video code bit rate control method is characterized in that comprising following step:
1. set up the mapping table between quantization parameter and the conversion ratio parameter, the corresponding relation between quantization parameter and the conversion ratio parameter passes through formula
Obtain; Wherein, D
0(x) and D
1(x) discrete cosine transform coefficient that is respectively intraframe coding and inter-coded macroblocks distributes, and x is the value of the conversion coefficient after quantizing, and q is a quantization parameter, and p is corresponding conversion ratio parameter, and M is the pixel count of present image;
2. determine the target code bit number of present image according to the size of encoding buffer;
3. utilize given conversion ratio parameter and quantize after the average information entropy of conversion coefficient between ratio, determine to reach the size of the corresponding conversion ratio parameter of target code bit number;
4. according to the mapping table between quantization parameter and the conversion ratio parameter, determine the quantization parameter of present image coding;
5. adjust the conversion ratio parameter of next macro block according to the distortion factor of current macro;
6. according to the mapping table between quantization parameter and the conversion ratio parameter, determine the quantization parameter of next macroblock coding; 5. repeating step finishes until all macroblock codings of a frame;
7. determine the target code bit number of next frame image according to the size of encoding buffer;
8. conversion ratio parameter value that is adopted according to present image coding and the ratio between the actual coding bit number are determined the size of the conversion ratio parameter of next frame image encoding;
9. according to the mapping table between quantization parameter and the conversion ratio parameter, determine the quantization parameter of next frame image encoding;
10. repeating step 5.-9., up to end-of-encode.
2. video code bit rate control method according to claim 1 is characterized in that, described step 2. with step 7. in, adopt formula
Obtain the target code bit number of present image; Wherein, it is channel width that B has used buffer size, C for coding, and F is a frame per second, B
TBe buffer sizes, B
MVAnd R
HBe respectively the number of coded bits of motion vector and header.
3. video code bit rate control method according to claim 1 is characterized in that, described step 2. with step 7. in, adopt formula
Obtain the target code bit number of present image, wherein, it is channel width that B has used buffer size, C for coding, and F is a frame per second, B
TBe buffer sizes, R
MVAnd R
HBe respectively the number of coded bits of motion vector and header.
4 according to claim 1,2 or 3 described video code bit rate control methods, it is characterized in that, described step 3. in, pass through formula
Determine the size of the pairing conversion ratio parameter of target code bit number, wherein p
TBe the size of the pairing conversion ratio parameter of target code bit number, R
TBe target code bit number, p
0For quantization parameter is made as the size of 16 o'clock pairing conversion ratio parameters, H
0For quantization parameter is made as 16 o'clock average information entropys through the conversion coefficient after quantizing.
5 video code bit rate control methods according to claim 4 is characterized in that, described step 5. in, for first macro block of current encoded image, adopt the conversion ratio parameter of present image to encode; For the conversion ratio parameter of next coded macroblocks, by formula
Obtain; Wherein, R
TBe the target code bit number, the macroblock number of L for having encoded, θ
i=R
i/ p
i, R
iBe the actual coding bit number of current macro, p
iBe the conversion ratio parameter of current macro,
σ
iBe the standard deviation of current macro, D
iThe distortion factor for current macro.
6 video code bit rate control methods according to claim 5 is characterized in that, described step 8. in, pass through formula
Determine the conversion ratio parameter of next frame image encoding, wherein p
N+1Be the conversion ratio parameter of next frame image encoding, R
TBe target code bit number, p
nBe the conversion ratio parameter that the present image coding is adopted, R
nActual bit number for the present image coding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB03118748XA CN1190969C (en) | 2003-03-08 | 2003-03-08 | Method for controlling video coding bit rate |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB03118748XA CN1190969C (en) | 2003-03-08 | 2003-03-08 | Method for controlling video coding bit rate |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1434638A CN1434638A (en) | 2003-08-06 |
CN1190969C true CN1190969C (en) | 2005-02-23 |
Family
ID=27634488
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB03118748XA Expired - Fee Related CN1190969C (en) | 2003-03-08 | 2003-03-08 | Method for controlling video coding bit rate |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1190969C (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005203905A (en) * | 2004-01-13 | 2005-07-28 | Sony Corp | Apparatus, method and program for image coding |
EP1745653B1 (en) | 2004-01-30 | 2017-10-18 | Thomson Licensing DTV | Encoder with adaptive rate control for h.264 |
KR100631714B1 (en) * | 2004-06-30 | 2006-10-09 | 엘지전자 주식회사 | Apparatus and method for improved video signal rate control of a mobile terminal |
KR101058524B1 (en) * | 2004-07-22 | 2011-08-23 | 삼성전자주식회사 | Bit quantity control device and control method |
JP4543971B2 (en) * | 2005-03-07 | 2010-09-15 | ソニー株式会社 | Encoding method, encoding apparatus, encoding processing program, and recording medium recording the encoding processing program |
US7961783B2 (en) * | 2005-07-07 | 2011-06-14 | Mediatek Incorporation | Methods and systems for rate control in video encoder |
CA2679767C (en) * | 2007-03-14 | 2013-06-25 | Nippon Telegraph And Telephone Corporation | Encoding bit-rate control method and apparatus, program therefor, and storage medium which stores the program |
CN101159871B (en) * | 2007-11-12 | 2010-08-04 | 中兴通讯股份有限公司 | Macro block group video code rate control method |
CN101552917B (en) * | 2008-03-31 | 2011-01-05 | 深圳市融创天下科技发展有限公司 | Bit rate control method for video compression |
CA2722051C (en) * | 2008-06-05 | 2014-01-21 | Nippon Telegraph And Telephone Corporation | Method and apparatus for variable video bitrate control in which picture bitrate correction is limited to be within a calculated range |
CN101540908B (en) * | 2009-03-30 | 2012-03-28 | 北京大学 | Video coding processing method and device |
CN102595143B (en) * | 2012-03-19 | 2014-01-29 | 中国科学院声学研究所 | Wireless video transmission method |
CN104079933B (en) * | 2014-07-09 | 2018-07-27 | 上海君观信息技术有限公司 | Low delay bit rate control method and bits allocation method suitable for HEVC |
CN116437090B (en) * | 2023-06-13 | 2023-08-22 | 基石酷联微电子技术(北京)有限公司 | Efficient parallelizable image compression code rate control method and processing equipment |
-
2003
- 2003-03-08 CN CNB03118748XA patent/CN1190969C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN1434638A (en) | 2003-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1190969C (en) | Method for controlling video coding bit rate | |
CN1110962C (en) | Adaptive quantizer for use in video signal encoding system | |
CN100456835C (en) | Methods and systems for rate control in video encoder | |
KR100304103B1 (en) | Method for finding re-quantization step sizes resulting in abrupt bit-rate reduction and rate control method using it | |
CN101552917B (en) | Bit rate control method for video compression | |
CN1106599A (en) | Image coding method and apparatus therefor | |
CN1631041A (en) | Method and system for rate control during video transcoding | |
CN1902939A (en) | Encoding method, decoding method, and encoding apparatus for a digital picture sequence | |
CN102281446B (en) | Visual-perception-characteristic-based quantification method in distributed video coding | |
CN1407808A (en) | Flow compressible video code converter | |
CN1949877A (en) | Adaptive quantization controller and method thereof | |
WO2010041488A1 (en) | Dynamic image encoding device | |
CN100553335C (en) | Macro-block level bit rate control method in a kind of video code conversion | |
CN104410861A (en) | Video encoding method and device | |
CN1463560A (en) | Method and system for determining distortion in video signal | |
CN103501438B (en) | A kind of content-adaptive method for compressing image based on principal component analysis | |
WO2019179096A1 (en) | Compressive sensing-based quality-scalable fast coding method | |
CN1889687A (en) | Non-predicted circulation anti-code error video frequency coding method | |
CN1870753A (en) | Integration code rate control method of low complexity | |
CN101459850A (en) | Image compression quality prediction method and system | |
US20160049156A1 (en) | Method for coding pulse vectors using statistical properties | |
JP2007325262A (en) | Method of video compression | |
CN1422075A (en) | Parallel image sequence bit rate controlling method for digital TV video coder | |
CN101686398A (en) | Method for transcoding a first codeword to a second codeword | |
CN111355952B (en) | Coding coefficient eliminating method and improved HEVC coding method |
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 | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20050223 Termination date: 20120308 |