How SVT-AV1 VMAF Tuning Modifies RDO Curves

This article provides an overview of how the VMAF (Video Multi-Method Assessment Fusion) tuning mode in the SVT-AV1 encoder shifts traditional rate-distortion optimization (RDO). By replacing standard mathematical error metrics with perceptually weighted calculations, SVT-AV1 adjusts the cost function, reshapes the operational Lagrangian multipliers, and modifies spatial-temporal quantization offsets. These mechanics alter the shape and slope of the encoder's rate-distortion curves, favoring visual and metric-specific efficiencies over raw mathematical fidelity.

The Baseline RDO Model

In standard encoding modes, rate-distortion optimization relies on a Lagrangian cost function:

\[J = D + \lambda R\]

Here, \(J\) is the cost to minimize, \(R\) is the rate (bit count), \(D\) is the distortion, and \(\lambda\) (lambda) is the Lagrange multiplier that governs the trade-off between quality loss and bitrate.

By default, SVT-AV1 measures distortion (\(D\)) using Sum of Squared Errors (SSE) or Mean Squared Error (MSE). While mathematically straightforward, SSE treats all pixel errors equally regardless of human visual perception or the specific algorithmic biases of perceptual quality models like VMAF.

Distortion Metric Replacement in VMAF Tuning

When VMAF tuning is enabled in SVT-AV1 (typically using --tune 2), the encoder alters the calculation of \(D\). VMAF measures quality through a combination of Visual Information Fidelity (VIF), Detail Loss Metric (DLM), and temporal motion features.

To align with VMAF:

Because the distortion calculation \(D\) changes at the transform and mode-decision stages, decisions that look suboptimal to an SSE-based metric are chosen if they yield higher predicted VMAF scores.

Modification of the Lagrange Multiplier (\(\lambda\))

The Lagrange multiplier \(\lambda\) dictates the slope of the rate-distortion curve at any given operating point:

\[\lambda = -\frac{dD}{dR}\]

In SSE mode, \(\lambda\) is strictly derived from the base Quantization Parameter (QP) using an exponential relationship tailored to minimize square error across frames.

In VMAF tuning mode, SVT-AV1 modifies the base \(\lambda\) tables:

  1. Slope Adjustment: The encoder steepens or flattens \(\lambda\) dynamically depending on the temporal and spatial complexity of the frame.
  2. Diminishing Returns Threshold: VMAF saturates near 100 at higher bitrates faster than PSNR does. To prevent wasting bits where VMAF gains plateau, SVT-AV1 inflates \(\lambda\) at lower QPs (higher bitrates), pricing additional bits more expensively and shifting the rate-distortion trade-off toward rate savings.

Perceptual Quantization and Dynamic QP Offsets

SVT-AV1’s VMAF tuning directly influences delta-QP assignments and quantization matrix application:

Impact on the Resulting R-D Curves

These modifications alter the graphical representation of rate-distortion curves: