A moving image encoding device that performs encoding by converting and quantizing a prediction residual difference obtained by applying an interframe prediction or an intraframe prediction to each encoding tree block, wherein an image is divided into a plurality of tree blocks, wherein a 360 degree video is divided into units of a frame given by means of equirectangular projection which is a method of expanding a sphere surface into a rectangular image, for each encoding block constituting the encoding tree block, the moving image encoding device comprising: a calculation unit configured to calculate a quantization parameter to be applied to the encoding block on the basis of a pixel value of a pre-coding block and a position of the encoding block in the frame; a prediction unit configured to obtain a QP prediction value by predicting the quantization parameter on the basis of a quantization parameter calculated by the calculation unit with respect to a left neighboring block, an upper neighboring block, or an already encoded block of the encoding block; a correction unit configured to correct the QP prediction value and obtain a QP correction value such that: when a condition is satisfied where the encoding block (TU20, TU22, TU24) is positioned at a left end of the frame, and the left neighboring block and the upper neighboring block belong to encoding tree blocks that are different from the encoding tree block to which the encoding block belongs, then the correction unit corrects the QP prediction value by adding to the QP prediction value, a difference between a value COR of a correction function COR based on a position of the encoding block and a value COR of the same function based on a position of the already encoded block that is referenced by the prediction unit to obtain the predicted value, wherein said function COR becomes greater as the block position gets away from the equator to the north pole or the south pole in the equirectangular projection, when said condition is not satisfied, the correction unit outputs the value of the QP prediction value obtained by the prediction unit; and an encoding unit configured to encode a difference between the QP correction value and the quantization parameter, QP. a calculation unit configured to calculate a quantization parameter to be applied to the encoding block on the basis of a pixel value of a pre-coding block and a position of the encoding block in the frame; a prediction unit configured to obtain a QP prediction value by predicting the quantization parameter on the basis of a quantization parameter calculated by the calculation unit with respect to a left neighboring block, an upper neighboring block, or an already encoded block of the encoding block; a correction unit configured to correct the QP prediction value and obtain a QP correction value such that: when a condition is satisfied where the encoding block (TU20, TU22, TU24) is positioned at a left end of the frame, and the left neighboring block and the upper neighboring block belong to encoding tree blocks that are different from the encoding tree block to which the encoding block belongs, then the correction unit corrects the QP prediction value by adding to the QP prediction value, a difference between a value COR of a correction function COR based on a position of the encoding block and a value COR of the same function based on a position of the already encoded block that is referenced by the prediction unit to obtain the predicted value, wherein said function COR becomes greater as the block position gets away from the equator to the north pole or the south pole in the equirectangular projection, when said condition is not satisfied, the correction unit outputs the value of the QP prediction value obtained by the prediction unit; and an encoding unit configured to encode a difference between the QP correction value and the quantization parameter, QP. when a condition is satisfied where the encoding block (TU20, TU22, TU24) is positioned at a left end of the frame, and the left neighboring block and the upper neighboring block belong to encoding tree blocks that are different from the encoding tree block to which the encoding block belongs, then the correction unit corrects the QP prediction value by adding to the QP prediction value, a difference between a value COR of a correction function COR based on a position of the encoding block and a value COR of the same function based on a position of the already encoded block that is referenced by the prediction unit to obtain the predicted value, wherein said function COR becomes greater as the block position gets away from the equator to the north pole or the south pole in the equirectangular projection, when said condition is not satisfied, the correction unit outputs the value of the QP prediction value obtained by the prediction unit; and an encoding unit configured to encode a difference between the QP correction value and the quantization parameter, QP.