Patent ID: 8139101

Claim:
A method comprising: obtaining, with a video processing apparatus, video frames, the video frames including macroblocks; comparing, with the video processing apparatus, a current macroblock in a current frame stored in a current frame buffer with a corresponding reference macroblock in a reference frame stored in a reference frame buffer; setting, with the video processing apparatus, a flag value for said current macroblock if the comparing indicates that the current macroblock and the corresponding reference macroblock are substantially different; creating, with the video processing apparatus, a residual macroblock by calculating a respective difference value for all pixels in a macroblock by respectively subtracting all pixels in the current macroblock from all corresponding pixels in the corresponding reference macroblock; respectively dividing, with the video processing apparatus, the residual macroblock into subsets D n , wherein n denotes an index of a subset; and executing, with the video processing apparatus, a sub-comparison for each D n by comparing a multiplication of a sum of values in D n and a weighting function (w) with a threshold value T n , wherein the current macroblock and the corresponding reference macroblock are determined as substantially different if the multiplication is greater than T n for one or more of said subsets.