H.264 Video Codec Mode Decision Using SAD and SSD Evaluation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional H.264 video encoders face high computational complexity when evaluating all prediction modes to determine the best prediction mode for macroblocks, leading to inefficient processing and increased resource utilization.
Innovation Solution
A codec system that performs integer level motion vector estimation using a hexagonal search followed by a diamond search to find the best motion vector for each block size, evaluating only the necessary prediction modes based on cost, thereby reducing computational complexity by selecting the mode with the least cost for coding.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If all prediction modes are evaluated to find the best prediction mode, then video quality is improved, but computational complexity increases
Solution Approach 1:
The prediction mode evaluation process is segmented into multiple stages: initial coarse evaluation using sum of absolute differences (SAD), followed by refined evaluation using sum of squared differences (SSD) only for candidate modes, and finally half-pel precision evaluation only for the best candidate. This segmentation allows the system to maintain video quality while reducing overall computational complexity by applying different evaluation rigor at different stages.
Solution Approach 2:
Different evaluation methods are applied to different prediction modes based on their likelihood of being optimal. Integer-pel modes are evaluated using SAD for initial screening, while only promising candidates undergo SSD evaluation. Half-pel modes are evaluated only for the single best candidate. This local quality approach ensures high video quality for critical decisions while reducing computational burden for less critical evaluations.
2Manufacturing precision
If all prediction modes are evaluated to find the best prediction mode, then coding accuracy is improved, but processing time increases
Solution Approach 1:
The system performs preliminary evaluation of all prediction modes using the computationally efficient SAD metric before committing to more expensive SSD evaluations. This preliminary action identifies candidate modes that are likely to be optimal, allowing the system to maintain coding accuracy while significantly reducing the number of modes that require full SSD evaluation and half-pel processing.
Solution Approach 2:
The system skips detailed SSD evaluation and half-pel precision processing for prediction modes that are unlikely to be optimal, based on initial SAD evaluation results. Only the best candidate mode undergoes half-pel precision evaluation, while other modes are skipped at the refined evaluation stage. This skipping strategy maintains coding accuracy for the selected mode while dramatically reducing overall processing time.
Data Source
AI summary
The a method and system of making a coding mode decision for a given macroblock of a current frame is disclosed. A codec for making the coding mode decision is provided. The codec disclosed herein performs prediction of the motion vectors in inter-frames. The macroblock may be coded in one of six inter modes, such as skip mode, P16×16 mode, P16×8 mode, P8×16 mode, and P8×8 mode or in intra modes such as intra 4×4 mode and intra 16×16 mode. Each block in the inter-frame is predicted from a block of equal size in the reference frame. In each mode, the codec finds a best match, that is, a motion vector for each block size in the reference frame and calculates a corresponding cost. The codec evaluates each mode based on cost and the mode with the least cost is selected as best mode for coding the given macroblock.


