Transforms in AVIF Intra-Prediction

This article provides a concise technical overview of the transforms utilized during the intra-prediction stage of an AVIF (AV1 Image File Format) encode. Because AVIF is derived from the AV1 video standard, it relies on AV1's prediction and transform pipelines. Below, we break down the directional modeling, intra-specific prediction transforms, and the primary 2D separable frequency transforms applied to intra-coded residual blocks.

Predictive Modeling Transforms

Before residual transform coding takes place, AVIF applies mathematical operations to reconstruct boundary pixels and synthesize the predicted block.

Primary Residual Transforms

Once the intra-prediction phase estimates the image block, the predicted values are subtracted from the source pixels to produce an intra-residual signal. This residual is then mapped to the frequency domain using 2D separable transforms consisting of vertical and horizontal 1D basis functions.

AVIF uses three core transform families for intra-residual blocks:

  1. Discrete Cosine Transform (DCT):

    • Primarily based on DCT-II and DCT-4/DCT-8 formulations.
    • Best suited for residuals where signal boundaries exhibit symmetric or evenly distributed error variance.
  2. Asymmetric Discrete Sine Transform (ADST):

    • Based on DST-VII (and its reversed counterpart, FLIPADST).
    • Why it matters for Intra-prediction: In intra coding, reference pixels are taken from the top and left boundaries. Consequently, the prediction residual tends to have near-zero error close to those boundaries and higher error variance further away. The ADST enforces a zero-boundary condition at the known reference edge, making it mathematically superior to the DCT for modeling directional intra residuals.
  3. Identity Transform (IDTX):

    • Passes the spatial residual directly to the quantizer without frequency-domain projection in one or both directions.
    • Useful for sharp synthetic edges, text, or screen content where frequency transforms cause ringing artifacts.

2D Transform Combinations

AVIF combines these 1D horizontal (\(H\)) and vertical (\(V\)) transforms into 16 possible combinations for intra-residual blocks, sized from \(4\times4\) up to \(64\times64\):