1. Field of the Invention
The present invention relates generally to an image processing technique, and more particularly, to a low complexity fractional motion estimation algorithm for multimedia video coding applications.
2. Description of the Related Art
Among the image processing techniques, for example, U.S. Pat. Nos. 7,408,988 and 7,580,456 each disclosed something about a fractional pixel motion estimation method. In the field of BACKGROUND of the latter patent, the integer pixel motion estimation and the fractional pixel motion estimation under the video coding standard H.264 were recited.
In H.264/AVC encoding, the fractional pixel motion estimation method is to primarily search 41 blocks of different sizes including one 16×16 block, two 16×8 blocks, two 8×16 blocks, four 8×8 blocks, eight 8×4 blocks, eight 4×8 blocks, and sixteen 4×4 blocks. After the search for all of the blocks, a 16×16 macroblock of optimal estimation is generated.
According to the aforesaid method, while the search for each of the blocks is performed, it is necessary to carry out the interpolation computation of the pixels in the reference, e.g. the previous frame or image, to acquire the required fractional pixels, then to search each pixel within the corresponding predetermined search range, and finally to get a sum of absolute transformed differences (SATD) of each of the aforesaid pixels. After the search for all of the pixels, the pixel of minimum SATD and the corresponding motion vector (MV) can be obtained. After the search for all of the 41 blocks is done, the best combination can be selected for encoding.
In both of the above-identified two patents, the search is executed for each of the blocks and no reduction mode is applied to the 41 blocks, such that the whole process is complex and only one combination mode is selected at last to need further improvement.
The primary objective of the present invention is to provide a fractional motion estimation method, which adopts the adaptive mode selection to decrease computation complexity, to effectively enhance efficiency of hardware, to lower power consumption, and to maintain consistent image quality.
The foregoing objective of the present invention is attained by the fractional motion estimation method including the steps of a) categorizing search modes of the macroblock into a single mode, a reduced mode, and a full mode; only 16×16 blocks are searched in the single mode, only 16×16 blocks, 16×8 blocks, 8×16 blocks and 8×8 blocks are searched in the reduced mode, and 16×16 blocks, 16×8 blocks, 8×16 blocks, 8×8 blocks, 8×4 blocks, 4×8 blocks, and 4×4 blocks are searched in the full mode, each of the blocks being composed of a plurality of integer pixels; in the 4×4 blocks as an example, there are 16 integer pixels; b) determining a search mode for a to-be-processed macroblock according to a predetermined condition as follows; select the single mode if the best mode of the integer pixel motion estimation of the to-be-processed macroblock is 16×16 and the mode of its predetermined adjacent macroblock is 16×16; select the reduced mode if the best mode of the integer pixel motion estimation of the to-be-processed macroblock is not 16×16 and the mode of its predetermined adjacent macroblock is 16×16; select the reduced mode if the best mode of the integer pixel motion estimation of the to-be-processed macroblock is one of 16×16, 16×8, and 8×16 modes and the mode of its predetermined adjacent macroblock is one of 16×16, 16×8, and 8×16 modes, or (4) select the full mode if the best mode of the integer pixel motion estimation of the to-be-processed macroblock and the mode of its predetermined adjacent macroblock are both different from the aforesaid three conditions; c) conducting a fractional motion estimation of a to-be-estimated pixel according to the search mode determined in the step b); the fractional motion estimation can be done by accessing a pixel located in a reference and corresponding to the to-be-estimated pixel, performing an interpolation computation of such two pixels to get a half pixel and a quarter pixel, calculating the SATD and the MV cost of each of the pixels (integer pixel, half pixel, and quarter pixel) within a predetermined search range corresponding to the to-be-estimated pixel, and comparing those pixels to get the location of the best pixel (integer pixel, half pixel, or quarter pixel) and the best macroblock type corresponding to the to-be-estimated pixel to further get the best MV of the to be-processed macroblock; and d) repeating the steps b) and c) for the next to-be-estimated pixel and its corresponding macroblock.
To specify the technical features of the present invention, the following preferred embodiment is recited in view of accompanying drawings.
In the H.264/AVC encoding, the fractional motion estimation needs to search 41 different blocks. After a simulated analysis in this regard, the present inventor became aware that 16×16 macroblocks selected after a search for the macroblocks in a film are the highest in ratio. In different films, the probability of selecting the 16×16 macroblocks is approximately 70-90%.
The present invention comes up with an adaptive mode selection technique characterized in that the correlation between a macroblock and an adjacent macroblock thereto is analyzed to conclude that the chances of the current macroblock selected to be 16×16 mode are more than 85%, and the chances of the current macroblock selected to be 16×16 mode, 16×8 mode, or 8×16 mode are close to 95%, as two adjacent upper and left macroblocks to be encoded each are 16×16 mode. If the result of the integer pixel motion estimation is analyzed, when the estimated optimal mode is 16×16 and the upper and left macroblocks each are 16×16 mode, the chances of the current macroblock selected to be 16×16 mode will rise up to more than 90%, and the chances of the current macroblock selected to be 16×16 mode, 16×8 mode, or 8×16 mode will be more than 96%.
Referring to
The predetermined adjacent macroblocks indicate the macroblocks located at the upper side and the left side of the to-be-processed macroblock separately.
The practical operation can proceed as shown in
The aforesaid predetermined search range, as shown in
The aforesaid way to get the best pixel is to add up the SATD and the MV cost of each pixel and to compare respective sums of the SATD and the MV cost of those pixels, wherein a pixel of the minimal sum is the best pixel.
d) Repeat the steps b) and c) for another (next) to-be-estimated pixel and its corresponding macroblock.
The operations mentioned in the above-identified steps a) to d) can be based on the hardware architecture indicated in
Briefly, the present invention can analyze the macroblocks to define the three search modes. The left and upper macroblocks and the integer pixel motion estimation can be used for identifying which search mode is proper, belonging to an adaptive mode selection technique, whereby some parts of the computation can be spared to decrease throughput of the computation. In conclusion, the present invention can effectively enhance the efficiency of hardware and decrease the power consumption while maintaining constant image quality.
Although the present invention has been described with respect to a specific preferred embodiment thereof, it is in no way limited to the specifics of the illustrated structures but changes and modifications may be made within the scope of the appended claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 99117786 | Jun 2010 | TW | national |