A moving image encoding device encoding a moving image by using a computation unit subtracting a prediction image from an input image for each pixel block, an orthogonal transformation unit applying orthogonal transformation to an output of the computation unit, a quantization unit quantizing an output of the orthogonal transformation unit, and an encoding unit encoding an output of the quantization unit, comprising: a prediction mode determination unit determining an intra-prediction mode when the input image is an I-picture, and determining an intra-prediction mode, determining an inter-prediction mode, and determining as best mode any one of the determined intra-prediction mode and the determined inter-prediction mode when the input image is a P-picture or a B-picture, wherein for determining the intra-prediction mode, the prediction mode determination unit calculates a flat area determination parameter evaluating a flatness of each pixel block of the input image, calculates for a coding target block an intra prediction mode offset value for each intra prediction mode based on the flat area determination parameter of an adjacent block used for the intra prediction of the coding target block of the input image, calculates an evaluation value evaluating coding cost of the coding target block for each intra prediction mode, and selects, as the determined intra prediction mode of the coding target block, the intra prediction modes having a smallest intra evaluation value which is obtained by adding respective intra prediction mode offset values and the corresponding evaluation values; characterized in that for determining the inter-prediction mode the prediction mode determination unit calculates a second evaluation value evaluating coding cost of the determined inter-prediction mode; and further characterised by selecting a mode corresponding to a smaller one of theintra evaluation value and the second evaluation value as said best mode for the P-picture and the B-picture. a prediction mode determination unit determining an intra-prediction mode when the input image is an I-picture, and determining an intra-prediction mode, determining an inter-prediction mode, and determining as best mode any one of the determined intra-prediction mode and the determined inter-prediction mode when the input image is a P-picture or a B-picture, wherein for determining the intra-prediction mode, the prediction mode determination unit calculates a flat area determination parameter evaluating a flatness of each pixel block of the input image, calculates for a coding target block an intra prediction mode offset value for each intra prediction mode based on the flat area determination parameter of an adjacent block used for the intra prediction of the coding target block of the input image, calculates an evaluation value evaluating coding cost of the coding target block for each intra prediction mode, and selects, as the determined intra prediction mode of the coding target block, the intra prediction modes having a smallest intra evaluation value which is obtained by adding respective intra prediction mode offset values and the corresponding evaluation values; characterized in that for determining the inter-prediction mode the prediction mode determination unit calculates a second evaluation value evaluating coding cost of the determined inter-prediction mode; and further characterised by selecting a mode corresponding to a smaller one of theintra evaluation value and the second evaluation value as said best mode for the P-picture and the B-picture. <EOS>