diff options
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 0763c11037..09563e0112 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 | |||
33 | 33 | ||
34 | /* Statically allocate the filter buffers */ | 34 | /* Statically allocate the filter buffers */ |
35 | 35 | ||
36 | #ifdef FILTER256_IRAM | ||
36 | static filter_int filterbuf32[(32*3 + FILTER_HISTORY_SIZE) * 2] | 37 | static filter_int filterbuf32[(32*3 + FILTER_HISTORY_SIZE) * 2] |
37 | IBSS_ATTR __attribute__((aligned(16))); /* 2432/4864 bytes */ | 38 | IBSS_ATTR __attribute__((aligned(16))); /* 2432/4864 bytes */ |
38 | static filter_int filterbuf256[(256*3 + FILTER_HISTORY_SIZE) * 2] | 39 | static filter_int filterbuf256[(256*3 + FILTER_HISTORY_SIZE) * 2] |
39 | IBSS_ATTR __attribute__((aligned(16))); /* 5120/10240 bytes */ | 40 | IBSS_ATTR __attribute__((aligned(16))); /* 5120/10240 bytes */ |
41 | #define FILTERBUF64 filterbuf256 | ||
42 | #define FILTERBUF32 filterbuf32 | ||
43 | #define FILTERBUF16 filterbuf32 | ||
44 | #else | ||
45 | static filter_int filterbuf64[(64*3 + FILTER_HISTORY_SIZE) * 2] | ||
46 | IBSS_ATTR __attribute__((aligned(16))); /* 2432/4864 bytes */ | ||
47 | static filter_int filterbuf256[(256*3 + FILTER_HISTORY_SIZE) * 2] | ||
48 | __attribute__((aligned(16))); /* 5120/10240 bytes */ | ||
49 | #define FILTERBUF64 filterbuf64 | ||
50 | #define FILTERBUF32 filterbuf64 | ||
51 | #define FILTERBUF16 filterbuf64 | ||
52 | #endif | ||
40 | 53 | ||
41 | /* This is only needed for "insane" files, and no current Rockbox targets | 54 | /* This is only needed for "insane" files, and no current Rockbox targets |
42 | can hope to decode them in realtime, although the Gigabeat S comes close. */ | 55 | 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, | |||
57 | switch (ape_ctx->compressiontype) | 70 | switch (ape_ctx->compressiontype) |
58 | { | 71 | { |
59 | case 2000: | 72 | case 2000: |
60 | init_filter_16_11(filterbuf32); | 73 | init_filter_16_11(FILTERBUF16); |
61 | break; | 74 | break; |
62 | 75 | ||
63 | case 3000: | 76 | case 3000: |
64 | init_filter_64_11(filterbuf256); | 77 | init_filter_64_11(FILTERBUF64); |
65 | break; | 78 | break; |
66 | 79 | ||
67 | case 4000: | 80 | case 4000: |
68 | init_filter_256_13(filterbuf256); | 81 | init_filter_256_13(filterbuf256); |
69 | init_filter_32_10(filterbuf32); | 82 | init_filter_32_10(FILTERBUF32); |
70 | break; | 83 | break; |
71 | 84 | ||
72 | case 5000: | 85 | case 5000: |
73 | init_filter_1280_15(filterbuf1280); | 86 | init_filter_1280_15(filterbuf1280); |
74 | init_filter_256_13(filterbuf256); | 87 | init_filter_256_13(filterbuf256); |
75 | init_filter_16_11(filterbuf32); | 88 | init_filter_16_11(FILTERBUF32); |
76 | } | 89 | } |
77 | } | 90 | } |
78 | 91 | ||