AVIF Color Spaces and Transfer Functions Explained
The AV1 Image File Format (AVIF) offers robust color management for
modern digital imaging, natively accommodating both standard dynamic
range (SDR) and high dynamic range (HDR) workflows. This guide breaks
down the specific color spaces (color primaries) and transfer functions
natively supported within the AVIF specification. By utilizing the ISO
Base Media File Format (ISOBMFF) colr box alongside AV1
bitstream metadata, AVIF supports precise color rendering through either
NCLX (Non-Centric Learning Extended / ISO/IEC 23091-2 / ITU-T H.273)
parameters or embedded ICC profiles.
Color Signalling in AVIF
AVIF signals color representation natively in two primary ways:
- NCLX Properties (ITU-T H.273 Codecs): A compact, standardized set of integer identifiers indicating the exact color primaries, transfer characteristics, and matrix coefficients. This method is preferred for web performance because it avoids the byte-overhead of full ICC profiles.
- Embedded ICC Profiles: Used for custom, legacy, or device-specific profiles, allowing AVIF to support any arbitrary color profile compatible with ICC version 2 or version 4 specifications.
Natively Supported Color Spaces (Color Primaries)
Through ITU-T H.273 parameters defined within the NCLX property, AVIF natively supports the following color primaries without requiring external color transformation profiles:
- BT.709 / sRGB (Value 1): The default color space for the web and standard-definition displays.
- BT.470-6 System M (Value 4): Historical NTSC primary system.
- BT.470-6 System B, G (Value 5): Historical PAL/SECAM primary system.
- BT.601 / SMPTE 170M (Value 6): Standard-definition digital television primaries.
- SMPTE 240M (Value 7): Early high-definition television standard.
- Generic Film (Value 8): Traditional color film primaries (illuminant C).
- BT.2020 / BT.2100 (Value 9): Ultra-high-definition (UHD) wide color gamut covering 75.8% of the CIE 1931 color space, essential for HDR delivery.
- SMPTE ST 428-1 (Value 10): DCI-P3 with standard DCI white point (theater digital cinema).
- SMPTE RP 431-2 / DCI-P3 (Value 11): Theater digital cinema distribution standard.
- SMPTE EG 432-1 / Display P3 (Value 12): Apple and modern consumer wide-gamut standard using DCI-P3 primaries with a D65 white point.
- EBU Tech. 3213-E (Value 22): European Broadcasting Union standard monitor primaries.
Natively Supported Transfer Functions (Transfer Characteristics)
AVIF natively recognizes gamma and electro-optical transfer functions (EOTF) through the H.273 transfer characteristic code points:
- BT.709 (Value 1): Standard dynamic range video curve (equivalent to BT.601 and BT.2020-10 transfer functions).
- Linear (Value 8): Useful for graphics, VFX pipelines, normal maps, and computational photography where no gamma encoding is applied (\(E = L\)).
- sRGB / IEC 61966-2-1 (Value 13): The standard transfer function for web and computer monitors.
- BT.470 System M / 2.2 Gamma (Value 4): Standard pure \(2.2\) power-law gamma.
- BT.470 System B, G / 2.8 Gamma (Value 5): Legacy \(2.8\) power-law gamma.
- SMPTE 240M (Value 7): Historical transfer function for early HDTV.
- Logarithmic Curves (Values 9 and 10): Log 100:1 and Log 316:1 contrast profiles for film scanning.
- xvYCC (Values 11 and 12): Extended-gamut SDR functions (IEC 61966-2-4).
- SMPTE ST 2084 / PQ (Perceptual Quantizer) (Value 16): The primary HDR transfer curve used for HDR10 and Dolby Vision, mastering peak brightness levels up to 10,000 cd/m² (nits).
- BT.2100-2 / HLG (Hybrid Log-Gamma) (Value 18): Broadcast-oriented HDR transfer curve that remains backward-compatible with SDR displays.
- SMPTE ST 428-1 (Value 17): DCI digital cinema distribution mastering curve.
Matrix Coefficients and Color Formats
AVIF supports both full and limited range signals across multiple chroma formats:
- Color Matrix Coefficients: Identity (direct RGB), BT.709, BT.601, BT.2020 non-constant luminance, and YCoCg.
- Pixel Formats: 4:2:0, 4:2:2, 4:4:4 (YUV or RGB), and single-channel Monochrome.
- Bit Depths: Native 8-bit, 10-bit, and 12-bit channel precision, preventing banding artifacts when utilizing wide gamuts like BT.2020 and PQ transfer curves.