CN105554503A - HEVC encoding unit level code rate control method - Google Patents

HEVC encoding unit level code rate control method Download PDF

Info

Publication number
CN105554503A
CN105554503A CN201610073339.3A CN201610073339A CN105554503A CN 105554503 A CN105554503 A CN 105554503A CN 201610073339 A CN201610073339 A CN 201610073339A CN 105554503 A CN105554503 A CN 105554503A
Authority
CN
China
Prior art keywords
lcu
subcu
currlcu
rate control
formula
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610073339.3A
Other languages
Chinese (zh)
Other versions
CN105554503B (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.)
Tongji University
Original Assignee
Tongji University
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 Tongji University filed Critical Tongji University
Priority to CN201610073339.3A priority Critical patent/CN105554503B/en
Publication of CN105554503A publication Critical patent/CN105554503A/en
Application granted granted Critical
Publication of CN105554503B publication Critical patent/CN105554503B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides an HEVC encoding unit level code rate control method. An encoding unit SubCU further divided by LCU is used for carrying out level code rate control initialization, bit number allocation, encoding parameter estimation and other processes of P frame and B frame encoding units. At first, former LCU encoding information of the same level frame and at the same position is used for predicating whether the current frame LCU is divided. The LCU predicted to be divided, and an R-D model of the SubCU is used for estimating the complexity and the weight in the encoding unit level code rate control initialization part. In a bit number allocation phase, the state of an encoder and the complexity of the current LCU are respectively considered to calculate a target bit number of the current LCU. In an encoding parameter estimation phase, the R-D model of the SubCU is used for estimating the encoding parameter of the current LCU.

Description

A kind of HEVC coding unit level bit-rate control method
Technical field
The present invention relates to high-performance video coding (HighEfficiencyVideoCoding, HEVC) field, particularly wherein coding unit level bit-rate control method.
Background technology
Rate control algorithm, as a key technology in Video coding application, has important value for practical application.In actual applications, rate control algorithm can according to target bit rate to Video coding, and after making Video coding, actual bit rate is close to target bit rate, improves the quality after coding as much as possible simultaneously.Have employed new coding structure such as coding unit (CodingUnit, CU) and such as the self adaptation sampling point compensation etc. of new technology in HEVC and improve code efficiency.Accordingly, new coding unit level bit-rate control algolithm in HEVC, should be taked, to be adapted to the new coding structure of HEVC and technology, improve the quality after Video coding as far as possible.
The size of the CU that the testing software (HEVCTestModel, HM) of HEVC adopts is 64 × 64,32 × 32,16 × 16 and 8 × 8, and the degree of depth of corresponding CU is 0,1,2,3 respectively.Wherein the degree of depth be 0 CU be designated as LCU (LargestCodingUnit), the degree of depth be 1 CU be designated as SubCU (SubCodingUnit).The encoder of HM adopts the mode of recurrence to divide LCU, and the CU for every one deck will carry out RDO and determine whether being divided into lower one deck.Usually, in order to reduce bit number shared by coding parameter, the target of coding unit level bit-rate control algolithm is general only for LCU, also can be called LCU level bit-rate control algolithm.
Rate control algorithm is divided into three ranks by HEVC existing standard: picture group level, frame level, coding unit level, and have employed a series of coding unit level bit-rate control method: for the LCU in P, B frame, use the relation of R-λ model description bit number and coding parameter.The principle of LCU being carried out to bits allocation is expect that the coding parameter λ of each LCU in frame of video is equal.On this basis, with present frame target bit for constraints, use the R-λ model of each LCU, the bit number that each LCU should get can be solved.Detailed realization can see document 1 (see LiB, LiH, LiL, etal.RatecontrolbyR-lambdamodelforHEVC [C] //JCTVC-K0103, JCTVCofISO/IECandITU-T, 11thmeetingShanghai, China.2012) and document 2 (see LJCTVC-M0036, " AdaptivebitallocationforR-lambdamodelratecontrolinHM, " Incheon, KR, 18 – 26Apr.2013).Compared with standard comparatively early, the method can improve coding quality, but does not consider partition structure and the texture features of LCU, still has the space of improvement.Document 3 is (see JCTVC-M0257, " IntraFrameRateControlBasedonSATD; " Incheon, KR, 18 – 26Apr.2013) propose in I frame, use the texture features of rear absolute length chang (SumofAbsoluteTransformedDifferences, SATD) the description encoding unit of conversion.And use based on the R-λ model description bit number of SATD and the relation of coding parameter.Its SATD value is used to carry out bits allocation as weight to LCU in I frame.The SubCU level bit-rate that the program only considered I frame distributes, and does not design corresponding scheme to P frame and B frame.
Summary of the invention
The object of the present invention is to provide a kind of HEVC coding unit level bit-rate control method.
The present invention need protect technical scheme be:
A kind of HEVC coding unit level bit-rate control method, summarizes and says, at coding unit level bit-rate control algolithm initial phase, in prediction present frame, whether each LCU divides.Whether the LCU according to the same position for previous frame at the same level of prediction divides.If the LCU actual division of the same position of previous frame at the same level, namely predict that this LCU also can divide.Otherwise, as the same.
A kind of HEVC coding unit level bit-rate control method, is characterized in that, specifically comprise the steps:
1) encode before present frame, carry out frame level bit-rate control algorithm, target bit, QP and λ of prediction present frame.Enter coding unit level bit-rate control algolithm initialization section.
2) predict in present frame, whether each LCU divides.If prediction does not divide, calculate weight according to formula (1); Otherwise, calculate weight according to formula (2) (3).
3) InitBits of each LCU is calculated according to formula (4) currLCU.
4) encoding before current LCU, is current LCU distribution target bit according to formula (5) (6).
5) if prediction does not divide, according to formula (7) calculation code parameter lambda currLCU; Otherwise, according to formula (8) (9) (10) calculation code parameter lambda currLCU.
6) QP of current LCU is obtained according to formula (11) currLCU.
7) according to λ currLCUand QP currLCUmodel selection Equal-coding pass is carried out to current LCU.After current LCU end-of-encode, whether be divided into SubCU layer according under actual coding outcome record.If be divided into SubCU layer, according to the actual coding parameter of each SubCU and the R-λ model of result renewal SubCU.Upgrade the R-λ model of LCU.Enter next LCU.
Owing to adopting such scheme, the invention has the beneficial effects as follows:
1. the present invention is according to the partition structure of LCU, relation between the distortion of the LCU using the R-λ model description of SubCU to divide and coding parameter, and propose the method calculating LCU complexity, calculation code parameter according to the R-λ model of SubCU, improve the objective quality after coding.
2. the present invention considers the complexity of encoder current state and LCU, devises the method into current LCU allocation bit number, can be LCU allocation bit number more accurately, improves the objective quality after coding.
Embodiment
Explain below by way of some embodiments, set forth and support the technical scheme that will protect required for the present invention.
Embodiment 1
Theoretical foundation and checking
First, in existing HEVC standard, for P frame and B frame, each LCU sets up, uses and upgrades its R-λ model according to position.But in the ordinary course of things, the content change of LCU inside is very large, and texture features is different, and the bit number that under same coding parameter, different sub-CU obtains has very big difference, so final HEVC encodes, LCU can be divided into multiple little CU by it, carries out the process such as motion compensation, quantization encoding respectively.Now only with a R-λ model, its encoding characteristics is described to single LCU, the feature that LCU inner vein different from those is very large can not be characterized, the partition structure to LCU in actual coding process can not be characterized.But LCU can not form again the statistical property of similar frame level, so describe its encoding characteristics to single LCU with a R-λ model not meet actual conditions.Secondly, for the method for current LCU allocation bit number is desirably in the error making up in frame of video within several LCU and predict bit number and actual bit number in existing standard, easily cause its target bit excessive or too small.
Devise the coding unit level bit-rate control algolithm based on SubCU herein for this reason.
At coding unit level bit-rate control algolithm initial phase, in prediction present frame, whether each LCU divides.Whether the LCU according to the same position for previous frame at the same level of prediction divides.If the LCU actual division of the same position of previous frame at the same level, namely predict that this LCU also can divide.Otherwise, as the same.Table 1 for the method regular coding QP in BQMall sequence be accuracy rate in 32 situations.Test platform is HEVC reference software HM14.0, and test configurations is RandomAccessMain.
Table 1.LCU divides Forecasting Methodology accuracy rate
Frame level Accuracy rate
Framelevel=1 89.16%
Framelevel=2 85.58%
Framelevel=3 87.63%
Framelevel=4 89.40%
Mean value 88.53%
As seen in table 1, this LCU divides prediction side and has higher accuracy.Because the method is simply effective, the present invention uses the method to divide Forecasting Methodology as LCU.
At coding unit level bit-rate control algolithm initial phase, for predicting the LCU do not divided, the R-λ model of LCU is used to estimate that its complexity is as weights W eight currLCU:
Weigth c u r r L C U = 1 α c u r r L C U × λ c u r r P i c 1 β c u r r L C U × numberOfPixels c u r r L C U - - - ( 1 )
Wherein λ currPicfor the coding parameter of the present frame that frame level bit-rate control algorithm provides.NumberOfPixels currLCUfor the number of pixels of current LCU.α currLCU, β currLCUfor the parameter of the R-λ model of current LCU.For the LCU divided, the R-λ model of its SubCU is used to estimate that its complexity is as weights W eight currLCU:
Weight c u r r L C U = Σ i = 0 n u m b e r O f S u b C U InitBits SubCU i - - - ( 2 )
InitBits SubCU i = 1 α SubCU i × λ c u r r P i c 1 β SubCU i × numberOfPixels SubCU i - - - ( 3 )
Wherein, for the bits of original number of each SubCU in LCU, representing in λ value is λ currPicin situation, the bit number needed for each SubCU. it is the parameter of the R-λ model of i-th SubCU. it is the number of pixels of i-th SubCU.NumberOfSubCU is that in current LCU, number of pixels is not the number of the SubCU of 0.
After the weight calculation of all LCU is complete, according to the bits of original number InitBits of the target bit of present frame with the weight calculation LCU of each LCU currLCU:
InitBits c u r r L C U = T c u r r P i c Σ i = 0 n u m b e r O f L C U Weight i × Weight c u r r L C U - - - ( 4 )
After calculating completes, start the actual coding work of present frame.Before the current LCU of coding, the coding situation weighing present encoding result and prediction is also needed to be that current LCU distributes a suitable target bit TargetBits currLCU, method is as follows:
TargetBits currLCU=a×InitBits currLCU+(1-a)×LeftBits currLCU(5)
LeftBits c u r r L C U = BitsLeft c u r r P i c Σ i = c u r r L C U n u m b e r O f L C U Weight i × Weight c u r r L C U - - - ( 6 )
Wherein a is weighted value.In order to determine InitBits currLCUand LeftBits currLCUweight, invention has been following experiment: respectively different value is got to a, the coding result that test is actual.Cycle tests have chosen RaceHorses, BQSquare, BQMall, ParkScene.Test benchmark is the original rate control algorithm of HEVC reference software HM14.0, and test configurations is RandomAccessMain.Testing algorithm is method of the present invention, and table intermediate value is the mean value of all cycle tests BD-rate values.
Table 2.a value and encoding efficiency relation
Sequence a 0 0.2 0.4 0.5 0.6 0.8 1
BQSquare -0.68% -0.68% -0.52% 0.13% -0.17% -0.17% -1.23%
RaceHorses -0.48% -0.52% -0.73% -0.69% -0.63% -0.81% -1.07%
BQMall -1.09% -1.10% -1.23% -0.96% -1.33% -1.34% -0.77%
ParkScene -0.62% -1.16% -0.93% -0.75% -0.87% -0.66% -0.29%
Mean value -0.72% -0.87% -0.85% -0.57% -0.68% -0.75% -0.84%
Experimentally result a gets 0.2, to obtain average encoding efficiency preferably.
In coding parameter estimation stages, according to the coding parameter that target bit calculating LCU should use.For predicting the LCU do not divided, the R-λ model of LCU is used to estimate its coding parameter:
λ c u r r L C U = α c u r r L C U × ( TargetBits c u r r L C U numberOfPixels c u r r L C U ) × β c u r r L C U - - - ( 7 )
For the LCU that prediction divides, the R-λ model of its SubCU is used to estimate its coding parameter:
TargetBits SubCU i = TargetBits c u r r L C U InitBits c u r r L C U × InitBits SubCU i - - - ( 8 )
λ SubCU i = α SubCU i × ( TargetBits SubCU i numberOfPixels SubCU i ) × β SubCU i - - - ( 9 )
λ c u r r L C U = Π i = 0 n u m b e r O f S u b c C U λ SubCU i 1 n u m b e r O f S u b c C U - - - ( 10 )
Final coding parameter QP calculates according to following formula:
QP=4.2005×lnλ+13.7122(11)
In order to ensure the level and smooth of encoding efficiency, λ currLCU, QP currLCUits span can be limited according to the state of the encoded part of encoder.Last according to λ currLCU, QP currLCUcurrent LCU is carried out to the codings such as model selection.After current LCU end-of-encode, need to upgrade R-D model according to actual coding result, and record current LCU and whether be divided into SubCU layer.If current LCU is divided into SubCU layer really, according to the actual coding parameter of each SubCU and the R-λ model of result renewal SubCU.No matter whether divide, the R-λ model of current LCU all should be upgraded.Then the coding of next LCU is carried out.
Based on above analysis, propose HEVC coding unit level bit-rate control method herein, method text description is as follows:
1) encode before present frame, carry out frame level bit-rate control algorithm, target bit, QP and λ of prediction present frame.Enter coding unit level bit-rate control algolithm initialization section.
2) predict in present frame, whether each LCU divides.If prediction does not divide, calculate weight according to formula (1); Otherwise, calculate weight according to formula (2) (3).
3) InitBits of each LCU is calculated according to formula (4) currLCU.
4) encoding before current LCU, is current LCU distribution target bit according to formula (5) (6).
5) if prediction does not divide, according to formula (7) calculation code parameter lambda currLCU; Otherwise, according to formula (8) (9) (10) calculation code parameter lambda currLCU.
6) QP of current LCU is obtained according to formula (11) currLCU.
7) according to λ currLCUand QP currLCUmodel selection Equal-coding pass is carried out to current LCU.After current LCU end-of-encode, whether be divided into SubCU layer according under actual coding outcome record.If be divided into SubCU layer, according to the actual coding parameter of each SubCU and the R-λ model of result renewal SubCU.Upgrade the R-λ model of LCU.Enter next LCU.
Table 3 is the contrast of the coding result (Pro) after the coding unit level bit-rate control algolithm that open existing coding unit level bit-rate control algolithm in HEVC reference software HM14.0 after, coding result (Orig) and unlatching the present invention propose, wherein BD_rate yrepresent the coding result of Y-component, BD_rate urepresent the coding result of U component, BD_rate vrepresent the coding result of V component, BD_rate is the comprehensive of three:
BD_rate=(4×BD_rate Y+BD_rate U+BD_rate V)/6(12)
Wherein, the reference data that all BD_rate calculate is that HM14.0 only opens existing frame level bit-rate control, and does not open the coding result of any coding unit level bit-rate control.Can see from table, compare with the existing frame level bit-rate control coding result of HEVC, the coding quality of HEVC existing coding unit level bit-rate control algolithm on average has the loss of 0.07%BD-rate, and institute of the present invention extracting method on average has the coding quality of 1.12%BD-rate to promote.
Table 3. the inventive method (Pro) and the experimental result of the existing LCU code rate allocation method (Orig) of HEVC under RandomAccessMain configuration condition contrast
Embodiment 2
Below in conjunction with attached reproduction technical solution of the present invention embodiment illustrated in fig. 1.
As shown in Figure 1, an embodiment of the present invention comprises the following steps:
Step 1: initialization before coding.For each SubCU and LCU sets up R-λ model, in P, B frame, R-λ model parameter α, β initial value are set to 3.2003 ,-1.367 respectively.
Step 2: before coding present frame, carry out frame level bit-rate control algorithm, target bit, QP and λ of prediction present frame.Enter coding unit level bit-rate control algolithm initialization section.
Step 3: in prediction present frame, whether each LCU divides.If prediction does not divide, calculate weight according to formula (1); Otherwise, calculate weight according to formula (2) (3).
Step 4: the InitBits calculating each LCU according to formula (4) currLCU.
Step 5: start present frame of encoding.
Step 6: before the current LCU that encodes, according to formula (5) (6) for current LCU distributes target bit.
Step 7: if prediction does not divide, according to formula (7) calculation code parameter lambda currLCU; Otherwise, according to formula (8) (9) (10) calculation code parameter lambda currLCU.
Step 8: the QP obtaining current LCU according to formula (11) currLCU.
Step 9: according to λ currLCUand QP currLCUmodel selection Equal-coding pass is carried out to current LCU.After current LCU end-of-encode, whether be divided into SubCU layer according under actual coding outcome record.If be divided into SubCU layer, according to the actual coding parameter of each SubCU and the R-λ model of result renewal SubCU.Upgrade the R-λ model of LCU.Enter next LCU.

Claims (1)

1. a HEVC coding unit level bit-rate control method, is characterized in that, specifically comprise the steps:
1) encode before present frame, carry out frame level bit-rate control algorithm, target bit, QP and λ of prediction present frame; Enter coding unit level bit-rate control algolithm initialization section;
2) predict in present frame, whether each LCU divides; If prediction does not divide, calculate weight according to formula (1); Otherwise, calculate weight according to formula (2) (3);
3) InitBits of each LCU is calculated according to formula (4) currLCU;
4) encoding before current LCU, is current LCU distribution target bit according to formula (5) (6);
5) if prediction does not divide, according to formula (7) calculation code parameter lambda currLCU; Otherwise, according to formula (8) (9) (10) calculation code parameter lambda currLCU;
6) QP of current LCU is obtained according to formula (11) currLCU;
7) according to λ currLCUand QP currLCUmodel selection Equal-coding pass is carried out to current LCU; After current LCU end-of-encode, whether be divided into SubCU layer according under actual coding outcome record; If be divided into SubCU layer, according to the actual coding parameter of each SubCU and the R-λ model of result renewal SubCU; Upgrade the R-λ model of LCU; Enter next LCU.
CN201610073339.3A 2016-02-02 2016-02-02 A kind of HEVC coding unit level bit rate control method Expired - Fee Related CN105554503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610073339.3A CN105554503B (en) 2016-02-02 2016-02-02 A kind of HEVC coding unit level bit rate control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610073339.3A CN105554503B (en) 2016-02-02 2016-02-02 A kind of HEVC coding unit level bit rate control method

Publications (2)

Publication Number Publication Date
CN105554503A true CN105554503A (en) 2016-05-04
CN105554503B CN105554503B (en) 2018-12-18

Family

ID=55833410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610073339.3A Expired - Fee Related CN105554503B (en) 2016-02-02 2016-02-02 A kind of HEVC coding unit level bit rate control method

Country Status (1)

Country Link
CN (1) CN105554503B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438479A (en) * 2021-06-13 2021-09-24 北方工业大学 Code rate control based on CTU information entropy

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6215820B1 (en) * 1998-10-12 2001-04-10 Stmicroelectronics S.R.L. Constant bit-rate control in a video coder by way of pre-analysis of a slice of the pictures
CN102271248A (en) * 2011-08-15 2011-12-07 复旦大学 H.264/AVC (Advanced Video Coding) macroblock-level code rate control algorithm based on weight window models
CN103281530A (en) * 2013-05-07 2013-09-04 西安电子科技大学 HEVC (High Efficiency Video Coding) rate control method based on rate distortion optimization
CN103561266A (en) * 2013-11-06 2014-02-05 北京牡丹电子集团有限责任公司数字电视技术中心 Rate control method based on logarithm R-Q model and hierarchical bit allocation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6215820B1 (en) * 1998-10-12 2001-04-10 Stmicroelectronics S.R.L. Constant bit-rate control in a video coder by way of pre-analysis of a slice of the pictures
CN102271248A (en) * 2011-08-15 2011-12-07 复旦大学 H.264/AVC (Advanced Video Coding) macroblock-level code rate control algorithm based on weight window models
CN103281530A (en) * 2013-05-07 2013-09-04 西安电子科技大学 HEVC (High Efficiency Video Coding) rate control method based on rate distortion optimization
CN103561266A (en) * 2013-11-06 2014-02-05 北京牡丹电子集团有限责任公司数字电视技术中心 Rate control method based on logarithm R-Q model and hierarchical bit allocation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438479A (en) * 2021-06-13 2021-09-24 北方工业大学 Code rate control based on CTU information entropy
CN113438479B (en) * 2021-06-13 2022-09-20 北方工业大学 Code rate control based on CTU information entropy

Also Published As

Publication number Publication date
CN105554503B (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN102939753B (en) For the method and apparatus by video being decoded according to pixel groups compensated pixel value
CN102792695B (en) By the method and apparatus using big converter unit image to be encoded and decodes
CN101971631B (en) Adaptive intra mode selection
CN103220528B (en) Method and apparatus by using large-scale converter unit coding and decoding image
CN101466040B (en) Code rate estimation method for video encoding mode decision
CN105357540A (en) Method and apparatus for decoding video
CN111641832A (en) Encoding method, decoding method, device, electronic device and storage medium
CN103731668A (en) Image encoding apparatus and image encoding method
CN111711815B (en) Fast VVC intra-frame prediction method based on integrated learning and probability model
CN103501438A (en) Content self-adaptation image compression method based on PCA
CN111163314A (en) Image compression method and system
CN108322749B (en) RDOQ coefficient optimization method, RDOQ acceleration method and device
CN114173120A (en) Video coding block division method and video coding block division prediction model training method
CN115941943A (en) HEVC video coding method
CN108390871B (en) Radar data compression method based on autoregressive model frame prediction
CN110677644B (en) Video coding and decoding method and video coding intra-frame predictor
CN109688411B (en) Video coding rate distortion cost estimation method and device
CN105554503A (en) HEVC encoding unit level code rate control method
CN102282770A (en) Parameter selection method, parameter selection apparatus, program, and recording medium
CN101513072B (en) Method and apparatus for analytical and empirical hybrid encoding distortion modeling
CN105791863B (en) 3D-HEVC depth map intra-frame predictive encoding method based on layer
CN111163320A (en) Video compression method and system
CN111161363A (en) Image coding model training method and device
CN114143536B (en) Video coding method of SHVC (scalable video coding) spatial scalable frame
CN105208382A (en) Sampling point self-adaptation compensation mode judging method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181218

Termination date: 20220202

CF01 Termination of patent right due to non-payment of annual fee