Method and apparatus for encoding and decoding image, and recording medium for storing bitstream
An image encoding method and an image decoding method are provided. The image decoding method includes deriving a temporal merge candidate from a co-located block of a current block, generating a merge candidate list of the current block based on the derived temporal merge candidate, and generating a prediction block of the current block based on the generated merge candidate list. The deriving a temporal merge candidate includes scaling a motion vector derived from the co-located block based on a POC difference value between the current block and a reference picture of the current block and a POC difference value between the co-located block and a reference picture of the co-located block, and modifying the scaled motion vector based on motion vector scaling information between a neighboring block of the current block and a co-located block of the neighboring block.
1. A method for decoding an image, the method comprising:
deriving a first prediction block of a current block;
deriving a second prediction block of the current block; and
generating a final prediction block of the current block by applying weights of the current block to first prediction block and the second prediction block,
wherein the weights of the current block are decoded by a truncated rice binarization.
2. The method of claim 1 , wherein the weights of the current block are derived based on a Picture Order Count (POC) of a current picture including the current block.
3. The method of claim 1 , wherein the weights of the current block are derived based on a Picture Order Count (POC) of a current picture including the current block and a POC of a reference picture of the current picture.
4. A method for encoding an image, the method comprising:
deriving a first prediction block of a current block;
deriving a second prediction block of the current block; and
generating a final prediction block of the current block by applying weights of the current block to first prediction block and the second prediction block,
wherein the weights of the current block are encoded by a truncated rice binarization.
5. The method of claim 4 , wherein the weights of the current block are derived based on a Picture Order Count (POC) of a current picture including the current block.
6. The method of claim 4 , wherein the weights of the current block are derived based on a Picture Order Count (POC) of a current picture including the current block and a POC of a reference picture of the current picture.
7. A non-transitory computer-readable recording medium storing a bitstream generated by the encoding method, wherein the encoding method comprising:
deriving a first prediction block of a current block;
deriving a second prediction block of the current block; and
generating a final prediction block of the current block by applying weights of the current block to first prediction block and the second prediction block,
wherein the weights of the current block are encoded by a truncated rice binarization.