forked from len0rd/rockbox
Use more IRAM on S5L870x to speed up wmapro by ~2%.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29906 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
99494140da
commit
609c526d56
3 changed files with 22 additions and 10 deletions
|
|
@ -571,9 +571,9 @@ int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
|
||||||
#define INIT_VLC_USE_NEW_STATIC 4
|
#define INIT_VLC_USE_NEW_STATIC 4
|
||||||
void free_vlc(VLC *vlc);
|
void free_vlc(VLC *vlc);
|
||||||
|
|
||||||
#define INIT_VLC_STATIC(vlc, bits, a,b,c,d,e,f,g, static_size)\
|
#define INIT_VLC_STATIC(vlc, bits, a,b,c,d,e,f,g, static_size, attr)\
|
||||||
{\
|
{\
|
||||||
static VLC_TYPE table[static_size][2];\
|
static VLC_TYPE table[static_size][2] attr;\
|
||||||
(vlc)->table= table;\
|
(vlc)->table= table;\
|
||||||
(vlc)->table_allocated= static_size;\
|
(vlc)->table_allocated= static_size;\
|
||||||
init_vlc(vlc, bits, a,b,c,d,e,f,g, INIT_VLC_USE_NEW_STATIC);\
|
init_vlc(vlc, bits, a,b,c,d,e,f,g, INIT_VLC_USE_NEW_STATIC);\
|
||||||
|
|
|
||||||
|
|
@ -400,31 +400,31 @@ int decode_init(asf_waveformatex_t *wfx)
|
||||||
|
|
||||||
INIT_VLC_STATIC(&sf_vlc, SCALEVLCBITS, HUFF_SCALE_SIZE,
|
INIT_VLC_STATIC(&sf_vlc, SCALEVLCBITS, HUFF_SCALE_SIZE,
|
||||||
scale_huffbits, 1, 1,
|
scale_huffbits, 1, 1,
|
||||||
scale_huffcodes, 2, 2, 616);
|
scale_huffcodes, 2, 2, 616, IBSS_ATTR_WMAPRO_VLC_TABLES);
|
||||||
|
|
||||||
INIT_VLC_STATIC(&sf_rl_vlc, VLCBITS, HUFF_SCALE_RL_SIZE,
|
INIT_VLC_STATIC(&sf_rl_vlc, VLCBITS, HUFF_SCALE_RL_SIZE,
|
||||||
scale_rl_huffbits, 1, 1,
|
scale_rl_huffbits, 1, 1,
|
||||||
scale_rl_huffcodes, 4, 4, 1406);
|
scale_rl_huffcodes, 4, 4, 1406, IBSS_ATTR_WMAPRO_VLC_TABLES);
|
||||||
|
|
||||||
INIT_VLC_STATIC(&coef_vlc[0], VLCBITS, HUFF_COEF0_SIZE,
|
INIT_VLC_STATIC(&coef_vlc[0], VLCBITS, HUFF_COEF0_SIZE,
|
||||||
coef0_huffbits, 1, 1,
|
coef0_huffbits, 1, 1,
|
||||||
coef0_huffcodes, 4, 4, 2108);
|
coef0_huffcodes, 4, 4, 2108, IBSS_ATTR_WMAPRO_VLC_TABLES);
|
||||||
|
|
||||||
INIT_VLC_STATIC(&coef_vlc[1], VLCBITS, HUFF_COEF1_SIZE,
|
INIT_VLC_STATIC(&coef_vlc[1], VLCBITS, HUFF_COEF1_SIZE,
|
||||||
coef1_huffbits, 1, 1,
|
coef1_huffbits, 1, 1,
|
||||||
coef1_huffcodes, 4, 4, 3912);
|
coef1_huffcodes, 4, 4, 3912, IBSS_ATTR_WMAPRO_VLC_TABLES);
|
||||||
|
|
||||||
INIT_VLC_STATIC(&vec4_vlc, VLCBITS, HUFF_VEC4_SIZE,
|
INIT_VLC_STATIC(&vec4_vlc, VLCBITS, HUFF_VEC4_SIZE,
|
||||||
vec4_huffbits, 1, 1,
|
vec4_huffbits, 1, 1,
|
||||||
vec4_huffcodes, 2, 2, 604);
|
vec4_huffcodes, 2, 2, 604, IBSS_ATTR_WMAPRO_VLC_TABLES);
|
||||||
|
|
||||||
INIT_VLC_STATIC(&vec2_vlc, VLCBITS, HUFF_VEC2_SIZE,
|
INIT_VLC_STATIC(&vec2_vlc, VLCBITS, HUFF_VEC2_SIZE,
|
||||||
vec2_huffbits, 1, 1,
|
vec2_huffbits, 1, 1,
|
||||||
vec2_huffcodes, 2, 2, 562);
|
vec2_huffcodes, 2, 2, 562, IBSS_ATTR_WMAPRO_VLC_TABLES);
|
||||||
|
|
||||||
INIT_VLC_STATIC(&vec1_vlc, VLCBITS, HUFF_VEC1_SIZE,
|
INIT_VLC_STATIC(&vec1_vlc, VLCBITS, HUFF_VEC1_SIZE,
|
||||||
vec1_huffbits, 1, 1,
|
vec1_huffbits, 1, 1,
|
||||||
vec1_huffcodes, 2, 2, 562);
|
vec1_huffcodes, 2, 2, 562, IBSS_ATTR_WMAPRO_VLC_TABLES);
|
||||||
|
|
||||||
/** calculate number of scale factor bands and their offsets
|
/** calculate number of scale factor bands and their offsets
|
||||||
for every possible block size */
|
for every possible block size */
|
||||||
|
|
|
||||||
|
|
@ -7,24 +7,36 @@
|
||||||
#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR
|
#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR
|
||||||
#define ICODE_ATTR_WMAPRO_LARGE_IRAM
|
#define ICODE_ATTR_WMAPRO_LARGE_IRAM
|
||||||
#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR
|
#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR
|
||||||
|
#define IBSS_ATTR_WMAPRO_VLC_TABLES
|
||||||
#define ICONST_ATTR_WMAPRO_WIN_VS_TMP
|
#define ICONST_ATTR_WMAPRO_WIN_VS_TMP
|
||||||
|
|
||||||
#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || defined(CPU_S5L870X)
|
#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
|
||||||
/* Enough IRAM to move additional data and code to it. */
|
/* Enough IRAM to move additional data and code to it. */
|
||||||
#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR
|
#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR
|
||||||
#define ICODE_ATTR_WMAPRO_LARGE_IRAM ICODE_ATTR
|
#define ICODE_ATTR_WMAPRO_LARGE_IRAM ICODE_ATTR
|
||||||
#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR
|
#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR
|
||||||
|
#define IBSS_ATTR_WMAPRO_VLC_TABLES
|
||||||
#define ICONST_ATTR_WMAPRO_WIN_VS_TMP
|
#define ICONST_ATTR_WMAPRO_WIN_VS_TMP
|
||||||
|
|
||||||
|
#elif defined(CPU_S5L870X)
|
||||||
|
/* Enough IRAM to move additional data and code to it. */
|
||||||
|
#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR
|
||||||
|
#define ICODE_ATTR_WMAPRO_LARGE_IRAM ICODE_ATTR
|
||||||
|
#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR
|
||||||
|
#define IBSS_ATTR_WMAPRO_VLC_TABLES IBSS_ATTR
|
||||||
|
#define ICONST_ATTR_WMAPRO_WIN_VS_TMP ICONST_ATTR
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Not enough IRAM available. */
|
/* Not enough IRAM available. */
|
||||||
#define IBSS_ATTR_WMAPRO_LARGE_IRAM
|
#define IBSS_ATTR_WMAPRO_LARGE_IRAM
|
||||||
#define ICODE_ATTR_WMAPRO_LARGE_IRAM
|
#define ICODE_ATTR_WMAPRO_LARGE_IRAM
|
||||||
#define ICONST_ATTR_WMAPRO_LARGE_IRAM
|
#define ICONST_ATTR_WMAPRO_LARGE_IRAM
|
||||||
|
#define IBSS_ATTR_WMAPRO_VLC_TABLES
|
||||||
/* Models with large IRAM put tmp to IRAM rather than window coefficients as
|
/* Models with large IRAM put tmp to IRAM rather than window coefficients as
|
||||||
* this is the fastest option. On models with smaller IRAM the 2nd-best option
|
* this is the fastest option. On models with smaller IRAM the 2nd-best option
|
||||||
* is to move the window coefficients to IRAM. */
|
* is to move the window coefficients to IRAM. */
|
||||||
#define ICONST_ATTR_WMAPRO_WIN_VS_TMP ICONST_ATTR
|
#define ICONST_ATTR_WMAPRO_WIN_VS_TMP ICONST_ATTR
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int decode_init(asf_waveformatex_t *wfx);
|
int decode_init(asf_waveformatex_t *wfx);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue