diff options
Diffstat (limited to 'lib/rbcodec/codecs/libwmapro/wmaprodec.h')
-rw-r--r-- | lib/rbcodec/codecs/libwmapro/wmaprodec.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libwmapro/wmaprodec.h b/lib/rbcodec/codecs/libwmapro/wmaprodec.h new file mode 100644 index 0000000000..d8398fc9f1 --- /dev/null +++ b/lib/rbcodec/codecs/libwmapro/wmaprodec.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #include "codeclib.h" | ||
2 | #include "wma.h" | ||
3 | #include "../libasf/asf.h" | ||
4 | |||
5 | #if (CONFIG_CPU == MCF5250) | ||
6 | /* Enough IRAM but performance suffers with ICODE_ATTR. */ | ||
7 | #define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR | ||
8 | #define ICODE_ATTR_WMAPRO_LARGE_IRAM | ||
9 | #define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR | ||
10 | #define IBSS_ATTR_WMAPRO_VLC_TABLES | ||
11 | #define ICONST_ATTR_WMAPRO_WIN_VS_TMP | ||
12 | |||
13 | #elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) | ||
14 | /* Enough IRAM to move additional data and code to it. */ | ||
15 | #define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR | ||
16 | #define ICODE_ATTR_WMAPRO_LARGE_IRAM ICODE_ATTR | ||
17 | #define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR | ||
18 | #define IBSS_ATTR_WMAPRO_VLC_TABLES | ||
19 | #define ICONST_ATTR_WMAPRO_WIN_VS_TMP | ||
20 | |||
21 | #elif defined(CPU_S5L870X) | ||
22 | /* Enough IRAM to move additional data and code to it. */ | ||
23 | #define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR | ||
24 | #define ICODE_ATTR_WMAPRO_LARGE_IRAM ICODE_ATTR | ||
25 | #define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR | ||
26 | #define IBSS_ATTR_WMAPRO_VLC_TABLES IBSS_ATTR | ||
27 | #define ICONST_ATTR_WMAPRO_WIN_VS_TMP ICONST_ATTR | ||
28 | |||
29 | #else | ||
30 | /* Not enough IRAM available. */ | ||
31 | #define IBSS_ATTR_WMAPRO_LARGE_IRAM | ||
32 | #define ICODE_ATTR_WMAPRO_LARGE_IRAM | ||
33 | #define ICONST_ATTR_WMAPRO_LARGE_IRAM | ||
34 | #define IBSS_ATTR_WMAPRO_VLC_TABLES | ||
35 | /* Models with large IRAM put tmp to IRAM rather than window coefficients as | ||
36 | * this is the fastest option. On models with smaller IRAM the 2nd-best option | ||
37 | * is to move the window coefficients to IRAM. */ | ||
38 | #define ICONST_ATTR_WMAPRO_WIN_VS_TMP ICONST_ATTR | ||
39 | |||
40 | #endif | ||
41 | |||
42 | int decode_init(asf_waveformatex_t *wfx); | ||
43 | int decode_packet(asf_waveformatex_t *wfx, | ||
44 | int32_t *dec[2], int *data_size, void* pktdata, int size); | ||