Patent ID: 8571116

Claim:
An encoding method for adaptively carrying out field-based or frame-based encoding processing at a macroblock level with image information as an input, the encoding method comprising: generating a context model corresponding to motion vector information of a current macroblock, wherein the context model is generated based on a sum of absolute values of motion vector information of macroblocks neighboring the current macroblock, and when the current macroblock is subjected to the frame-based encoding and a neighboring macroblock is subjected to field-based encoding, calculating the motion vector information corresponding to the neighboring macroblock by converting a vertical component of the motion vector information corresponding to the neighboring macroblock to an equivalent for frame-based encoding, and applying the motion vector information corresponding to the neighboring macroblock to the context model corresponding to the motion vector information of the current macroblock; and carrying out the encoding processing using the context model corresponding to the motion vector information of the current macroblock generated in the generating step.