summaryrefslogtreecommitdiff
path: root/apps/codecs/libfaad/syntax.c
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2006-09-24 19:00:29 +0000
committerMagnus Holmgren <magnushol@gmail.com>2006-09-24 19:00:29 +0000
commit3fa5e5f5924306417c05cbc7a7f46a605c670996 (patch)
tree582869c0709cb876cec3f4a3b73a0dd56e6241a5 /apps/codecs/libfaad/syntax.c
parent0e5bd54cbb26768a2059ed5aadd7b2c15974fe6f (diff)
downloadrockbox-3fa5e5f5924306417c05cbc7a7f46a605c670996.zip
rockbox-3fa5e5f5924306417c05cbc7a7f46a605c670996.tar.gz
rockbox-3fa5e5f5924306417c05cbc7a7f46a605c670996.tar.bz2
rockbox-3fa5e5f5924306417c05cbc7a7f46a605c670996.tar.xz
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.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/codecs/libfaad/syntax.c b/apps/codecs/libfaad/syntax.c
index 27f9b8a..77a2e88 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,
/* Table 4.4.4 and */
/* Table 4.4.9 */
ALIGN int16_t spec_data[1024] = {0};
-element sce IBSS_ATTR;
+element sce;
static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
uint8_t channel, uint8_t *tag)
{
@@ -603,9 +603,9 @@ static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
}
/* Table 4.4.5 */
-ALIGN int16_t spec_data1[1024];
-ALIGN int16_t spec_data2[1024];
-element cpe IBSS_ATTR;
+ALIGN int16_t spec_data1[1024] IBSS_ATTR;
+ALIGN int16_t spec_data2[1024] IBSS_ATTR;
+element cpe;
static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
uint8_t channels, uint8_t *tag)
{
@@ -833,6 +833,8 @@ static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
}
#endif
}
+#else
+ (void) common_window;
#endif
}
}
@@ -1166,8 +1168,8 @@ static void gain_control_data(bitfile *ld, ic_stream *ics)
#endif
#ifdef SCALABLE_DEC
-ALIGN int16_t spec_data1[1024] IBSS_ATTR;
-ALIGN int16_t spec_data2[1024] IBSS_ATTR;
+ALIGN int16_t spec_data1[1024];
+ALIGN int16_t spec_data2[1024];
/* Table 4.4.13 ASME */
void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
bitfile *ld, program_config *pce, drc_info *drc)
@@ -1610,6 +1612,8 @@ static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld
#ifdef ERROR_RESILIENCE
if (hDecoder->aacSectionDataResilienceFlag)
sect_cb_bits = 5;
+#else
+ (void) hDecoder;
#endif
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
#ifdef ERROR_RESILIENCE
if (!hDecoder->aacScalefactorDataResilienceFlag)
{
+#else
+ (void) hDecoder;
#endif
ret = decode_scale_factors(ics, ld);
#ifdef ERROR_RESILIENCE