How SSIMULACRA Evaluates AVIF Image Quality
This article explains how the SSIMULACRA (Structural Similarity Image Quality Assessment) metric evaluates structural degradation and perceptual quality in compressed AVIF files. By modeling the human visual system rather than relying on raw pixel comparisons, SSIMULACRA assesses how AVIF's transform coding, smoothing filters, and chroma subsampling affect human perception across multiple spatial scales.
Human Visual System Modeling
Traditional metrics like PSNR or basic SSIM treat all pixel errors relatively equally, which fails to reflect how the human eye perceives compression artifacts. SSIMULACRA bridges this gap by transforming input images into a perceptually uniform color space—similar to the XYB color space derived from human cone responses.
When evaluating an AVIF file, SSIMULACRA compares the compressed image against the uncompressed source in this perceptual domain. It separates luminance from chrominance, heavily weighting luminance errors while allowing greater tolerance for color variations, accurately mirroring retinal sensitivity.
Multi-Scale Structural Decomposition
AVIF uses the AV1 video codec's intra-frame coding tools, dividing images into variable-sized transform blocks (from 4x4 up to 64x64). This architecture often introduces multi-scale artifacts, ranging from fine texture erasure to larger structural shifts.
SSIMULACRA addresses this through multi-scale decomposition. It analyzes the image at several resolution levels using Gaussian downsampling filters. At each scale, it computes:
- Luminance and Contrast: Evaluating whether the dynamic range of localized regions remains consistent.
- Structural Correlation: Measuring whether the patterns, edges, and gradients align with the original image after normalized cross-correlation.
By aggregating structural similarity measurements across these spatial frequencies, the metric detects both macro-level distortions and subtle losses of fine detail.
Evaluating Specific AVIF Artifacts
AVIF compression exhibits distinct visual signatures, particularly at medium to low bitrates. SSIMULACRA is calibrated to penalize the artifacts inherent to AV1 encoding:
- Directional Smoothing and Blurring: AVIF frequently smooths high-frequency textures (such as grain, foliage, or fabric) to save bits. SSIMULACRA penalizes the absence of these high-frequency structural elements across its finer evaluation scales.
- Ringing and Edge Ghosting: High-contrast edges compressed with discrete cosine transforms (DCT) or asymmetric discrete sine transforms (ADST) can produce ringing. SSIMULACRA detects the contrast disruption around these sharp boundaries.
- Block Boundaries: While AVIF uses advanced in-loop deblocking and directional enhancement filters (CDEF) to eliminate hard grid edges, over-filtering can lead to a synthetic, plastic appearance. SSIMULACRA identifies the structural deviation caused by this unnatural flattening.
Score Aggregation and Output
After comparing the local windows across all channels and scales, SSIMULACRA pools the local error maps using an asymmetric norm. This mathematical pooling places greater weight on regions with severe localized degradation, reflecting the human tendency to judge an image based on its worst visible flaws rather than an average of clean areas.
The resulting score correlates closely with subjective Mean Opinion Scores (MOS), providing an accurate, automated assessment of whether an AVIF-compressed image maintains structural fidelity to the human eye.