For example, when a mode value of a MPM is greater than or equal to a base mode value, an operation which subtracts a predetermined value of m from a MPM may be performed and otherwise, an operation which adds a predetermined value of m to a MPM may be performed. Conversely, when a mode value of a MPM is greater than or equal to a base mode value, an operation which adds a predetermined value of m to a MPM may be performed and otherwise, an operation which subtracts a predetermined value of m from a MPM may be performed.
Meanwhile, i base mode values may be used. Herein, a value of i may be 1, 2, 3, 4, or 5. For example, when a value of i is 2, base mode values may include a first base mode value and a second base mode value. In this case, a first base mode value may be any one of the above-described 5 modes and a second base mode value may be another of 5 modes.
In an example, in reference to 
In addition to a mode derived based on a MPM, a second candidate group may further include its neighboring mode (embodiment 2). A neighboring mode may be determined by adding or subtracting an integer such as 1, 2, 3, or more to or from a mode derived based on a MPM.