Concretely, a decoding device may obtain a first flag from a bitstream. The first flag may represent whether an intra prediction mode of a current block is derived from a candidate mode list (a first candidate group). A candidate mode list may include k candidate modes (MPM) and k may be an integer such as 1, 2, 3, 4, 5, 6, or more.
When the first flag is a first value (i.e., when an intra prediction mode of a current block is derived from a first candidate group), a decoding device may obtain index information (mpm_idx) from a bitstream. In this case, index information may specify any one of a plurality of MPM belonging to the candidate mode list. An intra prediction mode of a current block may be determined based on the candidate mode list and index information. In other words, a MPM specified by the index information may be set as an intra prediction mode of a current block. But, index information may be used only when a plurality of MPM are included in a candidate mode list. For example, when only one MPM is included in a candidate mode list, signaling of index information may be omitted and the corresponding MPM may be set as an intra prediction mode of a current block.