Causes of AVIF Color Shifts in Legacy Decoders

Color-shift issues in legacy AVIF decoders primarily occur due to discrepancies in how color metadata is parsed, mismatches between full and limited color ranges, and conflicts between container-level and bitstream-level color definitions. Early decoder implementations frequently failed to synchronize video-centric AV1 decoding pipelines with modern image-display standards, resulting in inaccurate gamma curves, incorrect matrix transformations, or clipped color values.

Mismatched Color Range (Full vs. Limited)

The most frequent source of visible color shifting and contrast distortion is the confusion between full-range (0–255 for 8-bit) and limited-range (16–235 for 8-bit) quantization. Because the underlying AV1 codec originated in video delivery, where limited-range YUV is the traditional default, legacy decoders often assumed limited range unless explicitly forced otherwise.

When a standard full-range AVIF still image is decoded using a limited-range matrix, dark tones become crushed and highlights blow out. Conversely, if a limited-range image is decoded as full-range, the image appears washed out with elevated black levels.

Container Metadata vs. AV1 Bitstream Discrepancies

An AVIF file encapsulates raw AV1 bitstreams within an ISO Base Media File Format (ISOBMFF) container. Color parameters can be defined in two separate places:

  1. The ISOBMFF Container: Specified inside the colr box using either an NCLX (Color Parameter Definition) code or an embedded ICC profile.
  2. The AV1 Sequence Header: Specified in the Open Bitstream Unit (OBU) metadata as Coding-Independent Code Points (CICP).

Early decoders often read color parameters exclusively from the AV1 sequence header while ignoring the ISOBMFF colr box, or vice versa. If an image-encoding tool updated metadata in the container box without rewriting the underlying AV1 bitstream headers, legacy decoders applied the wrong primaries, transfer characteristics, or matrix coefficients.

Inconsistent CICP and ICC Profile Precedence

According to modern AVIF specifications, an embedded ICC profile must override CICP color properties if both are present. Many legacy decoders lacked fully integrated color management systems (CMS). These decoders would either ignore the ICC profile completely or apply the CICP matrix transformations first and then re-apply the ICC profile, resulting in double-transformed, heavily distorted hues.

Matrix Coefficients and YUV-to-RGB Conversion Errors

AVIF stores image data natively in YUV or monochrome formats, which must be converted to RGB for display. This conversion requires exact matrix coefficients (such as BT.709, BT.601, or BT.2020).

Legacy implementations frequently defaulted to standard BT.709 or BT.601 matrices regardless of the metadata flags. For instance, converting wide-gamut BT.2020 content using a BT.709 matrix leads to severely undersaturated colors and dramatic shifts in skin tones and primary hues.

Chroma Siting Interpretation

For subsampled formats like YUV 4:2:0, the exact spatial alignment of chroma samples relative to luma samples (chroma siting) determines how colors align with edges. Legacy decoders frequently hardcoded chroma siting to traditional MPEG-2 (left-aligned) or center-aligned positions rather than reading the container flags. This resulted in slight hue shifts, color bleeding, and desaturation along high-contrast boundaries.