• 沒有找到結果。

H.264 is a video compression standard being jointly developed by the ITU-T video coding experts group and the ISO/IEC motion picture expert group. The main goal of this standardization effort is enhanced compression performance. The H.264 video coding standard achieves considerably higher coding efficiency than previous standards by using advanced intra-prediction and variable block size motion compensation with multiple reference frames at quarter-pel accuracy. One of the most challenging problems in implementing this encoder is variable block size motion estimation. Motion Estimation in h.264 takes 60%~80% process time. For each block size mode, motion estimation must be done for each partition block independently.

For a marcoblock, there are 41 partition search processes needed to be done. All modes need to do search once then select one best RDcost result for encoding. This is the reason why the motion estimation in h.264 takes more time than previous video coding standard.

Doing search for all modes then selecting one best mode is optimal for final encoding. But it does cost a lot of computation. In order to reduce computational load in variable block size motion estimation, there are numbers of fast mode decision/prediction algorithm proposed for h.264/avc. In [1], they classify macroblock into homogeneous and stationary by whole frame edge map. By experimental result, setting edge vector amplitude threshold is used to classify macroblock type and to select mode. There is additional calculation to generate the edge direction histogram before doing motion search. In [2], early termination algorithm that detecting zero motion block by threshold value is proposed. Selecting the threshold of a set of clips by experimental result is adopted. This method is using threshold as an early

termination criterion. Statistics result to determine the threshold is needed. If a MB is homogenous, it may tend to be coded as a larger block type. By using MAD (mean absolute difference) and MAFD (mean absolute frame difference) in [3], current MB is classified as homogenous or not. And the larger block size .mode motion search is chosen if the current MB is homogenous. These algorithms proposed in literature need to predefine threshold value setting by experimental result or perform calculation to gather information for mode prediction before motion estimation. They turn off certain block mode search options or early terminate search to reduce the computational load with the information gathering computation cost. In this thesis, we choose alternative way to reduce computational load by skipping search step but without overhead calculation for information.

In the motion estimation of h.264/avc, best search point for each partition is determined by choosing the candidate ones with the minimal value of the sum of SADcost and MVcost in the same search window. After motion estimation for each partition is done, one best block mode is selected in all modes by choosing search result with the minimal value of RDcost among all modes. The result of each mode except the lowest RDcost mode is finally discarded by mode decision making process.

It means that the rest best candidate search points in other modes are discarded by mode decision procedure. Because the RDO procedure lists the RDcost of all modes and chooses the lowest RDcost mode, every mode has chance to be discarded in the final RDO mode selection procedure. Doing the search becomes meaningless because the search result is discarded by final RDO stage: mode selection. It comes a thought:

Is it necessary to search all candidates even the result is finally abandoned?

Our observation find that the chance of the mode discarded is larger when the search point is further from start point. The result of the best mode is center-biased.

When each mode doing search, compared to its candidate only, the minimal SAD and MV cost search point candidate is selected. But when doing mode selection procedure, mode result with the further distance search point candidate is less chance to be selected as the final encoding mode. It means that the longer MV length result one mode has, the more possibility the result is discarded in mode selection. This tendency makes us consider that the search may be skipped by distance check.

We also find that MV result has the similar distance distribution characteristic among all modes. The meaning of the similar distance distribution tells that the correlation about distance from start point for all block modes is high. This correlation among modes may reveal some information about search distance.

In order to save search steps in search process that may be discarded in mode selection procedure, we propose an adaptive algorithm that adjusts search step range for motion estimation of each mode to reduce the computational load.

The main ideas are:

1. Best mode result is center-biased; we try to find the range that mode result is discarded outside this range.

2. By using the neighbor motion vectors result, we predict the distance cap that limits the search steps.

3. When certain mode search is end but final encoding mode is not determined, there is some information from the search result of the search-end mode.

From the observation, the similar motion vector distance distribution of each block help us to adjust this range.

In this thesis, a prediction–correction search range scheme for VBSME is proposed as follow. First, we predict the search range by neighbor MVs result by the concept of mv predictor and the correlation of neighbor marcoblock. Second, without limiting 16x16 mode search range, we do 16x16 mode search and get its mv length result. Then, we compare the predicted search range and mv length of 16x16 mode, take larger one as limited search range of other modes. When doing other mode search, if the search point is outside the limited search range, this search point is not searched. By using this algorithm, we can achieve 20%-50% me time saving compared to FME result with PSNR loss about 0.01-0.02 dB.

相關文件