A video decoding apparatus, the video decoding apparatus being configured to: derive motion information of a first target block; derive modified motion information for the first target block based on the motion information and bi-prediction; obtain information on inter prediction for a second target block from a bitstream, wherein the information on the inter prediction includes mode information representing that a merge mode is applied to the second target block and a merge index information for the second target block; determine that the merge mode is applied to the second target block based on the mode information; configure a merge candidate list for the second target block based on spatial neighboring blocks and a temporal neighboring block of the second target block; select one of merge candidates constituting the merge candidate list based on the merge index information; derive motion information of the second target block based on the selected merge candidate; generate prediction samples for the second target block by performing the inter prediction based on the motion information of the second target block; and generate reconstructed samples based on the prediction samples, wherein the merge candidates include spatial motion information candidates and a temporal motion information candidate, wherein the spatial motion information candidates are derived based on the spatial neighboring blocks and the temporal motion information candidate is derived based on the temporal neighboring block, wherein when the temporal neighboring block corresponds to the first target block, the temporal motion information candidate is derived by using the modified motion information of the first target block, characterized in that when the spatial neighboring block corresponds to the first target block, the spatial motion information candidate is derived by using the motion information of the first target block. derive motion information of a first target block; derive modified motion information for the first target block based on the motion information and bi-prediction; obtain information on inter prediction for a second target block from a bitstream, wherein the information on the inter prediction includes mode information representing that a merge mode is applied to the second target block and a merge index information for the second target block; mode information representing that a merge mode is applied to the second target block and a merge index information for the second target block; determine that the merge mode is applied to the second target block based on the mode information; configure a merge candidate list for the second target block based on spatial neighboring blocks and a temporal neighboring block of the second target block; select one of merge candidates constituting the merge candidate list based on the merge index information; derive motion information of the second target block based on the selected merge candidate; generate prediction samples for the second target block by performing the inter prediction based on the motion information of the second target block; and generate reconstructed samples based on the prediction samples, wherein the merge candidates include spatial motion information candidates and a temporal motion information candidate, wherein the spatial motion information candidates are derived based on the spatial neighboring blocks and the temporal motion information candidate is derived based on the temporal neighboring block, wherein when the temporal neighboring block corresponds to the first target block, the temporal motion information candidate is derived by using the modified motion information of the first target block, characterized in that when the spatial neighboring block corresponds to the first target block, the spatial motion information candidate is derived by using the motion information of the first target block.