diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-11-21 14:03:55 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-11-21 14:03:55 +0000 |
commit | 0dbc4a6cae1284f986b7f77fabbaffd54a0d8f60 (patch) | |
tree | 9214fccee810f21cb2db57ea6c8ca22643d790d4 | |
parent | e5b1a7d4237a9006b6c49c9c1c13b292ca4ecf7c (diff) | |
download | rockbox-0dbc4a6cae1284f986b7f77fabbaffd54a0d8f60.tar.gz rockbox-0dbc4a6cae1284f986b7f77fabbaffd54a0d8f60.zip |
Use MEM_ALIGN_ATTR in mpc codec. Speed up by 22-24% was measured on ARM11.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28627 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/libmusepack/mpc_decoder.c | 8 | ||||
-rw-r--r-- | apps/codecs/libmusepack/synth_filter.c | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/apps/codecs/libmusepack/mpc_decoder.c b/apps/codecs/libmusepack/mpc_decoder.c index 191ee10a2c..face3d1f81 100644 --- a/apps/codecs/libmusepack/mpc_decoder.c +++ b/apps/codecs/libmusepack/mpc_decoder.c | |||
@@ -62,10 +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_V_L[MPC_V_MEM + 960 ] IBSS_ATTR __attribute__((aligned(16))); | 65 | static MPC_SAMPLE_FORMAT g_V_L[MPC_V_MEM + 960 ] IBSS_ATTR MEM_ALIGN_ATTR; |
66 | static MPC_SAMPLE_FORMAT g_Y_L[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM __attribute__((aligned(16))); | 66 | static MPC_SAMPLE_FORMAT g_Y_L[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM MEM_ALIGN_ATTR; |
67 | static MPC_SAMPLE_FORMAT g_V_R[MPC_V_MEM + 960 ] IBSS_ATTR __attribute__((aligned(16))); | 67 | static MPC_SAMPLE_FORMAT g_V_R[MPC_V_MEM + 960 ] IBSS_ATTR MEM_ALIGN_ATTR; |
68 | static MPC_SAMPLE_FORMAT g_Y_R[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM __attribute__((aligned(16))); | 68 | static MPC_SAMPLE_FORMAT g_Y_R[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM MEM_ALIGN_ATTR; |
69 | 69 | ||
70 | //SV7 globals (decoding results for bundled quantizers (3- and 5-step)) | 70 | //SV7 globals (decoding results for bundled quantizers (3- and 5-step)) |
71 | static const mpc_int32_t g_sv7_idx30[] ICONST_ATTR = | 71 | static const mpc_int32_t g_sv7_idx30[] ICONST_ATTR = |
diff --git a/apps/codecs/libmusepack/synth_filter.c b/apps/codecs/libmusepack/synth_filter.c index e173702a77..602edff6c6 100644 --- a/apps/codecs/libmusepack/synth_filter.c +++ b/apps/codecs/libmusepack/synth_filter.c | |||
@@ -36,6 +36,7 @@ | |||
36 | /// Synthesis functions. | 36 | /// Synthesis functions. |
37 | /// \todo document me | 37 | /// \todo document me |
38 | #include <string.h> | 38 | #include <string.h> |
39 | #include <codecs.h> | ||
39 | #include "mpcdec.h" | 40 | #include "mpcdec.h" |
40 | #include "decoder.h" | 41 | #include "decoder.h" |
41 | #include "mpcdec_math.h" | 42 | #include "mpcdec_math.h" |
@@ -68,7 +69,7 @@ | |||
68 | #endif | 69 | #endif |
69 | 70 | ||
70 | // Di_opt coefficients are +/- 2^17 (pre-shifted by <<16) | 71 | // Di_opt coefficients are +/- 2^17 (pre-shifted by <<16) |
71 | static const MPC_SAMPLE_FORMAT Di_opt [512] ICONST_ATTR __attribute__((aligned(16))) = { | 72 | static const MPC_SAMPLE_FORMAT Di_opt [512] ICONST_ATTR MEM_ALIGN_ATTR = { |
72 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ | 73 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ |
73 | /* 0 */ D( 0), -D( 29), D(213), -D( 459), D(2037), -D(5153), D( 6574), -D(37489), D(75038), D(37489), D(6574), D(5153), D(2037), D(459), D(213), D(29), | 74 | /* 0 */ D( 0), -D( 29), D(213), -D( 459), D(2037), -D(5153), D( 6574), -D(37489), D(75038), D(37489), D(6574), D(5153), D(2037), D(459), D(213), D(29), |
74 | /* 1 */ -D( 1), -D( 31), D(218), -D( 519), D(2000), -D(5517), D( 5959), -D(39336), D(74992), D(35640), D(7134), D(4788), D(2063), D(401), D(208), D(26), | 75 | /* 1 */ -D( 1), -D( 31), D(218), -D( 519), D(2000), -D(5517), D( 5959), -D(39336), D(74992), D(35640), D(7134), D(4788), D(2063), D(401), D(208), D(26), |