Patent ID: 8260072

Claim:
An image encoding apparatus which encodes image data and generates encoded data within a target code amount L, comprising: an input unit which inputs, from encoding target image data, image data of a pixel block including a plurality of pixels; a frequency transform unit which frequency-transforms the input image data of the pixel block to generate high frequency band data and low frequency band data; a storage unit which stores, in a buffer memory, the low frequency band data obtained by said frequency transform unit; a first encoder which quantizes and encodes the high frequency band data obtained by said frequency transform unit and stores obtained encoded data in a code stream storage memory; a detector which detects a total code amount CL_H of the encoded data of the high frequency band data generated by said first encoder; a determiner which, when said first encoder has finished encoding processing of high frequency band data of all pixel blocks of the encoding target image data, sets, as a low frequency band target code amount, a capacity obtained by subtracting the total code amount CL_H of the encoded data of the high frequency band data from the target code amount L and determines an encoding parameter of the low frequency band data based on the low frequency band target code amount; a second encoder which encodes the low frequency band data stored in the buffer memory, in accordance with the encoding parameter determined by said determiner and stores obtained encoded data in the code stream storage memory; and an outputting unit which, when said second encoder has finished encoding processing of low frequency band data of all pixel blocks, outputs the encoded data of the low frequency band data and the encoded data of the high frequency band data both of which are stored in the code stream storage memory and have a data structure in a preset format.