Method and device for interpolating images by using a smoothing interpolation filter
Provided are a method of interpolating an image by determining interpolation filter coefficients, and an apparatus for performing the same. The method includes: differently selecting an interpolation filter, from among interpolation filters for generating at least one sub-pel-unit pixel value located between integer-pel-unit pixels, based on a sub-pel-unit interpolation location and a smoothness; and generating the at least one sub-pel-unit pixel value by interpolating, using the selected interpolation filter, pixel values of the integer-pel-unit pixels.
1. A method of motion compensation, the method comprising:
determining, in a luma reference picture, a luma reference block for prediction of a current block, by using a luma motion vector of the current block;
generating a luma sample of a 2/4-pixel location included in the luma reference block by applying an 8-tap filter to luma samples of an integer pixel location of the luma reference picture;
determining, in a chroma reference picture, a chroma reference block for prediction of a current block, by using a chroma motion vector of the current block; and
generating at least one chroma sample of at least one of ⅛, 2/8, and ⅜-pixel locations included in the chroma reference block by applying a 4-tap filter to chroma samples of an integer pixel location of the chroma reference picture;
wherein the 8-tap filter includes eight filter coefficients, and
the 4-tap filter includes four filter coefficients.
2. The method of claim 1 , wherein the generating of the luma sample comprises: scaling the luma sample generated by applying the 8-tap filter by using a luma scaling factor that a sum of coefficients of the 8-tap filter is 1.
3. The method of claim 1 , wherein the generating of the at least one chroma sample comprises scaling the chroma sample generated by applying the 4-tap filter by using a chroma scaling factor that a sum of coefficients of the 4-tap filter is 1.