An apparatus for decoding a video, the apparatus comprising: a obtainer which is configured to: obtain, based on the size of a current prediction unit, motion prediction mode information indicating a motion prediction mode applied to the current prediction unit from among a unidirectional motion prediction mode and a bidirectional motion prediction mode, wherein the unidirectional motion prediction mode comprises one of an L0 prediction mode and an L1 prediction mode, and determine the motion prediction mode applied to the current prediction unit from among the L0 prediction mode, the L1 prediction mode and the bidirectional motion prediction mode based on the motion prediction mode information of the current prediction unit; and a motion compensator which is configured to perform, based on the determined motion prediction mode, motion compensation on the current prediction unit by using prediction values of the current prediction unit, characterized in that the motion compensator is configured to: determine a location (x1, y1) with x1 equal to N+1/4 and y1 equal to M+1/4, wherein N and M are integers, of a first sub-pixel in a reference frame of the current prediction unit indicated by a motion vector of the current prediction unit, wherein the reference frame of the current prediction unit is obtained according to the determined motion prediction mode, wherein N and M are integers, generate a pixel value of the first sub-pixel by using a neighboring sub-pixel located on an upper side location (x2, y2), with x2 equal to N+1/4 and y2 equal to M, of the first sub-pixel, and obtain the prediction values of the current prediction unit including the generated pixel value of the first sub-pixel. a obtainer which is configured to: obtain, based on the size of a current prediction unit, motion prediction mode information indicating a motion prediction mode applied to the current prediction unit from among a unidirectional motion prediction mode and a bidirectional motion prediction mode, wherein the unidirectional motion prediction mode comprises one of an L0 prediction mode and an L1 prediction mode, and determine the motion prediction mode applied to the current prediction unit from among the L0 prediction mode, the L1 prediction mode and the bidirectional motion prediction mode based on the motion prediction mode information of the current prediction unit; and obtain, based on the size of a current prediction unit, motion prediction mode information indicating a motion prediction mode applied to the current prediction unit from among a unidirectional motion prediction mode and a bidirectional motion prediction mode, wherein the unidirectional motion prediction mode comprises one of an L0 prediction mode and an L1 prediction mode, and determine the motion prediction mode applied to the current prediction unit from among the L0 prediction mode, the L1 prediction mode and the bidirectional motion prediction mode based on the motion prediction mode information of the current prediction unit; and a motion compensator which is configured to perform, based on the determined motion prediction mode, motion compensation on the current prediction unit by using prediction values of the current prediction unit, characterized in that the motion compensator is configured to: determine a location (x1, y1) with x1 equal to N+1/4 and y1 equal to M+1/4, wherein N and M are integers, of a first sub-pixel in a reference frame of the current prediction unit indicated by a motion vector of the current prediction unit, wherein the reference frame of the current prediction unit is obtained according to the determined motion prediction mode, wherein N and M are integers, generate a pixel value of the first sub-pixel by using a neighboring sub-pixel located on an upper side location (x2, y2), with x2 equal to N+1/4 and y2 equal to M, of the first sub-pixel, and obtain the prediction values of the current prediction unit including the generated pixel value of the first sub-pixel. determine a location (x1, y1) with x1 equal to N+1/4 and y1 equal to M+1/4, wherein N and M are integers, of a first sub-pixel in a reference frame of the current prediction unit indicated by a motion vector of the current prediction unit, wherein the reference frame of the current prediction unit is obtained according to the determined motion prediction mode, wherein N and M are integers, generate a pixel value of the first sub-pixel by using a neighboring sub-pixel located on an upper side location (x2, y2), with x2 equal to N+1/4 and y2 equal to M, of the first sub-pixel, and obtain the prediction values of the current prediction unit including the generated pixel value of the first sub-pixel.