Patent ID: 8279933

Claim:
A method of encoding a digital video image, comprising: using a computer processor for partitioning a current frame into non-overlapping macroblocks; using the computer processor for computing a motion estimation termination threshold for a current macroblock using macroblock parameters; using the computer processor for selecting an initial motion vector for the current macroblock using spatio-temporal neighboring macroblock parameters; using the computer processor for computing a block variance of luminance components of the current macroblock; using the computer processor for determining an initial distortion for the current macroblock by computing a sum of absolute difference based on the computed block variance; using the computer processor for comparing the computed initial distortion to the computed motion estimation termination threshold; and using the computer processor for encoding the current macroblock based on the outcome of the comparison; wherein computing the sum of absolute difference between the current and reference macroblocks comprises: using the computer processor for calculating a first and second threshold values based on a user defined parameter; using the computer processor for computing variance of current macroblocks; if the calculated variance of the current macroblocks is less than or equal to the first threshold value, then computing the sum of absolute difference using a first fraction of the number of pixels in the current and reference macroblocks, and then multiplying the computed sum of absolute difference by a first scale factor to obtain the estimated sum of absolute difference for all the pixels in the macroblocks; if the calculated variance of the current macroblocks is more than the first threshold value and less than the second threshold value, then computing the sum of absolute difference using a second fraction of the number of pixels in the current and reference macroblocks, and then multiplying the computed sum of absolute difference by a second scale factor to obtain the estimated sum of absolute difference for all the pixels in the macroblocks; and if the calculated variance of the current macroblocks is greater than the second threshold value, then computing sum of absolute difference using all of the pixels in the current and reference macroblocks.