Method and apparatus of signaling the number of candidates for merge mode
A method of obtaining a maximum number of geometric partitioning merge mode candidates for video decoding and a video decoding apparatus are disclosed, wherein the method comprises: obtaining a bitstream for a video sequence; obtaining a value of a first indicator according to the bitstream, wherein the first indicator represents a maximum number of merging motion vector prediction (MVP) candidates; obtaining a value of a second indicator according to the bitstream, wherein the second indicator represents whether a geometric partition based motion compensation is enabled for the video sequence; and parsing a value of a third indicator from the bitstream, when the value of the first indicator is greater than a threshold and when the value of the second indicator is equal to a preset value, wherein the third indicator represents a maximum number of geometric partitioning merge mode candidates subtracted from the value of the first indicator.
1 . A method to obtain a maximum number of geometric partitioning merge mode candidates for video decoding, wherein the method comprises:
obtaining a bitstream for a video sequence;
parsing a value of a first indicator from the bitstream, wherein the first indicator represents a maximum number of merging motion vector prediction (MVP) candidates;
parsing a value of a second indicator from the bitstream, wherein the second indicator represents whether a geometric partition based motion compensation is enabled for the video sequence;
when the value of the first indicator indicates that the maximum number of merging MVP candidates is greater than 2 and the value of the second indicator indicates that the geometric partition based motion compensation is enabled, parsing a value of a third indicator from the bitstream, wherein the third indicator represents a maximum number of geometric partitioning merge mode candidates subtracted from the value of the first indicator;
when the value of the first indicator indicates that the maximum number of merging MVP candidates is equal to 2 and the value of the second indicator indicates that the geometric partition based motion compensation is enabled, setting the value of the maximum number of geometric partitioning merge mode candidates to 2 ; and
when the value of the first indicator indicates that the maximum number of merging MVP candidates is less than 2 or when the value of the second indicator indicates that the geometric partition based motion compensation is disabled, setting the value of the maximum number of geometric partitioning merge mode candidates to 0.
2 . A decoder, comprising:
one or more processors; and
a computer-readable storage medium coupled to the processors and storing programming for execution by the processors, wherein the programming, when executed by the processors, configures the decoder to perform operations comprising:
obtaining a bitstream for a video sequence;
parsing a value of a first indicator from the bitstream, wherein the first indicator represents a maximum number of merging motion vector prediction (MVP) candidates;
parsing a value of a second indicator from the bitstream, wherein the second indicator represents whether a geometric partition based motion compensation is enabled for the video sequence;
when the value of the first indicator indicates that the maximum number of merging MVP candidates is greater than 2 and the value of the second indicator indicates that the geometric partition based motion compensation is enabled, parsing a value of a third indicator from the bitstream, wherein the third indicator represents a maximum number of geometric partitioning merge mode candidates subtracted from the value of the first indicator;
when the value of the first indicator indicates that the maximum number of merging MVP candidates is equal to 2 and the value of the second indicator indicates that the geometric partition based motion compensation is enabled, setting the value of the maximum number of geometric partitioning merge mode candidates to 2; and
when the value of the first indicator indicates that the maximum number of merging MVP candidates is less than 2 or when the value of the second indicator indicates that the geometric partition based motion compensation is disabled, setting the value of the maximum number of geometric partitioning merge mode candidates to 0.
3 . A non-transitory computer-readable medium comprising a bitstream for a video sequence and one or more instructions executable by at least one processor to perform operations of decoding of the bitstream, the operations comprising:
parsing a value of a first indicator from the bitstream, wherein the first indicator represents a maximum number of merging motion vector prediction (MVP) candidates;
parsing a value of a second indicator from the bitstream, wherein the second indicator represents whether a geometric partition based motion compensation is enabled for the video sequence;
when the value of the first indicator indicates that the maximum number of merging MVP candidates is greater than 2 and the value of the second indicator indicates that the geometric partition based motion compensation is enabled, parsing a value of a third indicator from the bitstream, wherein the third indicator represents a maximum number of geometric partitioning merge mode candidates subtracted from the value of the first indicator;
when the value of the first indicator indicates that the maximum number of merging MVP candidates is equal to 2 and the value of the second indicator indicates that the geometric partition based motion compensation is enabled, setting the value of the maximum number of geometric partitioning merge mode candidates to 2; and
when the value of the first indicator indicates that the maximum number of merging MVP candidates is less than 2 or when the value of the second indicator indicates that the geometric partition based motion compensation is disabled, setting the value of the maximum number of geometric partitioning merge mode candidates to 0.