Patent ID: 8208548

Claim:
A method for selecting a predictive macroblock partition in motion estimation and compensation in a video encoder comprising: determining a bit rate signal, wherein determining said bit rate signal comprises: generating a residual error signal by subtracting a macroblock of a current frame from a section of a search area; dividing said residual error signal into an integral number of blocks; transforming said integral number of blocks into the frequency domain from the spatial domain to create a transform of said integral number of blocks; generating a quantization approximation block through a first combination of shifts and adds of said transform of said integral number of blocks, said quantization approximation block having a number of non-zero coefficients and a number of zero value coefficients, wherein said first combination of shifts and adds is based on a first quantization parameter; calculating a sum of absolute levels of said quantization approximation block; and calculating said bit rate signal for said quantization block by summing three times said number of non-zero coefficients plus said number of zero-value coefficients plus said sum of absolute levels; generating a distortion signal, wherein said generating of said distortion signal comprises; generating an inverse quantization approximation block through a second combination of shifts and adds of said transform of said integral number of blocks, wherein said second combination of shifts and adds is based on a second quantization parameter; and determining a squared-error between said quantization approximation block and said inverse quantization approximation block, wherein said distortion signal equals said squared-error; calculating a cost based on said bit rate signal and said distortion signal; and determining a motion vector from said cost, wherein said motion vector designates said predictive macroblock partition.