diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-11-12 07:04:07 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-11-12 07:04:07 +0000 |
commit | 3f4e0cf25b525f8acec950547ff7570db5c134a5 (patch) | |
tree | 43d153e024754e69bbe30af2aaf0bf402301bebe /apps/codecs/libmusepack/mpc_decoder.c | |
parent | 755523559104713340243da83e08871ec6601865 (diff) | |
download | rockbox-3f4e0cf25b525f8acec950547ff7570db5c134a5.tar.gz rockbox-3f4e0cf25b525f8acec950547ff7570db5c134a5.zip |
Set alignment for major data arrays in the mpc codec. This avoids performance regressions on S5L870x CPUs when changing code and allows further improvements.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28561 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmusepack/mpc_decoder.c')
-rw-r--r-- | apps/codecs/libmusepack/mpc_decoder.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/codecs/libmusepack/mpc_decoder.c b/apps/codecs/libmusepack/mpc_decoder.c index 2ac855b946..c1e1d0e0d2 100644 --- a/apps/codecs/libmusepack/mpc_decoder.c +++ b/apps/codecs/libmusepack/mpc_decoder.c | |||
@@ -62,8 +62,10 @@ extern const mpc_can_data mpc_can_Q9up; | |||
62 | 62 | ||
63 | //Decoder globals (g_Y_L and g_Y_R do not fit into iram for all targets) | 63 | //Decoder globals (g_Y_L and g_Y_R do not fit into iram for all targets) |
64 | static mpc_decoder g_mpc_decoder IBSS_ATTR; | 64 | static mpc_decoder g_mpc_decoder IBSS_ATTR; |
65 | static MPC_SAMPLE_FORMAT g_Y_L[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM; | 65 | static MPC_SAMPLE_FORMAT g_V_L[MPC_V_MEM + 960 ] IBSS_ATTR __attribute__((aligned(16))); |
66 | static MPC_SAMPLE_FORMAT g_Y_R[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM; | 66 | static MPC_SAMPLE_FORMAT g_Y_L[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM __attribute__((aligned(16))); |
67 | static MPC_SAMPLE_FORMAT g_V_R[MPC_V_MEM + 960 ] IBSS_ATTR __attribute__((aligned(16))); | ||
68 | static MPC_SAMPLE_FORMAT g_Y_R[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM __attribute__((aligned(16))); | ||
67 | 69 | ||
68 | //SV7 globals (decoding results for bundled quantizers (3- and 5-step)) | 70 | //SV7 globals (decoding results for bundled quantizers (3- and 5-step)) |
69 | static const mpc_int32_t g_sv7_idx30[] ICONST_ATTR = | 71 | static const mpc_int32_t g_sv7_idx30[] ICONST_ATTR = |
@@ -236,9 +238,13 @@ static void mpc_decoder_setup(mpc_decoder *d) | |||
236 | 238 | ||
237 | d->__r1 = 1; | 239 | d->__r1 = 1; |
238 | d->__r2 = 1; | 240 | d->__r2 = 1; |
241 | d->V_L = g_V_L; | ||
242 | d->V_R = g_V_R; | ||
239 | d->Y_L = g_Y_L; | 243 | d->Y_L = g_Y_L; |
240 | d->Y_R = g_Y_R; | 244 | d->Y_R = g_Y_R; |
241 | 245 | ||
246 | memset(d->V_L, 0, sizeof(g_V_L)); | ||
247 | memset(d->V_R, 0, sizeof(g_V_R)); | ||
242 | memset(d->Y_L, 0, sizeof(g_Y_L)); | 248 | memset(d->Y_L, 0, sizeof(g_Y_L)); |
243 | memset(d->Y_R, 0, sizeof(g_Y_R)); | 249 | memset(d->Y_R, 0, sizeof(g_Y_R)); |
244 | 250 | ||