Image encoding/decoding method and apparatus, and recording medium in which bitstream is stored
Disclosed herein are an image encoding/decoding method and apparatus. The image decoding method includes acquiring a partitioning index of a current block from a bitstream, and generating a prediction sample of the current block by weighted-summing a prediction sample of a first subblock of the current block and a prediction sample of a second subblock of the current block based on the partitioning index. The partitioning index indicates a partitioning distance and a partitioning direction included in a predefined table.
1. An image decoding method comprising:
determining whether a geometric partitioning mode is applied to a current block;
in response to the geometric partitioning mode being applied to the current block, obtaining a partitioning index of the current block from a bitstream,
wherein, based on the partition index, the current block is divided into a first partition and a second partition; and
generating a prediction sample of the current block by weighted-summing a first prediction sample obtained based on first motion information of the first partition and a second prediction sample obtained based on second motion information of the second partition,
wherein the partitioning index indicates one of partitioning candidates included in a predefined table, each of the partitioning candidates comprising a pair of a partitioning distance and a partitioning direction, and
wherein in response to all of a subblock merge flag, a regular merge flag and a combined intra inter prediction flag being false, it is determined that the geometric partitioning mode is applied to the current block without decoding any further flag from the bitstream.
2. The image decoding method of claim 1 , wherein whether the geometric partitioning mode is applicable to the current block or not is determined based on a size or a shape of the current block.
3. The image decoding method of claim 2 , wherein the geometric partitioning mode is applicable to the current block only when a width and height of the current block are greater than or equal to 8.
4. An image encoding method comprising:
in response to a geometric partitioning mode being applied to a current block, partitioning the current block into a first partition and a second partition, a partitioning index, representing a partition type of the current block, being encoded into a bitstream; and
generating a prediction sample of the current block by weighted-summing a first prediction sample obtained based on first motion information of the first partition and a second prediction sample obtained based on second motion information of the second partition,
wherein the partitioning index indicates one of partitioning candidates included in a predefined table, each of the partitioning candidates comprising a pair of a partitioning distance and a partitioning direction, and
wherein when the geometric partitioning mode is applied to the current block, all of a subblock merge flag, a regular merge flag and a combined intra inter prediction flag are encoded with a value of false, and a flag indicating whether the geometric partitioning mode is applied to the current block is not further encoded.
5. The image encoding method of claim 4 , wherein whether the geometric partitioning mode is applicable to the current block or not is determined based on a size or a shape of the current block.
6. The image encoding method of claim 5 , wherein the geometric partitioning mode is applicable to the current block only when a width and height of the current block are greater than or equal to 8.
7. An apparatus for transmitting compressed video data, the apparatus comprising:
a processor configured to obtain the compressed video data, and
a transmitting unit configured to transmit the compressed video data,
wherein obtaining the compressed video data comprises:
in response to a geometric partitioning mode being applied to a current block, partitioning the current block into a first partition and a second partition, a partitioning index, representing a partition type of the current block, being encoded into a bitstream; and
generating a prediction sample of the current block by weighted-summing a first prediction sample obtained based on first motion information of the first partition and a second prediction sample obtained based on second motion information of the second partition,
wherein the partitioning index indicates one of partitioning candidates included in a predefined table, each of the partitioning candidates comprising a pair of a partitioning distance and a partitioning direction, and
wherein when the geometric partitioning mode is applied to the current block, all of a subblock merge flag, a regular merge flag and a combined intra inter prediction flag are encoded with a value of false, and a flag indicating whether the geometric partitioning mode is applied to the current block is not further encoded.