AV1 Sub-Frame Quantization: Delta Q Signalling
The AV1 video codec provides adaptive rate control and perceptual optimization by varying quantization step sizes within a single frame rather than relying solely on a uniform frame-level setting. This sub-frame quantization adjustment is primarily achieved through two distinct, complementary syntax mechanisms: Delta Quantization (Delta Q) signaled at the superblock level, and block-level Segmentation. Together, these tools allow encoders to alter the base quantizer index locally, redistributing bit allocation to match the complexity and visual sensitivity of different regions across the picture.
Frame-Level Enablement and Configuration
Sub-frame quantization adjustments require frame-level setup within the uncompressed frame header.
The frame header defines the global baseline with
base_q_idx (ranging from 0 to 255). To allow localized
changes, the frame header sets the delta_q_present_flag.
When this flag is enabled, the bitstream specifies
delta_q_res, which defines the mathematical step size or
resolution of the transmitted deltas using the formula:
\[\text{Step} = 1 \ll \text{delta\_q\_res}\]
This resolution parameter allows the encoder to trade off the dynamic range of local adjustments against the bit cost of signaling delta values.
Superblock-Level Delta Q Signalling
Once Delta Q is enabled, quantization updates occur across Superblocks (128x128 or 64x64 pixel coding units).
- Activation per Superblock: For each superblock containing non-zero transform coefficients, the bitstream signals whether a local quantizer modification occurs. If a superblock is completely skipped, delta values are omitted, and the quantization state carries forward.
- Delta Representation: When signaled, the quantizer
delta is coded using:
delta_q_abs: The magnitude of the step index change.delta_q_sign_bit: The direction of the change (positive or negative), sent ifdelta_q_absis greater than zero.
- Differential Updates: The decoded delta value is added to the running quantizer predictor (normally the quantizer of the previous superblock, reset at frame/tile boundaries). The resulting value is clamped to the valid [0, 255] range to establish the new active \(Q\)-index:
\[Q_{\text{current}} = \text{Clip3}(0, 255, Q_{\text{previous}} + (\text{delta\_q\_val} \ll \text{delta\_q\_res}))\]
This active index remains in effect for subsequent superblocks until a new delta is explicitly signaled.
Segmentation Maps
AV1 also supports sub-frame quantization variance via its segmentation engine. A frame can be divided into up to eight distinct segments:
- Segment Map: The bitstream transmits a segment ID for individual coding blocks down to 4x4 resolution.
- Feature Signalling: The frame header specifies
feature data per segment, including
SEG_LVL_ALT_Q(an absolute or relative delta quantizer index offset). - Combination: When both segmentation and Delta Q are active, the segment-specific offset is added to the baseline/Delta Q index, yielding block-specific quantization steps even finer than the superblock level.
Component-Specific Adjustments
AV1 applies the determined sub-frame \(Q\)-index across the transform stages while
allowing predefined plane offsets. Quantization steps for chroma planes
(\(U\) and \(V\)) and transform coefficient types (DC
versus AC) derive their final values by adding frame-level parameters
(delta_q_y_dc, delta_q_u_dc,
delta_q_u_ac, etc.) to the dynamically calculated sub-frame
\(Q\)-index before indexing the final
reconstruction scaling tables.