In step ST73, the intra-predicting section decides on an optimum mode in an intra-prediction. The intra-predicting section 41 decides on a prediction mode that minimizes the cost, and then goes to step ST74.
In step ST74, in case the cost of an inter-prediction is smaller than the cost of an intra-prediction, the prediction selector goes to step ST75, and in case the cost of as inter-prediction is not smaller than the cost of an intra-prediction, the prediction selector goes to step ST76.
In step ST75, the prediction selector selects an inter-prediction. In step ST76, the prediction selector selects an intra-prediction.
By performing the foregoing processing sequence, since an inter-prediction is selected in case a TU in the transformation skip mode is included in an optimum mode, the image quality of a decoded image is prevented from being lowered.
According to basic profiles Main10, Main Still) of the HEVC standards, as the transformation skip mode can be set with respect to a TU of 4×4 pixels, an inter-prediction may be selected in case there exists a TU of 4×4 pixels in the transformation skip mode.
In step ST81, the motion predicting and compensating section selects an optimum mode in an inter-prediction. The motion predicting and compensating section 42 decides on either a motion vector, a PU size, a TU size, or an orthogonal transformation/transformation skip, for example, that minimizes the cost, and then goes to step ST82.