CN101159871B - Macro block group video code rate control method - Google Patents

Macro block group video code rate control method Download PDF

Info

Publication number
CN101159871B
CN101159871B CN 200710177218 CN200710177218A CN101159871B CN 101159871 B CN101159871 B CN 101159871B CN 200710177218 CN200710177218 CN 200710177218 CN 200710177218 A CN200710177218 A CN 200710177218A CN 101159871 B CN101159871 B CN 101159871B
Authority
CN
China
Prior art keywords
group
current macro
image
encoded
macro block
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
Application number
CN 200710177218
Other languages
Chinese (zh)
Other versions
CN101159871A (en
Inventor
范文杰
鲁晓牧
王宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN 200710177218 priority Critical patent/CN101159871B/en
Publication of CN101159871A publication Critical patent/CN101159871A/en
Application granted granted Critical
Publication of CN101159871B publication Critical patent/CN101159871B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a macroblock group video code rate control method, which includes the following steps: determining an object bit number of the prior macroblock, utilizing image time domain relativity to determine the QP parameter and encoding bit number estimation value of the prior macroblock; according to the encoding bit number estimation value of the prior macroblock and the object bit number, as well as the relation between the encoded adjacent macroblock actual encoding bit number and the object bit number, adjusting the prior macroblock QP parameter. The invention can obtain the macroblock QP parameter by simple calculation quickly, reduce code rate control method calculation amount, and take the relativity of images on time and space, with high accuracy.

Description

Macro block group video code rate control method
Technical field
The present invention relates to the Image Information Processing technology, particularly relate to a kind of macro block group video code rate control method.
Background technology
During by the Network Transmission video, owing to reasons such as the network bandwidth, video capacity restriction and user's requests, generally can carry out compressed encoding, and can take all factors into consideration above-mentioned factor and select suitable encoder bit rate, promptly adopt the encoder bit rate of some technological means control of video video.Described video is made up of a series of images, comprises multiple image.In the prior art, video code rate control method comprises: adjust quantization parameter, frame-skipping, selective coding and adjustment frame frequency, wherein, described quantization parameter is the set of number that video standard adopts, and different, the code check of quantization parameter and video is inversely proportional to the video standard difference, and promptly quantization parameter is high more, code check is low more, and video quality is also just low relatively more; Described frame-skipping is not meant by some two field pictures are not encoded and reduces the code check of entire image sequence, and this method can cause decoded picture to jump, and image sequence is discontinuous in the video; Described selective coding is meant according to the similitude of present encoding zone with reference zone, selects not encoded in the high present encoding zone of similarity degree, reduces the code check of vision signal with this; Described adjustment frame frequency is a relation of having utilized frame frequency to be directly proportional with video code rate, reduces frame frequency to reduce video code rate.
Video code rate control method can be based on sequence-level, image level and macro block group, wherein, described sequence is the multiframe consecutive image, exactly a plurality of consecutive images is regarded as an integral body based on the video code rate control method of sequence-level, and the code check summation of controlling this image sequence is no more than certain value; Video code rate control method based on image level is that the complexity according to each image in the image sequence, the coded message of encoded image etc. are controlled the code check of a certain width of cloth image in the image sequence again; And be with piece image zoning territory based on macro block group video code rate control method, be called the several macro blocks group, the encoder bit rate of each macro block group is controlled.
Existing video encoding standard has all adopted the method for adjusting quantization parameter bar none in Rate Control.This with the MPEG-4 video encoding standard and H.263 video encoding standard be that example is done brief description.
The actual coding bit number that MPEG4 video encoding standard bit rate control method at first takies degree and previous image of having encoded or macro block group according to encoding buffer calculates the target bit of present image or macro block group, then according to this target bit, utilize a secondary model to calculate the quantification estimates of parameters, and utilize this quantization parameter estimated value that present image or macro block group are encoded, again the parameter of this secondary model and encoding buffer are taken parameter such as degree after coding is finished and upgrade.This video code rate control method all needs to upgrade this secondary model at every turn after encoded an image or macro block group, and before arbitrary image of coding or macro block group, all need to use this secondary model to carry out the Floating-point Computation of a quadratic equation, so the computation complexity height, amount of calculation is bigger.
H.263 the video encoding standard bit rate control method is that unit adjusts quantization parameter with the macro block.At first take degree and distribute the target bits bit number,, utilize a rate-distortion model to calculate the quantization parameter of each macro block, utilize this quantization parameter that each macro block is encoded at last then according to this target bit for each two field picture according to encoding buffer.This video code rate control method be owing to will all will upgrade rate-distortion model one time after each macroblock coding is intact, calculate and realize video code rate control so need finish complex mathematical.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of macro block group video code rate control method, and this method can reduce code rate control method calculation amount.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of macro block group video code rate control method said method comprising the steps of: A, determine the target bit of current macro group, and utilize the relativity of time domain of image, determine the quantization parameter and the number of coded bits estimated value of current macro group; B, according to the number of coded bits estimated value and the target bit of current macro group, and encoded relation between the adjacent macroblocks group target bit of the actual coding bit number of the adjacent macroblocks group of having encoded and this is adjusted current macro group quantization parameter.
After the macro block group video code rate control method step B of the present invention, further comprise:, the current macro group is encoded according to current macro group quantization parameter.
In the macro block group video code rate control method steps A of the present invention, the operation of the target bit of described definite current macro group comprises: obtain all macro block groups in the present image absolute error and, and the absolute error of definite current macro group and in all shared ratios in the absolute error of coded macroblocks group and the sum not; Determine the residue target bit of present image; According to current macro group absolute error with at all proportions in coded macroblocks group absolute error and the sum not, and the residue target bit of present image, be current macro set of dispense target bit.
In the macro block group video code rate control method steps A of the present invention, the operation of the quantization parameter of described definite current macro group and number of coded bits estimated value comprises: according to the absolute error of corresponding macro block group in frame before the present image or the multiframe encoded image and, with the absolute error of current macro group and relation, determine this former frame or multiframe encoded image the weights that influence to present image; Utilize the quantization parameter and the actual coding bit number of corresponding macro block group in former frame or the multiframe encoded image, and each two field picture is to the quantization parameter and the number of coded bits estimated value that weights are determined the current macro group that influence of present image.
Wherein, the encoded image before the described present image is 3 frames.
Wherein, described determine before encoded image to the weights that influence of present image be, in the preceding encoded image absolute error of corresponding macro block group and current macro group and difference take absolute value, as the inverse that influences weights.
Wherein, the operation of described adjustment current macro group quantization parameter comprises, determine the current macro set of coded bits count difference between estimated value and the target bit divided by the number of coded bits estimated value as first corrected parameter, determine to have encoded the actual coding bit number of adjacent macroblocks group and this encoded difference between the adjacent macroblocks group target bit divided by described target bit as second corrected parameter, first corrected parameter and the second corrected parameter sum are added one, multiply by the quantization parameter of current macro group quantization parameter estimated value as the current macro group.
The macro block group video code rate control method that the present invention proposes, have the following advantages: utilize correlation on the consecutive image time domain to determine the quantization parameter and the number of coded bits estimated value of current macro group, therefore use the transition of macro block group video code rate control method of the present invention between can smoothed image, in addition, macro block group video code rate control method of the present invention is adjusted the quantization parameter of current macro group according to the actual coding bit number of adjacent macroblocks group, so transitions smooth between the adjacent macroblocks group, macro block group video code rate control method computational methods of the present invention are simple, reduce code rate control method calculation amount, realize quick and precisely to obtain the quantization parameter of macro block group easily.
Description of drawings
Fig. 1 is the flow chart of macro block group video code rate control method of the present invention;
Fig. 2 is for determining the operational flowchart of current macro group target bit in the macro block group video code rate control method of the present invention;
Fig. 3 is for adjusting the operational flowchart of current macro group quantization parameter in the macro block group video code rate control method of the present invention.
Embodiment
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
Basic thought of the present invention is: the relativity of time domain that utilizes image, determine the quantization parameter and the number of coded bits estimated value of current macro group, then according to the number of coded bits estimated value and the target bit of current macro group, and the actual coding bit number of the adjacent macroblocks group of having encoded and the relation between its target bit, adjust current macro group quantization parameter.
As shown in Figure 1, macro block group video code rate control method of the present invention may further comprise the steps:
Step 101: the target bit of determining the current macro group.
The target bit of determining the current macro group can use multiple way, and all macro block groups that comprised as directly the target bit of present image all being given present image are got the bit number got as the target bit of current macro group etc.Wherein, the bit number of described target bit for taking after encoding, for macro block group video code rate control method, the target bit of present image is a known numeric value.
In order to allow the target bit of current macro group take following mode to determine the target bit of current macro group in one embodiment of the present of invention near the actual coding bit number behind the video coding:
Step 101a, obtain absolute error and (SAD, the Sum ofAbsolute Difference) of all macro block groups in the present image, and the SAD of definite current macro group is in all shared ratios in the SAD sum of coded macroblocks group not.
If the current macro group is i macro block group in present image, its SAD is SAD i, present image has and is numbered 0 to n-1 n macro block group altogether, then described ratio S iFor:
S i = SAD i Σ j = 0 n - 1 SAD j - Σ j = 0 i - 1 SAD j
Wherein the i value is 0 to n-1, is the current grand fast group of numbering in present image.
Step 101b: the residue target bit of determining present image.
The residue target bit of present image is that the target bit of present image deducts the actual coding bit number of coded macroblocks group.If T ' is present image residue target bit, T is the present image target bit, and B jBe the bit number that j macro block group actual coding produces, the j value is 0 to i-1, then has:
T ′ = T - Σ j = 0 i - 1 B j
Step 101c: at all proportions in the coded macroblocks group SAD sum not, and the residue target bit of present image is current macro set of dispense target bit according to current macro group SAD.
The target bit Ti that is the current macro group is: T i=T ' * S i
By the step that step 101a-101c gives current macro set of dispense target bit, the target bit that can make the current macro group be got is directly proportional with its SAD, and according to the principle of video coding, this situation is more near the actual conditions behind the coding.
Step 102: utilize the relativity of time domain of image, determine the quantization parameter and the number of coded bits estimated value of current macro group.
In general, the variation of image all is a kind of seamlessly transitting before and after in the image sequence, so utilize the relativity of time domain of image, also promptly utilize the actual coding situation of encoded two field picture before the present image in the image sequence, can determine the quantization parameter and the number of coded bits estimated value of the current macro group of present image.
Particularly, the operation of the quantization parameter of described definite current macro group and number of coded bits estimated value comprises: according to the SAD of opposite position macro block group in frame before the present image or the multiframe encoded image, with the relation of current macro group SAD, determine this former frame or multiframe encoded image the weights that influence to present image; Utilize quantization parameter, the actual coding bit number of opposite position macro block group in former frame or the multiframe encoded image, and each two field picture is to the quantization parameter and the number of coded bits estimated value that weights are determined the current macro group that influence of present image.For example the current macro group is an i macro block group in the present image, and its SAD is SAD i, the SAD of i macro block group of preceding first two field picture is SAD -1, i, the SAD of i macro block group of preceding second two field picture is SAD -2, i, the SAD of i macro block group of preceding n two field picture is SAD -n, iHow many two field pictures are selected according to actual conditions before getting altogether, preceding number of image frames is crossed less with the present image correlation at most, cross quantization parameter and the number of coded bits estimated value that accurately to obtain the current macro group at least, the SAD of the corresponding macro block group of preceding 3 two field pictures of selection and the relation of current macro group SAD in the present embodiment, obtain and the corresponding weights that influence of picture frame, D -1, i, D -2, iAnd D -3, i, represent preceding first frame, preceding second frame and preceding the 3rd two field picture the weights that influence respectively to present image:
D - 1 , i = 1 | SAD - 1 , i - SAD i |
D - 2 , i = 1 | SAD - 2 , i - SAD i |
D - 3 , i = 1 | SAD - 3 , i - SAD i |
This shows that the SAD of preceding encoded image respective macroblock group and current macro group is approaching more, then before encoded image to present image to influence weights high more.
According to the weights that influence of each two field picture, determine the estimated value QP of current macro group quantization parameter and number of coded bits respectively i' and B i' be:
QP i ′ = QP - 3 , i × D - 3 , i + QP - 2 , i × D - 2 , i + QP - 1 , i × D - 1 , i D - 3 , i + D - 2 , i + D - 1 , i
B i ′ = B - 3 , i × D - 3 , i + B - 2 , i × D - 2 , i + B - 1 , i × D - 1 , i D - 3 , i + D - 2 , i + D - 1 , i
Wherein, QP -1, i, QP -2, i, QP -3, iThe quantization parameter value of corresponding macro block group in first, second and third two field picture before being respectively, B -1, i, B -2, i, B -3, iThe actual coding bit number of corresponding macro block group in first, second and third two field picture before being respectively.Above step 101 and 102, behind the SAD of knowing the current macro group, execution sequence can be put upside down mutually, does not have other influences for implementation result of the present invention.
Step 103: according to the number of coded bits estimated value and the target bit of current macro group, and the actual coding bit number of the adjacent macroblocks group of having encoded and the relation between its target bit, adjust current macro group quantization parameter.
Consider current macro group proportion in present image, and the current macro group is adjacent the relation between the coded macroblocks group, need utilize the number of coded bits estimated value and the target bit of current macro group, and the actual coding bit number of the adjacent macroblocks group of having encoded and the relation between its target bit, adjust current macro group quantization parameter.
Particularly, the operation of described adjustment current macro group quantization parameter comprises,
Step 103a: determine current macro group B i' and Ti between difference divided by B i' as the first corrected parameter delta1.That is:
delta 1 = B i ′ - T i B i ′
Step 103b: determine to have encoded adjacent macroblocks group target bit T I-1Actual coding bit number B with this adjacent macroblocks group of having encoded I-1Between difference divided by T I-1As the second corrected parameter delta2, that is:
delta 2 = B i - 1 - T i - 1 T i - 1
Step 103c: delta1 and delta2 sum are added one, multiply by current macro group QP i' as the quantization parameter QP of current macro group i, that is:
QP i=QP i′×(1+delta1+delta2)
In the aforementioned calculation process, the adjacent macroblocks group of selecting to have encoded is that the previous group of coded macroblocks is calculated delta2, in the video code rate control method of the present invention, also can select one or more adjacent groups of coded macroblocks to calculate delta2 according to neighbouring relations with the current macro group.
Step 104:, the current macro group is encoded according to current macro group quantization parameter.
After obtaining the quantization parameter of current macro group, the current macro group is carried out encoding operation according to prior art.
The above is preferred embodiment of the present invention only, is not to be used for limiting protection scope of the present invention.Those skilled in that art should be able to associate; the target bit that distributes the current macro group by additive method; select the preceding encoded image of different frame numbers to determine the quantization parameter and the number of coded bits estimated value of current macro group; select the adjacent group of coded macroblocks of other numbers and position to adjust the quantization parameter of current macro group, and other is equal to change or replace and all should belong to protection scope of the present invention accordingly according to technical scheme of the present invention and design thereof.

Claims (7)

1. a macro block group video code rate control method is characterized in that, said method comprising the steps of:
A, determine the target bit of current macro group, and utilize the relativity of time domain of image, determine the quantization parameter and the number of coded bits estimated value of current macro group;
B, according to the number of coded bits estimated value and the target bit of current macro group, and encoded relation between the adjacent macroblocks group target bit of the actual coding bit number of the adjacent macroblocks group of having encoded and this is adjusted current macro group quantization parameter.
2. macro block group video code rate control method according to claim 1 is characterized in that, after the step B, further comprises: according to current macro group quantization parameter, the current macro group is encoded.
3. macro block group video code rate control method according to claim 1, it is characterized in that, in the steps A, the operation of the target bit of described definite current macro group comprises: obtain all macro block groups in the present image absolute error and, and the absolute error of definite current macro group and in all shared ratios in the absolute error of coded macroblocks group and the sum not; Determine the residue target bit of present image; According to current macro group absolute error with at all proportions in coded macroblocks group absolute error and the sum not, and the residue target bit of present image, be current macro set of dispense target bit.
4. macro block group video code rate control method according to claim 1, it is characterized in that, in the steps A, the operation of the quantization parameter of described definite current macro group and number of coded bits estimated value comprises: according to the absolute error of corresponding macro block group in the former frame of present image or the multiframe encoded image and, with the absolute error of current macro group and relation, determine this former frame or multiframe encoded image the weights that influence to present image; Utilize the quantization parameter and the actual coding bit number of corresponding macro block group in former frame or the multiframe encoded image, and described former frame or multiframe encoded image are to the quantization parameter and the number of coded bits estimated value that weights are determined the current macro group that influence of present image.
5. macro block group video code rate control method according to claim 4 is characterized in that, the former frame of described present image or multiframe encoded image are 3 frames.
6. macro block group video code rate control method according to claim 4, it is characterized in that, described definite former frame or multiframe encoded image to the weights that influence of present image are, in former frame or the multiframe encoded image absolute error of corresponding macro block group and current macro group and difference take absolute value, as the inverse that influences weights.
7. macro block group video code rate control method according to claim 1, it is characterized in that, the operation of described adjustment current macro group quantization parameter comprises, determine the current macro set of coded bits count difference between estimated value and the target bit divided by the number of coded bits estimated value as first corrected parameter, determine to have encoded the actual coding bit number of adjacent macroblocks group and this encoded difference between the adjacent macroblocks group target bit divided by the target bit of the described adjacent macroblocks group of having encoded as second corrected parameter, first corrected parameter and the second corrected parameter sum are added one, multiply by the quantization parameter of current macro group quantization parameter estimated value as the current macro group.
CN 200710177218 2007-11-12 2007-11-12 Macro block group video code rate control method Expired - Fee Related CN101159871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710177218 CN101159871B (en) 2007-11-12 2007-11-12 Macro block group video code rate control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710177218 CN101159871B (en) 2007-11-12 2007-11-12 Macro block group video code rate control method

Publications (2)

Publication Number Publication Date
CN101159871A CN101159871A (en) 2008-04-09
CN101159871B true CN101159871B (en) 2010-08-04

Family

ID=39307769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710177218 Expired - Fee Related CN101159871B (en) 2007-11-12 2007-11-12 Macro block group video code rate control method

Country Status (1)

Country Link
CN (1) CN101159871B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534436B (en) * 2008-03-11 2011-02-02 深圳市融创天下科技发展有限公司 Allocation method of video image macro-block-level self-adaptive code-rates
CN101527846B (en) * 2008-12-19 2010-11-03 无锡云视界科技有限公司 H.264 variable bit rate control method based on Matthew effect
CN101778275B (en) * 2009-01-09 2012-05-02 深圳市融创天下科技股份有限公司 Image processing method of self-adaptive time domain and spatial domain resolution ratio frame
CN101795415B (en) * 2010-04-22 2012-02-08 杭州华三通信技术有限公司 Method and device for controlling code rate in video coding
JP6056122B2 (en) 2011-01-24 2017-01-11 ソニー株式会社 Image encoding apparatus, image decoding apparatus, method and program thereof
CN106231341B (en) * 2016-07-26 2019-05-24 浙江大华技术股份有限公司 A kind of method and device controlling Motion JPEG encoder bit rate
CN109996076B (en) * 2016-10-12 2021-08-06 深圳市大疆创新科技有限公司 Code rate control method, computer system and device
CN106937115A (en) * 2017-03-02 2017-07-07 杭州当虹科技有限公司 The method for carrying out bit number training to bit number fallout predictor in Video coding
CN108965881B (en) * 2017-05-25 2020-08-14 瑞芯微电子股份有限公司 Code rate control method, system, server and readable storage medium
CN110225343B (en) * 2019-05-20 2021-07-13 北京佳讯飞鸿电气股份有限公司 Code rate control method and device for video coding
CN112073724B (en) * 2020-11-16 2021-01-29 北京世纪好未来教育科技有限公司 Video information processing method and device, electronic equipment and storage medium
CN112235576B (en) * 2020-11-16 2024-04-30 北京世纪好未来教育科技有限公司 Encoding method, encoding device, electronic equipment and storage medium
CN116438794B (en) * 2022-05-31 2023-12-12 上海玄戒技术有限公司 Image compression method, device, electronic equipment, chip and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1434638A (en) * 2003-03-08 2003-08-06 华中科技大学 Method for controlling video coding bit rate
CN1767653A (en) * 2005-11-08 2006-05-03 上海广电(集团)有限公司中央研究院 Bit rate control method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1434638A (en) * 2003-03-08 2003-08-06 华中科技大学 Method for controlling video coding bit rate
CN1767653A (en) * 2005-11-08 2006-05-03 上海广电(集团)有限公司中央研究院 Bit rate control method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
陈梅丽,刘鹏,姚庆栋.面向H.264/AVC的宏块级码率控制算法.浙江大学学报(工学版)41 6.2007,41(6),926-929.
陈梅丽,刘鹏,姚庆栋.面向H.264/AVC的宏块级码率控制算法.浙江大学学报(工学版)41 6.2007,41(6),926-929. *

Also Published As

Publication number Publication date
CN101159871A (en) 2008-04-09

Similar Documents

Publication Publication Date Title
CN101159871B (en) Macro block group video code rate control method
CN100452668C (en) Method and system for selecting interpolation filter type in video coding
CN101389026B (en) Image coding apparatus and image coding method
CN101779468B (en) Image processing device and image processing method
CN104301724B (en) Method for processing video frequency, encoding device and decoding device
CN1980393B (en) Image coding device, method and integrated circuit
CN100589548C (en) The method of correcting interpolated pixel values
CN100574427C (en) The control method of video code bit rate
CN102036062B (en) Video coding method and device and electronic equipment
CN101010964A (en) Method and apparatus for using frame rate up conversion techniques in scalable video coding
CN106060539B (en) A kind of method for video coding of low transmission bandwidth
CN108012149B (en) Code rate control method in video coding
CN110225343B (en) Code rate control method and device for video coding
CN101188752A (en) A self-adapted code rate control method based on relevancy
CN103533365B (en) Bit-rate control method and Bit-Rate Control Algorithm system
CN101552917A (en) Bit rate control method for video compression
CN103119940A (en) Image encoding method, image decoding method, image encoding device, image decoding device and program therefor
CN101917618B (en) Calculation complexity control method for multi-viewpoint video coding and layering B frame predicting structure
CN102572439B (en) Method for determining optimal multi-viewpoint video coding mode for coding
JP4257655B2 (en) Video encoding device
CN110139101B (en) Frame-level bit distribution method based on lambda domain code rate control
CN102752598A (en) Fast adaptive code rate control method
CN100448295C (en) Integration code rate control method of low complexity
CN101933334A (en) Method for measuring flicker
CN106658024A (en) Fast video 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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100804

Termination date: 20151112