Patent ID: 8428135

Claim:
A method of using a video encoder for selecting the best matching block in a reference frame of a video, matching a block in a current frame of the video, according to a given distortion metric, the method comprising repeating the following steps for each of a one or more examination resolutions: a) Setting an examination resolution; b) Setting a center position as a current best location; c) Examining a plurality of diamond positions around said center position a best location; d) Finding a best motion vector; e) Storing a second best motion vector; f) Testing a set of conditions involving the best motion vector, a predictor motion vector, the center position, and also testing an early termination criterion; i) If all said set of conditions are met and an early termination criterion is met, exiting and declaring a best motion vector; ii) If said set of conditions are not met, proceeding to step (g); g) Testing a plurality of positions and conditions, wherein said testing includes comparisons relating to the best motion vector, the second best motion vector, the center position, and the predictor motion vector; h) Determining a new best motion vector; i) Resetting the center position to be said new best motion vector; j) Testing the examination resolution relative to a maximum resolution; and k) Increasing the examination resolution if the examination resolution is less than the maximum resolution, and returning to step (c).