diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2006-09-24 19:00:29 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2006-09-24 19:00:29 +0000 |
commit | 3fa5e5f5924306417c05cbc7a7f46a605c670996 (patch) | |
tree | 582869c0709cb876cec3f4a3b73a0dd56e6241a5 /apps/codecs/libfaad/syntax.c | |
parent | 0e5bd54cbb26768a2059ed5aadd7b2c15974fe6f (diff) | |
download | rockbox-3fa5e5f5924306417c05cbc7a7f46a605c670996.tar.gz rockbox-3fa5e5f5924306417c05cbc7a7f46a605c670996.zip |
Apply a bunch of simple AAC decoder optimizations. Biggest speedup is on ColdFire targets, but ARM targets benefits too. Allows realtime playback of some AAC files on Iriver targets (H1x0, H3x0). Remove support for some rarely used AAC profiles to reduce code size a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11038 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad/syntax.c')
-rw-r--r-- | apps/codecs/libfaad/syntax.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/codecs/libfaad/syntax.c b/apps/codecs/libfaad/syntax.c index 27f9b8a632..77a2e886ec 100644 --- a/apps/codecs/libfaad/syntax.c +++ b/apps/codecs/libfaad/syntax.c | |||
@@ -559,7 +559,7 @@ void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, | |||
559 | /* Table 4.4.4 and */ | 559 | /* Table 4.4.4 and */ |
560 | /* Table 4.4.9 */ | 560 | /* Table 4.4.9 */ |
561 | ALIGN int16_t spec_data[1024] = {0}; | 561 | ALIGN int16_t spec_data[1024] = {0}; |
562 | element sce IBSS_ATTR; | 562 | element sce; |
563 | static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, | 563 | static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, |
564 | uint8_t channel, uint8_t *tag) | 564 | uint8_t channel, uint8_t *tag) |
565 | { | 565 | { |
@@ -603,9 +603,9 @@ static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, | |||
603 | } | 603 | } |
604 | 604 | ||
605 | /* Table 4.4.5 */ | 605 | /* Table 4.4.5 */ |
606 | ALIGN int16_t spec_data1[1024]; | 606 | ALIGN int16_t spec_data1[1024] IBSS_ATTR; |
607 | ALIGN int16_t spec_data2[1024]; | 607 | ALIGN int16_t spec_data2[1024] IBSS_ATTR; |
608 | element cpe IBSS_ATTR; | 608 | element cpe; |
609 | static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, | 609 | static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, |
610 | uint8_t channels, uint8_t *tag) | 610 | uint8_t channels, uint8_t *tag) |
611 | { | 611 | { |
@@ -833,6 +833,8 @@ static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld, | |||
833 | } | 833 | } |
834 | #endif | 834 | #endif |
835 | } | 835 | } |
836 | #else | ||
837 | (void) common_window; | ||
836 | #endif | 838 | #endif |
837 | } | 839 | } |
838 | } | 840 | } |
@@ -1166,8 +1168,8 @@ static void gain_control_data(bitfile *ld, ic_stream *ics) | |||
1166 | #endif | 1168 | #endif |
1167 | 1169 | ||
1168 | #ifdef SCALABLE_DEC | 1170 | #ifdef SCALABLE_DEC |
1169 | ALIGN int16_t spec_data1[1024] IBSS_ATTR; | 1171 | ALIGN int16_t spec_data1[1024]; |
1170 | ALIGN int16_t spec_data2[1024] IBSS_ATTR; | 1172 | ALIGN int16_t spec_data2[1024]; |
1171 | /* Table 4.4.13 ASME */ | 1173 | /* Table 4.4.13 ASME */ |
1172 | void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, | 1174 | void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, |
1173 | bitfile *ld, program_config *pce, drc_info *drc) | 1175 | bitfile *ld, program_config *pce, drc_info *drc) |
@@ -1610,6 +1612,8 @@ static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld | |||
1610 | #ifdef ERROR_RESILIENCE | 1612 | #ifdef ERROR_RESILIENCE |
1611 | if (hDecoder->aacSectionDataResilienceFlag) | 1613 | if (hDecoder->aacSectionDataResilienceFlag) |
1612 | sect_cb_bits = 5; | 1614 | sect_cb_bits = 5; |
1615 | #else | ||
1616 | (void) hDecoder; | ||
1613 | #endif | 1617 | #endif |
1614 | 1618 | ||
1615 | ics->sect_cb[g][i] = (uint8_t)faad_getbits(ld, sect_cb_bits | 1619 | ics->sect_cb[g][i] = (uint8_t)faad_getbits(ld, sect_cb_bits |
@@ -1797,6 +1801,8 @@ static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfil | |||
1797 | #ifdef ERROR_RESILIENCE | 1801 | #ifdef ERROR_RESILIENCE |
1798 | if (!hDecoder->aacScalefactorDataResilienceFlag) | 1802 | if (!hDecoder->aacScalefactorDataResilienceFlag) |
1799 | { | 1803 | { |
1804 | #else | ||
1805 | (void) hDecoder; | ||
1800 | #endif | 1806 | #endif |
1801 | ret = decode_scale_factors(ics, ld); | 1807 | ret = decode_scale_factors(ics, ld); |
1802 | #ifdef ERROR_RESILIENCE | 1808 | #ifdef ERROR_RESILIENCE |