Context-based adaptive binary arithmetic coding (CABAC) is a powerful and widely used technique for entropy coding in video coding standards, such as H.264/AVC and High Efficiency Video Coding (HEVC). It provides highly efficient compression by exploiting the statistical dependencies between neighboring symbols in the bitstream.
CABAC operates by encoding binary symbols using adaptive models that are updated based on the context of the symbols being encoded. The context refers to the surrounding symbols in the bitstream that provide information about the probability of the current symbol being a 0 or a 1. By taking advantage of these dependencies, CABAC achieves higher compression efficiency compared to traditional entropy coding techniques, such as Huffman coding.
The key idea behind CABAC is to divide the bitstream into small segments called bins. Each bin represents a single binary symbol to be encoded. The encoder maintains a set of context models, one for each bin, which are used to estimate the probability of the current symbol being a 0 or a 1. These context models are adaptive and are updated based on the observed symbols in the previous bins.
To encode a symbol, the encoder selects the appropriate context model based on the context of the symbol. The context is determined by the neighboring symbols in the bitstream, which are used to look up the corresponding context model. The encoder then uses the selected context model to estimate the probability of the current symbol being a 0 or a 1.
The estimated probability is then converted into a cumulative distribution function (CDF) using a process called binarization. The CDF represents the probability of the current symbol being less than or equal to each possible value. The encoder then performs arithmetic coding based on the CDF to encode the symbol. Arithmetic coding assigns shorter codewords to symbols with higher probabilities, resulting in more efficient compression.
After encoding a symbol, the encoder updates the corresponding context model based on the actual value of the encoded symbol. This update process ensures that the context models adapt to the statistics of the symbols in the bitstream. The update is performed using a technique called the probability estimation update (PEU), which adjusts the probabilities of the context models based on the observed symbols.
On the decoder side, the process is reversed. The decoder uses the same context models as the encoder to estimate the probabilities of the symbols. It then performs arithmetic decoding based on the CDF to decode the symbols back to their original values. The decoder also updates the context models based on the decoded symbols to ensure consistency with the encoder.
CABAC provides several advantages over other entropy coding techniques. Firstly, it achieves higher compression efficiency by exploiting the statistical dependencies between neighboring symbols. The adaptive nature of the context models allows for accurate estimation of the probabilities, resulting in more efficient encoding. Secondly, CABAC is highly scalable and can adapt to different coding scenarios. The context models can be tailored to specific coding parameters, such as …
Read More