Patent ID: 8320467

Claim:
A non-transitory computer-readable medium storing a computer program that, when executed by a computer, causes the computer to perform a decoding method, comprising: receiving input image compression information that was encoded using a context model corresponding to a syntax element for carrying out frame-based or field-based encoding, wherein a context model corresponding to motion vector information of a current macroblock is generated based on a sum of an absolute value of motion vector information of macroblocks neighboring the current macroblock, and if the current macroblock is subjected to the field-based encoding and a neighboring macroblock is subjected to frame-based encoding, the motion vector information corresponding to the neighboring macroblock is calculated by converting the vertical component of the motion vector information corresponding to the neighboring macroblock to the equivalent for field-based encoding and is applied to the context model corresponding to the motion vector information of the current macroblock; and decoding the input image compression information using (1) a context model corresponding to a frame/field flag indicating whether the encoding processing at the macroblock level is field-based or frame-based, and (2) the context model corresponding to the syntax element for carrying out the frame-based or the field-based encoding.