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

Showing the changes to libavcodec (1 of 1 file). Show all

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
1660 * @return Returns error status. 0 - OK, !0 - error1660 * @return Returns error status. 0 - OK, !0 - error
1661 */1661 */
1662static int decode_spectrum_and_dequant(AACDecContext *ac, INTFLOAT coef[1024],1662static int decode_spectrum_and_dequant(AACDecContext *ac, INTFLOAT coef[1024],
1663 GetBitContext *gb, const INTFLOAT sf[120],1663 GetBitContext *gb,
1664 int pulse_present, const Pulse *pulse,1664 int pulse_present, const Pulse *pulse,
1665 const IndividualChannelStream *ics,1665 SingleChannelElement *sce)
1666 enum BandType band_type[120])
1667{1666{
1668 int i, k, g, idx = 0;1667 int i, k, g, idx = 0;
1668 IndividualChannelStream *ics = &sce->ics;
1669 const int c = 1024 / ics->num_windows;1669 const int c = 1024 / ics->num_windows;
1670 const uint16_t *offsets = ics->swb_offset;1670 const uint16_t *offsets = ics->swb_offset;
1671 const INTFLOAT *sf = sce->AAC_RENAME(sf);
1672 const enum BandType *band_type = sce->band_type;
1671 INTFLOAT *coef_base = coef;1673 INTFLOAT *coef_base = coef;
1672 1674
1673 for (g = 0; g < ics->num_windows; g++)1675 for (g = 0; g < ics->num_windows; g++)
@@ -2094,8 +2096,9 @@ static int decode_ics(AACDecContext *ac, SingleChannelElement *sce, · 420 unmodified lines
2094 }2096 }
2095 }2097 }
2096 2098
2097 ret = decode_spectrum_and_dequant(ac, out, gb, sce->AAC_RENAME(sf), pulse_present,2099 ret = decode_spectrum_and_dequant(ac, out, gb,
2098 &pulse, ics, sce->band_type);2100 pulse_present,
2101 &pulse, sce);
2099 if (ret < 0)2102 if (ret < 0)
2100 goto fail;2103 goto fail;
2101 2104

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