Patent ID: 7340394

Claim:
A computer-readable storage medium storing computer-executable instructions for causing a computer programmed thereby to perform a method of controlling quality of information in a constant bitrate encoder, wherein the encoder outputs the information at variable quality and compressed to a constant or relatively constant bitrate, the method comprising: determining a target maximum-bits parameter based at least in part upon (a) a first value constraining how many bits can be used in trying to satisfy a target quality parameter for a current block of information and (b) a second value indicating a number of bits available in a buffer until overflow; quantizing the current block of information to meet constant or relatively constant bitrate requirements, wherein, in a quality control quantization loop, the encoder adjusts quantization step size of the quantizing in view of a comparison of the target quality parameter for the current block to a quality measurement for the current block as quantized and reconstructed and wherein, in a bit-count control quantization loop following and de-linked from the quality control quantization loop, the encoder adjusts the quantization step size also in view of the target maximum-bits parameter, thereby reducing number of changes in quality and smoothing transitions between the changes in quality; and entropy coding the quantized current block of information.