Patent ID: 8296159

Claim:
An apparatus for calculating a number of spectral envelopes to be derived by a spectral band replication (SBR) encoder, wherein the SBR encoder is adapted to encode an audio signal using a plurality of sample values within a predetermined number of subsequent time portions in an SBR frame extending from an initial time to a final time, the predetermined number of subsequent time portions being arranged in a time sequence given by the audio signal, the apparatus comprising: a decision value calculator configured to determining a decision value, the decision value measuring a deviation in spectral energy distributions of a pair of neighboring time portions; a detector configured to detecting a violation of a threshold by the decision value; a processor configured to determining a first envelope border between the pair of neighboring time portions when the violation of the threshold is detected; a processor configured to determining a second envelope border between a different pair of neighboring time portions or at the initial time or at the final time for an envelope comprising the first envelope border based on the violation of the threshold for the other pair or based on a temporal position of the pair or the different pair in the SBR frame; and a number processor configured to establishing the number of spectral envelopes comprising the first envelope border and the second envelope border, wherein the predetermined number of time portions is equal to n with n−1 borders between neighboring time portions, which are numbered and ordered with respect to the time so that the borders comprise even and odd borders, and wherein the number processor is adapted to establish n as the number of spectral envelopes if the detector detects the violation at an odd border.