AV1 16-Way Partitioning Rate-Distortion Optimization

This article examines how an AV1 video encoder evaluates rate-distortion (RD) curves across its 16-way block partitioning scheme. AV1 expands traditional quad-tree partitioning into a flexible recursive tree supporting square, rectangular, and non-symmetrical 1:4 and 4:1 aspect ratios. Encoders navigate this immense search space by computing Lagrangian cost functions across candidate splits, deploying variance and edge-detection heuristics, and using early termination strategies to select the optimal partition balance between compression efficiency and bit budget.

The 16-Way Partition Topology

AV1 extends the superblock architecture (typically 128x128 or 64x64 pixels) down to 4x4 blocks using 16 distinct partition configurations:

Each split creates sub-blocks that can often be partitioned recursively, producing an exponential number of structural candidates for a single superblock.

The Rate-Distortion Optimization (RDO) Metric

To compare different partition options, the encoder projects candidate splits onto an RD curve using the Lagrangian formulation:

\[J = D + \lambda \cdot R\]

Where:

Bottom-Up vs. Top-Down RD Evaluation

Encoders evaluate RD curves across partition depths using recursive tree searches, typically functioning via a depth-first traversal:

  1. Leaf Cost Evaluation: For any given partition candidate, the encoder tests candidate intra-prediction or inter-prediction modes, computes residual transforms, quantizes coefficients, and reconstructs the block to yield precise values for \(D\) and \(R\).
  2. Aggregated Cost Summation: The cost of a partitioned block equals the sum of the RD costs of all its sub-blocks plus the bit cost needed to signal the partition syntax itself: \[J_{\text{split}} = \left( \sum_{i=1}^{N} J_{\text{sub\_block}_i} \right) + \lambda \cdot R_{\text{partition\_type}}\]
  3. Direct Comparison: The aggregate cost \(J_{\text{split}}\) is compared against the undivided parent cost \(J_{\text{none}}\). If a split configuration yields a lower \(J\), the encoder adopts the split branch on the RD curve.

Pruning the 16-Way Search Space

An exhaustive evaluation of all 16 partition types across every depth level is computationally prohibitive for real-time and near-real-time encoding. Production encoders like SVT-AV1 and libaom implement aggressive pruning to evaluate only the most viable points on the RD curve: