Patent ID: 7606311

Claim:
In a computing device that implements a video encoder, a method of encoding video, the method comprising: with the computing device that implements the video encoder, encoding an interlaced P-frame to produce encoded information, including: selecting a variable length code table from among multiple available variable length code tables, wherein the multiple available variable length code tables include a first set of tables used when four-motion-vector coding is enabled for the interlaced P-frame and a second set of tables used when four-motion-vector coding is not enabled for the interlaced P-frame; selecting a motion compensation type for a macroblock in the interlaced P-frame; selecting a field/frame coding type for the macroblock; and jointly encoding the motion compensation type and the field/frame coding type for the macroblock using the selected variable length code table, in which plural different variable length codes represent plural different combinations of values for the motion compensation type and the field/frame coding type, wherein the plural different variable length codes vary in size in relation to respective likelihoods of the plural different combinations of values; and outputting, from the computing device that implements the video encoder, the encoded information in a bit stream, wherein the outputting comprises signaling in the bit stream a code table selection syntax element, and wherein the code-table selection syntax element indicates a selection among the first set of tables or indicates a selection among the second set of tables.