CPC H04N 19/521 (2014.11) [H04N 19/13 (2014.11); H04N 19/1887 (2014.11); H04N 19/436 (2014.11); H04N 19/46 (2014.11); H04N 19/463 (2014.11); H04N 19/52 (2014.11); H04N 19/70 (2014.11); H04N 19/91 (2014.11); H04N 19/17 (2014.11); H04N 19/184 (2014.11)] | 2 Claims |
1. A method for encoding, into a bitstream, a difference motion vector which indicates a difference between a motion vector used to predict a picture and a predicted motion vector that is a prediction of the motion vector, the method comprising:
encoding, into the bitstream, a code string, wherein the code string includes a first flag that indicates whether or not a horizontal component of the difference motion vector is zero and a second flag that indicates whether or not a vertical component of the difference motion vector is zero;
when the encoded code string indicates that the horizontal component of the difference motion vector is not zero and that the vertical component of the difference motion vector is not zero:
encoding, into the bitstream, first grouped data that includes (i) first prefix data that is a prefix portion of the horizontal component of the difference motion vector, and (ii) second prefix data that is a prefix portion of the vertical component of the difference motion vector; and
encoding, into the bitstream, subsequent to encoding the first grouped data, second grouped data that includes (i) first suffix data that is a suffix portion of the horizontal component of the difference motion vector, (ii) first sign data that indicate indicates the horizontal component being positive or negative, (iii) second suffix data that is a suffix portion of the vertical component of the difference motion vector, and (iv) second sign data that indicates the vertical component being positive or negative,
wherein the first flag, the second flag, the first prefix data, the second prefix data, the first suffix data, first sign data, the second suffix data, and the second sign data are coded in this order in the bitstream.
|