A Bayesian Approach to Block Structure Inference in AV1-Based Multi-Rate Video Encoding

Bichuan Guo, Xinyao Chen, Jiawen Gu, Yuxing Han, Jiangtao Wen

Abstract

Modern video streaming services require encoding content at multiple bitrates to ensure smooth playback across varying network conditions. However, the computational cost of state-of-the-art codecs like AV1 makes this multi-rate encoding process extremely resource-intensive. This paper proposes a Bayesian inference model that leverages block partitioning decisions from a high-quality reference stream to accelerate lower-quality local instances. By statistically modeling the correlation between reference and local block structures and incorporating a "safety valve" to maintain model accuracy, the proposed method achieves an average encoding time reduction of 36.1% with negligible impact on video quality.

Introduction

The AV1 codec offers superior compression efficiency compared to its predecessors but at the cost of massive computational complexity. A primary bottleneck is Rate-Distortion Optimization (RDO), specifically the recursive process of frame partitioning into blocks. In multi-rate encoding scenarios—where a single source is encoded into multiple quality levels—redundant computations occur across different bitrate versions. While cross-rate information sharing has been successful in older codecs like HEVC, AV1's unique features, such as "special" reference frames (golden and altref frames), make simple structure copying ineffective, often leading to substantial quality degradation.

Methodology: Bayesian Block Structure Inference

The authors address these challenges by introducing a Bayesian framework tailored for AV1. The system designates the highest-quality stream as a "reference instance," which undergoes full RDO. Subsequent "local instances" at lower bitrates use the reference's partitioning decisions to prune their own search space.

Statistical Correlation and Posterior Probability

The core of the approach lies in the observation that block splitting decisions are highly correlated across quality levels. If a block is split at a high quality, it is statistically likely to be split at a lower quality. The model calculates the posterior probability of a split based on the split degrees observed in the reference frame and the most recent special frame.

Statistical correlation of block depths between reference ($d_R$) and local ($d_L$) instances across different quality levels.

Pruning and Safety Mechanisms

To balance speed and quality, the encoder employs two key thresholds:

  • Early Termination ($\tau_1$): If the calculated probability of a split is very low, the search for that split is skipped.
  • Sampling Frequency ($\tau_2$): To prevent the statistical model from becoming biased, a full search is periodically performed regardless of the probability. This ensures the model remains synchronized with the specific characteristics of the video content.

Furthermore, "special frames" are always fully encoded. This ensures they provide high-fidelity evidence for the Bayesian model, preventing error propagation throughout the sequence.

Experimental Results

The model was evaluated using standard test sequences ranging from 240p to 1080p. The results demonstrate a robust trade-off between computational savings and coding efficiency.

Performance comparison showing BD-rate increase and encoding time reduction ($\Delta T$) for the original and improved Bayesian methods.

As shown in the results, the proposed Bayesian method achieved an average reduction in encoding time of 36.1%, with some high-resolution sequences reaching over 50%. The cost of this speedup was a negligible 0.46% average increase in BD-rate, a measure of bitrate versus quality that is generally considered invisible to the end-user when under 1%.

Key Insights

  • Resolution Sensitivity: High-resolution videos (like 1080p) can tolerate more aggressive pruning than lower-resolution videos because they naturally contain more large, unsplit blocks.
  • Bimodal Probability: The posterior probability for block splits tends to be bimodal (either very high or very low), which validates the use of threshold-based early termination.
  • AV1 Specificity: Accounting for AV1's special frames is crucial; failing to do so leads to significant quality loss that propagates through the video sequence.

Conclusion and Future Work

The proposed Bayesian inference model effectively mitigates the computational burden of AV1 multi-rate encoding. Future improvements could include dynamic threshold adaptation to further optimize the speed-quality trade-off and extending the inference model to other encoding decisions like motion vector estimation. Additionally, adapting the model for multi-resolution encoding (e.g., encoding a 1080p source into 720p and 360p versions simultaneously) remains a promising area for exploration.

Summary updated

BibTeX
@inproceedings{guo2018bayesian,
  author = {Bichuan Guo and Xinyao Chen and Jiawen Gu and Yuxing Han and Jiangtao Wen},
  title = {{A Bayesian Approach to Block Structure Inference in AV1-Based Multi-Rate Video Encoding}},
  booktitle = {DCC},
  year = {2018},
  doi = {10.1109/dcc.2018.00047},
}
Figure