Patent ID: 7415159

Claim:
An image data compression device used to compress image data, the image data compression device comprising: an image data processing section including a quantization section that quantizes image data by a quantization step that changes based on a quantization parameter; a FIFO buffer section that buffers quantized data for at least N frames (N is an integer greater than one) from the quantization section; an encoded data generation section that reads the quantized data from the FIFO buffer section asynchronously from writing into the FIFO buffer section, and generates encoded data by encoding the quantized data; and a rate control section that controls a data size of encoded data to be processed by changing the quantization step of the quantization section, the quantization step being changed by calculating the quantization parameter by using an average data size obtained by averaging data sizes of the encoded data for N frames preceding a frame of image data to be quantized by the quantization section, the rate control section setting or canceling an upper threshold of the quantization parameter based on the number of assignable bits to be assigned to the compression processing for maintaining a predetermined bit rate, or based on the number of remaining frames, or based on both the number of assignable bits to be assigned and the number of remaining frames; when the rate control section has set the upper threshold, the rate control section calculates the quantization parameter to be equal to or less than the upper threshold; and when the rate control section has canceled the upper threshold, the rate control section calculates the quantization parameter irrespective of the upper threshold.