AVIF vs HEIC Directional Intra-Prediction Angles

Intra-prediction is essential for modern image compression, removing spatial redundancy by predicting pixel blocks from adjacent, already decoded pixels. When comparing image formats, AVIF (derived from the AV1 video codec) and HEIC (derived from HEVC/H.265) take distinctly different architectural approaches to directional intra-prediction. While HEIC utilizes a fixed set of 33 angular modes uniformly mapped across standard orientations, AVIF implements a dynamic system combining 8 nominal directional modes with fine angular deltas, allowing up to 56 directional angles that deliver greater geometric precision and sharper edge reconstruction.

HEIC Angular Intra-Prediction Architecture

HEIC relies on the intra-frame prediction framework established by HEVC (H.265). HEVC defines 35 total intra-prediction modes for coding units:

The 33 directional prediction modes in HEIC span angles from roughly 45 degrees to 225 degrees. Each mode index corresponds directly to a fixed slope value that dictates the sample projection direction from the top and left reference boundaries. These modes are spaced at fixed intervals, providing uniform coverage across horizontal, vertical, and diagonal orientations. HEIC signals these modes using a Most Probable Mode (MPM) list containing three candidate modes derived from neighboring blocks to minimize signaling overhead.

AVIF Directional Intra-Prediction Architecture

AVIF utilizes the spatial prediction framework of the AV1 codec, which structures directional prediction using a base-plus-offset mechanism rather than a flat list of fixed angles.

AV1 defines 8 base directional (nominal) modes:

To increase directional resolution without bloating mode signaling tables, AV1 introduces directional angle deltas. For any nominal directional mode, the encoder can signal an angular offset ranging from -3 to +3 in increments of approximately 3 degrees.

With 8 nominal directional modes and 7 possible offset settings (0, ±1, ±2, ±3), AVIF can express up to 56 directional angles.

Key Differences and Comparison

1. Angular Granularity and Mode Count

2. Signaling and Bitstream Efficiency

3. Edge Alignment and Prediction Accuracy

4. Supporting Non-Directional Alternatives

Both codecs supplement directional prediction with non-directional tools. HEIC relies heavily on its Planar mode to model gradual tone changes. AVIF supplements its 56 directional angles with an expanded set of non-directional modes, including Paeth predictor and three variations of Smooth prediction (Smooth, Smooth Horizontal, and Smooth Vertical). This ensures that directional modes in AVIF are reserved strictly for true edges, while non-directional modes efficiently model soft contours.

AVIF provides significantly finer angular resolution than HEIC (56 angles versus 33 angles), using a flexible base-plus-delta signaling scheme that reduces prediction residuals along complex, arbitrary edges.