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 ¼-pixel location or a ¾-pixel location included in the luma reference block by applying a 7-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 a chroma sample of a ⅛-pixel location or a 4/8-pixel location 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 7-tap filter comprises seven filter coefficients, the 4-tap filter comprises four filter coefficients, and filter coefficients of the 7-tap filter for generating the luma sample of the ¼-pixel location are arranged in reverse order against filter coefficients of the 7-tap filter for generating the luma sample of the ¾-pixel location.