AV1 Context Models for Transform Coefficient Coding

This article provides an overview of the context modeling architecture used for transform coefficient coding within the AOMedia Video 1 (AV1) entropy engine. AV1 replaces traditional binary arithmetic coding (such as CABAC) with a symbol-adaptive multi-symbol arithmetic coding engine. To balance coding efficiency and hardware complexity, the codec maintains a carefully restricted set of context models—represented as Cumulative Distribution Functions (CDFs)—to code coefficient magnitudes, signs, and the end-of-block position.

Multi-Symbol Coefficient Representation

Transform coefficient coding in AV1 decomposes the absolute magnitude and sign of each coefficient into several distinct syntax elements:

  1. End-of-Block (EOB): Identifies the position of the last non-zero coefficient in a transform block.
  2. Base Level (coeff_base): Multi-symbol tokens representing whether a coefficient value is 0, 1, 2, or exceeds 2.
  3. Base Level at EOB (coeff_base_eob): Similar to the base level, but constrained because an EOB coefficient cannot be zero.
  4. Bracket/Remainder Levels (coeff_br): Encodes magnitudes from 3 to 14 in increments using multi-symbol alphabets.
  5. Residual Magnitude: Large values beyond 14 are coded using Exp-Golomb codes in bypass mode.
  6. Sign Values: AC coefficient signs are coded without context (equiprobable), while DC sign coding uses neighboring spatial information.

Exact Context Model Allocations

For coefficient magnitudes and signs, the AV1 entropy engine maintains a total of 87 primary context models per plane and transform class:

End-of-Block (EOB) Context Models

Locating the last non-zero transform coefficient requires additional context models:

Context Adaptivity and Memory Footprint

Instead of maintaining separate tables for every permutation of transform block size and plane, AV1 shares these 87 primary coefficient contexts across multiple transform sizes, differentiating primarily between luma and chroma planes and transform types (e.g., DCT vs. ADST).

During frame processing, each context model updates its symbol probabilities dynamically using an exponential adaptation rate without storing large transition tables, keeping the active entropy coder memory footprint substantially smaller than preceding standards.