A method of decoding an intra prediction mode, comprising: reconstructing an intra prediction mode group indicator and a prediction mode index; constructing an MPM group including three intra prediction modes using valid intra prediction modes of left and top blocks of a current block; determining an intra prediction mode in the MPM group corresponding to the prediction mode index as an intra prediction mode of the current block when the intra prediction mode group indicator indicates the MPM group; and determining the intra prediction mode of the current block using the prediction mode index and the three intra prediction modes of the MPM group when the intra prediction mode group indicator does not indicate the MPM group; wherein when the intra prediction modes of the left and top blocks are equal to each other, if the intra prediction mode of the left block is equal to one of two non-directional intra prediction modes, the MPM group includes the two non- directional intra prediction modes and a vertical mode, and if the intra prediction mode of the left block is equal to one of the directional intra prediction modes, the MPM group includes the intra prediction mode of the left block and two neighboring directional intra prediction modes of the intra prediction mode of the left block, wherein when only one of the intra prediction modes of the left and top blocks of the current block is valid, two additional intra prediction modes are included in the MPM group and the two additional intra prediction modes are determined based on the valid intra prediction mode, wherein when none of the intra prediction modes of the left and top blocks is valid, the MPM group includes DC mode, planar mode and vertical mode, and wherein the two non-directional intra prediction modes are DC mode and planar mode, and mode number 0 is assigned to the planar mode. constructing an MPM group including three intra prediction modes using valid intra prediction modes of left and top blocks of a current block; determining an intra prediction mode in the MPM group corresponding to the prediction mode index as an intra prediction mode of the current block when the intra prediction mode group indicator indicates the MPM group; and determining the intra prediction mode of the current block using the prediction mode index and the three intra prediction modes of the MPM group when the intra prediction mode group indicator does not indicate the MPM group; wherein when the intra prediction modes of the left and top blocks are equal to each other, if the intra prediction mode of the left block is equal to one of two non-directional intra prediction modes, the MPM group includes the two non- directional intra prediction modes and a vertical mode, and if the intra prediction mode of the left block is equal to one of the directional intra prediction modes, the MPM group includes the intra prediction mode of the left block and two neighboring directional intra prediction modes of the intra prediction mode of the left block, wherein when only one of the intra prediction modes of the left and top blocks of the current block is valid, two additional intra prediction modes are included in the MPM group and the two additional intra prediction modes are determined based on the valid intra prediction mode, wherein when none of the intra prediction modes of the left and top blocks is valid, the MPM group includes DC mode, planar mode and vertical mode, and wherein the two non-directional intra prediction modes are DC mode and planar mode, and mode number 0 is assigned to the planar mode.