cabac based bit estimation for fast h.264 rd optimization decision
DESCRIPTION
CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision. Li Liu Xinhua Zhuang CCNC 2009. Outline. Introduction Based on CAVLC - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/1.jpg)
1
CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision
Li Liu Xinhua Zhuang
CCNC 2009
![Page 2: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/2.jpg)
2
Outline
Introduction Based on CAVLC
[1] Mohammed Golam Sarwer and Lai-Man Po, “Fast Bit Rate Estimation for Mode Decision of H.264/AVC,” Circuits and Systems for Video Technology, IEEE Transactions on,Vol.17, no. 10, pp 1402-1407, Nov. 2007.
Based on CABAC Experimental Results Related paper
![Page 3: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/3.jpg)
3
Introduction
Rate distortion optimization(RDO) is used to decide the best coding mode of a macroblock in H.264/AVC. Efficient to improve coding performance. Considerable complexity increase of the encoder.
Lagrange cost function:
Fast bit estimation is adopted to avoid entropy coding computation during the mode decision.
)( RRRSSDJ resmotionheadermRD
![Page 4: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/4.jpg)
4
Introduction
DCT & Q Entropy coding
DCT’& Q’
RD cost calculation
Residue data
Rate Distortion
RDO computation
)( RRRSSDJ resmotionheadermRD
![Page 5: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/5.jpg)
5
Based on CAVLC
Estimate the number of bits for each of five different types of symbols of CAVLC separately.
CAVLC encoding of a block of transform coefficients proceeds as follow: Encode the number of coefficients and trailing
ones. Encode the sigh of each TrailingOne. Encode the levels of the remaining nonzero
coefficients. Encode the total number of zeros before the last
coefficient. Encode each run of zeros.
![Page 6: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/6.jpg)
4x4 Block
Reordered Block: 0,3,0,1,-1,-1,0,1,0,0,0,0,0,0,0,0 TotalCoeff = 5; TotalZeros=3; T1s =3 (max value)
Encoding
12
3
45
Transmitted bitstream 000010001110010111101101 (24 bits)
CAVLC exampleStep1: Encode the number of coefficients and trailing ones.Step2: Encode the sigh of each TrailingOne.Step3: Encode the levels of the remaining nonzero coefficients.Step4: Encode the total number of zeros before the last coefficient.Step5: Encode each run of zeros.
![Page 7: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/7.jpg)
7
Based on CAVLC
Encode the number of coefficients and trailing ones. Four VLC tables are used for encoding coefficient
token. Bit consumption to encode the coefficient token is
increased with number of coefficients.
Bit consumption to encode the coefficient token is decreased with number of trailing .
x-axis: number of nonzero coefficientsy-axis: true rate of Coeff_token
1
![Page 8: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/8.jpg)
8
Based on CAVLC
The number of bits required to encode the coefficient token is :
is the total number of nonzero coefficients. is the number of trailing . are weighting constants. Experiments show that at and
better RD performance was found.
wTwTwR occoeff 321
1
T c
T o
www 321,,
121 ww 03 w
TTR occoeff
![Page 9: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/9.jpg)
9
Encode the sigh of each TrailingOne
For each , a single bit encodes the sigh(0+, 1-).
The number of bits to encode the trailing ones is :
T o
TR otrail 1
![Page 10: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/10.jpg)
Encode the levels of the remaining nonzero coefficients From the observation of level-VLC tables, it is shown
that bit requirement is increased with magnitude of nonzero coefficients.
The number of bits to encode the level information is :
is the absolute values of all levels of quantized transform residual block.
is the sum of absolute values of all levels of quantized transform residual block.
is a positive constant. Better results were found with .
10SATwR llevel 4
TC
kkl LSAT
1
||
||Lk
SAT l
w4
14w
x-axis: SATy-axis: true rate of level
SATR llevel
![Page 11: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/11.jpg)
11
Encode the total number of zeros before the last coefficient.
From the observation of total zero VLC tables, it is shown that bit consumption to encode the total zero is increased with number of total zero.
The number of bits for total zero is :
is a positive constant. is the total number of zeros before the last
nonzero coefficients. Better results were found with .
TwR zzero 5
w5
T z
15w
TR zzero
![Page 12: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/12.jpg)
12
Encode each run of zeros
After DCT, the high-frequency coefficient usually has small energy. By quantization, more zeros are found at the high-frequency position of quantized transform block, so the value of run for high-frequency nonzero coefficients is larger.
From the observation of run VLC tables, it is shown that more bits are required for large value of run, so bit consumption is higher to encode the run of high-frequency nonzero coefficient.
4x4 Block
Reordered Block: 0,3,0,1,-1,-1,0,1,0,0,0,0,0,0,0,0
![Page 13: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/13.jpg)
13
Encode each run of zeros
The rate for run of each nonzero coefficients is :
is the frequency of th nonzero coefficient reordered block.
Example: A string of coefficients [0,3,0,1,-1,-1,-
1,0,1,0,0…] frequency of (3) is 1 frequency of (1) is 7 Better results were found with .
150,run 6R(k)
kfw k
fk k
3.06w
150,3.0runR(k)
kfk
![Page 14: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/14.jpg)
14
Total estimated bits
From previous analysis, the total estimated bits needed to encode a 4x4 residual block are:
T
runestc
kres kzeroleveltrailcoeff RRRRRR
11
)()(
T
estc
res kklzc fSATTTR
1
3.0)(
x-axis: Estimation error of a symbol is the absolute difference between actual bit rate and estimated bit rate of that symbol.
Perfectly match
Most of estimation error
![Page 15: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/15.jpg)
15
Experimental Results
JM 8.3 CAVLC is enabled Frame rate is 30 Motion vector search range is 32 Number of frame is 100 Percentage of difference coding time
![Page 16: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/16.jpg)
16
Experimental Results
All frames are I frames Foreman sequence
[9] C. H. Tseng, H. M.Wang, and J. F. Yang, “Enhanced intra 4x4 mode decision for H.264/AVC coders,” IEEE Trans. Circuits Syst. Video Technol., vol. 16, no. 8, pp. 1027–1032, Aug. 2006.
![Page 17: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/17.jpg)
17
Experimental Results All frames are I frames: 47% time reduction IPP + fast motion estimation algorithm[15]
34% time reduction IBPBP + fast motion estimation algorithm[15]
32% time reduction
[15] Z. Chen, P. Zhou, and Y. He, “Fast integer pel and fractional pel motionestimation for JVT,” Joint Video Team (JVT) Docs, JVT-F017, Dec. 2002.
![Page 18: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/18.jpg)
18
Experimental Results
All I frames
IPP
IBPBP
![Page 19: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/19.jpg)
19
Experimental Results
Experiments with full search motion estimation IPP + number of frames is set to 50
17% time reduction
![Page 20: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/20.jpg)
20
Experimental Results
Comparison with other method[9] Only intra 4x4 modes are used
[9] C. H. Tseng, H. M.Wang, and J. F. Yang, “Enhanced intra 4x4 mode decision for H.264/AVC coders,” IEEE Trans. Circuits Syst. Video Technol., vol. 16, no. 8, pp. 1027–1032, Aug. 2006.
![Page 21: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/21.jpg)
21
Based on CABAC
The CABAC encoding process of a symbol consists of three elementary steps: Binarization Context modeling Binary arithmetic coding
![Page 22: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/22.jpg)
22
Flow diagram of the CABAC
![Page 23: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/23.jpg)
23
Coding of residual data with CABAC
For each block: coded_block_flag
0: The coded block flag is insignificant, no further information is transmitted.
1: a significance map specifying the positions of significant. The absolute value of the coefficient level as well as the sign is encoded for each significant transform coefficient.
Number of bits: 1 bit for each block.
![Page 24: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/24.jpg)
24
Coding of residual data with CABAC For each coefficient: significant_coeff_flag
1: current scanning position contains a significant coefficient.(nonzero)
0: current scanning position contains a insignificant coefficient.(zero)
last_significant_flag 1: current significant coefficient is the last one inside the
block. 0: current significant coefficient is not the last one inside
the block. Number of bits:
is the total number of zero coefficients before the last
nonzero coefficient. is the total number of nonzero coefficients. and are weighted coefficients.
NCNCR ssmzztMapSignifican
N s
C z C sm
N z
![Page 25: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/25.jpg)
25
Coding of residual data with CABAC
For each significant coefficient: coeff_abs_level_minus1
The absolute value of the significant coefficient level minus one.
coeff_sign_flag The sigh of the significant coefficient level. Number of bits:
NCR ssisign
![Page 26: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/26.jpg)
26Coding of residual data with CABAC
Estimate total number of bits to encode all symbol coeff_abs_level_minus1
is the absolute value of the i-th nonzero coefficient.
is estimated number of bits to encode .
stands for average number of bits encoding absolute level value k calculated from previous frames.
Total number of bits:
coefftotal
iilevelabscoeff LR Est
_
1__ )(
Li
)(LiEst
Li
otherwiseTkif
kavgk
kEst
)(
)(
)(kavg
otherwiseQP
T15
85
RNCR levelabscoeffssilevel __
![Page 27: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/27.jpg)
27
Coding of residual data with CABAC
The total number of bits estimated to code a coefficient block using CABAC entropy coding as:
where 1__ RNCNCR levelabscoeffsszzestimate
15.2__
RNNR levelabscoeffszestimate
CCC smsis
![Page 28: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/28.jpg)
28
Experimental Results
JM 10.1 Saving ratio of total encoding time
![Page 29: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/29.jpg)
29
Experimental Results
![Page 30: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/30.jpg)
30
Experimental Results
30% RDO time saving 0.02 dB less 0.22% bit rate reducing
![Page 31: CABAC Based Bit Estimation for Fast H.264 RD Optimization Decision](https://reader036.vdocument.in/reader036/viewer/2022062521/56816663550346895dd9f3be/html5/thumbnails/31.jpg)
31
Related paper
Jongmin Hahm and Chong-Min Kyung, “Efficient CABAC Rate Estimation for H.264/AVC Mode Decision, IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 20, NO. 2, FEBRUARY 2010 Arithmetic coding is replaced by a table lookup .