Using CNN for Encoder Optimization in H.265/HEVC

Ying Xie, Ming–Hsuan Yang, Jian Yu, Wenchan Jiang, Luguo Hao2017 · DOI

TL;DR

This paper proposes using deep Convolutional Neural Networks (CNNs) to optimize critical encoding decisions within the H.265/HEVC video compression standard. By leveraging CNNs for tasks like block partitioning and prediction mode selection, the authors aim to significantly speed up the encoding process, making real-time streaming more feasible.

What Problem Does This Paper Address?

Modern video compression standards like H.265/HEVC achieve high compression efficiency through complex hybrid coding architectures. These architectures rely on numerous intricate decisions made during the encoding process, such as how to partition video blocks (Coding Tree Units or CTUs) into smaller units (Coding Units or CUs, Prediction Units or PUs) and which prediction modes (intra or inter) to use. Making these decisions optimally often involves computationally expensive Rate-Distortion Optimization (RDO) searches. For real-time applications like streaming, this exhaustive search is impractical, leading to a trade-off between compression efficiency and encoding speed. The paper addresses this by proposing a way to use deep learning, specifically CNNs, to make these critical encoding decisions much faster, thereby bridging the gap between high compression and real-time performance.

Methods

The core of the proposed method involves designing specialized deep CNN architectures for several key H.265/HEVC encoding tasks:

  • CTU to CU Partitioning: Instead of relying on the standard quadtree-based recursive partitioning, the authors propose a two-stage CNN approach. The first stage determines if a 64x64 CTU needs further partitioning. If so, the second stage uses another CNN to determine the partitioning of its four 32x32 sub-regions. This approach aims to maintain the flexibility of larger CTUs while reducing computational load.
  • CU to PU Partitioning: For each CU, a CNN is designed to determine its prediction type (intra or inter) and how it should be partitioned into Prediction Units (PUs). This is done for various CU sizes (2Nx2N where N can be 32, 16, 8, or 4).
  • Intra Prediction Mode Selection: Once a PU is identified as requiring intra prediction, a CNN is used to select the optimal prediction mode from the 35 available modes. This CNN takes the PU and its neighboring blocks as input.
  • Inter Prediction: For PUs identified as requiring inter prediction, a CNN is proposed to directly output the coordinates of the most similar candidate block in a reference frame. This bypasses the computationally intensive full search for motion estimation.

The authors specifically mention using ResNet architectures for their CNN components due to their proven effectiveness in image recognition tasks and their use of small, fixed-size filters.

Datasets

The paper discusses the challenge of generating large training datasets for these deep CNN models. Their proposed solution involves using the H.265 reference software to process a large number of videos offline. This process generates optimal partition information for each CTU, which is then extracted to form training sets for the CNNs. The paper does not explicitly name specific public datasets used for training or evaluation but implies the use of diverse video content.

Key Insights and Ideas

  • CNNs as a "Fast Path" for Encoding Decisions: The central idea is that CNNs, trained on optimal encoding decisions, can act as a highly efficient surrogate for computationally expensive RDO processes.
  • Task-Specific CNN Architectures: The paper proposes distinct CNN designs tailored to the specific requirements of each critical encoding task, rather than a single monolithic model.
  • Leveraging ResNet for Video Encoding: The choice of ResNet highlights the transferability of deep learning advancements from image recognition to video processing tasks, particularly for feature extraction.
  • Two-Stage CTU Partitioning: The proposed two-stage approach for CTU partitioning is a clever way to balance the benefits of large CTUs with the need for manageable computational complexity.

Key Results

As this is a "work-in-progress" paper, specific quantitative results (e.g., exact speedup percentages or compression efficiency gains) are not detailed. However, the authors state that their proposal aims to:

  • Significantly speed up the H.265/HEVC coding process.
  • Make real-time coding and streaming applications feasible.
  • Take advantage of the capabilities of deep CNNs for content-based video encoding.

The paper presents architectural diagrams and conceptual designs for the proposed CNN models, illustrating their inputs, outputs, and internal structures.

Limitations and Future Work

  • Training Data Generation: The authors acknowledge that generating large, high-quality training data is a significant challenge. Their proposed method using the H.265 reference software is a step towards addressing this, but it is noted as a time-consuming process itself.
  • Experimental Validation: The paper is a proposal, and the authors explicitly state that their next step is to conduct large-scale experimental studies to validate their deep NN designs and refine them based on the results.
  • Depth of ResNet: The specific depth of the ResNet architecture to be used will be determined by experimental studies.

The future work will focus on conducting these extensive experiments to evaluate the performance of the proposed CNN-based encoding optimization techniques.

Summary updated

Abstract

In this work-in-progress paper, we proposed using deep learning techniques, especially the deep Convolutional Neural Network (CNN) to perform critical tasks of video ending within the framework of H.265/HEVC. Deep CNNs have achieved break-through improvements on image recognition tasks such as imag
BibTeX
@misc{xie2017using,
  author = {Ying Xie and Ming–Hsuan Yang and Jian Yu and Wenchan Jiang and Luguo Hao},
  title = {{Using CNN for Encoder Optimization in H.265/HEVC}},
  year = {2017},
  doi = {10.4108/eai.13-7-2017.2270767},
}
Figure