AV1 Quantization Matrices Across Transform Blocks

The AOMedia Video 1 (AV1) codec utilizes frequency-dependent quantization matrices (QM) to optimize perceptual video quality across a wide range of transform block sizes. This article explains how AV1 defines, signals, and applies these scaling matrices to square and non-square transform blocks, adjusting quantization step sizes across spatial frequencies to preserve visual fidelity where human vision is most sensitive while discarding imperceptible high-frequency detail.

Frame-Level Signaling and Matrix Levels

AV1 does not transmit explicit, custom matrix tables within the bitstream to minimize overhead. Instead, it relies on a standardized set of predefined, hardcoded quantization matrices.

The bitstream signals quantization matrix usage at the frame header level:

Support for Varied Transform Sizes and Shapes

AV1 supports multiple transform sizes ranging from 4x4 to 64x64, encompassing both square and rectangular aspect ratios (including 1:2, 2:1, 1:4, and 4:1 shapes, such as 4x8, 8x4, 16x4, and 8x32).

To support this variety without inflating decoder memory, AV1 standardizes base 2D matrix definitions derived from perceptual contrast sensitivity functions (CSF). The matrices correspond directly to the supported 2D transform dimensions:

Application to Transform Coefficients

During forward quantization in the encoder, the effective quantization step size for a coefficient at coordinate \((x, y)\) is computed as a product of the base frame quantizer and the scaling factor derived from the matrix:

  1. Matrix Lookup: The encoder and decoder look up the weight \(M(x, y)\) corresponding to the block’s shape, size, component plane, and signaled QM level.
  2. Coefficient Scaling: The base dequantization/quantization step size \(Q_{base}\) is modified by the matrix factor: \[\text{StepSize}_{effective}(x, y) = \frac{Q_{base} \times M(x, y)}{\text{Normalization Factor}}\]
  3. Weight Distribution: The DC coefficient \((0, 0)\) and immediate low-frequency AC coefficients receive the lowest scale factors (closest to the base quantizer), preserving structural details, edges, and smooth gradients. Higher-frequency coordinates receive progressively larger divisors, increasing the likelihood that small, visually redundant coefficients round to zero.

Through this systematic lookup and scaling process, AV1 applies adaptive, frequency-dependent quantization across all valid transform configurations while keeping signaling overhead limited to a few bits per frame.