diff options
| author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-07-01 21:18:42 +0000 |
|---|---|---|
| committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-07-01 21:18:42 +0000 |
| commit | 52f17dfe9d5221fdc83b2c5d719fe701dce46f24 (patch) | |
| tree | 6fdecfc1e9560e2566214bc8336b401df02663bc /apps/codecs/libfaad/common.h | |
| parent | b013fb76c464b5125026b4d6c95c49a046d0924c (diff) | |
| download | rockbox-52f17dfe9d5221fdc83b2c5d719fe701dce46f24.zip rockbox-52f17dfe9d5221fdc83b2c5d719fe701dce46f24.tar.gz rockbox-52f17dfe9d5221fdc83b2c5d719fe701dce46f24.tar.bz2 rockbox-52f17dfe9d5221fdc83b2c5d719fe701dce46f24.tar.xz | |
Submit FS#11445. Speed up of faad (aac) decoder via several optimizations like refactoring some requantization routines, moving several arrays and code tables to IRAM, using an optimized swap32() function and inlining several huffman decoder functions. Decoding is sped up by ~10% (PP5002, PP5022, MCF5249) and ~22% (MCF5250).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27225 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad/common.h')
| -rw-r--r-- | apps/codecs/libfaad/common.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/codecs/libfaad/common.h b/apps/codecs/libfaad/common.h index 01164e3..59ce806 100644 --- a/apps/codecs/libfaad/common.h +++ b/apps/codecs/libfaad/common.h @@ -51,6 +51,25 @@ extern struct codec_api* ci; #define LOGF(...) #endif +#if (CONFIG_CPU == MCF5250) || defined(CPU_S5L870X) +/* Enough IRAM but performance suffers with ICODE_ATTR. */ +#define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR +#define ICODE_ATTR_FAAD_LARGE_IRAM +#define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR + +#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) +/* Enough IRAM to move additional data and code to it. */ +#define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR +#define ICODE_ATTR_FAAD_LARGE_IRAM ICODE_ATTR +#define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR + +#else +/* Not enough IRAM available. */ +#define IBSS_ATTR_FAAD_LARGE_IRAM +#define ICODE_ATTR_FAAD_LARGE_IRAM +#define ICONST_ATTR_FAAD_LARGE_IRAM +#endif + #define INLINE __inline #if 0 //defined(_WIN32) && !defined(_WIN32_WCE) #define ALIGN __declspec(align(16)) @@ -71,7 +90,7 @@ extern struct codec_api* ci; /* #define USE_DOUBLE_PRECISION */ /* use fixed point reals */ #define FIXED_POINT -//#define BIG_IQ_TABLE +#define BIG_IQ_TABLE /* BIG_IQ_TABLE results in faster requantization */ /* Use if target platform has address generators with autoincrement */ //#define PREFER_POINTERS |