History

aacdec: give spectrum dequant+decode SCE rather than an ICS

Eliminates using templated values in function definition.

Lynne committed 2 years ago

Commit 77a88bb1 parent 60b60dd1 file · +8 −5Browse files

Unified · Split

libavcodec/aacdec_template.c+8−5
@@ -1660,14 +1660,16 @@ static void decode_mid_side_stereo(ChannelElement *cpe, GetBitContext *gb, · 1659 unmodified lines
16601660 * @return Returns error status. 0 - OK, !0 - error
16611661 */
16621662 static int decode_spectrum_and_dequant(AACDecContext *ac, INTFLOAT coef[1024],
1663− GetBitContext *gb, const INTFLOAT sf[120],
1663+ GetBitContext *gb,
16641664 int pulse_present, const Pulse *pulse,
1665− const IndividualChannelStream *ics,
1666− enum BandType band_type[120])
1665+ SingleChannelElement *sce)
16671666 {
16681667 int i, k, g, idx = 0;
1668+ IndividualChannelStream *ics = &sce->ics;
16691669 const int c = 1024 / ics->num_windows;
16701670 const uint16_t *offsets = ics->swb_offset;
1671+ const INTFLOAT *sf = sce->AAC_RENAME(sf);
1672+ const enum BandType *band_type = sce->band_type;
16711673 INTFLOAT *coef_base = coef;
16721674
16731675 for (g = 0; g < ics->num_windows; g++)
@@ -2094,8 +2096,9 @@ static int decode_ics(AACDecContext *ac, SingleChannelElement *sce, · 420 unmodified lines
20942096 }
20952097 }
20962098
2097− ret = decode_spectrum_and_dequant(ac, out, gb, sce->AAC_RENAME(sf), pulse_present,
2098− &pulse, ics, sce->band_type);
2099+ ret = decode_spectrum_and_dequant(ac, out, gb,
2100+ pulse_present,
2101+ &pulse, sce);
20992102 if (ret < 0)
21002103 goto fail;
21012104

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t