Delta-QP Signaling per Superblock in AV1
This article provides an overview of delta quantization parameters (delta-QP) in the AV1 video codec and examines how these values are signaled at the superblock level. It covers the role of delta-QP in adaptive quantization, the frame-level configuration required to enable the feature, and the syntax mechanisms used to transmit local quantization adjustments to individual superblocks.
What is Delta-QP?
In digital video compression, the Quantization Parameter (QP)
controls the trade-off between visual fidelity and bitrate. While a
video frame is assigned a base QP (base_q_idx in AV1),
visual content within that frame often varies significantly in
complexity and perceptual sensitivity.
Delta-QP refers to a local offset added to or subtracted from the baseline frame QP. By varying quantization across different regions, an encoder can apply finer quantization (lower QP) to perceptually sensitive areas, such as human faces or detailed textures, and coarser quantization (higher QP) to complex motion or background regions. This local adaptation is critical for psycho-visual optimizations, Region of Interest (ROI) coding, and fine-grained rate control.
Frame-Level Prerequisites in AV1
Before delta-QP values can be signaled for individual superblocks, the encoder must configure the delta-QP mechanism within the frame header:
delta_q_present_flag: A 1-bit syntax element in the frame header indicating whether delta-QP signaling is active for the current frame. If set to0, all superblocks strictly inherit the frame'sbase_q_idx.delta_q_res: Specifies the step size or resolution of the delta values. It dictates the bit-shift applied to the decoded delta value, defining the granularity at which QP offsets are adjusted.
Signaling Delta-QP per Superblock
AV1 operates on superblock units of either 128×128 or 64×64 pixels.
When delta_q_present_flag is enabled, the encoder can
transmit delta-QP syntax elements to modify the quantization index
dynamically throughout the frame.
1. Predictive Coding Scheme
AV1 does not transmit an absolute QP index for every superblock.
Instead, it uses a predictive mechanism where the signaled delta
represents the difference relative to the previous superblock's active
QP value. At the start of a tile, the active QP initializes to the
frame's base_q_idx. Each signaled delta updates a running
state variable (current_q_index), which carries over to
subsequent blocks until another delta is signaled.
2. Triggering Conditions
To conserve bits, delta-QP is not transmitted unconditionally in every superblock. A delta-QP value is only signaled at the first transform block within a superblock that contains non-zero transform coefficients (coded residual data). If an entire superblock is skipped or contains only non-coded blocks, the transmission of delta-QP is deferred, and the superblock retains the current running QP value.
3. Syntax Elements
When the conditions to transmit delta-QP are met, AV1 reads two primary syntax elements:
delta_q_abs: Encoded using a combination of unary and fixed-length entropy coding to represent the absolute magnitude of the offset.delta_q_sign_bit: Transmitted only ifdelta_q_abs > 0to indicate whether the offset is positive or negative.
4. QP Reconstruction Formula
Once decoded, the final quantization parameter index for the superblock is computed:
delta_q = delta_q_sign_bit ? -delta_q_abs : delta_q_abs
current_q_index = Clip3(0, 255, current_q_index + (delta_q << delta_q_res))
The resulting current_q_index is clamped to the valid
range of 0 to 255. This value serves as the actual QP index used to
derive the AC and DC quantization steps for luma components in the
current superblock and establishes the reference baseline for subsequent
delta updates.