Patent ID: 7924920

Claim:
A method of decoding encoded video information using a video decoder, the method comprising: receiving encoded video information in a bitstream; and with the video decoder, decoding a current interlaced frame coded picture using the encoded video information, wherein the decoding includes motion vector prediction for a field motion vector for a current field of a current macroblock in the current interlaced frame coded picture, and wherein the motion vector prediction includes: with the video decoder, determining a number of one or more valid candidate motion vectors for predicting the field motion vector for the current field of the current macroblock in the current interlaced frame coded picture, wherein the current field has a polarity, and wherein the field motion vector and the one or more valid candidate motion vectors refer to a reference frame; with the video decoder, for each of the one or more valid candidate motion vectors, determining field polarity of the valid candidate motion vector, including determining whether the valid candidate motion vector refers to a same polarity field in the reference frame or opposite polarity field in the reference frame, wherein the same polarity field in the reference frame has polarity the same as the polarity of the current field, and wherein the opposite polarity field in the reference frame has polarity opposite the polarity of the current field; and with the video decoder, calculating a motion vector predictor for the field motion vector based at least in part on the one or more valid candidate motion vectors and based at least in part on the determined field polarities of the one or more valid candidate motion vectors, wherein the calculating the motion vector predictor includes: determining a number of same field candidate motion vectors; determining a number of opposite field candidate motion vectors; and determining the motion vector predictor depending on the number of valid candidate motion vectors, the number of same field candidate motion vectors and the number of opposite field candidate motion vectors, including, when the number of valid candidate motion vectors is three: if the number of same field candidate motion vectors is three or the number of opposite field candidate motion vectors is three, computing median of the valid candidate motion vectors; otherwise, if the number of same field candidate motion vectors is greater than or equal to the number of opposite field candidate motion vectors, selecting one of the same field candidate motion vectors, and otherwise, selecting one of the opposite field candidate motion vectors.