mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
aacdec: give spectrum dequant+decode SCE rather than an ICS
Eliminates using templated values in function definition.
This commit is contained in:
parent
60b60dd635
commit
77a88bbdda
@ -1660,14 +1660,16 @@ 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, INTFLOAT coef[1024],
|
||||||
GetBitContext *gb, const INTFLOAT sf[120],
|
GetBitContext *gb,
|
||||||
int pulse_present, const Pulse *pulse,
|
int pulse_present, const Pulse *pulse,
|
||||||
const IndividualChannelStream *ics,
|
SingleChannelElement *sce)
|
||||||
enum BandType band_type[120])
|
|
||||||
{
|
{
|
||||||
int i, k, g, idx = 0;
|
int i, k, g, idx = 0;
|
||||||
|
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;
|
||||||
|
const INTFLOAT *sf = sce->AAC_RENAME(sf);
|
||||||
|
const enum BandType *band_type = sce->band_type;
|
||||||
INTFLOAT *coef_base = coef;
|
INTFLOAT *coef_base = coef;
|
||||||
|
|
||||||
for (g = 0; g < ics->num_windows; g++)
|
for (g = 0; g < ics->num_windows; g++)
|
||||||
@ -2094,8 +2096,9 @@ static int decode_ics(AACDecContext *ac, SingleChannelElement *sce,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = decode_spectrum_and_dequant(ac, out, gb, sce->AAC_RENAME(sf), pulse_present,
|
ret = decode_spectrum_and_dequant(ac, out, gb,
|
||||||
&pulse, ics, sce->band_type);
|
pulse_present,
|
||||||
|
&pulse, sce);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user