1 A method for sub-pixel motion estimation in video encoding comprising: generating a plurality of non-linear building surfaces; generating, in real time, an estimated matching criterion surface representing a matching criterion between a first image and a second image based on the building surfaces and a plurality of sample points of an actual matching criterion surface; selecting, in real time, a position on the estimated matching criterion surface, wherein the position represents a best matching between the first image and the second image.