Patent ID: 7711049

Claim:
A method for fast macroblock mode decision, which is used in a frame encoder meeting H.264/MPEG-4 video coding standard, the method comprising: (A) calculating a motion cost at the origin (0, 0) or a prediction motion vector (PMV) for a 4n*4n macroblock; (B) deciding a macroblock mode as 4n*4n if the motion cost calculated in step (A) is smaller than a first threshold and ending the method; (C) using an adaptive diversity search strategy to perform motion estimation on four 2n*2n blocks associated with the 4n*4n macroblock if the motion cost calculated in step (A) is greater than or equal to the first threshold; (D) calculating all motion costs of the four 2n*2n blocks; (E) deciding the macroblock mode as 2n*2n if the motion costs of the four 2n*2n blocks calculated in step (D) are smaller than a second threshold; (F) using a motion vector merge to perform the motion estimation on two 4n*2n blocks and two 2n*4n blocks associated with the 4n*4n macroblock when step (E) decides that any of the motion costs of the four 2n*2n blocks is greater than or equal to the second threshold; (G) calculating a total motion cost of the two 4n*2n blocks and a total motion cost of the two 2n*4n blocks; and (H) executing a sub-macroblock mode decision step when the two total motion costs calculated in step (0) are greater than the total motion cost of the four 2n*2n blocks, wherein step (H) further comprises: (H1) using a motion vector splitting to perform the motion estimation on two 2n*n blocks and two n*2n blocks associated with one of the four 2n*2n blocks, (H2) calculating a total motion cost of the two 2n*n blocks and a total motion cost of the two n*2n blocks, (H3) deciding the macroblock mode as 2n*2n when the total motion cost of the two 2n*n blocks and the total motion cost of the two n*2n blocks calculated in step (H2) are greater than the motion cost of the 2n*2n block, and (H4) returning to step (H1) for execution until the four 2n*2n blocks are processed completely.