Methods and devices for geometric partitioning mode with adaptive blending
Methods for video decoding and encoding, apparatuses and non-transitory storage media are provided. In one decoding method, the decoder obtains a set of blending strengths for a current block, where the current block is partitioned into two parts along a partition line for prediction in a geometric partitioning mode. Furthermore, the decoder obtains a mapping relationship between a plurality of blending indices and the blending strengths in the set of blending strengths. Moreover, the decoder obtains a binarized value indicating one of the blending indices, where the blending indices are binarized with variable length code. Further, the decoder determines a blending strength of the current block based on the binarized value and the mapping relationship.
1 . A method for video decoding, comprising:
obtaining, by a decoder, a set of blending strengths for a current block, wherein the current block is partitioned into two partitions parts along a partition line for prediction in a geometric partitioning mode and a blending strength in the set of blending strengths is related to a blending area between the two partitions;
obtaining, by the decoder, a mapping relationship between a plurality of blending indices and the blending strengths in the set of blending strengths;
obtaining, by the decoder, a binarized value indicating one of the blending indices, wherein the blending indices are binarized with variable length code; and
determining, by the decoder, a blending strength of the current block from the set of blending strengths based on the binarized value and the mapping relationship.
2 . The method of claim 1 , wherein the blending indices are binarized with truncated unary code, truncated rice code or exp-golomb code.
3 . The method of claim 1 , wherein the mapping relationship is determined according to a statistical use frequency of the blending strengths.
4 . The method of claim 3 , wherein a lower index value corresponds to a blending strength of higher use frequency, and is binarized with a shorter codeword.
5 . The method of claim 1 , wherein the mapping relationship between the plurality of blending indices and the blending strengths in the set of blending strengths is changeable by a syntax element.
6 . The method of claim 5 , wherein the syntax element is signaled in one or more of the following: a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, or a coding unit.
7 . The method of claim 1 , further comprising:
determining, by the decoder, the set of blending strengths according to a parameter relating to the current block.
8 . The method of claim 7 , wherein the parameter is related to a block size of the current block or an angle of the partition line of the current block.
9 . The method of claim 1 , wherein the binarized value indicating one of the blending indices is included in a context model, and the context model is selected from a plurality of context models based on predefined conditions.
10 . The method of claim 9 , wherein the context model is selected based on whether neighboring blocks of the current block contain a block using the geometric partitioning mode or based on whether neighboring blocks of the current block contain a block using the geometric partitioning mode and the blending strength of the current block.
11 . An apparatus, comprising:
one or more processors; and
a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, wherein the one or more processors, upon execution of the instructions, are configured to perform operations for video decoding comprising:
obtaining a set of blending strengths for a current block, wherein the current block is partitioned into two partitions along a partition line for prediction in a geometric partitioning mode and a blending strength in the set of blending strengths is related to a blending area between the two partitions;
obtaining a mapping relationship between a plurality of blending indices and the blending strengths in the set of blending strengths;
obtaining a binarized value indicating one of the blending indices, wherein the blending indices are binarized with variable length code; and
determining a blending strength of the current block from the set of blending strengths based on the binarized value and the mapping relationship;
or configured to perform operations for video encoding comprising:
obtaining a set of blending strengths for a current block, wherein the current block is partitioned into two partitions along a partition line for prediction in a geometric partitioning mode and a blending strength in the set of blending strengths is related to a blending area between the two partitions;
obtaining a mapping relationship between a plurality of blending indices and the blending strengths in the set of blending strengths;
determining a blending strength of the current block among the blending strengths in the set of blending strengths; and
determining a binarized value indicating a blending index that corresponds to the blending strength of the current block from the set of blending strengths, wherein the blending indices are binarized with the variable length code.
12 . A method for video encoding, comprising:
obtaining, by an encoder, a set of blending strengths for a current block, wherein the current block is partitioned into two partitions along a partition line for prediction in a geometric partitioning mode and a blending strength in the set of blending strengths is related to a blending area between the two partitions;
obtaining, by the encoder, a mapping relationship between a plurality of blending indices and the blending strengths in the set of blending strengths;
determining, by the encoder, a blending strength of the current block among the blending strengths in the set of blending strengths; and
determining, by the encoder, a binarized value indicating a blending index that corresponds to the blending strength of the current block from the set of blending strengths, wherein the blending indices are binarized with variable length code.
13 . The method of claim 12 , wherein the blending indices are binarized with truncated unary code, truncated rice code or exp-golomb code.
14 . The method of claim 12 , wherein the mapping relationship is determined according to a statistical use frequency of the blending strengths.
15 . The method of claim 13 , wherein a lower index value corresponds to a blending strength of higher use frequency, and is binarized with a shorter codeword.
16 . The method of claim 12 , wherein the mapping relationship between the plurality of blending indices and the blending strengths in the set of blending strengths is changeable by a syntax element.
17 . A method for storing a bitstream, comprising:
performing the method for video encoding of claim 12 to generate a bitstream; and
storing the bitstream.
18 . The method of claim 17 , wherein the blending indices are binarized with truncated unary code, truncated rice code or exp-golomb code.
19 . The method of claim 17 , wherein the mapping relationship is determined according to a statistical use frequency of the blending strengths.
20 . The method of claim 19 , wherein a lower index value corresponds to a blending strength of higher use frequency, and is binarized with a shorter codeword.