Sub-block division-based image encoding/decoding method and device
Disclosed herein are a video encoding/decoding method and apparatus. The video decoding method of the present disclosure includes: obtaining block partitioning information of a current block; based on the block partitioning information, partitioning the current block into a first sub-block and a second sub-block; deriving motion information of the first sub-block and notion information of the second sub-block respectively; based on the notion information of the first sub-block and the motion information of the second sub-block, generating a prediction sample of the first sub-block and a prediction sample of the second sub-block respectively; and through a weighted-sum of the prediction sample of the first sub-block and the prediction sample of the second sub-block, generating a prediction sample of the current block. Herein, the block partitioning information is index information indicating an index of a table including information indicating a plurality of predefined asymmetric partition shapes.
1. A video decoding method, the method comprising:
obtaining block partitioning information of a current block;
deriving first motion information for a first sub-block of the current block and second motion information for a second sub-block of the current block respectively;
generating a first prediction sample for the first sub-block and a second prediction sample for the second sub-block respectively based on the first motion information and the second motion information;
generating a prediction sample of the current block by weighted-sum of the first prediction sample and the second prediction sample; and
storing at least one of the first motion information for the first sub-block, the second motion information for the second sub-block, and third motion information based on a value of sType,
wherein the block partitioning information is index information indicating an index of a table including information indicating a plurality of predefined asymmetric partition shapes for the first sub-block and the second sub-block, and
wherein, in response to the value of sType being 2 and the first motion information and the second motion information referring to a reference picture in a same direction, L1 motion information of the third motion information is set identical to the second motion information for the second sub-block, and L0 motion vector of L0 motion information of the third motion information is set to 0 for horizontal and vertical directions, and L0 reference picture index of the L0 motion information is set to a value of −1.
2. The video decoding method of claim 1 ,
wherein the deriving of the first motion information for the first sub-block and the second motion information for the second sub-block respectively comprises:
obtaining a first merge index for the first sub-block and a second merge index for the second sub-block respectively;
generating a merge candidate list;
deriving the first motion information for the first sub-block by using the merge candidate list and the first merge index; and
deriving the second motion information for the second sub-block by using the merge candidate list and the second merge index.
3. The video decoding method of claim 2 ,
wherein the merge candidate list is generated on the basis of the current block.
4. The video decoding method of claim 1 ,
wherein the block partitioning information indicates a partitioning line for the first sub-block and the second sub-block.
5. The video decoding method of claim 4 ,
wherein the information indicating the plurality of predefined asymmetric partition shapes comprises at least one of angle information and distance information for the partitioning line.
6. The video decoding method of claim 1 ,
wherein the asymmetric partition shape is any one shape of a triangle, a rectangle, a trapezoid, and a pentagon.
7. The video decoding method of claim 1 ,
wherein the deriving of the first motion information for the first sub-block and the second motion information for the second sub-block respectively is not performed when a horizontal length and a vertical length of the current block are less than respective predetermined thresholds.
8. A video encoding method, the method comprising:
determining a block partitioning structure of a current block;
deriving first motion information for a first sub-block of the current block and second motion information for a second sub-block of the current block respectively;
encoding block partitioning information based on the block partitioning structure; and
encoding a first merge index for the first sub-block and a second merge index for the second sub-block respectively based on the first motion information and the second motion information; and
storing at least one of the first motion information for the first sub-block, the second motion information for the second sub-block, and third motion information based on a value of sType,
wherein the block partitioning information is index information indicating an index of a table including information indicating a plurality of predefined asymmetric partition shapes for the first sub-block and the second sub-block, and
wherein, in response to the value of sType being 2 and the first motion information and the second motion information referring to a reference picture in a same direction, L1 motion information of the third motion information is set identical to the second motion information for the second sub-block, and L0 motion vector of L0 motion information of the third motion information is set to 0 for horizontal and vertical directions, and L0 reference picture index of the L0 motion information is set to a value of −1.
9. The video encoding method of claim 8 ,
wherein the encoding of the first merge index and the second merge index respectively comprises:
generating a merge candidate list;
encoding the first merge index by using the merge candidate list and the first motion information; and
encoding the second merge index by using the merge candidate list and the second motion information.
10. The video encoding method of claim 9 ,
wherein the merge candidate list is generated on the basis of the current block.
11. The video encoding method of claim 8 ,
wherein the block partitioning information indicates a partitioning line for the first sub-block and the second sub-block.
12. The video encoding method of claim 11 ,
wherein the information indicating the plurality of predefined asymmetric partition shapes comprises at least one of angle information and distance information for the partitioning line.
13. The video encoding method of claim 8 ,
wherein the asymmetric partition shape is any one shape of a triangle, a rectangle, a trapezoid, and a pentagon.
14. The video encoding method of claim 8 ,
wherein the deriving of the first motion information for the first sub-block and the second motion information for the second sub-block respectively is not performed when a horizontal length and a vertical length of the current block are less than respective predetermined thresholds.
15. A non-transitory computer readable recording medium for_
storing a bitstream generated by a video encoding method, wherein the video encoding method comprises:
determining a block partitioning structure of a current block;
deriving first motion information for a first sub-block of the current block and second motion information for a second sub-block of the current block respectively;
encoding block partitioning information based on the block partitioning structure; and
encoding a first merge index for the first sub-block and a second merge index for the second sub-block respectively based on the first motion information and the second motion information; and
storing at least one of the first motion information for the first sub-block, the second motion information for the second sub-block, and third motion information based on a value of sType,
wherein the block partitioning information is index information indicating an index of a table including information indicating a plurality of predefined asymmetric partition shapes for the first sub-block and the second sub-block, and
wherein, in response to the value of sType being 2 and the first motion information and the second motion information referring to a reference picture in a same direction, L1 motion information of the third motion information is set identical to the second motion information for the second sub-block, and L0 motion vector of L0 motion information of the third motion information is set to 0 for horizontal and vertical directions, and L0 reference picture index of the L0 motion information is set to a value of −1.