Inter prediction method and apparatus using secondary list
According to a present disclosure, an image decoding method performed by a decoding apparatus, the image decoding method comprising obtaining image information including inter prediction-related information of a current block from a bitstream; configuring at least one of a merge list of the current block and an advanced motion vector prediction (AMVP) list of the current block for inter prediction; deriving motion information of the current block on the basis of the at least one of the merge list of the current block and the AMVP list of the current block; generating prediction samples for the current block based on the motion information of the current block; and generating reconstruction samples for the current block based on the prediction samples for the current block, wherein the merge list includes at least one of a primary merge list and a secondary merge list (SML).
1 . An image decoding method performed by a decoding apparatus, the image decoding method comprising:
obtaining image information including inter prediction-related information of a current block from a bitstream;
configuring at least one of a merge list of the current block and an advanced motion vector prediction (AMVP) list of the current block for inter prediction;
deriving motion information of the current block on the basis of the at least one of the merge list of the current block and the AMVP list of the current block;
generating prediction samples for the current block based on the motion information of the current block; and
generating reconstruction samples for the current block based on the prediction samples for the current block,
wherein the merge list includes at least one of a primary merge list and a secondary merge list (SML),
wherein the image information includes merge index information, and
based on the merge index information indicating candidates in the SML, the merge index information is decoded based on a number of candidates in the primary merge list.
2 . The image decoding method of claim 1 , wherein the SML includes at least one of a regular merge candidate, an affine merge candidate, and a geometric prediction mode (GPM) merge candidate.
3 . The image decoding method of claim 1 , wherein the image information includes a sequence parameter set (SPS),
the SPS includes first flag information related to the SML, and
the first flag information is related to whether the SML is used for a current picture referenced by the SPS.
4 . The image decoding method of claim 1 , wherein the image information includes information on a coding tree unit (CTU),
the information on the CTU includes second flag information related to the SML, and
the second flag information is related to whether the SML is used for coding units (CUs) in the CTU.
5 . The image decoding method of claim 4 , wherein the image information includes information on the CUS, and
information related to a number of candidates in the SML is included in the information on the CUs on the basis of the second flag information.
6 . The image decoding method of claim 4 , wherein the image information includes picture header information,
the picture header information includes third flag information related to the SML, and
the third flag information is related to whether the SML is used for the CUs in the CTU.
7 . The image decoding method of claim 6 , wherein the image information includes information on the CUs, and
information related to a number of candidates in the SML is included in the information on the CUs on the basis of the third flag information.
8 . The image decoding method of claim 1 , wherein the image information includes a sequence parameter set (SPS), and
information related to a number of candidates in the SML is included in the SPS.
9 . The image decoding method of claim 1 , wherein a number of candidates in the SML is derived on the basis of a size of the current block or whether a neighboring block of the current block is available.
10 . The image decoding method of claim 1 , wherein the image information includes a sequence parameter set (SPS) and information on a number of candidates in the SML,
the information on the number of candidates in the SML includes information on a delta value of the number of candidates, and
based on that information on the delta value of the number of candidates is included in the SPS, fixed-length binarization is performed on the information on the delta value of the number of candidates.
11 . The image decoding method of claim 1 ,
wherein, based on that the merge index information indicates candidates in the SML, the merge index information is decoded based on information on merge index differences and the number of candidates in the primary merge list.
12 . The image decoding method of claim 1 , wherein the SML includes at least one of additional spatial merge candidates and additional temporal candidates.
13 . The image decoding method of claim 12 , wherein the additional spatial merge candidates are derived based on blocks which are in one direction from the current block.
14 . The image decoding method of claim 12 , wherein the additional spatial merge candidates are re-ordered based on template matching cost.
15 . The image decoding method of claim 1 , wherein the image information includes merge flag information,
the motion information of the current block is derived based on the merge flag information and the AMVP list of the current block, and
the AMVP list includes at least one of a primary AMVP list and a secondary AMVP list.
16 . The image decoding method of claim 15 , wherein the secondary AMVP list is used to derive candidates for an intra block copy (IBC) AMVP mode.
17 . An image encoding method performed by an encoding apparatus, the image encoding method comprising:
configuring at least one of a merge list of a current block and an advanced motion vector prediction (AMVP) list of the current block;
deriving motion information of the current block on the basis of the at least one of the merge list of the current block and the AMVP list of the current block;
generating prediction samples for the current block on the basis of the motion information of the current block;
generating residual information based on the prediction samples of the current block; and
encoding image information including the residual information,
wherein the merge list includes at least one of a primary merge list and a secondary merge list (SML),
wherein the image information includes merge index information, and
based on the merge index information indicating candidates in the SML, the merge index information is encoded based on a number of candidates in the primary merge list.
18 . A non-transitory computer-readable storage medium for storing instructions that, when executed by a processor, cause the processor to perform the image encoding method of claim 17 .
19 . A method of transmitting data of an image, the method comprising:
generating a bitstream of the image, wherein the bitstream is generated based on configuring at least one of a merge list of a current block and an advanced motion vector prediction (AMVP) list of the current block, deriving motion information of the current block on the basis of the at least one of the merge list of the current block and the AMVP list of the current block, generating prediction samples for the current block on the basis of the motion information of the current block, generating residual information on the basis of the prediction samples of the current block, encoding image information including the residual information; and
transmitting the data including the bitstream,
wherein the merge list includes at least one of a primary merge list and a secondary merge list (SML),
wherein the image information includes merge index information, and
based on the merge index information indicating candidates in the SML, the merge index information is encoded based on a number of candidates in the primary merge list.