How ADST Improves Edge Encoding in AVIF Images

The AVIF image format, derived from the AV1 video codec, achieves superior compression efficiency partly through advanced transform techniques like the Asymmetric Discrete Sine Transform (ADST). This article explains how ADST overcomes the mathematical limitations of the standard Discrete Cosine Transform (DCT) to preserve sharp edges, reduce ringing artifacts, and improve the visual fidelity of intra-frame boundaries in AVIF images.

Traditional image formats like JPEG rely heavily on the symmetric Type-II Discrete Cosine Transform (DCT). While DCT is effective at compacting energy across smooth, continuous pixel blocks, it enforces an implied even symmetry at block boundaries. In intra-prediction—where a block's pixel values are predicted from previously decoded neighboring pixels along the top and left borders—the prediction error (residual) is not symmetric. Instead, the residual typically starts near zero at the predicted boundary and grows larger as the distance from the reference pixels increases. Forcing this non-symmetric residual into a symmetric DCT requires many high-frequency coefficients, leading to inefficient compression and visible ringing artifacts (the Gibbs phenomenon) around sharp borders and text.

The Asymmetric Discrete Sine Transform directly addresses this structural mismatch. Mathematically, the ADST enforces zero-boundary conditions at one end of the block (odd symmetry) while allowing natural variation at the other. Because prediction residuals naturally exhibit low amplitude near reference edges and expand across the block, the basis functions of the ADST naturally match the shape and decay profile of these directional prediction errors.

In AVIF encoding, this dynamic improves edge representation in several distinct ways:

By integrating the Asymmetric Discrete Sine Transform into its hybrid transform core, AVIF captures sharp contrasts, UI elements, vector-like graphics, and natural contours at significantly lower bitrates than codecs restricted to standard cosine transforms.