A Fast Sub-Pixel Motion Estimation Algorithm for H.264/AVC Video Coding

Weiyao Lin, Krit Panusopone, David M. Baylon, Ming-Ting Sun, Zhenzhong Chen, Hongxiang LiIEEE TCSVT 2011

Abstract

Sub-pixel motion estimation (ME) is a critical but computationally intensive component of the H.264/AVC video coding standard. This paper presents the Rough-strategy-based Fast Sub-pixel Motion Estimation (RFSME) algorithm, which employs a "rough-to-precise" strategy. By utilizing a lightweight, approximate search to identify the optimal block partition before performing high-precision refinement, the proposed algorithm reduces sub-pixel search computations by over 50% while maintaining nearly identical video quality compared to standard exhaustive methods.

Introduction

In modern video compression, Motion Estimation (ME) is essential for reducing temporal redundancy by finding how pixel blocks move between frames. The H.264/AVC standard significantly improved compression efficiency by introducing sub-pixel accuracy (searching between actual pixels) and multiple partition sizes, allowing blocks to be split into shapes ranging from 16x16 down to 4x4.

However, these advancements created a massive computational bottleneck. While integer-pixel searches have been successfully optimized, sub-pixel searches remain expensive due to the need for interpolating new pixel values. Standard encoders typically perform a full sub-pixel search for every possible partition size before selecting the best one. This approach is inherently wasteful, as significant computational resources are spent on partitions that are ultimately discarded. This paper addresses this inefficiency by proposing a strategy that prioritizes partition selection using lower-cost estimates.

Proposed Methodology: RFSME

The core innovation of this work is the Rough-strategy-based Fast Sub-pixel Motion Estimation (RFSME) algorithm. It replaces the traditional exhaustive search with a two-stage pipeline designed to minimize redundant calculations.

Comparison between the standard sub-pixel search strategy (a) and the proposed two-stage strategy (b).

The Two-Stage Pipeline

  1. Stage 1 (Rough Search): A quick, approximate motion estimate is performed for all potential partitions. This stage provides enough information to make an informed decision about the best block mode without the cost of high-precision interpolation.
  2. Stage 2 (Precise Search): A high-accuracy refinement is executed only for the single best partition selected in the first stage.

Algorithmic Steps

The RFSME algorithm follows a structured five-step process to determine the motion vectors efficiently:

Flowchart detailing the five specific steps of the RFSME algorithm.
  • Flatness Test: The algorithm first evaluates the "flatness" of the integer-pixel cost surface. If the surface is flat, it assumes sub-pixel refinement will yield minimal gains and skips the process for that partition.
  • Dual Prediction: For non-flat surfaces, the sub-pixel motion vector is predicted using two methods: spatiotemporal information from neighboring blocks and a second-order mathematical model of the error surface.
  • Bilinear Modeling: If the discrepancy between the predicted sub-pixel cost and the integer cost is significant, a bilinear model is used to select two additional neighboring points for searching.
  • Mode Selection: The encoder selects the optimal partition based on these "rough" costs, utilizing a Rate-Distortion COST function that balances pixel error with the bits required for motion vector coding.
  • Final Refinement: Only the winning partition undergoes a final 8-point quarter-pixel search to ensure maximum precision.

Experimental Results

The researchers evaluated RFSME using the H.264/AVC reference software (JM 10.2) across various standard video benchmarks, including QCIF (e.g., Akiyo, Foreman), CIF (e.g., Football), and SD resolutions (e.g., Mobile, Flower). These sequences cover a wide spectrum of motion complexity.

Efficiency and Quality

  • Search Point Reduction: RFSME reduced the average search points per partition (SP/PT) to fewer than 3 for most sequences. Compared to other fast methods like CBFPS and FPME, it consistently reduced search points by more than 50%.
  • Performance in Low Motion: In static sequences like Akiyo, search points dropped as low as 0.87, as the algorithm correctly identified that sub-pixel refinement was rarely necessary.
  • Negligible Quality Loss: Peak Signal-to-Noise Ratio (PSNR) and Bitrate (BR) remained almost identical to full-search methods. For the Mobile sequence, the PSNR was maintained at 32.95 dB while search points were slashed from 16 to 3.1.

Conclusion

The RFSME algorithm demonstrates that high precision is a "post-selection luxury." By recognizing that a rough estimate is sufficient for mode competition, encoders can achieve significant speedups. While the algorithm's complexity increases slightly at lower Quantization Parameters (QP) due to more complex error surfaces, its overall efficiency makes it a robust solution for real-time H.264/AVC encoding. Future work may involve adapting these rough-search strategies for newer standards like HEVC, which utilize different interpolation filters.

Summary updated

BibTeX
@article{lin2011fast,
  author = {Weiyao Lin and Krit Panusopone and David M. Baylon and Ming-Ting Sun and Zhenzhong Chen and Hongxiang Li},
  title = {{A Fast Sub-Pixel Motion Estimation Algorithm for H.264/AVC Video Coding}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2011},
  doi = {10.1109/tcsvt.2011.2106290},
}
Figure