Merge mode with motion vector differences
An electronic apparatus performs a method of decoding video data. The method comprises: receiving, from a bitstream, a first control flag that indicates merge mode with motion vector difference (MMVD) is enabled for one or more coding units in a video sequence; receiving a first syntax from the video data that identifies a set of motion vector difference (MVD) offsets from a plurality sets of MVD offsets; receiving, a second control flag corresponding to a respective coding unit of the one or more coding units, which indicates the MMVD is applied to the coding unit; receiving a second syntax that selects an MVD offset from the identified set of MVD offsets, and a third syntax that selects an MVD direction; forming MVD based on the selected MVD offset and MVD direction; and reconstructing the coding unit by applying the formed MVD to generate motion vectors to the coding unit.
1 . A method of encoding video data, comprising:
in response to a determination that merge mode with motion vector difference (MMVD) is enabled for one or more coding units in a video sequence,
generating a first syntax element, wherein the first syntax element identifies a set of motion vector difference (MVD) offsets from a plurality sets of MVD offsets, wherein each set of the plurality sets of MVD offsets comprises a plurality of MVD offsets and the plurality sets of MVD offsets comprise a first set of MVD offsets and a second set of MVD offsets, wherein a first set of binarization codewords is assigned to the first set of MVD offsets, and a second set of binarization codewords is assigned to the second set of MVD offsets, and wherein a codeword for an offset value in the first set of binarization codewords is different from a codeword for the offset value in the second set of binarization codewords; and
in response to a determination that the MMVD is applied to a respective coding unit of the one or more coding units,
generating a second syntax element, which is different from the first syntax element, for the respective coding unit that selects an MVD offset from the identified set of MVD offsets, and a third syntax element, which is different from the first syntax element, for the respective coding unit that selects an MVD direction corresponding to the selected MVD offset; and
reconstructing the respective coding unit by applying the selected MVD offset and MVD direction to generate motion vectors for the respective coding unit.
2 . The method according to claim 1 , wherein the first set of MVD offsets is a subset of the second set of MVD offsets.
3 . The method according to claim 1 , wherein the first set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4.
4 . The method according to claim 1 , wherein the second set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4, 8, 16, and 32.
5 . The method according to claim 1 , wherein the first set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4 and their corresponding binarization codewords of 1, 01, 001, 0001 and 0000, respectively.
6 . The method according to claim 1 , wherein the second set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4, 8, 16, and 32 and their corresponding binarization codewords of 000, 001, 011, 010, 10, 110, 1110, and 1111, respectively.
7 . The method according to claim 1 , wherein the first syntax element is signaled at one or more of different coding levels including sequence-level, picture-level or slice level.
8 . The method according to claim 1 , further comprising:
generating a first control flag, wherein the first control flag indicates whether the MMVD is enabled for the one or more coding units, and the first control flag is equal to 1 when the MMVD is enabled.
9 . An electronic apparatus comprising:
one or more processing units;
memory coupled to the one or more processing units; and
a plurality of programs stored in the memory that, when executed by the one or more processing units, cause the electronic apparatus to perform a method of encoding video data comprising:
in response to a determination that merge mode with motion vector difference (MMVD) is enabled for one or more coding units in a video sequence,
generating a first syntax element, wherein the first syntax element identifies a set of motion vector difference (MVD) offsets from a plurality sets of MVD offsets, wherein each set of the plurality sets of MVD offsets comprises a plurality of MVD offsets and the plurality sets of MVD offsets comprise a first set of MVD offsets and a second set of MVD offsets, wherein a first set of binarization codewords is assigned to the first set of MVD offsets, and a second set of binarization codewords is assigned to the second set of MVD offsets, and wherein a codeword for an offset value in the first set of binarization codewords is different from a codeword for the offset value in the second set of binarization codewords; and
in response to a determination that the MMVD is applied to a respective coding unit of the one or more coding units,
generating a second syntax element, which is different from the first syntax element, for the respective coding unit that selects an MVD offset from the identified set of MVD offsets, and a third syntax element, which is different from the first syntax element, for the respective coding unit that selects an MVD direction corresponding to the selected MVD offset; and
reconstructing the respective coding unit by applying the selected MVD offset and MVD direction to generate motion vectors for the respective coding unit.
10 . The electronic apparatus according to claim 9 , wherein the first set of MVD offsets is a subset of the second set of MVD offsets.
11 . The electronic apparatus according to claim 9 , wherein the first set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4.
12 . The electronic apparatus according to claim 9 , wherein the second set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4, 8, 16, and 32.
13 . The electronic apparatus according to claim 9 , wherein the first set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4 and their corresponding binarization codewords of 1, 01, 001, 0001 and 0000, respectively.
14 . The electronic apparatus according to claim 9 , wherein the second set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4, 8, 16, and 32 and their corresponding binarization codewords of 000, 001, 011, 010, 10, 110, 1110, and 1111, respectively.
15 . The electronic apparatus according to claim 9 , wherein the first syntax element is signaled at one or more of different coding levels including sequence-level, picture-level or slice level.
16 . The electronic apparatus according to claim 9 , the method of encoding video data further comprising:
generating a first control flag, wherein the first control flag indicates whether the MMVD is enabled for the one or more coding units, and the first control flag is equal to 1 when the MMVD is enabled.
17 . A method for storing a bitstream, comprising:
generating a bitstream by performing an encoding method; and
storing the bitstream,
wherein the encoding method comprises:
in response to a determination that merge mode with motion vector difference (MMVD) is enabled for one or more coding units in a video sequence,
generating a first syntax element, wherein the first syntax element identifies a set of motion vector difference (MVD) offsets from a plurality sets of MVD offsets, wherein each set of the plurality sets of MVD offsets comprises a plurality of MVD offsets and the plurality sets of MVD offsets comprise a first set of MVD offsets and a second set of MVD offsets, wherein a first set of binarization codewords is assigned to the first set of MVD offsets, and a second set of binarization codewords is assigned to the second set of MVD offsets, and wherein a codeword for an offset value in the first set of binarization codewords is different from a codeword for the offset value in the second set of binarization codewords; and
in response to a determination that the MMVD is applied to a respective coding unit of the one or more coding units,
generating a second syntax element, which is different from the first syntax element, for the respective coding unit that selects an MVD offset from the identified set of MVD offsets, and a third syntax element, which is different from the first syntax element, for the respective coding unit that selects an MVD direction corresponding to the selected MVD offset; and
reconstructing the respective coding unit by applying the selected MVD offset and MVD direction to generate motion vectors for the respective coding unit.
18 . The method according to claim 17 , wherein the first set of MVD offsets is a subset of the second set of MVD offsets.
19 . The method according to claim 17 , wherein the first set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4.
20 . The method according to claim 17 , wherein the second set of MVD offsets includes offset values (in unit of sample) of ¼, ½, 1, 2, 4, 8, 16, and 32.