1. A method for motion compensation, comprising: calculating a pixel value of a pixel located between pixels of a reference image corresponding to a current image, based on pixel values of the pixels of the reference image by using at least one method from among a plurality of methods of interpolating the pixels of the reference image; and restoring the current image by adding motion compensation data, including the calculated pixel value, and a difference between the reference image and the current image, wherein the at least one method from among the plurality of methods is selected according to codec information, indicating one of a plurality of codecs, the codec information being received from an external encoding apparatus.