Chroma from Luma Prediction in AVIF Compression

Chroma-from-Luma (CfL) prediction is an advanced intra-frame coding tool in the AV1 video codec—and by extension, the AVIF image format—that dramatically improves compression efficiency and color accuracy. By utilizing the high-frequency structural details already captured in the reconstructed luminance (brightness) channel, CfL predicts the chrominance (color) channels using a lightweight linear model. This article explores how CfL functions, its role in eliminating cross-channel redundancy, and its impact on producing smaller, higher-quality AVIF images.

Understanding Cross-Channel Redundancy

In standard image compression, visual data is typically split into a luma channel (\(Y\)) representing brightness and two chroma channels (\(Cb\) and \(Cr\), or \(U\) and \(V\)) representing color. In the natural world, color changes often coincide directly with brightness changes; edges, textures, and contours usually share the exact same spatial boundaries across all three channels.

Traditional image formats (like legacy JPEG) process these channels largely independently after color-space conversion, leaving significant cross-component correlation unexploited. AVIF uses CfL to bridge this gap, actively using the already-decoded luma component to inform and reconstruct the chroma components.

How Chroma-from-Luma Prediction Works

CfL operates as a specialized intra-prediction mode for chroma blocks:

  1. Luma Downsampling (if applicable): If the image uses chroma subsampling (such as YUV 4:2:0), the reconstructed luma pixels corresponding to the chroma block are first downsampled to match the chroma resolution. For YUV 4:4:4 formats, downsampling is bypassed.
  2. Mean Normalization: The average (DC) value of the luma block is subtracted to leave an AC-only signal representing the variations and textures.
  3. Linear Scaling: The chroma values are modeled as a scaled version of the AC luma signal plus a baseline DC offset. The mathematical relationship is expressed as: \[\text{Chroma} = \alpha \times (\text{Luma}_{\text{reconstructed}} - \text{Luma}_{\text{mean}}) + \text{Chroma}_{\text{DC}}\]
  4. Parameter Transmission: Instead of encoding large amounts of residual pixel data for the color channels, the encoder only needs to signal the optimal scaling factor (\(\alpha\)) and the DC offset.

Because the encoder only transmits a single scalar value (\(\alpha\)) per block, the bit cost required to represent the chroma channel drops substantially.

Impact on AVIF Compression and Quality

CfL provides distinct advantages in optimizing AVIF files for web and storage delivery:

Chroma-from-Luma prediction transforms redundant luma structural information into a predictor for color, allowing AVIF to deliver smaller file sizes while maintaining sharper, more accurate edges across photographs and digital illustrations alike.