AVIF Mastering Display Color Volume Metadata Explained
The AV1 Image File Format (AVIF) communicates mastering display color volume by encapsulating SMPTE ST 2086 metadata inside dedicated ISO Base Media File Format (ISOBMFF) boxes. This metadata defines the color primaries, white point, and luminance boundaries of the monitor used to grade the content, enabling target displays to execute precise tone mapping and gamut mapping for High Dynamic Range (HDR) images.
The ISOBMFF
Architecture and the mdcv Box
AVIF inherits its structural framework from the ISOBMFF and HEIF (ISO/IEC 23008-12) standards. Rather than storing display metadata inside the raw AV1 bitstream (OBU), AVIF prioritizes communicating color volume at the container level through item properties.
The specific property used for this purpose is the Mastering Display
Colour Volume box, identified by the four-character code
mdcv. Standardized in ISO/IEC 14496-12, the
mdcv box translates the SMPTE ST 2086 static metadata
standard directly into structured binary fields.
Structure and Payload of
the mdcv Box
The mdcv box contains ten primary numerical values
encoded in big-endian format. These values detail the physical
capabilities of the mastering display:
- Display Primaries (
display_primaries): Three pairs of 16-bit unsigned integers representing the normalized chromaticity coordinates (\(x\) and \(y\)) for the green, blue, and red color primaries in the CIE 1931 color space. The coordinates are scaled by a factor of 50,000 to maintain precision without floating-point numbers. - White Point (
white_point): A pair of 16-bit unsigned integers representing the normalized \(x\) and \(y\) chromaticity coordinates of the mastering display's white point (typically D65), also scaled by 50,000. - Maximum Mastering Luminance
(
max_display_mastering_luminance): A 32-bit unsigned integer representing the nominal peak luminance capability of the mastering monitor, expressed in units of 0.0001 candelas per square meter (\(\text{cd/m}^2\) or nits). For example, a 1,000-nit mastering display is represented by a value of 10,000,000. - Minimum Mastering Luminance
(
min_display_mastering_luminance): A 32-bit unsigned integer defining the black level of the display, also expressed in units of 0.0001 nits. For example, a black level of 0.005 nits is stored as 50.
Box Association via
iprp, ipco, and ipma
To link the mdcv property to the image payload, AVIF
relies on standard ISOBMFF property relationship mechanisms within the
Meta Box (meta):
- Item Property Container Box (
ipco): Themdcvbox resides inside theipcobox, which acts as a general index of all available properties (such as transformations, color profiles, and dimensions). - Item Property Association Box (
ipma): Theipmabox creates a link between the ID of the primary image item and the 1-based index of themdcvbox in theipco.
Through this link, a parser detects that the image data should be
interpreted according to the mastering constraints defined in that
specific mdcv instance.
Complementary Metadata Boxes
The mdcv box does not operate in isolation; it works
alongside two other critical ISOBMFF boxes to deliver a complete color
representation:
- Colour Information Box (
colr): Carries the Colour Primaries, Transfer Characteristics (such as ITU-R BT.2100 Perceptual Quantizer / PQ, or Hybrid Log-Gamma / HLG), and Matrix Coefficients using annclxprofile. - Content Light Level Information Box
(
clli): Transports CTA-861.3 parameters, specifically the Maximum Content Light Level (max_content_light_levelor MaxCLL) and Maximum Frame-Average Light Level (max_pic_average_light_levelor MaxFALL), defining the actual light levels present in the encoded pixels rather than the physical display limits.
Role in Decoding and Tone Mapping
When an AVIF-compliant renderer opens an HDR image, the decoder
parses the meta box before fully decompressing the AV1
payload. By retrieving the mdcv parameters, the rendering
engine learns whether the source image exceeds the target display’s
native color gamut (such as DCI-P3 or Rec. 2020) or peak luminance.
If the target display peaks at 600 nits, but the mdcv
box identifies that the image was authored on a 4,000-nit display, the
rendering engine applies an appropriate tone-mapping curve (such as
roll-off compression). This prevents highlight clipping and preserves
shadow detail, ensuring that the final output mirrors the creative
intent established on the mastering display.