forked from len0rd/rockbox
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
This commit is contained in:
parent
7555235591
commit
3f4e0cf25b
3 changed files with 13 additions and 7 deletions
|
|
@ -87,8 +87,8 @@ struct mpc_decoder_t {
|
|||
mpc_uint8_t SCF_shift[256];
|
||||
#endif
|
||||
|
||||
MPC_SAMPLE_FORMAT V_L[MPC_V_MEM + 960];
|
||||
MPC_SAMPLE_FORMAT V_R[MPC_V_MEM + 960];
|
||||
MPC_SAMPLE_FORMAT *V_L;
|
||||
MPC_SAMPLE_FORMAT *V_R;
|
||||
MPC_SAMPLE_FORMAT *Y_L;
|
||||
MPC_SAMPLE_FORMAT *Y_R;
|
||||
MPC_SAMPLE_FORMAT SCF[256]; ///< holds adapted scalefactors (for clipping prevention)
|
||||
|
|
|
|||
|
|
@ -62,8 +62,10 @@ extern const mpc_can_data mpc_can_Q9up;
|
|||
|
||||
//Decoder globals (g_Y_L and g_Y_R do not fit into iram for all targets)
|
||||
static mpc_decoder g_mpc_decoder IBSS_ATTR;
|
||||
static MPC_SAMPLE_FORMAT g_Y_L[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM;
|
||||
static MPC_SAMPLE_FORMAT g_Y_R[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM;
|
||||
static MPC_SAMPLE_FORMAT g_V_L[MPC_V_MEM + 960 ] IBSS_ATTR __attribute__((aligned(16)));
|
||||
static MPC_SAMPLE_FORMAT g_Y_L[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM __attribute__((aligned(16)));
|
||||
static MPC_SAMPLE_FORMAT g_V_R[MPC_V_MEM + 960 ] IBSS_ATTR __attribute__((aligned(16)));
|
||||
static MPC_SAMPLE_FORMAT g_Y_R[MPC_FRAME_LENGTH] IBSS_ATTR_MPC_LARGE_IRAM __attribute__((aligned(16)));
|
||||
|
||||
//SV7 globals (decoding results for bundled quantizers (3- and 5-step))
|
||||
static const mpc_int32_t g_sv7_idx30[] ICONST_ATTR =
|
||||
|
|
@ -236,9 +238,13 @@ static void mpc_decoder_setup(mpc_decoder *d)
|
|||
|
||||
d->__r1 = 1;
|
||||
d->__r2 = 1;
|
||||
d->V_L = g_V_L;
|
||||
d->V_R = g_V_R;
|
||||
d->Y_L = g_Y_L;
|
||||
d->Y_R = g_Y_R;
|
||||
|
||||
memset(d->V_L, 0, sizeof(g_V_L));
|
||||
memset(d->V_R, 0, sizeof(g_V_R));
|
||||
memset(d->Y_L, 0, sizeof(g_Y_L));
|
||||
memset(d->Y_R, 0, sizeof(g_Y_R));
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
#endif
|
||||
|
||||
// Di_opt coefficients are +/- 2^17 (pre-shifted by <<16)
|
||||
static const MPC_SAMPLE_FORMAT Di_opt [512] ICONST_ATTR = {
|
||||
static const MPC_SAMPLE_FORMAT Di_opt [512] ICONST_ATTR __attribute__((aligned(16))) = {
|
||||
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
|
||||
/* 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),
|
||||
/* 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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue