Inter-Frame Prediction in Animated AVIF Files

Animated AVIF files achieve high compression efficiency by relying on the underlying AV1 video coding standard to eliminate temporal redundancy between frames. Because AVIF is an image-specific profile of the ISO Base Media File Format (ISOBMFF) that encapsulates raw AV1 bitstreams, its inter-frame prediction mechanism does not exist as a separate image-level protocol. Instead, it utilizes the full suite of AV1 motion estimation, multi-frame referencing, and advanced motion compensation tools to predict succeeding frames from previous or future reference pictures.

The Codec-Level Architecture

An animated AVIF file stores an image sequence as a video track within an ISOBMFF container. The temporal processing relies on two fundamental AV1 frame categories:

Multi-Reference Frame Buffers

Unlike older animation formats such as GIF (which uses simple frame disposal and differential bounding boxes) or basic video codecs that reference only the immediate previous frame, AV1 maintains a pool of up to eight distinct reference frames in its frame buffer.

During inter-prediction, an encoder can select from seven temporal reference directions for any given block:

This structure allows animated AVIF files to retain recurring elements—such as a looping background or an oscillating graphic—in memory, referencing them later without re-encoding the visual data.

Block-Based Motion Compensation and Sub-Pixel Accuracy

AV1 partitions frames using a recursive block structure ranging from 128×128 down to 4×4 pixels. For inter-predicted blocks, the codec calculates motion vectors (MVs) that track pixel displacement across frames. AV1 supports sub-pixel precision down to 1/8-pel accuracy, using high-order interpolation filters (such as 8-tap regular, smooth, or sharp filters) to accurately capture fine or slow movements.

Compound and Masked Prediction

When predicting a block, AV1 is not limited to a single motion vector. It supports compound prediction, combining two distinct reference signals via several methods:

Global and Warped Motion Compensation

Animated graphics and screen recordings often feature camera pans, zooming, or rotational motion. AV1 includes affine and homography transformation models:

Overlapped Block Motion Compensation (OBMC)

To eliminate boundary discontinuities between adjacent blocks with different motion vectors, AV1 applies Overlapped Block Motion Compensation. OBMC blends the prediction of the current block with predictions formed by extending the motion vectors of adjacent top and left neighboring blocks, significantly reducing blockiness and lowering the bit-cost of the residual transform stage.