5.8 Envelope and noise floor coding
26.4043GPPEnhanced aacPlus encoder Spectral Band Replication (SBR) partEnhanced aacPlus general audio codecGeneral audio codec audio processing functionsRelease 17TS
The spectral envelope scalefactors and noise floor scalefactors are delta coded in either the time direction or the frequency direction, according to the preferred choice indicated in bs_df_env(l) and bs_df_noise(l). The bs_df_env and bs_df_noise elements are chosen so that the total number of bits required for coding the scalefactor data of the present frame is minimised, with the reservation for the case when reset = 1. In this case delta coding in the time direction is not allowed for the first SBR envelope or noise floor of that SBR frame.
The above minimization of envelope bits are for stereo done in both coupling and left/right stereo mode and based on this the stereo mode is chosen so that the total number of bits required is minimized.
Below the delta coding of envelope scalefactors and noise floor scalefactors are defined.
where and,
where and
is defined below. As
represents the envelope scalefactors for the current SBR frame, the envelope scalefactors from the previous SBR frame is denoted
. Envelope scalefactors from the previous SBR frame,
is needed when delta coding in time direction over SBR frame boundaries. The number of SBR envelopes of the previous SBR frame is denoted
, and is also needed in that case, as well as frequency resolution vector of the previous SBR frame, denoted r’.
and
.
The delta coding of the noise floor scalefactors are defined as:
where
and where is the noise floor scalefactors from the previous SBR frame and
is the number of noise floors from the previous SBR frame.
and
are stored as bitstream element as shown below prior to Huffman coding.
For the envelope scalefactors and the noise floor scalefactors different Huffman tables are used dependent on coding directions, quantization and stereo mode, according to in [1], sub clause 4.A.6.1 Table 4.A.76