An image decoding method comprising: reconstructing an intra prediction mode group indicator and a prediction mode index of a current block; constructing a first group including three intra prediction modes using valid intra prediction modes of left and top blocks of the current block; determining the intra prediction mode corresponding to the prediction mode index in the first group as the intra prediction mode of the current block when the intra prediction mode group indicator indicates the first group and determining the intra prediction mode corresponding to the prediction mode index in a second group when the intra prediction mode group indicator indicates the second group; and creating a prediction block on the basis of the determined intra prediction mode of the current block, wherein the size of the prediction block is determined depending on transform size information, wherein when only one of the intra prediction modes of the left and top blocks of the current block is present, two intra prediction modes are added to the first group, characterised in that: when the intra prediction modes of the left and top blocks are not equal to each other and are directional intra prediction modes, the first group includes the intra prediction modes of the left and top blocks and a planar mode, and when the intra prediction modes of the left and top blocks are not equal to each other and are non-directional intra prediction modes, the first group includes the intra prediction modes of the left and top blocks and a vertical mode. reconstructing an intra prediction mode group indicator and a prediction mode index of a current block; constructing a first group including three intra prediction modes using valid intra prediction modes of left and top blocks of the current block; determining the intra prediction mode corresponding to the prediction mode index in the first group as the intra prediction mode of the current block when the intra prediction mode group indicator indicates the first group and determining the intra prediction mode corresponding to the prediction mode index in a second group when the intra prediction mode group indicator indicates the second group; and creating a prediction block on the basis of the determined intra prediction mode of the current block, wherein the size of the prediction block is determined depending on transform size information, wherein when only one of the intra prediction modes of the left and top blocks of the current block is present, two intra prediction modes are added to the first group, characterised in that: when the intra prediction modes of the left and top blocks are not equal to each other and are directional intra prediction modes, the first group includes the intra prediction modes of the left and top blocks and a planar mode, and when the intra prediction modes of the left and top blocks are not equal to each other and are non-directional intra prediction modes, the first group includes the intra prediction modes of the left and top blocks and a vertical mode. when the intra prediction modes of the left and top blocks are not equal to each other and are directional intra prediction modes, the first group includes the intra prediction modes of the left and top blocks and a planar mode, and when the intra prediction modes of the left and top blocks are not equal to each other and are non-directional intra prediction modes, the first group includes the intra prediction modes of the left and top blocks and a vertical mode.