A method for motion estimation in video coding. The row containing a motion vector
predictor is determined as a P-th row and the rows adjacent to the P-th row are
the (P+1)-th row and the (P-1)-th row. The method includes the following steps:
(a) calculating of the 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, and if yes,
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, 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); and (g) determining a corresponding motion
vector from the point with a minimum distortion.