1. An image processing apparatus comprising: a selected-generated-code-size computing section that codes an input image by at least quantizing simple coded data that is obtained by simple coding of the input image through simple processing, by using quantization steps based on selected quantization factors discretely selected from quantization factors, and computes generated code sizes of the input image upon coding; an error correcting section that corrects an error in the generated code sizes of the input image upon coding which occurs in accordance with the simple processing; an interpolated-generated-code-size computing section that computes generated code sizes when the input image is coded on the basis of quantization parameters other than the selected quantization parameters, by an interpolation process with respect to the generated code sizes when the input image is coded on the basis of the selected quantization factors; and a main coding section that codes the input image on the basis of a base quantization factor determined by a base-quantization-factor determining section and that executes intra-prediction using a local decoded image as a predicted image before quantization, wherein said selected-generated-code-size computing section performs simple coding on the input image by simple processing in comparison to the main coding section, and said selected-generated-code-size computing section computes the generated code sizes of the input image upon coding by executing intra-prediction using the input image as the predicted image before quantization, and corrects the generated code sizes for an error that occurs due to use of the input image as the predicted image.