Presentation is loading. Please wait.

Presentation is loading. Please wait.

Context-Based Adaptive Binary Arithmetic Coding in the H.264/AVC Video Compression Standard Detlev Marpe, Heiko Schwarz, and Thomas Wiegand IEEE Transactions.

Similar presentations


Presentation on theme: "Context-Based Adaptive Binary Arithmetic Coding in the H.264/AVC Video Compression Standard Detlev Marpe, Heiko Schwarz, and Thomas Wiegand IEEE Transactions."— Presentation transcript:

1 Context-Based Adaptive Binary Arithmetic Coding in the H.264/AVC Video Compression Standard Detlev Marpe, Heiko Schwarz, and Thomas Wiegand IEEE Transactions on Circuits and Systems for Video Technology, JULY 2003

2 Outline  Introduction  The CABAC Framework Binarization Context Modeling Binary Arithmetic Coding  Example of detailed CABAC

3 Introduction (1)  CAVLC Baseline profile  CABAC Main profile  Compared to CAVLC, CABAC typically provides a reduction in bit rate between 5%~15%.

4 Introduction (2)  Binarization  Context modeling  Binary arithmetic coding Binarization Context modeling Binary arithmetic coding entropy_coding_mode = 1

5 Binarization  Alphabet reduction Reduce a nonbinary syntax to a unique intermediate binary codeword. similar to converting a data symbol into a variable length code but the binary code is further encoded prior to transmission. Nothing is lost in terms of modeling.  P( “ 3 ” ) = P (C0) ( “ 0 ” )  P (C1) ( “ 0 ” )  P (C2) ( “ 1 ” ) 0 0 0 011 1 1 C0 C1 C2C3 “0”“0”“3”“3”“2”“2”“1”“1” “ 5 ” - “ 30 ”

6 Binarization (2)  No multiplications needed Adaptive m-ary arithmetic coding requires at least two multiplications for each symbol.  Enable context modeling on a subsymbol level. Conditional probabilities can be used for the most frequently observed bins, whereas others use zero-order probability model.

7 Binarization – four basic schemes (1)  Unary code (U) x = 4  11110  Truncated unary code (TU) x = 4, S = 5  11110 x = 5, S = 5  111110  kth order Exp-Golomb code (EGk) while (1) { if ( x >= (1<<k) ) { put ( 1 ) x = x – (1<<k) k++ } else { put ( 0 ) while ( k-- ) put ( (x>>k) & 0x01 ) break } prefix part termination of prefix part suffix part

8 Binarization – four basic schemes (2)  Fixed-length code (FL) S = 7  log 2 7 = 3 Is applied to uniform distribution

9 Binarization – concatenation of basic schemes (1)  Coded_block_pattern Which blocks contain nonzero transform coefficients in a MB Prefix: 4-bit FL for luminance Suffix: TU with S = 2 for chrominance  Motion vector difference Prefix: TU with S = 9 for |mvd| < 9 Suffix: EG3 for |mvd - 9| if |mvd|  9 Sign bit

10 Binarization – concatenation of basic schemes (2)  Transform coefficient level Prefix: TU with S = 14 for |mvd| Suffix: EG0 for |mvd - 14| if |mvd|  14

11 Context Modeling (1)  A "context model" is a probability model for one or more bins of the binarized symbol.  This model may be chosen from a selection of available models depending on the statistics of recently-coded data symbols.  The context model stores the probability of each bin being "1" or "0".

12 Context Modeling (2)  Four basic design types Two neighboring syntax elements in the past of the current syntax element The prior coded bins (b 0, b 1, … b i-1 )  mb_type and sub_mb_type The position in the scanning path  Significant map The accumulated number of encoded levels  Coefficient levels Residual data only B CA 0 0 0 011 1 1 C0 C1 C2C3 “0”“0”“3”“3”“2”“2”“1”“1” “ 5 ” - “ 30 ” mb_type (P/SP slices)

13 Context Modeling - Context index γ(1)  The entity of probability models can be arranged in a linear fashion such that each model can be identified by a so-called context index γ.  According to each context index γ, the probability model is determined by ( α γ, β γ ) for 0≤ γ ≤398.  6 bits for α γ and 1 bit for β γ.  α γ is the probability state index and the (binary) β γ represents the most probable symbol (MPS). 64 representative probability values

14 Context Modeling - Context index γ(2)  0 to 72 are related to syntax elements of macroblock, sub-macroblock, prediction modes of special and temporal as well as slice-based and macroblock-based control information. γ=Γ S +χ S..  Γ S denotes the context index offset, the lower value of the range.  χ S denotes the context index increment of a given syntax element S.  73 to 398 are related to the coding of residual data. Significant_coeff_flag and last_significant_coeff_flag are conditioned on the scanning position. Coded_block_pattern: γ=Γ S +χ S.. Others: γ=Γ S +Δ S (ctx_cat)+χ S. Here the context category (ctx_cat) dependent offset Δ S is employed.

15 Context Modeling - Context index γ(3)  Values of Δ S depending on context category and syntax element

16 Binary arithmetic coding  An arithmetic coder encodes each bin according to the selected probability model.  Binary arithmetic is based on the principal of recursive interval subdivision.  Another distinct feature in H.264/AVC is its simplicity bypass coding mode (assumed to be uniformly distributed). 1/4 3/4 2/3 1/3 5/6 1/6 1/2

17 Example of detailed CABAC – motion vector difference (1)  Binarization  Prefix: TU (|mvd x |< 9)  Suffix: EG3 (|mvd x |  9)  |mvd x | = 10  prefix 8 use TU and suffix 2 use EG3  Context model One of 3 model is selected for bin 1, based on previous coded MVD values.  e=|mvd A |+|mvd B |

18 Example of detailed CABAC – motion vector difference (2) The remaining bins are coded using one of 4 further context models: eContext model for bin 1 ( χ S ) 0 <= e < 3Model 0 3 <= e < 32Model 1 32 <= eModel 2 BinContext mode 10, 1, or 2 (depend on e k ) 23 34 45 56 6 and higher7

19 Example of detailed CABAC – mb_type and sub_mb_type (2)  Binarization  Context model C0 … C3 C ’ 0 … C ’ 2

20 Experimental result  In our experiments, we compare the coding efficiency of CABAC to the coding efficiency of the baseline entropy coding method of H.264/AVC. The baseline entropy coding method uses the zero-order Exp- Golomb code for all syntax elements with the exception of the residual data, which are coded using the coding method of CAVLC.  Bit-rate savings of 9% to 14% are achieved, where higher gains are obtained at lower rates.

21


Download ppt "Context-Based Adaptive Binary Arithmetic Coding in the H.264/AVC Video Compression Standard Detlev Marpe, Heiko Schwarz, and Thomas Wiegand IEEE Transactions."

Similar presentations


Ads by Google