An image encoding apparatus includes a first selector selecting a
prediction-order to sub-blocks obtained by further dividing pixel-blocks
obtained by dividing a frame of an input-image-signal from predetermined
prediction-orders, a second selector selecting, from prediction-modes
regulating a manner of referring to an encoded-pixel when a
first-prediction-signal of each-sub-block is generated with reference to
the encoded-pixel, the number of prediction-modes used in prediction of
the first-prediction-signal, a third selector selecting prediction-modes
the number of which is the selected number from prediction-modes to use
the prediction-modes in prediction of the first-prediction-signal, a
generator generating the first-prediction-signal in the selected
prediction order by using the selected prediction-modes the number of
which is the selected number to generate a second-prediction-signal
corresponding to the pixelblock, and an encoder encoding a
prediction-residual-error-signal expressing a difference between an
image-signal of the pixel-block and the second-prediction-signal to
generate encoded data obtained by the prediction-encoding.