CN102752598A - Fast adaptive code rate control method - Google Patents

Fast adaptive code rate control method Download PDF

Info

Publication number
CN102752598A
CN102752598A CN2012102378167A CN201210237816A CN102752598A CN 102752598 A CN102752598 A CN 102752598A CN 2012102378167 A CN2012102378167 A CN 2012102378167A CN 201210237816 A CN201210237816 A CN 201210237816A CN 102752598 A CN102752598 A CN 102752598A
Authority
CN
China
Prior art keywords
frame
coding
quantization parameter
bit rate
rate control
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
Application number
CN2012102378167A
Other languages
Chinese (zh)
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.)
BEIJING BOYA HUALU TECH RESEARCH INSTITUTE Co Ltd
Original Assignee
BEIJING BOYA HUALU TECH RESEARCH INSTITUTE Co Ltd
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 BEIJING BOYA HUALU TECH RESEARCH INSTITUTE Co Ltd filed Critical BEIJING BOYA HUALU TECH RESEARCH INSTITUTE Co Ltd
Priority to CN2012102378167A priority Critical patent/CN102752598A/en
Publication of CN102752598A publication Critical patent/CN102752598A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a fast adaptive code rate control method which comprises the following steps of: coding the current image by use of the quantization coefficient obtained by the previous code rate control; storing the intermediate result of the coding; comparing the code rate calculated according to the size of the current coded frame and the size of the previous N-1 frames of the current coded frame with the target code rate; adjusting the quantization coefficient according to the comparison result; if the current coding code rate exceeds the threshold, adjusting the quantization coefficient of the previous N frames, and adjusting the quantization coefficient according to the difference between the coding result of each frame and the target code rate; recoding the N frames by use of the adjusted quantization coefficient by use of the intermediate result of the coded frame before; and calculating the quantization coefficient of the next frame by use of the bit number after the recoding of the N frames and the quantization coefficient when calculating the quantization coefficient in next code rate control. The method disclosed by the invention has the advantages of fast response to the screen change in a complicated scene, fast change of the coding type, fast recovery and stable code rate.

Description

Quick self-adapted bit rate control method
Technical field
The invention provides a kind of quick self-adapted bit rate control method, be specifically related to a kind of utilization and keep precoding information, make the coding method that self adaptation is adjusted with actual demand bit rate, belong to field of video encoding according to the precoding result.
Background technology
Video coding principle and step are following:
1. intraframe coding:
1) conversion, according to fixedly cutting apart (is unit such as the 8x8 pixel), the frequency distribution of image before the coefficient representation transformation in the matrix after the conversion, wherein HFS concentrates on the upper left corner, and low frequency part concentrates on the lower right corner;
2) quantize, use and do quantification (for example, the transformation matrix coefficient is divided by quantization parameter, and this process is called quantification), the coefficient value among the back result is diminished, obtain the result for quantizing the back matrix with quantization parameter;
3) prediction use to quantize back matrix coefficient and peripheral matrix coefficient and gives a forecast (search only matching relationship, make the result after the coupling minimum, this process is named prediction), and current matrix system numerical value further diminishes after the prediction;
4) entropy coding according to specific coding rule coding (such as huffman coding, concrete rule is different in different video coding standards), obtains final bit stream with matrix coefficient.
2. interframe encode:
1) estimation; Use fixing image segmentation (being unit), the data of present frame coding site image segmentation and reference frame (be arranged on the time present frame before or after frame) data are done contrast, constantly change the position such as the 8x8 pixel; Finally find the minimum position of difference (such as; The absolute value sum of individual element value difference is successively as standard of comparison), obtain the grid deviation (motion vector) of difference matrix and this position and coding site;
2) the difference matrix is done conversion, quantification, prediction, entropy coding (coding step at same frame);
3) motion vector is done entropy coding;
4) above step entropy coding gathers into final bit stream.
Rate Control; Refer to the picture group picture before the current encoded frame (be assumed to be N frame consecutive image, maybe in the frame or interframe encode) information make calculating, predict the present frame quantization parameter; Thereby (the bit number sum of front N two field picture that comprises present frame is divided by the shared time value of N frame for the code check of control of video; Unit is bps), quantization parameter is the direct factor that directly influences each frame coded bit number, coefficient is big more; Result after the quantification is more little, and the bit number behind the entropy coding is just few more.
Conventional codec Rate Control mode is following: determine the interframe and the intraframe coding type of every two field picture according to fixed model, according to the quantization parameter of coding size (bit number) adjustment back one frame of former frame, make the final code check convergence target bit rate of video.The result data of the coding intermediate steps of frame before not preserving in the cataloged procedure.
The characteristics of tradition bit rate control method are following: advantage is when video scene changes little (details that changes in the image shared ratio less); Can keep code check steady; Shortcoming is when video scene changes greatly; Code check can become big suddenly or diminish; Get back to chronic that plateau needs once more, generally will pass through at least one coding unit (0.5 second to 1 second coding frame number) and could recover steadily, when changing scene (such as advertisement) violent or frequently switching, possibly occur code check out of control (the actual coding code check exceed target bit rate more than one times and lasting above 1 second).
Method of the present invention is optimized on traditional bit rate control method, and the fast responding scene that has when complex scene changes, changes fast type of coding, fast quick-recovery code check advantage stably.
Summary of the invention
The objective of the invention is on the basis of existing bit rate control method, to be optimized, increase new control strategy, realize than the code check output more stably of original bit rate control method.
Technical scheme provided by the invention is following:
A kind of quick self-adapted bit rate control method comprises the steps:
1) the quantization parameter coding present image that uses last Rate Control to obtain; Intermediate object program when preserving coding; The code check and the target bit rate that calculate according to the size of the preceding N-1 frame of the size of current encoded frame and current encoded frame compare, and according to comparative result quantization parameter are made adjustment;
2) if the present encoding code check does not exceed threshold value, then quantization parameter is continued to use the adjusted value of step 1), jumps to step 1) and continues coding next frame image;
3) if the present encoding code check exceeds threshold value, then carry out following steps:
A) will before preserve the N frame of coding intermediate object program quantization parameter adjust, according to the difference size of frame coding result and target bit rate separately quantization parameter is made adjustment;
B) use adjusted quantization parameter that this N frame is recoded, use the intermediate object program that stays before the coded frame during recodification, to accelerate the speed of rearranging;
Use bit number and the quantization parameter of quantization parameter calculating next frame after this N frame is rearranged when c) Rate Control is calculated quantization parameter next time;
4) jumping to step 1) continues to carry out.
Described quick self-adapted bit rate control method is characterized in that, in the step 1), if first frame, the initial quantization coefficient coding present image that then uses the user to set.
Described quick self-adapted bit rate control method is characterized in that, in the step 1), if code check less than target bit rate, with regard to the lower quantization coefficient, otherwise just increases quantization parameter; The amplitude that quantization parameter changes is decided by code check difference.
Described quick self-adapted bit rate control method is characterized in that, the coding intermediate object program described in the step 1) comprises: the information of cutting apart unit in the type of coding of every frame, quantization parameter, each frame.
Described quick self-adapted bit rate control method is characterized in that, the value of said type of coding is in interframe or the frame; The information of cutting apart unit in each frame comprises type of prediction, motion vector.
Described quick self-adapted bit rate control method is characterized in that, said threshold value is 150% of a target bit rate.
Advantage of the present invention is; The code check of the current frame of having encoded of use before having changed decides the mode of next frame coded quantization coefficient; And be to use the result of some frames of participating in Rate Control calculating to control code check, and the method for rearranging when needed, the fluctuation of code check is controlled to greatest extent; And the intermediate object program before using, the speed when accelerating to rearrange greatly.Through the optimization of this method, improved the picture quality when the actual coding code check is lower than target bit rate, and avoided code check superelevation situation out of control to greatest extent.
Description of drawings
Fig. 1 is the flow chart of the method for the invention.
Embodiment
The method of the invention comprises the steps (referring to Fig. 1):
1) if first frame, the initial quantization coefficient that then uses the user to set, otherwise; The quantization parameter that uses last Rate Control to obtain, the coding present image, preservation comprises the coding intermediate object program of present frame at interior N frame; Such as the information (like type of prediction, motion vector etc.) of cutting apart unit in the type of coding of every frame (in interframe or the frame), quantization parameter, each frame, (N is the Rate Control window size according to the size of current encoded frame and the preceding N frame of current encoded frame; Rate Control is calculated all with reference to the information of this N frame at every turn, and the User Defined value for example can be provided with N=5; Also other value can be set) the size code check and the target bit rate that calculate compare, according to comparative result quantization parameter is made adjustment, such as; If code check is less than target bit rate; With regard to the lower quantization coefficient, otherwise just increase quantization parameter, the amplitude that quantization parameter changes is decided by code check difference;
2) (concrete threshold values can be adjusted according to user's request if present encoding code check (having comprised the code check that present frame calculates at interior N two field picture) does not exceed threshold value; For example; Can be to exceed 50% than target bit rate; Promptly exceed target bit rate 150%), quantization parameter is continued to use the adjusted value of step 1), jumps to step 1) and continues coding next frame image;
3) exceed threshold value if comprised present frame at the code check that interior N two field picture calculates, then carry out following steps:
A) will before preserve the N frame of coding intermediate object program quantization parameter adjust, according to the difference size of frame coding result and target bit rate separately quantization parameter is made adjustment, such as; If the bit number of average every frame is B under the target bit rate, the present frame bit number is less than B, and then quantization parameter increases by 1; Equal B's; Increase by 2, greater than B, then quantization parameter increases by 2 and multiply by the ratio that becomes big;
B) use adjusted quantization parameter that this N frame is recoded, use the intermediate object program that stays before the coded frame when rearranging, to accelerate the speed of rearranging;
To use bit number and the quantization parameter of quantization parameter calculating next frame after this N frame is rearranged when c) Rate Control is calculated quantization parameter next time;
4) jumping to step 1) continues to carry out.
Further specify with an embodiment below:
Embodiment 1:
Current Rate Control window is N=5, and target bit rate is that every N frame bit number sum can not be greater than 500Kb (1Kb equals 1000 bits), and 5 two field pictures of having encoded are respectively (qp represents quantization parameter):
#1:100Kb,qp=23
#2:100Kb,qp=22
#3:100Kb,qp=21
#4:100Kb,qp=22
#5:100Kb,qp=22
The summation of 5 frames is 500Kb before, and within target bit rate, code check calculates present frame (#6) with the qp=22 coding, and coding result is:
#6:400Kb,qp=22
Find to consider that present frame is 800Kb in 5 interior frame bit number summations; 60% (establish threshold value be target bit rate 150%) that surpasses the 500Kb of target bit rate; Need rearrange; When rearranging according to exceeding amplitude adjustment quantization parameter, if 150% with interior then according to normal process, adjust and the result that rearranges following:
#2:80Kb,qp=24,+2
#3:80Kb,qp=23,+2
#4:80Kb,qp=24,+2
#5:80Kb,qp=24,+2
#6:180Kb,qp=32,+10
The bit number summation of this 5 frame is 500Kb, meets the target bit rate requirement, continues coding #7 frame.

Claims (7)

1. a quick self-adapted bit rate control method comprises the steps:
1) the quantization parameter coding present image that uses last Rate Control to obtain; Intermediate object program when preserving coding; The code check and the target bit rate that calculate according to the size of the preceding N-1 frame of the size of current encoded frame and current encoded frame compare, and according to comparative result quantization parameter are made adjustment;
2) if the present encoding code check does not exceed threshold value, then quantization parameter is continued to use the adjusted value of step 1), jumps to step 1) and continues coding next frame image;
3) if the present encoding code check exceeds threshold value, then carry out following steps:
A) will before preserve the N frame of coding intermediate object program quantization parameter adjust, according to the difference size of frame coding result and target bit rate separately quantization parameter is made adjustment;
B) use adjusted quantization parameter that this N frame is recoded, use the intermediate object program that stays before the coded frame during recodification, to accelerate the speed of rearranging;
Use bit number and the quantization parameter of quantization parameter calculating next frame after this N frame is rearranged when c) Rate Control is calculated quantization parameter next time;
4) jumping to step 1) continues to carry out.
2. quick self-adapted bit rate control method as claimed in claim 1 is characterized in that, in the step 1), if first frame, the initial quantization coefficient coding present image that then uses the user to set.
3. quick self-adapted bit rate control method as claimed in claim 1 is characterized in that, in the step 1), if code check less than target bit rate, with regard to the lower quantization coefficient, otherwise just increases quantization parameter; The amplitude that quantization parameter changes is decided by code check difference.
4. quick self-adapted bit rate control method as claimed in claim 1 is characterized in that, the coding intermediate object program described in the step 1) comprises: the information of cutting apart unit in the type of coding of every frame, quantization parameter, each frame.
5. quick self-adapted bit rate control method as claimed in claim 4 is characterized in that, the value of said type of coding is in interframe or the frame; The information of cutting apart unit in each frame comprises type of prediction, motion vector.
6. quick self-adapted bit rate control method as claimed in claim 1 is characterized in that, said threshold value is 150% of a target bit rate.
7. quick self-adapted bit rate control method as claimed in claim 1 is characterized in that, said N=5.
CN2012102378167A 2012-07-09 2012-07-09 Fast adaptive code rate control method Pending CN102752598A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012102378167A CN102752598A (en) 2012-07-09 2012-07-09 Fast adaptive code rate control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012102378167A CN102752598A (en) 2012-07-09 2012-07-09 Fast adaptive code rate control method

Publications (1)

Publication Number Publication Date
CN102752598A true CN102752598A (en) 2012-10-24

Family

ID=47032472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012102378167A Pending CN102752598A (en) 2012-07-09 2012-07-09 Fast adaptive code rate control method

Country Status (1)

Country Link
CN (1) CN102752598A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107087169A (en) * 2017-03-22 2017-08-22 建荣半导体(深圳)有限公司 A kind of compression method, UVC video equipments and electronic equipment
WO2017166487A1 (en) * 2016-03-30 2017-10-05 乐视控股(北京)有限公司 Real-time bitrate modulating method, device, and service terminal
CN107846590A (en) * 2016-09-19 2018-03-27 阿里巴巴集团控股有限公司 The method and video encoder of a kind of Video coding
CN108769737A (en) * 2018-05-29 2018-11-06 中南大学 A kind of code rate adjustment method, server and computer-readable medium
CN109361937A (en) * 2018-09-25 2019-02-19 江苏电力信息技术有限公司 A kind of large-size screen monitors multichannel plug-flow code rate automatic adjusting method
CN113422958A (en) * 2021-05-31 2021-09-21 珠海全志科技股份有限公司 Method, system and medium for controlling size of video coding frame layer code stream

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5831688A (en) * 1994-10-31 1998-11-03 Mitsubishi Denki Kabushiki Kaisha Image coded data re-encoding apparatus
CN1510923A (en) * 2002-12-20 2004-07-07 中国科学院计算技术研究所 Visual model induced MPEG video code string rate inversion method
CN101867811A (en) * 2009-04-16 2010-10-20 索尼公司 Picture coding device and method for encoding images
CN102474659A (en) * 2009-07-16 2012-05-23 株式会社Gnzo Transmitting apparatus, receiving apparatus, transmitting method, receiving method and transport system
CN102547259A (en) * 2010-12-21 2012-07-04 联芯科技有限公司 Rate-control-based video coding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5831688A (en) * 1994-10-31 1998-11-03 Mitsubishi Denki Kabushiki Kaisha Image coded data re-encoding apparatus
CN1510923A (en) * 2002-12-20 2004-07-07 中国科学院计算技术研究所 Visual model induced MPEG video code string rate inversion method
CN101867811A (en) * 2009-04-16 2010-10-20 索尼公司 Picture coding device and method for encoding images
CN102474659A (en) * 2009-07-16 2012-05-23 株式会社Gnzo Transmitting apparatus, receiving apparatus, transmitting method, receiving method and transport system
CN102547259A (en) * 2010-12-21 2012-07-04 联芯科技有限公司 Rate-control-based video coding method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017166487A1 (en) * 2016-03-30 2017-10-05 乐视控股(北京)有限公司 Real-time bitrate modulating method, device, and service terminal
CN107846590A (en) * 2016-09-19 2018-03-27 阿里巴巴集团控股有限公司 The method and video encoder of a kind of Video coding
CN107846590B (en) * 2016-09-19 2020-09-08 阿里巴巴集团控股有限公司 Video coding method and video coder
CN107087169A (en) * 2017-03-22 2017-08-22 建荣半导体(深圳)有限公司 A kind of compression method, UVC video equipments and electronic equipment
CN107087169B (en) * 2017-03-22 2019-11-12 建荣半导体(深圳)有限公司 A kind of compression method, UVC video equipment and electronic equipment
CN108769737A (en) * 2018-05-29 2018-11-06 中南大学 A kind of code rate adjustment method, server and computer-readable medium
CN108769737B (en) * 2018-05-29 2022-07-29 中南大学 Code rate adjusting method, server and computer readable medium
CN109361937A (en) * 2018-09-25 2019-02-19 江苏电力信息技术有限公司 A kind of large-size screen monitors multichannel plug-flow code rate automatic adjusting method
CN113422958A (en) * 2021-05-31 2021-09-21 珠海全志科技股份有限公司 Method, system and medium for controlling size of video coding frame layer code stream

Similar Documents

Publication Publication Date Title
CN101534436B (en) Allocation method of video image macro-block-level self-adaptive code-rates
CN102752598A (en) Fast adaptive code rate control method
CN101547349B (en) Method for controlling code rate of secondary AVS encoding of video signal
CN102630013B (en) Bit rate control video compression method and device on basis of scene switching
CN100562116C (en) A kind of bit rate control method towards multi-view point video
CN106937112B (en) Bit rate control method based on H.264 video compression standard
CN105681793B (en) Based on bit rate control method in the adaptive extremely low delay high-performance video coding frame of complexity of video content
CN104185024A (en) HEVC quantization parameter optimizing method based on total code rate and information entropy model
CN104754335B (en) A kind of code rate controlling method for video coding
CN106303521B (en) A kind of HEVC Rate-distortion optimization method based on sensitivity of awareness
CN101795415A (en) Method and device for controlling code rate in video coding
CN101262603A (en) A new quick efficient self-adapted code rate control method
CN102413323A (en) H.264-based video compression method
CN103533359A (en) H.264 code rate control method
CN105681797A (en) Prediction residual based DVC-HEVC (Distributed Video Coding-High Efficiency Video Coding) video transcoding method
CN103945222A (en) Code rate control model updating method based on HEVC standards
CN103929652A (en) Intra-frame prediction fast mode selecting method based on autoregressive model in video standard
JP6373033B2 (en) Encoding apparatus and encoding method
CN106412611A (en) Complexity control method of efficient video encoding
CN104702959B (en) A kind of intra-frame prediction method and system of Video coding
CN105187832B (en) Based on 2.5G wireless network mobile video bit rate control methods
CN100448295C (en) Integration code rate control method of low complexity
CN103327329A (en) Method and system for quantitative adjustment of image quality jump
JP5111128B2 (en) Encoding apparatus, encoding apparatus control method, and computer program
CN102821280B (en) Rate distortion optimization 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
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121024