Patent ID: 9544593
Date: 2017-01-10
CPC Classifications: H04N

Claim:
1. A method of decoding a video signal, the method comprising: obtaining motion information of a current prediction block of a current picture; obtaining at least two reference blocks from reference pictures of the current prediction block using the motion information of the current prediction block; obtaining first weight information using a difference between the current prediction block and a first reference block of the at least two reference blocks; obtaining a first offset value for the first reference block from a difference between an average of pixel values of a template region of the first reference block and an average of pixel values of a template region of the current prediction block, the template region of the first reference block being a region in at least one neighboring block adjacent to the first reference block, and the template region of the current prediction block being a region in at least one neighboring block adjacent to the current prediction block; obtaining second weight information using a difference between the current prediction block and a second reference block of the at least two reference blocks; obtaining a second offset value for the second reference block from a difference between an average of pixel values of a template region of the second reference block and the average of pixel values of the template region of the current prediction block, the template region of the second reference block being a region in at least one neighboring block adjacent to the second reference block; obtaining a prediction value of the current prediction block by applying the obtained first weight information to pixel values of the first reference block and the first offset value and applying the obtained second weight information to pixel values of the second reference block and the second offset value, wherein the prediction value of the current block is obtained from a sum of the weighted pixel values of the first reference block, the weighted first offset value, the weighted pixel values of the second reference block, and the weighted second offset value; and reconstructing the current prediction block using the prediction value of the current prediction block and a residual data of the current prediction block.