Context-Based Adaptive Binary Arithmetic Coding (CABAC)

Context-based adaptive binary arithmetic coding (CABAC) [1] is a flexible and efficient entropy coding concept. It was originally designed for the video compression standard H.264/AVC and is also an integral part of its successor H.265/HEVC. The three core elements of CABAC are depicted in the block diagram below.

The data to be encoded with CABAC is given as a sequence of so-called syntax elements, which may be of various types, depending on the coding application. In H.264/AVC these are for example motion vector differences, transform coefficients, control flags, etc. The binarizer converts each syntax element into a number of binary symbols. Two different types of binary symbols can occur, the so-called bins and the so-called bypass bins. The context modeler associates with each bin one of a number of so-called context models while the bypass bins are assumed to be uniformly distributed. The objective of associating bins with context models is to group bins with similar statistical properties. For each context model independently, the probability estimator derives for the associated bins probability estimates, which are used for the subsequent binary arithmetic encoding. The probability estimator is implemented as a simple finite-state machine, which has as underlying concept the model of exponential aging as described by Howard and Vitter in [2].

The M coder is a fast adaptive binary arithmetic coding scheme [3] that involves a table-based interval subdivision for the encoding of bins as well as a fast bypass coding mode for the encoding of bypass bins. Compared to the MQ coder (as part of JBIG2 or JPEG2000), an increase in throughput of up to 18% can be achieved with the M coder, depending on the implementation platform. At the same time, average bit rate savings of 2-4% are obtained for the M coder relative to the MQ coder in its native H.264/AVC CABAC environment.


  1. D. Marpe, H. Schwarz, and T. Wiegand, Context-based adaptive binary arithmetic coding in the H.264/AVC video compression standard, IEEE Transactions on Circuits and Systems for Video Technology, vol. 13, no. 7, pp. 620–636, July 2003, ISSN: 1051-8215, doi:10.1109/TCSVT.2003.815173, Erratum: On p. 631, left column below Table VI, "max(...)" must be replaced by "min(...)" in the two expressions for specifying context index increments for bins related to absolute values of transform coefficients.
  2. P. G. Howard, Practical implementations of arithmetic coding, Image and Text Compression, Ed. by J. A. Storer, Kluwer Academic Publishers, 1992, pp. 85–112.
  3. D. Marpe and T. Wiegand, A highly efficient multiplication-free binary arithmetic coder and its application in video coding, International Conference on Image Processing (ICIP 2003), Barcelona, Spain, September 2003, doi:10.1109/ICIP.2003.1246667.