Image encoding/decoding method and device, and recording medium in which bitstream is stored
An image encoding/decoding method and device according to the present disclosure can: construct a candidate list of the current block, the candidate list comprising a plurality of candidates and the plurality of candidates including HMVP candidates; deriving motion information about the current block on the basis of the candidate list; and perform inter prediction for the current block on the basis of the motion information.
1 . An image decoding method, the method comprising:
constructing a candidate list of a current block, wherein the candidate list includes a plurality of candidates, and the plurality of candidates include a history-based motion vector prediction (HMVP) candidate;
deriving motion information of the current block based on the candidate list; and
performing an inter prediction for the current block based on the motion information,
wherein the HMVP candidate is derived based on a plurality of HMVP lists,
wherein the plurality of HMVP lists include a first HMVP list related to only L0 motion information and a second HMVP list related to only L1 motion information,
wherein whether an L0 HMVP candidate with same motion information exists in the first HMVP list and whether an L1 HMVP candidate with same motion information exists in the second HMVP list are checked separately, and
wherein based on the first HMVP list and the second HMVP list respectively including one or more L0 HMVP candidates and one or more L1 HMVP candidates, the HMVP candidate is derived by bi-directional motion information generated based on a combination of a L0 HMVP candidate in the first HMVP list and a L1 HMVP candidate in the second HMVP list.
2 . The method of claim 1 ,
wherein the L0 motion information includes at least one of a L0 reference index or a L0 motion vector,
wherein the L1 motion information includes at least one of a L1 reference index or a L1 motion vector.
3 . The method of claim 1 ,
wherein in the first HMVP list and the second HMVP list, index values are individually assigned to the one or more L0 HMVP candidates and the one or more L1 HMVP candidates,
wherein the HMVP candidate is derived by using an L0 HMVP candidate and an L1 HMVP candidate having a same index value.
4 . The method of claim 2 ,
wherein when a candidate having a specific index value exists only in one of the first HMVP list and the second HMVP list, a motion vector of a first direction of the HMVP candidate is derived as a motion vector of the candidate having the specific index value,
wherein a motion vector of a second direction of the HMVP candidate is derived as a value that a size is equal and a sign is opposite to the motion vector of the first direction.
5 . The method of claim 1 ,
wherein the HMVP candidate is derived based on an average of an L0 HMVP candidate and an L1 HMVP candidate included in each of the first HMVP list and the second HMVP list.
6 . The method of claim 1 , wherein:
wherein in the first HMVP list and the second HMVP list, index values are individually assigned to the one or more L0 HMVP candidates and the one or more L1 HMVP candidates,
wherein the HMVP candidate is derived by using an L0 HMVP candidate having a first specific index value and an L1 HMVP candidate having a second specific index value in the first HMVP list and the second HMVP list, respectively.
7 . An image encoding method, the method comprising:
constructing a candidate list of a current block, wherein the candidate list includes a plurality of candidates, and the plurality of candidates include a history-based motion vector prediction (HMVP) candidate;
determining motion information of the current block based on the candidate list; and
performing an inter prediction for the current block based on the motion information,
wherein the HMVP candidate is derived based on a plurality of HMVP lists,
wherein the plurality of HMVP lists includes a first HMVP list related to only L0 motion information and a second HMVP list related to only L1 motion information, and
wherein whether an L0 HMVP candidate with same motion information exists in the first HMVP list and whether an L1 HMVP candidate with same motion information exists in the second HMVP list are checked separately, and
wherein based on the first HMVP list and the second HMVP list respectively including one or more L0 HMVP candidates and one or more L1 HMVP candidates, the HMVP candidate is derived by bi-directional motion information generated based on a combination of a L0 HMVP candidate in the first HMVP list and a L1 HMVP candidate in the second HMVP list.
8 . A method for transmitting data for image information, the method comprising:
constructing a candidate list of a current block, wherein the candidate list includes a plurality of candidates, and the plurality of candidates include a history-based motion vector prediction (HMVP) candidate;
determining motion information of the current block based on the candidate list;
generating a prediction sample of the current block by performing an inter prediction for the current block based on the motion information;
generating a bitstream by encoding the current block based on the prediction sample of the current block; and
transmitting data including the bitstream,
wherein the HMVP candidate is derived based on a plurality of HMVP lists,
wherein the plurality of HMVP lists includes a first HMVP list related to only L0 motion information and a second HMVP list related to only L1 motion information, and
wherein whether an L0 HMVP candidate with same motion information exists in the first HMVP list and whether an L1 HMVP candidate with same motion information exists in the second HMVP list are checked separately, and
wherein based on the first HMVP list and the second HMVP list respectively including one or more L0 HMVP candidates and one or more L1 HMVP candidates, the HMVP candidate is derived by bi-directional motion information generated based on a combination of a L0 HMVP candidate in the first HMVP list and a L1 HMVP candidate in the second HMVP list.