Patent ID: 8432970

Claim:
A method, comprising: calculating, in parallel by a hardware component, a sum of absolute differences (SAD) for each block of a set of block types, wherein each block of the set of block types is an encoding block of image data that represents at least a portion of a macroblock, and wherein the set of block types include building blocks of the macroblock and combinations of the building blocks that form complex blocks; calculating a motion vector cost for each block of the set of block type, wherein the motion vector cost for each block is determined using an offset from a predicted motion vector, and wherein the motion vector cost for each block is calculated from a corner point of each of the plurality of blocks; calculating a block cost for each block of the set of block types based, at least in part, on a corresponding SAD and motion vector cost; selecting a combination of one or more blocks of the set of block types to represent the macroblock based, at least in part, on the block cost for each of the block types, wherein the combination of one or more blocks includes blocks of different sizes; and generating compressed image data for the macroblock based on the combination.