aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2024-03-13 07:11:55 +0100
committerLynne <dev@lynne.ee>2024-04-23 08:31:31 +0200
commit77a88bbddaa9b1afa3c61ea4f3271b31b0aa87a2 (patch)
tree96811cc2e20d7c4decbc894a0683a06f681d746d
parent60b60dd635a4e69e43ead19f10f90ac03aa83ee1 (diff)
downloadffmpeg-77a88bbddaa9b1afa3c61ea4f3271b31b0aa87a2.tar.gz
aacdec: give spectrum dequant+decode SCE rather than an ICS
Eliminates using templated values in function definition.
-rw-r--r--libavcodec/aacdec_template.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 5f3be074f7..a14b03263d 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -1660,14 +1660,16 @@ static void decode_mid_side_stereo(ChannelElement *cpe, GetBitContext *gb,
* @return Returns error status. 0 - OK, !0 - error
*/
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,
- const IndividualChannelStream *ics,
- enum BandType band_type[120])
+ SingleChannelElement *sce)
{
int i, k, g, idx = 0;
+ IndividualChannelStream *ics = &sce->ics;
const int c = 1024 / ics->num_windows;
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;
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,
- &pulse, ics, sce->band_type);
+ ret = decode_spectrum_and_dequant(ac, out, gb,
+ pulse_present,
+ &pulse, sce);
if (ret < 0)
goto fail;