How AVIF Separates Alpha and Image Items

This article explains how the AV1 Image File Format (AVIF) architectures transparency by decoupling primary color data from alpha channels within the ISO Base Media File Format (ISOBMFF) container. Readers will learn about the role of discrete items, item reference linkages, auxiliary type properties, and the technical mechanics that allow decoders to identify, separate, and reconstruct composite images with transparency.

The ISOBMFF Item Model

AVIF relies on the structural foundation of the High Efficiency Image File Format (HEIF) and the ISO Base Media File Format (ISOBMFF). Unlike traditional formats that interleave color and transparency within the same bitstream (such as a 32-bit RGBA pixel array), AVIF treats color data and alpha channels as completely independent entities, known as "items."

All items are cataloged within the container's top-level metadata box (meta), specifically inside the Item Info box (iinf). This architectural design enables AVIF to handle alpha as an auxiliary stream without altering the underlying AV1 video compression format, which natively lacks dedicated transparency channels.

The Primary Image Item

The main visual content of an AVIF file is designated as the primary item.

  1. Identification: The Primary Item box (pitm) stores the unique 16-bit or 32-bit item_ID of the master color image.
  2. Payload: The bitstream referenced by this item_ID is an AV1 Intra-frame (Keyframe) containing the color information, typically compressed using YUV (such as 4:2:0, 4:2:2, or 4:4:4) or monochrome configurations.
  3. Location: The actual byte offsets and lengths for this data are mapped within the Item Location box (iloc).

The Auxiliary Alpha Item

The alpha channel is encoded as a completely distinct, secondary item rather than being multiplexed into the primary bitstream:

Linking Alpha to the Primary Item via iref

The container establishes the relationship between the separate alpha stream and the primary image using the Item Reference box (iref).

Inside the iref box, AVIF defines a typed relationship:

This directional link explicitly declares to the parser that the alpha item is not a standalone picture meant to be rendered on its own, but an auxiliary layer that enhances the primary item.

Declaring Item Roles with the auxC Property

To inform the decoder of the specific function of an auxiliary item, the container assigns item properties using the Item Properties box (iprp).

Within iprp, an Auxiliary Type Property (auxC) is associated with the alpha item via the Item Property Association box (ipma). The auxC property contains a Uniform Resource Name (URN) that defines the nature of the data:

When a decoder detects this URN attached to an item with an auxl reference, it confirms that the monochrome stream represents the linear opacity/alpha mask for the designated master image.

Decoding and Compositing Pipeline

This structural separation dictates a straightforward pipeline for compatible decoders:

  1. Discovery: The parser inspects the meta box, reads the pitm box to find the primary image, and scans the iref box for an auxl reference pointing to that ID.
  2. Role Verification: The parser checks the auxC property of the referenced item to verify it carries the alpha URN.
  3. Parallel Decoding: Because both streams are standard AV1 keyframes, the color data and alpha data can be sent to two separate decoding pipelines simultaneously.
  4. Recombination: Once both bitstreams are decoded into raw pixel buffers, the renderer composites the monochrome plane onto the color planes as the alpha channel (producing an RGBA image). If an application does not support transparency or requires only the base image, it can ignore the auxiliary item entirely, saving processing overhead.