|
|
@ -1610,12 +1610,13 @@ static void decode_mid_side_stereo(ChannelElement *cpe, GetBitContext *gb, |
|
|
|
* |
|
|
|
* |
|
|
|
* @return Returns error status. 0 - OK, !0 - error |
|
|
|
* @return Returns error status. 0 - OK, !0 - error |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static int decode_spectrum_and_dequant(AACDecContext *ac, INTFLOAT coef[1024], |
|
|
|
static int decode_spectrum_and_dequant(AACDecContext *ac, |
|
|
|
GetBitContext *gb, |
|
|
|
GetBitContext *gb, |
|
|
|
int pulse_present, const Pulse *pulse, |
|
|
|
const Pulse *pulse, |
|
|
|
SingleChannelElement *sce) |
|
|
|
SingleChannelElement *sce) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int i, k, g, idx = 0; |
|
|
|
int i, k, g, idx = 0; |
|
|
|
|
|
|
|
INTFLOAT *coef = sce->AAC_RENAME(coeffs); |
|
|
|
IndividualChannelStream *ics = &sce->ics; |
|
|
|
IndividualChannelStream *ics = &sce->ics; |
|
|
|
const int c = 1024 / ics->num_windows; |
|
|
|
const int c = 1024 / ics->num_windows; |
|
|
|
const uint16_t *offsets = ics->swb_offset; |
|
|
|
const uint16_t *offsets = ics->swb_offset; |
|
|
@ -1856,7 +1857,7 @@ static int decode_spectrum_and_dequant(AACDecContext *ac, INTFLOAT coef[1024], |
|
|
|
coef += g_len << 7; |
|
|
|
coef += g_len << 7; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (pulse_present) { |
|
|
|
if (pulse) { |
|
|
|
idx = 0; |
|
|
|
idx = 0; |
|
|
|
for (i = 0; i < pulse->num_pulse; i++) { |
|
|
|
for (i = 0; i < pulse->num_pulse; i++) { |
|
|
|
INTFLOAT co = coef_base[ pulse->pos[i] ]; |
|
|
|
INTFLOAT co = coef_base[ pulse->pos[i] ]; |
|
|
@ -1977,7 +1978,6 @@ static int decode_ics(AACDecContext *ac, SingleChannelElement *sce, |
|
|
|
Pulse pulse; |
|
|
|
Pulse pulse; |
|
|
|
TemporalNoiseShaping *tns = &sce->tns; |
|
|
|
TemporalNoiseShaping *tns = &sce->tns; |
|
|
|
IndividualChannelStream *ics = &sce->ics; |
|
|
|
IndividualChannelStream *ics = &sce->ics; |
|
|
|
INTFLOAT *out = sce->AAC_RENAME(coeffs); |
|
|
|
|
|
|
|
int global_gain, eld_syntax, er_syntax, pulse_present = 0; |
|
|
|
int global_gain, eld_syntax, er_syntax, pulse_present = 0; |
|
|
|
int ret; |
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
|
@ -2047,9 +2047,9 @@ static int decode_ics(AACDecContext *ac, SingleChannelElement *sce, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ret = decode_spectrum_and_dequant(ac, out, gb, |
|
|
|
ret = decode_spectrum_and_dequant(ac, gb, |
|
|
|
pulse_present, |
|
|
|
pulse_present ? &pulse : NULL, |
|
|
|
&pulse, sce); |
|
|
|
sce); |
|
|
|
if (ret < 0) |
|
|
|
if (ret < 0) |
|
|
|
goto fail; |
|
|
|
goto fail; |
|
|
|
|
|
|
|
|
|
|
|