From 811af5968ae3015af04804aa774728f90a897c05 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Fri, 9 Jul 2010 18:32:37 +0000 Subject: Submit FS#11461. Major speedup for aac he profile (PP5002 +20%, PP5020 +15%, PP5022 +19%, MCF5249 +35%, MCF5250 +80%), still not realtime on most targets though. This change does a lot of refactoring in the sbr filters and the dct, switching to our optimized codeclib fft and tweaking IRAM usage. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27358 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libfaad/specrec.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'apps/codecs/libfaad/specrec.c') diff --git a/apps/codecs/libfaad/specrec.c b/apps/codecs/libfaad/specrec.c index 74bf1f36f6..d21a923384 100644 --- a/apps/codecs/libfaad/specrec.c +++ b/apps/codecs/libfaad/specrec.c @@ -458,14 +458,14 @@ static INLINE real_t iquant(int16_t q, const real_t *tab, uint8_t *error) if (q < 0) { /* tab contains a value for all possible q [0,8192] */ - if (-q < IQ_TABLE_SIZE) + if (LIKELY(-q < IQ_TABLE_SIZE)) return -tab[-q]; *error = 17; return 0; } else { /* tab contains a value for all possible q [0,8192] */ - if (q < IQ_TABLE_SIZE) + if (LIKELY(q < IQ_TABLE_SIZE)) return tab[q]; *error = 17; @@ -523,17 +523,17 @@ ALIGN static const real_t pow2sf_tab[] = { - Within a scalefactor window band, the coefficients are in ascending spectral order. */ +ALIGN static const real_t pow2_table[] ICONST_ATTR = +{ + COEF_CONST(1.0), + COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */ + COEF_CONST(1.4142135623730950488016887242097), /* 2^0.50 */ + COEF_CONST(1.6817928305074290860622509524664) /* 2^0.75 */ +}; static uint8_t quant_to_spec(NeAACDecHandle hDecoder, ic_stream *ics, int16_t *quant_data, real_t *spec_data, uint16_t frame_len) { - ALIGN static const real_t pow2_table[] ICONST_ATTR = - { - COEF_CONST(1.0), - COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */ - COEF_CONST(1.4142135623730950488016887242097), /* 2^0.5 */ - COEF_CONST(1.6817928305074290860622509524664) /* 2^0.75 */ - }; const real_t *tab = iq_table; (void)frame_len; -- cgit v1.2.3