AV1 Multi-Frame Entropy Probability Backward Update
This article explains the operation of backward entropy probability updates across multi-frame contexts in the AV1 video codec. In AV1, entropy coding relies on Cumulative Distribution Functions (CDFs) that adapt dynamically to the statistics of syntax elements. While intra-frame adaptation updates these probabilities symbol-by-symbol in the forward direction, multi-frame context mechanisms allow the accumulated probability states from previously decoded frames to be stored, updated, and propagated backward into reference buffers to initialize future frames.
Multi-Symbol CDF Adaptation Mechanics
AV1 uses a multi-symbol arithmetic coder where probability distributions are represented as Cumulative Distribution Functions (CDFs) instead of single binary probabilities. As syntax elements (such as transform coefficients, motion vector differences, and intra prediction modes) are coded, the local CDFs adaptively shift toward the observed symbol frequencies.
Throughout the decoding or encoding of a frame, the codec tracks symbol occurrences. An internal adaptation factor determines how aggressively the distribution adapts to incoming data:
- Early occurrences shift the distribution with higher adaptation rates to rapidly fit local characteristics.
- As the symbol count increases, the adaptation rate decreases to stabilize the distribution.
Multi-Frame Context Inheritance and Reference Slots
AV1 does not reset its entropy contexts to flat or uniform priors at the start of every frame. Instead, it utilizes reference frame context buffers:
- Context Initialization: When a frame header is
parsed, the bitstream specifies a
primary_ref_frame. The newly initialized frame copies the base CDF tables directly from the context buffer associated with that specific reference frame. - Context Persistence: Up to eight reference frame context models can be maintained concurrently in memory, corresponding to the reference picture buffer slots.
If a frame is marked as an intra-only keyframe or explicitly disables
context inheritance via error_resilient_mode, the entropy
tables are initialized from static default tables stored in the
specification. Otherwise, the frame inherits the state left behind by
its chosen reference.
Backward Context Updating
The backward update process governs how the learned symbol statistics of a processed frame are consolidated and saved back into the reference context buffers for subsequent frames to use.
Frame Context Refresh Flag
At the frame level, the syntax element
refresh_frame_context determines whether the final state of
the entropy models will be written back to the multi-frame storage:
- If
refresh_frame_contextis set to1, the entire set of adapted CDFs at the end of the frame is saved into the context slot assigned to that frame's reference buffer index. - If
refresh_frame_contextis set to0, the frame uses and adapts CDFs internally for its own syntax decoding, but its final state is discarded upon completion, leaving the stored reference contexts unchanged.
Tile-Level Handling and Context Aggregation
AV1 supports parallel execution via independent tiles. Because tiles are decoded in parallel, they cannot sequentially update a single shared CDF model without causing race conditions.
When multi-tile decoding is utilized alongside multi-frame context updates:
- Each tile begins execution with a copy of the base frame context.
- During decoding, each tile maintains its own local CDF states.
- AV1 dictates a deterministic resolution: only the CDF state from a predetermined tile (typically the context output of Tile 0, or the designated context-update tile specified in the bitstream) is saved back to update the frame context buffer. This preserves parallelism while maintaining deterministic multi-frame updates across decoders.
Impact on Inter-Frame Compression
By allowing entropy models to propagate backward into reference buffers and forward into future dependent frames, AV1 ensures that non-stationary statistics spanning multiple temporal frames are preserved. Frames showing similar motion, lighting, or scene complexity benefit from already-trained CDFs, avoiding the bit-overhead required to re-adapt the entropy coder from generic prior distributions at the start of each frame.