5.6.2 Tonality estimation
26.4043GPPEnhanced aacPlus encoder Spectral Band Replication (SBR) partEnhanced aacPlus general audio codecGeneral audio codec audio processing functionsRelease 17TS
The following detection modules base their output on a tonality estimate calculated in the tonality estimation module:
– Noise-floor estimation
– Inverse filtering estimation
– Additional sines estimation
The tonality is derived from the prediction gain of a second order linear prediction performed in every QMF subband. The LPC is calculated using the covariance method, and for every frame two tonality estimates are calculated for every subband.
In the following, X is the matrix holding the most recently available complex QMF subband samples. The tonality values are calculated and stored in the T and Tsbr matrices. These also contain buffered values from previous frames. The Tsbr values are obtained from the T values by patching the tonality values similarly to the patching of the subband channels in the high frequency reconstruction modules in the decoder.
Since the subband signals are complex valued, this results in complex filter coefficients for the linear prediction. The prediction filter coefficients are obtained from the covariance method. The covariance matrix elements for every tonality estimate calculated are:
where k is the subband index, and l is the tonality estimate.
Based on the covariance elements the coefficients and
used to calculate the tonality estimates for the subbands are calculated as:
,
,
.
where Inv is the relaxation parameter ( Inv = 1E-6 ).
The tonality values are calculated based on the above coefficients according to:
The tonality values are patched similarly to the patching of the QMF subbands in the decoder during high frequency reconstruction. Hence, it is possible to compare tonality of a "simulated" SBR signal and the original signal on the encoder side. The patch used is built in accordance to the flowchart in Figure 4.46, subclause 4.6.18.6.3 in [1], where the output variable numPatches is an integer value specifying the number of patches. patchStartSubband and patchNumSubbands are vectors holding the data output from the patch decision algorithm.
Hence, the tonality values for the SBR part is obtained according to:
for .