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 decoding video data, comprising:
receiving, from a bitstream, a first control flag, wherein the first control flag indicates whether merge mode with motion vector difference (MMVD) is enabled for one or more coding units in a video sequence; and
in accordance with a determination that the MMVD is enabled from the first control flag,
receiving a first syntax element from the video data, wherein the first syntax element identifies a set of motion vector difference (MVD) offsets from a plurality sets of MVD offsets, wherein 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;
determining, from the bitstream, a second control flag for video data corresponding to a respective coding unit of the one or more coding units, which indicates whether the MMVD is applied to the respective coding unit; and
in accordance with a determination that the MMVD is applied to the respective coding unit from the second control flag,
receiving a second syntax element for the respective coding unit that selects an MVD offset from the identified set of MVD offsets, and a third 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 to 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 and slice level.
8. The method according to claim 1 , wherein 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 acts including:
receiving, from a bitstream, a first control flag, wherein the first control flag indicates whether merge mode with motion vector difference (MMVD) is enabled for one or more coding units in a video sequence; and
in accordance with a determination that the MMVD is enabled from the first control flag,
receiving a first syntax element from the video data, wherein the first syntax element identifies a set of motion vector difference (MVD) offsets from a plurality sets of MVD offsets, wherein 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;
determining, from the bitstream, a second control flag for video data corresponding to a respective coding unit of the one or more coding units, which indicates whether the MMVD is applied to the respective coding unit; and
in accordance with a determination that the MMVD is applied to the respective coding unit from the second control flag,
receiving a second syntax element for the respective coding unit that selects an MVD offset from the identified set of MVD offsets, and a third 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 value 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 and slice level.
16. A non-transitory computer readable storage medium storing computer executable instructions, which when executed by one or more processors, enable the one or more processors to, individually or collectively, implement a method of decoding video data comprising:
receiving, from a bitstream to be decoded, a first control flag, wherein the first control flag indicates whether merge mode with motion vector difference (MMVD) is enabled for one or more coding units in a video sequence; and
in accordance with a determination that the MMVD is enabled from the first control flag,
receiving a first syntax element from the video data, wherein the first syntax element identifies a set of motion vector difference (MVD) offsets from a plurality sets of MVD offsets, wherein 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;
determining, from the bitstream, a second control flag for video data corresponding to a respective coding unit of the one or more coding units, which indicates whether the MMVD is applied to the respective coding unit; and
in accordance with a determination that the MMVD is applied to the respective coding unit from the second control flag,
receiving a second syntax element for the respective coding unit that selects an MVD offset from the identified set of MVD offsets, and a third 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.