summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs/lib/ffmpeg_get_bits.h4
-rw-r--r--apps/codecs/libwmapro/wmaprodec.c14
-rw-r--r--apps/codecs/libwmapro/wmaprodec.h14
3 files changed, 22 insertions, 10 deletions
diff --git a/apps/codecs/lib/ffmpeg_get_bits.h b/apps/codecs/lib/ffmpeg_get_bits.h
index 139d7ae556..04eda021a7 100644
--- a/apps/codecs/lib/ffmpeg_get_bits.h
+++ b/apps/codecs/lib/ffmpeg_get_bits.h
@@ -571,9 +571,9 @@ int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
571#define INIT_VLC_USE_NEW_STATIC 4 571#define INIT_VLC_USE_NEW_STATIC 4
572void free_vlc(VLC *vlc); 572void free_vlc(VLC *vlc);
573 573
574#define INIT_VLC_STATIC(vlc, bits, a,b,c,d,e,f,g, static_size)\ 574#define INIT_VLC_STATIC(vlc, bits, a,b,c,d,e,f,g, static_size, attr)\
575{\ 575{\
576 static VLC_TYPE table[static_size][2];\ 576 static VLC_TYPE table[static_size][2] attr;\
577 (vlc)->table= table;\ 577 (vlc)->table= table;\
578 (vlc)->table_allocated= static_size;\ 578 (vlc)->table_allocated= static_size;\
579 init_vlc(vlc, bits, a,b,c,d,e,f,g, INIT_VLC_USE_NEW_STATIC);\ 579 init_vlc(vlc, bits, a,b,c,d,e,f,g, INIT_VLC_USE_NEW_STATIC);\
diff --git a/apps/codecs/libwmapro/wmaprodec.c b/apps/codecs/libwmapro/wmaprodec.c
index c72bd0f10f..9d42c6de0f 100644
--- a/apps/codecs/libwmapro/wmaprodec.c
+++ b/apps/codecs/libwmapro/wmaprodec.c
@@ -400,31 +400,31 @@ int decode_init(asf_waveformatex_t *wfx)
400 400
401 INIT_VLC_STATIC(&sf_vlc, SCALEVLCBITS, HUFF_SCALE_SIZE, 401 INIT_VLC_STATIC(&sf_vlc, SCALEVLCBITS, HUFF_SCALE_SIZE,
402 scale_huffbits, 1, 1, 402 scale_huffbits, 1, 1,
403 scale_huffcodes, 2, 2, 616); 403 scale_huffcodes, 2, 2, 616, IBSS_ATTR_WMAPRO_VLC_TABLES);
404 404
405 INIT_VLC_STATIC(&sf_rl_vlc, VLCBITS, HUFF_SCALE_RL_SIZE, 405 INIT_VLC_STATIC(&sf_rl_vlc, VLCBITS, HUFF_SCALE_RL_SIZE,
406 scale_rl_huffbits, 1, 1, 406 scale_rl_huffbits, 1, 1,
407 scale_rl_huffcodes, 4, 4, 1406); 407 scale_rl_huffcodes, 4, 4, 1406, IBSS_ATTR_WMAPRO_VLC_TABLES);
408 408
409 INIT_VLC_STATIC(&coef_vlc[0], VLCBITS, HUFF_COEF0_SIZE, 409 INIT_VLC_STATIC(&coef_vlc[0], VLCBITS, HUFF_COEF0_SIZE,
410 coef0_huffbits, 1, 1, 410 coef0_huffbits, 1, 1,
411 coef0_huffcodes, 4, 4, 2108); 411 coef0_huffcodes, 4, 4, 2108, IBSS_ATTR_WMAPRO_VLC_TABLES);
412 412
413 INIT_VLC_STATIC(&coef_vlc[1], VLCBITS, HUFF_COEF1_SIZE, 413 INIT_VLC_STATIC(&coef_vlc[1], VLCBITS, HUFF_COEF1_SIZE,
414 coef1_huffbits, 1, 1, 414 coef1_huffbits, 1, 1,
415 coef1_huffcodes, 4, 4, 3912); 415 coef1_huffcodes, 4, 4, 3912, IBSS_ATTR_WMAPRO_VLC_TABLES);
416 416
417 INIT_VLC_STATIC(&vec4_vlc, VLCBITS, HUFF_VEC4_SIZE, 417 INIT_VLC_STATIC(&vec4_vlc, VLCBITS, HUFF_VEC4_SIZE,
418 vec4_huffbits, 1, 1, 418 vec4_huffbits, 1, 1,
419 vec4_huffcodes, 2, 2, 604); 419 vec4_huffcodes, 2, 2, 604, IBSS_ATTR_WMAPRO_VLC_TABLES);
420 420
421 INIT_VLC_STATIC(&vec2_vlc, VLCBITS, HUFF_VEC2_SIZE, 421 INIT_VLC_STATIC(&vec2_vlc, VLCBITS, HUFF_VEC2_SIZE,
422 vec2_huffbits, 1, 1, 422 vec2_huffbits, 1, 1,
423 vec2_huffcodes, 2, 2, 562); 423 vec2_huffcodes, 2, 2, 562, IBSS_ATTR_WMAPRO_VLC_TABLES);
424 424
425 INIT_VLC_STATIC(&vec1_vlc, VLCBITS, HUFF_VEC1_SIZE, 425 INIT_VLC_STATIC(&vec1_vlc, VLCBITS, HUFF_VEC1_SIZE,
426 vec1_huffbits, 1, 1, 426 vec1_huffbits, 1, 1,
427 vec1_huffcodes, 2, 2, 562); 427 vec1_huffcodes, 2, 2, 562, IBSS_ATTR_WMAPRO_VLC_TABLES);
428 428
429 /** calculate number of scale factor bands and their offsets 429 /** calculate number of scale factor bands and their offsets
430 for every possible block size */ 430 for every possible block size */
diff --git a/apps/codecs/libwmapro/wmaprodec.h b/apps/codecs/libwmapro/wmaprodec.h
index e30205cd35..d8398fc9f1 100644
--- a/apps/codecs/libwmapro/wmaprodec.h
+++ b/apps/codecs/libwmapro/wmaprodec.h
@@ -7,24 +7,36 @@
7#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR 7#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR
8#define ICODE_ATTR_WMAPRO_LARGE_IRAM 8#define ICODE_ATTR_WMAPRO_LARGE_IRAM
9#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR 9#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR
10#define IBSS_ATTR_WMAPRO_VLC_TABLES
10#define ICONST_ATTR_WMAPRO_WIN_VS_TMP 11#define ICONST_ATTR_WMAPRO_WIN_VS_TMP
11 12
12#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || defined(CPU_S5L870X) 13#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
13/* Enough IRAM to move additional data and code to it. */ 14/* Enough IRAM to move additional data and code to it. */
14#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR 15#define IBSS_ATTR_WMAPRO_LARGE_IRAM IBSS_ATTR
15#define ICODE_ATTR_WMAPRO_LARGE_IRAM ICODE_ATTR 16#define ICODE_ATTR_WMAPRO_LARGE_IRAM ICODE_ATTR
16#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR 17#define ICONST_ATTR_WMAPRO_LARGE_IRAM ICONST_ATTR
18#define IBSS_ATTR_WMAPRO_VLC_TABLES
17#define ICONST_ATTR_WMAPRO_WIN_VS_TMP 19#define ICONST_ATTR_WMAPRO_WIN_VS_TMP
18 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
19#else 29#else
20/* Not enough IRAM available. */ 30/* Not enough IRAM available. */
21#define IBSS_ATTR_WMAPRO_LARGE_IRAM 31#define IBSS_ATTR_WMAPRO_LARGE_IRAM
22#define ICODE_ATTR_WMAPRO_LARGE_IRAM 32#define ICODE_ATTR_WMAPRO_LARGE_IRAM
23#define ICONST_ATTR_WMAPRO_LARGE_IRAM 33#define ICONST_ATTR_WMAPRO_LARGE_IRAM
34#define IBSS_ATTR_WMAPRO_VLC_TABLES
24/* Models with large IRAM put tmp to IRAM rather than window coefficients as 35/* Models with large IRAM put tmp to IRAM rather than window coefficients as
25 * this is the fastest option. On models with smaller IRAM the 2nd-best option 36 * this is the fastest option. On models with smaller IRAM the 2nd-best option
26 * is to move the window coefficients to IRAM. */ 37 * is to move the window coefficients to IRAM. */
27#define ICONST_ATTR_WMAPRO_WIN_VS_TMP ICONST_ATTR 38#define ICONST_ATTR_WMAPRO_WIN_VS_TMP ICONST_ATTR
39
28#endif 40#endif
29 41
30int decode_init(asf_waveformatex_t *wfx); 42int decode_init(asf_waveformatex_t *wfx);