Alternatively, when candIntraPredModeA and candIntraPredModeB are not the same and both candIntraPredModeA and candIntraPredModeB are nondirectional modes, a second candidate group may include at least one of a nondirectional mode, a vertical mode, a horizontal mode, (a vertical mode?m), (a vertical mode+m), (a horizontal mode?m) or (a horizontal mode+m). Herein, m may be an integer such as 1, 2, 3, 4, or more. The nondirectional mode may include at least one of a Planar mode or a DC mode. In an example, a candidate mode of a second candidate group may be determined as in the following Table 12. An index in Table 12 specifies a position or a priority of a candidate mode, but is not limited thereto. For example, an index 1 may be assigned to a horizontal mode or the largest index may be assigned. In addition, a candidate mode may include at least one of a diagonal mode (e.g., a mode 2, a mode 34, a mode 66), (a diagonal mode?m) or (a diagonal mode+m).