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).

  1. 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.
  2. 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 if delta_q_abs is greater than zero.
  3. 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:

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.