Abstract
Neural B-frame video codecs often suffer from performance degradation due to "domain shift" when the temporal distance between frames increases during inference. This paper proposes Fast-OMRA, a suite of lightweight neural classifiers designed to adaptively predict optimal downsampling factors for motion estimation. By reducing large motion to a scale manageable by the codec, Fast-OMRA achieves significant bitrate reductions (up to 12.7%) with substantially lower computational overhead compared to exhaustive search methods. The proposed method is a plug-and-play solution that enhances existing codecs without requiring retraining.
Introduction
In modern video coding, B-frames (bi-directionally predicted frames) are essential for high compression efficiency. However, most neural B-frame codecs are trained on short video segments (e.g., a Group-of-Pictures or GOP of 5 frames). When deployed in real-world scenarios with larger GOP sizes (e.g., 32 frames), the temporal distance between a frame and its reference increases significantly. This results in motion that is often too large for the model to estimate accurately, leading to a performance drop known as the domain-shift issue.
A previous solution, Online Motion Resolution Adaptation (OMRA), addressed this by downsampling frames before motion estimation. While effective, OMRA relies on an exhaustive search for the optimal downsampling factor (1x, 2x, 4x, or 8x), which is computationally expensive and impractical for real-time applications.
Proposed Method: Fast-OMRA
The authors introduce Fast-OMRA, which replaces the exhaustive search with lightweight neural classifiers to predict the best downsampling factor ($S$). The system architecture and the classifier structure are shown in Figure 1.
Three variants of the classifier were developed:
- Bi-Class (Binary Classifier): Decides if a frame should be processed at full resolution ($S=1$) or requires downsampling. If the latter, a limited search is performed.
- Mu-Class (Multi-Class Classifier): Directly predicts one of the four factors ($1, 2, 4, 8$). It is trained using soft labels based on actual Rate-Distortion (RD) costs to handle cases where multiple factors yield similar performance.
- Co-Class (Collaborative Classifier): Uses the Mu-Class prediction as a base and performs a selective search on immediate neighbors to refine the choice.
The classifier is remarkably lean, consisting of only three convolutional layers, a pooling layer, and a linear layer, ensuring minimal impact on total encoding time.
Key Insights
- Motion as a Resolution Problem: Motion estimation failure is often a mismatch in scale. Downsampling effectively brings large motion back into the spatial frequency range the model was originally trained to handle.
- Soft Labels and Entropy Weighting: Using soft labels during training allows the model to remain robust when multiple downsampling factors are viable. Additionally, entropy weighting helps the model ignore "ambiguous" training samples where the choice of factor has negligible impact on RD performance.
Experimental Results
The models were evaluated on standard benchmarks including HEVC Class B, UVG, and MCL-JCV. Fast-OMRA (specifically the Co-Class variant) achieved an average 10.2% to 12.7% BD-rate reduction compared to the baseline MaskCRT-B codec.
As shown in Figure 2, Fast-OMRA maintains nearly all the compression gains of the original exhaustive OMRA while significantly reducing computational complexity. While the original OMRA required ~5863 kMAC/pixel, Fast-OMRA variants operate at approximately 1800-1900 kMAC/pixel, offering a massive speedup for practical deployment.
Conclusion
Fast-OMRA provides a highly efficient solution to the domain-shift problem in neural video coding. By using lightweight classifiers to adapt motion resolution, it achieves state-of-the-art compression gains with a fraction of the complexity of previous methods. Future work includes making the adaptation "layer-aware" to better handle different temporal layers and integrating these classifiers directly into end-to-end codec training.
Summary updated