Role of Sequence Header OBU in AVIF Decoding
The Sequence Header Open Bitstream Unit (OBU) serves as the primary configuration blueprint for decoding AVIF images. As AVIF encapsulates AV1 video bitstreams within the ISO Base Media File Format (ISOBMFF), the sequence header OBU provides the decoder with essential global parameters—such as profile levels, bit depth, color subsampling, and maximum spatial dimensions—required to initialize the decoding pipeline and allocate hardware resources before processing image frame data.
Defining Global Decoding Profiles and Levels
The sequence header OBU identifies the specific AV1 profile and level to which the image conforms. AV1 specifies three main profiles:
- Main Profile: Restricts color to 8-bit or 10-bit with 4:0:0 (monochrome) or 4:2:0 chroma subsampling.
- High Profile: Supports 8-bit or 10-bit color with 4:4:4 chroma subsampling.
- Professional Profile: Extends capability to 12-bit color and adds support for 4:2:2 subsampling.
Declaring the profile and level immediately tells the host system whether local hardware decoders can handle the image or if execution must fall back to a software implementation.
Configuring Color Properties and Bit Depth
Pixel representation depends directly on the sequence header. It
contains the color_config syntax structure, which
configures:
- Bit Depth: Explicitly defines whether the image uses 8-bit, 10-bit, or 12-bit color channels, dictating memory footprint and internal computational precision.
- Chroma Subsampling: Signals the horizontal and vertical positioning of color components (e.g., 4:2:0, 4:2:2, 4:4:4) or flags the bitstream as monochrome.
- Color Space and Primaries: Defines the color primaries, transfer characteristics (such as standard SDR, HDR10/PQ, or HLG curves), and matrix coefficients. While the container file can also store color profiles via NCLX or ICC color boxes, the sequence header provides the authoritative baseline for the AV1 core.
Establishing Dimensional Bounds
Before memory allocation occurs, the decoder must know the maximum
canvas size. The sequence header sets
max_frame_width_minus_1 and
max_frame_height_minus_1. These values determine the
maximum resolution that subsequent frame OBUs can occupy. Knowing the
upper bound enables the decoder to pre-allocate frame buffers
efficiently, avoiding runtime reallocations when rendering the
image.
Integration in the AVIF Container
In an AVIF file, the sequence header OBU is typically stored inside
the av1C (AV1 Configuration Box) within the file’s metadata
hierarchy, or prepended to the image item data itself. By reading this
OBU first, an AVIF parser can validate system compatibility, configure
color management pipelines, and reserve the exact buffer memory required
to decode the image payload without error.