5.6.3 Noise-floor estimation
26.4043GPPEnhanced aacPlus encoder Spectral Band Replication (SBR) partEnhanced aacPlus general audio codecGeneral audio codec audio processing functionsRelease 17TS
The noise floor estimation module estimates the amount of noise relative to the energy of the patched SBR signal that should be added on the decoder side in order to obtain a tonal to noise ratio similar to that of the original. The estimation is based on the tonality values in the T and Tsbr matrices, and the estimation is done for the number of frequency bands indicated by NQ , and the frequency ranges defined in fTableNoise for the time segments defined by . The algorithm below is outlined for noise floor band nfBand for noise floor nfEnv and should be applied for all noise-floor bands, and noise floors in the present frame. If the number of spectral envelopes for the present frame is larger than one, two noise floors will be estimated, otherwise one. For the case of two noise floors startIndex will be zero for the first noise-floor and one for the second noise-floor, while stopIndex will be one for the first noise-floor, and two for the second noise-floor. In case of only one noise-floor, the startIndex will be zero and the stopIndex will be one.
The noise floor is calculated by averaging of the tonality values for the given time/frequency range, or by choosing the maximum tonality value. The latter is used if the additional sine detection algorithm detects that a sine should be added on the decoder side for frequency band that is included in the present noise floor frequency band.
Hence, for every noise floor band the tonality values are calculated according to:
or, if a sine will be added at the decoder side as indicated by "missingHarmonicsFlag", according to:
The tonality values Tavg and TavgSbr are subsequently used to calculate the actual noise-floor value, according to:
,
if the additional sine detection has indicated that there is a sinusoidal missing in the present noise-floor band, or the inverse filtering level for the present noise-floor band is equal or below INVF_LEVEL_MID. If neither of these cases are true, the noise-floor value is calculated according to:
The noise-floor values are smoothed by applying a LP filter over time using previous noise floor values. Hence for every nfBand, the smoothing is done according to:
where nfPrev are the nf values from the previous estimates (where the most recent estimates is placed at the end of the vector, i.e. position 2), and h is defined as: