To encode a moving image in a variable rate at once by encoding an image in the latest GOP section to obtain the value of image complexity of the latest GOP section for the image in the just preceding GOP section and the value of an average coding rate many sections, thereby obtaining the target coding rate, and the target coding quantity of the next GOP section, and encoding in the next GOP section.
An MPEG encoder part the moving image is a basic part performing MPEG coding processing. A target coding quantity allocating part allocates target coding quantity to a GOP unit and an image frame unit and performs sequential coding processing while changing the quantization scale of the MPEG encoder part in performing encoding processing in an image frame. Then, it performs feedback control so that actual generation coding quantity can be constricted to the target coding quantity. A target coding quantity calculating part decides a target coding rate, target coding quantity, the target coding quantity in every I, P and B image frame and the value of a quantization scale in each macroblock in an image frame for the next GOP section.
SAKAI KIYOSHI