Patent ID: 8213498

Claim:
A method of processing blocks of digital image data comprising: scaling one or more quantization tables as a function of a computed scaling factor to create a first quantization table set; encoding a first portion of a plurality of blocks of pixels of the digital image data using the first quantization table set; encoding a second portion of a remaining unencoded portion of the plurality of blocks of image data using the first quantization table set; tracking a difference between a total number of encoded bits of the encoded second portion and a number of bits that ideally should be encoded at the second encoded portion to achieve a target bitrate; and removing one or more bits of the encoded second portion when the difference is greater than or equal to a threshold, wherein scaling the one or more quantization tables comprises scaling a luma quantization table and a chroma quantization table, wherein the chroma quantization table is scaled more than the luma quantization table, and wherein scaling the luma quantization table and the chroma quantization table comprises scaling a first portion of the luma quantization table by the computed scaling factor, and scaling a second portion of the luma quantization table and the chroma quantization table by a second scaling factor, wherein the second scaling factor is determined as a function of the computed scaling factor, and wherein the computed scaling factor and second scaling factor are greater than or equal to one, and further wherein the computed scaling factor is smaller than the second scaling factor.