Patent ID: 8767830

Claim:
A motion compensation module for use in a video encoder for encoding a video input signal, the motion compensation module comprising: a motion search module, that generates a motion search motion vector for each macroblock of a plurality of macroblocks; a motion refinement module, coupled to the motion search module, that generates a refined motion vector for each macroblock of the plurality of macroblocks, based on the motion search motion vector; a direct mode module, that generates a direct mode motion vector for each macroblock of the plurality of macroblocks, based on a plurality of macroblocks that neighbor the macroblock of pixels; an intra-prediction module that generates a best intra prediction mode for each macroblock of the plurality of macroblocks; a mode decision module, coupled to the motion refinement module, the direct mode module and the prediction module, that determines a final motion vector for each macroblock of the plurality of macroblocks based on costs associated with the refined motion vector, the direct mode motion vector, and the best intra prediction mode; a reconstruction module, coupled to the mode decision module, that generates residual pixel values corresponding to the final motion vector for each macroblock of the plurality of macroblocks; and a neighbor management module, coupled to the mode decision module, that generates and stores neighbor data that includes motion vector data associated with one macroblock of the plurality of macroblocks in a plurality of data structures associated with each of a corresponding plurality of neighboring macroblocks for retrieval by at least one of the motion search module, the motion refinement module, and the direct mode module when operating on at least one neighboring macroblock of the plurality of macroblocks to form a temporal prediction; wherein at least one of the motion search module, the motion refinement module, the direct mode module, the intra-prediction module, and the mode decision module operates in a macroblock adaptive frame and field mode and analyze each macroblock of a plurality of macroblocks based on macroblock pairs that include a top frame macroblock and bottom frame macroblock from a frame of the video input signal and a top field macroblock and a bottom field macroblock from a corresponding field of the video input signal.