A method for encoding an intra prediction mode, comprising: determining an intra prediction mode of a current prediction unit; generating a first intra prediction mode group using available intra prediction modes of a left prediction unit and an above prediction unit neighboring the current prediction unit, wherein the number of intra prediction modes belonging to the first intra prediction mode group is fixed to three; generating a second intra prediction mode group using intra prediction modes other than the intra prediction modes belonging to the first intra prediction mode group; encoding a first intra prediction mode group indicator and an index corresponding to the intra prediction mode of the current prediction unit in the first intra prediction mode group when the intra prediction mode of the current prediction unit is included in the first intra prediction mode group; and encoding a second intra prediction mode group indicator and an index corresponding to the intra prediction mode of the current prediction unit in the second intra prediction mode group when the intra prediction mode of the current prediction unit does not belong to the first intra prediction mode group, wherein, when only one intra prediction mode out of the intra prediction modes of the left prediction unit and the above prediction unit is available, the first intra prediction mode group includes the one available intra prediction mode of the respective prediction units and two additional intra prediction modes that are determined such that when the one available intra prediction mode is a non-directional intra prediction mode, the two additional intra prediction modes include another non-directional intra prediction mode and a vertical mode, wherein, when the one available intra prediction mode is a DC mode, the two additional intra prediction modes include a planar mode and the vertical mode, and wherein, when the one available intra prediction mode is a planar mode, the two additional intra prediction modes include a DC mode and the vertical mode. determining an intra prediction mode of a current prediction unit; generating a first intra prediction mode group using available intra prediction modes of a left prediction unit and an above prediction unit neighboring the current prediction unit, wherein the number of intra prediction modes belonging to the first intra prediction mode group is fixed to three; generating a second intra prediction mode group using intra prediction modes other than the intra prediction modes belonging to the first intra prediction mode group; encoding a first intra prediction mode group indicator and an index corresponding to the intra prediction mode of the current prediction unit in the first intra prediction mode group when the intra prediction mode of the current prediction unit is included in the first intra prediction mode group; and encoding a second intra prediction mode group indicator and an index corresponding to the intra prediction mode of the current prediction unit in the second intra prediction mode group when the intra prediction mode of the current prediction unit does not belong to the first intra prediction mode group, wherein, when only one intra prediction mode out of the intra prediction modes of the left prediction unit and the above prediction unit is available, the first intra prediction mode group includes the one available intra prediction mode of the respective prediction units and two additional intra prediction modes that are determined such that when the one available intra prediction mode is a non-directional intra prediction mode, the two additional intra prediction modes include another non-directional intra prediction mode and a vertical mode, wherein, when the one available intra prediction mode is a DC mode, the two additional intra prediction modes include a planar mode and the vertical mode, and wherein, when the one available intra prediction mode is a planar mode, the two additional intra prediction modes include a DC mode and the vertical mode.