Patent ID: 7881386

Claim:
Method for making a coding mode decision for a current macroblock of a video frame in a video codec of an electronic device, the method comprising: determining, via the video codec, whether to use a pre-mode decision process or a post-mode decision process in making the coding mode decision based on a position of the current macroblock within the video frame relative to a pattern of macroblock positions defined for the video frame, wherein the pre-mode decision process occurs prior to motion estimation and spatial estimation and wherein the post-mode decision process occurs after motion estimation and spatial estimation; if the pre-mode decision process is determined to be used, then evaluating, via the video codec, a plurality of coding modes without performing motion estimation and spatial estimation, wherein each of the plurality of coding modes is associated with a neighboring macroblock; and selecting, via the video codec, the coding mode for the current macroblock based upon the evaluation of the plurality of coding modes; and if the post-mode decision process is determined to be used, then extracting, via the video codec, a quality measure from the current macroblock following motion estimation and spatial estimation; and selecting, via the video codec, the coding mode for the current macroblock based upon the quality measure.