A method of encoding images including two-dimensional image or three-dimensional image, the method including a process for deriving motion information on a sub prediction unit comprising: determining whether a center sub prediction unit corresponding to a center position of the current block within a reference block has motion information; when the center sub prediction unit does not have motion information, terminating the process for deriving motion information on a sub prediction unit; otherwise, when the center sub prediction unit has motion information, carrying out the following steps: storing the motion information of the center sub prediction unit; for each current sub prediction unit within the current block: determining whether a sub prediction unit within the reference block has motion information, the sub prediction unit within the reference block corresponding to the current sub prediction unit; deriving motion information of the current sub prediction unit within the current block from the motion information of the sub prediction unit within the reference block when the sub prediction unit within the reference block has motion information; and deriving motion information of the current sub prediction unit within the current block from the stored motion information of the center sub prediction unit within the reference block when the sub prediction unit within the reference block does not have motion information. determining whether a center sub prediction unit corresponding to a center position of the current block within a reference block has motion information; when the center sub prediction unit does not have motion information, terminating the process for deriving motion information on a sub prediction unit; otherwise, when the center sub prediction unit has motion information, carrying out the following steps: storing the motion information of the center sub prediction unit; for each current sub prediction unit within the current block: determining whether a sub prediction unit within the reference block has motion information, the sub prediction unit within the reference block corresponding to the current sub prediction unit; deriving motion information of the current sub prediction unit within the current block from the motion information of the sub prediction unit within the reference block when the sub prediction unit within the reference block has motion information; and deriving motion information of the current sub prediction unit within the current block from the stored motion information of the center sub prediction unit within the reference block when the sub prediction unit within the reference block does not have motion information. storing the motion information of the center sub prediction unit; for each current sub prediction unit within the current block: determining whether a sub prediction unit within the reference block has motion information, the sub prediction unit within the reference block corresponding to the current sub prediction unit; deriving motion information of the current sub prediction unit within the current block from the motion information of the sub prediction unit within the reference block when the sub prediction unit within the reference block has motion information; and deriving motion information of the current sub prediction unit within the current block from the stored motion information of the center sub prediction unit within the reference block when the sub prediction unit within the reference block does not have motion information. determining whether a sub prediction unit within the reference block has motion information, the sub prediction unit within the reference block corresponding to the current sub prediction unit; deriving motion information of the current sub prediction unit within the current block from the motion information of the sub prediction unit within the reference block when the sub prediction unit within the reference block has motion information; and deriving motion information of the current sub prediction unit within the current block from the stored motion information of the center sub prediction unit within the reference block when the sub prediction unit within the reference block does not have motion information.