summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-07-10 09:05:52 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-07-10 09:23:33 -0400
commit43dfa7d084bf6629d8513c3f69f8101609a9c565 (patch)
tree7428844e0325243d0187e1281ec6abe4a51a83ad
parent67b5fa06d5b128ad66d1f4b946c9080387171529 (diff)
downloadrockbox-43dfa7d084bf6629d8513c3f69f8101609a9c565.tar.gz
rockbox-43dfa7d084bf6629d8513c3f69f8101609a9c565.zip
opus: Re-add IRAM hints to some constant tables
Was accidently disabled in 14c6bb798d6bebc80f07e863236adbaf8d156a9c (in January 2019) See 8e8671a73efe117bd34815e3f4c16f3178143774 for the benchmarks. Change-Id: I3d558f8cfc041a14d0a1e55da3b042c7d01089e8
-rw-r--r--lib/rbcodec/codecs/libopus/celt/cwrs.c4
-rw-r--r--lib/rbcodec/codecs/libopus/celt/entcode.c2
-rw-r--r--lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h24
3 files changed, 15 insertions, 15 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/cwrs.c b/lib/rbcodec/codecs/libopus/celt/cwrs.c
index a552e4f0fb..69c5894e2f 100644
--- a/lib/rbcodec/codecs/libopus/celt/cwrs.c
+++ b/lib/rbcodec/codecs/libopus/celt/cwrs.c
@@ -210,7 +210,7 @@ int log2_frac(opus_uint32 val, int frac)
210#if defined(CUSTOM_MODES) 210#if defined(CUSTOM_MODES)
211static const opus_uint32 CELT_PVQ_U_DATA[1488]={ 211static const opus_uint32 CELT_PVQ_U_DATA[1488]={
212#else 212#else
213static const opus_uint32 CELT_PVQ_U_DATA[1272]={ 213static const opus_uint32 CELT_PVQ_U_DATA[1272] ICONST_ATTR ={
214#endif 214#endif
215 /*N=0, K=0...176:*/ 215 /*N=0, K=0...176:*/
216 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -410,7 +410,7 @@ static const opus_uint32 CELT_PVQ_U_DATA[1272]={
410}; 410};
411 411
412#if defined(CUSTOM_MODES) 412#if defined(CUSTOM_MODES)
413static const opus_uint32 *const CELT_PVQ_U_ROW[15]={ 413static const opus_uint32 *const CELT_PVQ_U_ROW[15] ICONST_ATTR ={
414 CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 208,CELT_PVQ_U_DATA+ 415, 414 CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 208,CELT_PVQ_U_DATA+ 415,
415 CELT_PVQ_U_DATA+ 621,CELT_PVQ_U_DATA+ 826,CELT_PVQ_U_DATA+1030, 415 CELT_PVQ_U_DATA+ 621,CELT_PVQ_U_DATA+ 826,CELT_PVQ_U_DATA+1030,
416 CELT_PVQ_U_DATA+1233,CELT_PVQ_U_DATA+1336,CELT_PVQ_U_DATA+1389, 416 CELT_PVQ_U_DATA+1233,CELT_PVQ_U_DATA+1336,CELT_PVQ_U_DATA+1389,
diff --git a/lib/rbcodec/codecs/libopus/celt/entcode.c b/lib/rbcodec/codecs/libopus/celt/entcode.c
index 70f32016ec..461a36dd55 100644
--- a/lib/rbcodec/codecs/libopus/celt/entcode.c
+++ b/lib/rbcodec/codecs/libopus/celt/entcode.c
@@ -116,7 +116,7 @@ opus_uint32 ec_tell_frac(ec_ctx *_this){
116 116
117#ifdef USE_SMALL_DIV_TABLE 117#ifdef USE_SMALL_DIV_TABLE
118/* Result of 2^32/(2*i+1), except for i=0. */ 118/* Result of 2^32/(2*i+1), except for i=0. */
119const opus_uint32 SMALL_DIV_TABLE[129] = { 119const opus_uint32 SMALL_DIV_TABLE[129] ICONST_ATTR = {
120 0xFFFFFFFF, 0x55555555, 0x33333333, 0x24924924, 120 0xFFFFFFFF, 0x55555555, 0x33333333, 0x24924924,
121 0x1C71C71C, 0x1745D174, 0x13B13B13, 0x11111111, 121 0x1C71C71C, 0x1745D174, 0x13B13B13, 0x11111111,
122 0x0F0F0F0F, 0x0D79435E, 0x0C30C30C, 0x0B21642C, 122 0x0F0F0F0F, 0x0D79435E, 0x0C30C30C, 0x0B21642C,
diff --git a/lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h b/lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h
index 8717d626cb..d43ca72a7f 100644
--- a/lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h
+++ b/lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h
@@ -11,7 +11,7 @@
11 11
12#ifndef DEF_WINDOW120 12#ifndef DEF_WINDOW120
13#define DEF_WINDOW120 13#define DEF_WINDOW120
14static const opus_val16 window120[120] = { 14static const opus_val16 window120[120] ICONST_ATTR = {
152, 20, 55, 108, 178, 152, 20, 55, 108, 178,
16266, 372, 494, 635, 792, 16266, 372, 494, 635, 792,
17966, 1157, 1365, 1590, 1831, 17966, 1157, 1365, 1590, 1831,
@@ -41,13 +41,13 @@ static const opus_val16 window120[120] = {
41 41
42#ifndef DEF_LOGN400 42#ifndef DEF_LOGN400
43#define DEF_LOGN400 43#define DEF_LOGN400
44static const opus_int16 logN400[21] = { 44static const opus_int16 logN400[21] ICONST_ATTR = {
450, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, }; 450, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, };
46#endif 46#endif
47 47
48#ifndef DEF_PULSE_CACHE50 48#ifndef DEF_PULSE_CACHE50
49#define DEF_PULSE_CACHE50 49#define DEF_PULSE_CACHE50
50static const opus_int16 cache_index50[105] = { 50static const opus_int16 cache_index50[105] ICONST_ATTR = {
51-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41, 51-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41,
5282, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41, 5282, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41,
5341, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41, 5341, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41,
@@ -56,7 +56,7 @@ static const opus_int16 cache_index50[105] = {
56305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240, 56305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240,
57240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387, 57240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387,
58}; 58};
59static const unsigned char cache_bits50[392] = { 59static const unsigned char cache_bits50[392] ICONST_ATTR = {
6040, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6040, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
617, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 617, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
627, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 40, 15, 23, 28, 627, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 40, 15, 23, 28,
@@ -84,7 +84,7 @@ static const unsigned char cache_bits50[392] = {
84106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187, 84106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187,
85224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127, 85224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127,
86182, 234, }; 86182, 234, };
87static const unsigned char cache_caps50[168] = { 87static const unsigned char cache_caps50[168] ICONST_ATTR = {
88224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185, 88224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185,
89178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240, 89178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240,
90240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160, 90240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160,
@@ -101,7 +101,7 @@ static const unsigned char cache_caps50[168] = {
101 101
102#ifndef FFT_TWIDDLES48000_960 102#ifndef FFT_TWIDDLES48000_960
103#define FFT_TWIDDLES48000_960 103#define FFT_TWIDDLES48000_960
104static const kiss_twiddle_cpx fft_twiddles48000_960[480] = { 104static const kiss_twiddle_cpx fft_twiddles48000_960[480] ICONST_ATTR = {
105{32767, 0}, {32766, -429}, 105{32767, 0}, {32766, -429},
106{32757, -858}, {32743, -1287}, 106{32757, -858}, {32743, -1287},
107{32724, -1715}, {32698, -2143}, 107{32724, -1715}, {32698, -2143},
@@ -429,7 +429,7 @@ static const opus_int16 fft_bitrev60[60] = {
429 429
430#ifndef FFT_STATE48000_960_0 430#ifndef FFT_STATE48000_960_0
431#define FFT_STATE48000_960_0 431#define FFT_STATE48000_960_0
432static const kiss_fft_state fft_state48000_960_0 = { 432static const kiss_fft_state fft_state48000_960_0 ICONST_ATTR = {
433480, /* nfft */ 433480, /* nfft */
43417476, /* scale */ 43417476, /* scale */
4358, /* scale_shift */ 4358, /* scale_shift */
@@ -447,7 +447,7 @@ NULL,
447 447
448#ifndef FFT_STATE48000_960_1 448#ifndef FFT_STATE48000_960_1
449#define FFT_STATE48000_960_1 449#define FFT_STATE48000_960_1
450static const kiss_fft_state fft_state48000_960_1 = { 450static const kiss_fft_state fft_state48000_960_1 ICONST_ATTR = {
451240, /* nfft */ 451240, /* nfft */
45217476, /* scale */ 45217476, /* scale */
4537, /* scale_shift */ 4537, /* scale_shift */
@@ -465,7 +465,7 @@ NULL,
465 465
466#ifndef FFT_STATE48000_960_2 466#ifndef FFT_STATE48000_960_2
467#define FFT_STATE48000_960_2 467#define FFT_STATE48000_960_2
468static const kiss_fft_state fft_state48000_960_2 = { 468static const kiss_fft_state fft_state48000_960_2 ICONST_ATTR = {
469120, /* nfft */ 469120, /* nfft */
47017476, /* scale */ 47017476, /* scale */
4716, /* scale_shift */ 4716, /* scale_shift */
@@ -483,7 +483,7 @@ NULL,
483 483
484#ifndef FFT_STATE48000_960_3 484#ifndef FFT_STATE48000_960_3
485#define FFT_STATE48000_960_3 485#define FFT_STATE48000_960_3
486static const kiss_fft_state fft_state48000_960_3 = { 486static const kiss_fft_state fft_state48000_960_3 ICONST_ATTR = {
48760, /* nfft */ 48760, /* nfft */
48817476, /* scale */ 48817476, /* scale */
4895, /* scale_shift */ 4895, /* scale_shift */
@@ -503,7 +503,7 @@ NULL,
503 503
504#ifndef MDCT_TWIDDLES960 504#ifndef MDCT_TWIDDLES960
505#define MDCT_TWIDDLES960 505#define MDCT_TWIDDLES960
506static const opus_val16 mdct_twiddles960[1800] = { 506static const opus_val16 mdct_twiddles960[1800] ICONST_ATTR = {
50732767, 32767, 32767, 32766, 32765, 50732767, 32767, 32767, 32766, 32765,
50832763, 32761, 32759, 32756, 32753, 50832763, 32761, 32759, 32756, 32753,
50932750, 32746, 32742, 32738, 32733, 50932750, 32746, 32742, 32738, 32733,
@@ -867,7 +867,7 @@ static const opus_val16 mdct_twiddles960[1800] = {
867}; 867};
868#endif 868#endif
869 869
870static const CELTMode mode48000_960_120 = { 870static const CELTMode mode48000_960_120 ICONST_ATTR = {
87148000, /* Fs */ 87148000, /* Fs */
872120, /* overlap */ 872120, /* overlap */
87321, /* nbEBands */ 87321, /* nbEBands */