Role of Auxiliary Items in the AVIF iloc Table
In the AV1 Image File Format (AVIF), the Item Location Box
(iloc) acts as the central index detailing exactly where
each data payload resides within the container. Secondary auxiliary
items—such as alpha channels, depth maps, and HDR gain maps—are stored
as discrete items separate from the primary color image. The
iloc table defines the physical byte offsets and lengths
for these auxiliary payloads, enabling decoders to identify, locate, and
access auxiliary data independently without parsing the entire file.
Structural Indexing in ISOBMFF
AVIF is built on the ISO Base Media File Format (ISOBMFF) and HEIF
specifications, which treat image components as independent items
identified by a unique item_ID. The primary image item
contains the visual color payload (typically YUV or RGB), while
secondary auxiliary items contain monochrome AV1 bitstreams representing
auxiliary data.
The iloc box maps each item_ID to its
storage location within the file, whether the data exists inside a Media
Data Box (mdat), an Item Data Box (idat), or
an external reference. For auxiliary items, the iloc box
records:
- Base Offset: The base memory or file position for the item's data.
- Extent Count: The number of separate fragments making up the item.
- Extent Offset and Length: The precise start position and byte length of each payload fragment.
Enabling Non-Destructive Extensions
Auxiliary items are linked to the primary image using the Item
Reference Box (iref) with a reference type such as
auxl. While the iref box defines the
semantic relationship between the auxiliary item and the master
image, the iloc table provides the physical access
mechanism.
Because the iloc table assigns separate storage extents
to auxiliary items:
- Alpha Channels: Transparency data is encoded as an
independent monochrome AV1 image with its own
item_IDandilocentry, preventing the need to encode an uncompressed 4-channel image. - Gain Maps and Tone Mapping: HDR gain maps can be embedded alongside standard dynamic range (SDR) base images, allowing the file to remain backwards-compatible.
- Depth Maps: Spatial and stereoscopic data can be packaged into the same file without altering the primary color stream.
Selective and Progressive Retrieval
A primary benefit of indexing auxiliary items within the
iloc table is random and conditional access. Network-based
decoders can read the file header, parse the iloc box, and
execute targeted byte-range requests.
If a client device does not support or require a secondary auxiliary
feature—such as a rendering engine that ignores depth maps or a display
that does not render HDR—the parser can skip the byte ranges allocated
to those auxiliary items in the iloc table. Conversely,
when transparency or HDR is required, the decoder uses the explicit
offsets to fetch only the required auxiliary streams.
Facilitating Multi-Threaded Decoding
Because the iloc table provides independent offset and
length pairs for the primary image and its auxiliary items prior to
decoding, software can dispatch payloads to separate decode pipelines in
parallel. A system can decode the primary AV1 color bitstream on one
thread while concurrently decoding the alpha or gain map bitstream on
another, merging the reconstructed planes in memory prior to
display.