|
|
|
@@ -2367,7 +2367,7 @@ static int decode_extension_payload(AACContext *ac, GetBitContext *gb, int cnt, |
|
|
|
* @param decode 1 if tool is used normally, 0 if tool is used in LTP. |
|
|
|
* @param coef spectral coefficients |
|
|
|
*/ |
|
|
|
static void apply_tns(INTFLOAT coef[1024], TemporalNoiseShaping *tns, |
|
|
|
static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns, |
|
|
|
IndividualChannelStream *ics, int decode) |
|
|
|
{ |
|
|
|
const int mmm = FFMIN(ics->tns_max_bands, ics->max_sfb); |
|
|
|
@@ -2375,6 +2375,7 @@ static void apply_tns(INTFLOAT coef[1024], TemporalNoiseShaping *tns, |
|
|
|
int bottom, top, order, start, end, size, inc; |
|
|
|
INTFLOAT lpc[TNS_MAX_ORDER]; |
|
|
|
INTFLOAT tmp[TNS_MAX_ORDER+1]; |
|
|
|
UINTFLOAT *coef = coef_param; |
|
|
|
|
|
|
|
for (w = 0; w < ics->num_windows; w++) { |
|
|
|
bottom = ics->num_swb; |
|
|
|
@@ -2404,7 +2405,7 @@ static void apply_tns(INTFLOAT coef[1024], TemporalNoiseShaping *tns, |
|
|
|
// ar filter |
|
|
|
for (m = 0; m < size; m++, start += inc) |
|
|
|
for (i = 1; i <= FFMIN(m, order); i++) |
|
|
|
coef[start] -= AAC_MUL26(coef[start - i * inc], lpc[i - 1]); |
|
|
|
coef[start] -= AAC_MUL26((INTFLOAT)coef[start - i * inc], lpc[i - 1]); |
|
|
|
} else { |
|
|
|
// ma filter |
|
|
|
for (m = 0; m < size; m++, start += inc) { |
|
|
|
|