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;
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 first index information 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 second index information among the plurality of merge candidates included in the merge candidate list;
wherein when a value of the second index information is smaller than a value of the first index information, the second merge candidate has an index equal to the value of the second index information.
2. The video decoding method of claim 1 , wherein when a value of the second index information is greater than or equal to a value of the first index information, the second merge candidate has an index equal to the value of the second index information plus one.
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 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;
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
first index information for specifying the first merge candidate and second index information for specifying the second merge candidate are respectively encoded;
wherein when an index of the second merge candidate is smaller than an index of the first merge candidate, the second index information is encoded with a value of the index of the second merge candidate.
7. The video encoding method of claim 6 , wherein when an index of the second merge candidate is greater than an index of the first merge candidate, the second index information is encoded with a value obtained by subtracting one from the index of the second merge candidate.
8. The video encoding method of claim 6 , 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.
9. The video encoding method of claim 8 , 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.
10. The video encoding method of claim 9 , wherein a second weight applied to the second prediction sample is derived by subtracting the first weight from a constant value.
11. 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 first motion information regarding the first prediction is derived from a first merge candidate specified by first index information 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 second index information among the plurality of merge candidates included in the merge candidate list;
wherein when a value of the second index information is smaller than a value of the first index information, the second merge candidate has an index equal to the value of the second index information.
12. The video decoder of claim 11 , wherein when a value of the second index information is greater than or equal to a value of the first index information, the second merge candidate has an index equal to the value of the second index information plus one.
13. The video decoder of claim 11 , 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.
14. The video decoder of claim 13 , 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.
15. 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;
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
first index information for specifying the first merge candidate and second index information for specifying the second merge candidate are respectively encoded;
wherein when an index of the second merge candidate is smaller than an index of the first merge candidate, the second index information is encoded with a value of the index of the second merge candidate.
16. The video encoder of claim 15 , wherein when an index of the second merge candidate is greater than an index of the first merge candidate, the second index information is encoded with a value obtained by subtracting one from the index of the second merge candidate.
17. The video encoder of claim 15 , 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.
18. The video encoder of claim 10 , 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.
19. 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 .
20. 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 6 .