Method for encoding/decoding image signal, and apparatus therefor
View Patent ↗A method for decoding an image, according to the present invention, comprises the steps of: determining whether a coding block is divided into a first prediction unit and a second prediction unit; determining a partition type of the coding block when determining that the coding block is divided; deriving first motion information about a first prediction unit and second motion information about a second prediction unit within the coding block; and acquiring a prediction sample within the coding block on the basis of the first motion information and the second motion information.
1. A video decoding method comprising:
in case that there are a first prediction and a second prediction corresponding to a coding block, determining a partition type of the coding block, wherein the partition type is determined at least based on information indicating whether the coding block is split signaled in a bitstream;
deriving first motion information regarding the first prediction in the coding block and second motion information regarding the second prediction in the coding block; and
acquiring a prediction sample in the coding block on the basis of the first motion information and the second motion information,
wherein
the first motion information regarding the first prediction is derived from a first merge candidate specified by a first index among a plurality of merge candidates included in a merge candidate list, and
the second motion information regarding the second prediction is derived from a second merge candidate specified by a second index among the plurality of merge candidates included in the merge candidate list;
wherein a value of the second index is compared with a value of the first index, and in case that a comparison result indicates the value of the second index being greater than or equal to the value of the first index, an index of the second merge candidate is equal to the value of the second index plus one.
2. The video decoding method of claim 1 , wherein in case that the comparison result indicates the value of the second index being smaller than the value of the first index, the index of the second merge candidate is equal to the value of the second index.
3. The video decoding method of claim 1 , wherein when the prediction sample is included in a boundary region between the first prediction and the second prediction, the prediction sample is derived on the basis of a weighted-sum operation of a first prediction sample derived on the basis of the first motion information and a second prediction sample derived on the basis of the second motion information.
4. The video decoding method of claim 3 , wherein a first weight applied to the first prediction sample is determined on the basis of an x-coordinate and a y-coordinate of the prediction sample.
5. The video decoding method of claim 4 , wherein a second weight applied to the second prediction sample is derived by subtracting the first weight from a constant value.
6. A non-transitory computer-readable storage medium having stored therein computer executable instructions that when executed by a processor, implement the video decoding method of claim 1 .
7. A video encoding method comprising:
in case that there are a first prediction and a second prediction corresponding to a coding block, determining a partition type of the coding block, wherein the partition type is determined at least based on information indicating whether the coding block is split signaled in a bitstream;
deriving first motion information regarding the first prediction in the coding block and second motion information regarding the second prediction in the coding block; and
acquiring a prediction sample in the coding block on the basis of the first motion information and the second motion information,
wherein
the first motion information regarding the first prediction is derived from a first merge candidate among a plurality of merge candidates included in a merge candidate list,
the second motion information regarding the second prediction is derived from a second merge candidate among the plurality of merge candidates included in the merge candidate list, and
a first index for specifying the first merge candidate and a second index for specifying the second merge candidate are respectively encoded;
wherein an index of the second merge candidate is compared with an index of the first merge candidate, and in case that a comparison result indicates the index of the second merge candidate being greater than the index of the first merge candidate, the second index is encoded with a value obtained by subtracting one from the index of the second merge candidate.
8. The video encoding method of claim 7 , wherein in case that the comparison result indicates the index of the second merge candidate being smaller than the index of the first merge candidate, the second index is encoded with a value of the index of the second merge candidate.
9. The video encoding method of claim 7 , wherein when the prediction sample is included in a boundary region between the first prediction and the second prediction, the prediction sample is derived on the basis of a weighted-sum operation of a first prediction sample derived on the basis of the first motion information and a second prediction sample derived on the basis of the second motion information.
10. The video encoding method of claim 9 , wherein a first weight applied to the first prediction sample is determined on the basis of an x-coordinate and a y-coordinate of the prediction sample.
11. The video encoding method of claim 10 , wherein a second weight applied to the second prediction sample is derived by subtracting the first weight from a constant value.
12. A non-transitory computer-readable storage medium having stored therein computer executable instructions that when executed by a processor, implement the video encoding method of claim 7 .
13. A video decoder, comprising:
a memory having stored instructions;
a processor for executing the instructions to:
in case that there are a first prediction and a second prediction corresponding to a coding block, determine a partition type of the coding block, derive first motion information regarding the first prediction in the coding block and second motion information regarding the second prediction in the coding block, and acquire a prediction sample in the coding block on the basis of the first motion information and the second motion information, wherein the partition type is determined at least based on information indicating whether the coding block is split signaled in a bitstream,
wherein
the first motion information regarding the first prediction is derived from a first merge candidate specified by a first index among a plurality of merge candidates included in a merge candidate list, and the second motion information regarding the second prediction is derived from a second merge candidate specified by a second index among the plurality of merge candidates included in the merge candidate list;
wherein a value of the second index is compared with a value of the first index, and in case that a comparison result indicates the value of the second index being greater than or equal to the value of the first index, an index of the second merge candidate is equal to the value of the second index plus one.
14. The video decoder of claim 13 , wherein in case that the comparison result indicates the value of the second index being smaller than a value of the first index, the index of the second merge candidate is equal to the value of the second index.
15. The video decoder of claim 13 , wherein when the prediction sample is included in a boundary region between the first prediction and the second prediction, the prediction sample is derived on the basis of a weighted-sum operation of a first prediction sample derived on the basis of the first motion information and a second prediction sample derived on the basis of the second motion information.
16. The video decoder of claim 15 , wherein a first weight applied to the first prediction sample is determined on the basis of an x-coordinate and a y-coordinate of the prediction sample.
17. A video encoder, comprising:
a memory having stored instructions;
a processor for executing the instructions to:
in case that there are a first prediction and a second prediction corresponding to a coding block, determine a partition type of the coding block, wherein the partition type is determined at least based on information indicating whether the coding block is split signaled in a bitstream,
derive first motion information regarding the first prediction in the coding block and second motion information regarding the second prediction in the coding block; and
acquire a prediction sample in the coding block on the basis of the first motion information and the second motion information,
wherein
the first motion information regarding the first prediction is derived from a first merge candidate among a plurality of merge candidates included in a merge candidate list,
the second motion information regarding the second prediction is derived from a second merge candidate among the plurality of merge candidates included in the merge candidate list, and
a first index for specifying the first merge candidate and a second index for specifying the second merge candidate are respectively encoded;
wherein an index of the second merge candidate is compared with an index of the first merge candidate, and in case that a comparison result indicates the index of the second merge candidate being greater than the index of the first merge candidate, the second index is encoded with a value obtained by subtracting one from the index of the second merge candidate.
18. The video encoder of claim 17 , wherein in case that the comparison result indicates the index of the second merge candidate being smaller than the index of the first merge candidate, the second index is encoded with a value of the index of the second merge candidate.
19. The video encoder of claim 17 , wherein when the prediction sample is included in a boundary region between the first prediction and the second prediction, the prediction sample is derived on the basis of a weighted-sum operation of a first prediction sample derived on the basis of the first motion information and a second prediction sample derived on the basis of the second motion information.
20. The video encoder of claim 19 , wherein a first weight applied to the first prediction sample is determined on the basis of an x-coordinate and a y-coordinate of the prediction sample.