Patent ID: 6996182

Claim:
A method for motion estimation in video encoding for determining a motion vector corresponding to a first block in a current frame and a second block in a reference frame, wherein the second block in the reference frame is the best-matching block related to the first block in the current frame, a search region is predetermined and has a plurality of successive rows, including a (P−1)-th row, a P-th row, and a (P+1)-th row, each row of the search region has a plurality of points, and a motion vector predictor is located on the P-th row, the method comprising the steps of: (a) calculating the respective distortions corresponding to all points in the P-th, (P+1)-th, and (P−1)-th rows respectively; (b) comparing all distortions; (c) determining whether or not the point with a minimum distortion is in the P-th row, the uppermost or the lowest row of the search region, and if yes, then the method proceeds to step (g); (d) determining whether or not the point with a minimum distortion is in the (P+1)-th row, and if yes, then the method proceeds to step (f); (e) decreasing P by 1, calculating the corresponding distortions of all points in the (P−1)-th row respectively, and repeating step (b); (f) increasing P by 1, calculating the corresponding distortions of all points in the (P+1)-th row respectively, and repeating step (b); (g) determining a corresponding motion vector from the point with a minimum distortion.