Patent ID: 7668715

Claim:
A method of performing quantization in an audio encoder comprising: in an audio encoder determining a number of bits available in a frame of encoded audio data; determining the maximum transform coefficient value from a transform coefficient transform spectrum being encoded; determining if the number of bits available for encoding a frame of audio data is above or below a knee point; determining a coding gain factor from the determination of whether the number of bits are available for encoding a frame of audio data is above or below the knee point; determining a distribution of transform coefficient values across the transform coefficient spectrum being encoded by calculating a ratio value from a ratio of a mean transform coefficient absolute value of a transform coefficient spectrum to a maximum transform coefficient absolute value of the transform coefficient spectrum; calculating a parameter value from the distribution of transform coefficient values across the transform coefficient spectrum; calculating another ratio value from the number of available bits and the number of coefficients in the transform coefficient spectrum factored by the coding gain; and determining a quantization step size from the parameter value, the another ratio value, and the maximum coefficient value of the transform coefficient spectrum; and quantizing a stream of audio data with the audio decoder utilizing the determined quantization step size.