diff options
| author | Andrew Mahone <andrew.mahone@gmail.com> | 2010-01-30 02:20:54 +0000 |
|---|---|---|
| committer | Andrew Mahone <andrew.mahone@gmail.com> | 2010-01-30 02:20:54 +0000 |
| commit | 436f4d3a204e8183d32d8c47975e6a294be1c0fa (patch) | |
| tree | 179e01ffbcbf216526ff008f1fd6453884768634 /apps/codecs/demac/libdemac/decoder.c | |
| parent | 423927310882669e70f318688945bd4e51a847f7 (diff) | |
| download | rockbox-436f4d3a204e8183d32d8c47975e6a294be1c0fa.zip rockbox-436f4d3a204e8183d32d8c47975e6a294be1c0fa.tar.gz rockbox-436f4d3a204e8183d32d8c47975e6a294be1c0fa.tar.bz2 rockbox-436f4d3a204e8183d32d8c47975e6a294be1c0fa.tar.xz | |
Improve libdemac SATURATE slightly on ARMv4/5, move filter buffers and code out of IRAM for sizes that aren't near realtime and extend udiv32_arm reciprocal table.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24376 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/demac/libdemac/decoder.c')
| -rw-r--r-- | apps/codecs/demac/libdemac/decoder.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/codecs/demac/libdemac/decoder.c b/apps/codecs/demac/libdemac/decoder.c index 0763c11..09563e0 100644 --- a/apps/codecs/demac/libdemac/decoder.c +++ b/apps/codecs/demac/libdemac/decoder.c @@ -33,10 +33,23 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA /* Statically allocate the filter buffers */ +#ifdef FILTER256_IRAM static filter_int filterbuf32[(32*3 + FILTER_HISTORY_SIZE) * 2] IBSS_ATTR __attribute__((aligned(16))); /* 2432/4864 bytes */ static filter_int filterbuf256[(256*3 + FILTER_HISTORY_SIZE) * 2] IBSS_ATTR __attribute__((aligned(16))); /* 5120/10240 bytes */ +#define FILTERBUF64 filterbuf256 +#define FILTERBUF32 filterbuf32 +#define FILTERBUF16 filterbuf32 +#else +static filter_int filterbuf64[(64*3 + FILTER_HISTORY_SIZE) * 2] + IBSS_ATTR __attribute__((aligned(16))); /* 2432/4864 bytes */ +static filter_int filterbuf256[(256*3 + FILTER_HISTORY_SIZE) * 2] + __attribute__((aligned(16))); /* 5120/10240 bytes */ +#define FILTERBUF64 filterbuf64 +#define FILTERBUF32 filterbuf64 +#define FILTERBUF16 filterbuf64 +#endif /* This is only needed for "insane" files, and no current Rockbox targets can hope to decode them in realtime, although the Gigabeat S comes close. */ @@ -57,22 +70,22 @@ void init_frame_decoder(struct ape_ctx_t* ape_ctx, switch (ape_ctx->compressiontype) { case 2000: - init_filter_16_11(filterbuf32); + init_filter_16_11(FILTERBUF16); break; case 3000: - init_filter_64_11(filterbuf256); + init_filter_64_11(FILTERBUF64); break; case 4000: init_filter_256_13(filterbuf256); - init_filter_32_10(filterbuf32); + init_filter_32_10(FILTERBUF32); break; case 5000: init_filter_1280_15(filterbuf1280); init_filter_256_13(filterbuf256); - init_filter_16_11(filterbuf32); + init_filter_16_11(FILTERBUF32); } } |