Chaining Transformation Boxes in AVIF Files

AVIF files, built upon the ISO Base Media File Format (ISOBMFF) and the High Efficiency Image File Format (HEIF) standards, fully support combining multiple transformation boxes for a single image item. This article explains how the underlying file architecture chains transformative properties, how execution order is determined, and the specific constraints imposed by the AVIF specification.

The Container Architecture: ipco and ipma

In an AVIF file, image metadata and instructions are decoupled from the compressed AV1 bitstream. This is handled within the Meta Box (meta) through two primary structures:

Because an item can be associated with multiple properties simultaneously within the ipma, it can reference multiple transformative operations.

Transformative Properties Supported in AVIF

AVIF inherits several standard transformative property boxes from HEIF and the Multi-Image Application Format (MIAF):

How Transformation Chaining Works

Transformation boxes do not alter the raw encoded bitstream. Instead, they provide rendering instructions applied sequentially after the AV1 payload is decoded into pixel data.

When multiple transformative properties are associated with a single item, they are applied strictly in the order they appear in the ipma entry for that item. For example, associating an imir property followed by an irot property requires the decoder to mirror the decoded frame first and then rotate the resulting image. Reversing that sequence in the ipma changes the final rendered orientation.

Standard Constraints and Limitations

While chaining is fully supported, the AVIF specification (via its adherence to the MIAF profile) enforces strict rules to prevent ambiguous rendering:

  1. Uniqueness per Type: Under the MIAF baseline, an item cannot have duplicate instances of the same transformation type. You cannot chain two irot boxes together; multiple rotations must be consolidated into a single irot instruction.
  2. Order Dependency: The order of indices in the ipma box is critical. Compliant decoders process transformations sequentially as listed.
  3. Derived Items: For highly complex workflows involving operations beyond simple orientation and cropping, AVIF allows the creation of "derived items" (such as grid items or identity items), which can chain transformations across multiple hierarchical steps rather than relying solely on a single item property association list.

AVIF files successfully chain multiple transformation boxes to manipulate a single item, provided the boxes are valid, unique per transformation type, and referenced in the desired sequential order within the association table.