A method of encoding an image comprising: generating a virtual motion vector of an intra block which is in a current frame and is encoded by intra prediction, by using motion information of an area neighboring the intra block ; and encoding a motion vector of an inter block which is in the current frame and is encoded by inter prediction after the intra block is encoded, by using the virtual motion vector of the intra block in the current frame, wherein the encoding of the motion vector of the inter block comprises: generating a prediction motion vector of the inter block, by using motion vectors of blocks neighboring the inter block; and encoding a difference value between the prediction motion vector and the motion vector of the inter block, wherein in the encoding of the motion vector of the inter block, if the intra block is included in the blocks neighboring the inter block, the virtual motion vector of the intra block is used in the generating of the prediction motion vector of the inter block; characterised in that in the generating of the virtual motion vector of the intra block, a vector generated as a median value, a mean value, or a weighted sum of the motion vectors of blocks (410-440) neighboring the intra block is determined as the virtual motion vector of the intra block. generating a virtual motion vector of an intra block which is in a current frame and is encoded by intra prediction, by using motion information of an area neighboring the intra block ; and encoding a motion vector of an inter block which is in the current frame and is encoded by inter prediction after the intra block is encoded, by using the virtual motion vector of the intra block in the current frame, wherein the encoding of the motion vector of the inter block comprises: generating a prediction motion vector of the inter block, by using motion vectors of blocks neighboring the inter block; and encoding a difference value between the prediction motion vector and the motion vector of the inter block, wherein in the encoding of the motion vector of the inter block, if the intra block is included in the blocks neighboring the inter block, the virtual motion vector of the intra block is used in the generating of the prediction motion vector of the inter block; characterised in that in the generating of the virtual motion vector of the intra block, a vector generated as a median value, a mean value, or a weighted sum of the motion vectors of blocks (410-440) neighboring the intra block is determined as the virtual motion vector of the intra block. generating a prediction motion vector of the inter block, by using motion vectors of blocks neighboring the inter block; and encoding a difference value between the prediction motion vector and the motion vector of the inter block, wherein in the encoding of the motion vector of the inter block, if the intra block is included in the blocks neighboring the inter block, the virtual motion vector of the intra block is used in the generating of the prediction motion vector of the inter block; characterised in that in the generating of the virtual motion vector of the intra block, a vector generated as a median value, a mean value, or a weighted sum of the motion vectors of blocks (410-440) neighboring the intra block is determined as the virtual motion vector of the intra block. <EOS>