Patent ID: 7650277

Claim:
A method for real-time encoding of an audio signal in an audio encoder, comprising: grouping spectral lines to form scale band factors by determining masking thresholds based on human perception system using a time-to-frequency transformation module of the audio encoder; calculating local gain for each scale band factor using a quantizer coupled to a processor in the audio encoder; shaping quantization noise in spectral lines in each scale band factor using its local gain using the quantizer, wherein the local gain of each scale band factor is estimated as a function of band energy ratios and SMRs, wherein the shaping the quantization noise in each scale band factor such that a difference between SMR and SNR in each scale band factor is substantially constant, wherein the energy ratios are computed by dividing energy in each band over sum of energies in all bands, and wherein the local gain in each scale band factor is derived using the equation: K b =−( int )(α*log 2(en( b )/sum_en)+β*log 2(SMR( b ))) wherein K b is the local gain for each band, log 2 is logarithm to base 2, en(b) is the band energy in band b, sum_en is total energy in a frame, SMR(b) is the psychoacoustic threshold for band b, wherein α measures weightage due to energy ratio, and β is a weightage due to SMRs; and running a loop for each scale band factor to satisfy a predetermined bit allocation rate based on a bit allocation scheme using an inner loop module of the audio encoder.