diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-07-10 09:05:52 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-07-10 09:23:33 -0400 |
commit | 43dfa7d084bf6629d8513c3f69f8101609a9c565 (patch) | |
tree | 7428844e0325243d0187e1281ec6abe4a51a83ad | |
parent | 67b5fa06d5b128ad66d1f4b946c9080387171529 (diff) | |
download | rockbox-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.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/entcode.c | 2 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h | 24 |
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) |
211 | static const opus_uint32 CELT_PVQ_U_DATA[1488]={ | 211 | static const opus_uint32 CELT_PVQ_U_DATA[1488]={ |
212 | #else | 212 | #else |
213 | static const opus_uint32 CELT_PVQ_U_DATA[1272]={ | 213 | static 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) |
413 | static const opus_uint32 *const CELT_PVQ_U_ROW[15]={ | 413 | static 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. */ |
119 | const opus_uint32 SMALL_DIV_TABLE[129] = { | 119 | const 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 |
14 | static const opus_val16 window120[120] = { | 14 | static const opus_val16 window120[120] ICONST_ATTR = { |
15 | 2, 20, 55, 108, 178, | 15 | 2, 20, 55, 108, 178, |
16 | 266, 372, 494, 635, 792, | 16 | 266, 372, 494, 635, 792, |
17 | 966, 1157, 1365, 1590, 1831, | 17 | 966, 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 |
44 | static const opus_int16 logN400[21] = { | 44 | static const opus_int16 logN400[21] ICONST_ATTR = { |
45 | 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, }; | 45 | 0, 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 |
50 | static const opus_int16 cache_index50[105] = { | 50 | static 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, |
52 | 82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41, | 52 | 82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41, |
53 | 41, 41, 41, 123, 123, 123, 164, 164, 240, 266, 283, 295, 41, 41, 41, | 53 | 41, 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] = { | |||
56 | 305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240, | 56 | 305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240, |
57 | 240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387, | 57 | 240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387, |
58 | }; | 58 | }; |
59 | static const unsigned char cache_bits50[392] = { | 59 | static const unsigned char cache_bits50[392] ICONST_ATTR = { |
60 | 40, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, | 60 | 40, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
61 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, | 61 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
62 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 40, 15, 23, 28, | 62 | 7, 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] = { | |||
84 | 106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187, | 84 | 106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187, |
85 | 224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127, | 85 | 224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127, |
86 | 182, 234, }; | 86 | 182, 234, }; |
87 | static const unsigned char cache_caps50[168] = { | 87 | static const unsigned char cache_caps50[168] ICONST_ATTR = { |
88 | 224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185, | 88 | 224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185, |
89 | 178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240, | 89 | 178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240, |
90 | 240, 240, 240, 207, 207, 207, 198, 198, 183, 144, 66, 40, 160, 160, 160, | 90 | 240, 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 |
104 | static const kiss_twiddle_cpx fft_twiddles48000_960[480] = { | 104 | static 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 |
432 | static const kiss_fft_state fft_state48000_960_0 = { | 432 | static const kiss_fft_state fft_state48000_960_0 ICONST_ATTR = { |
433 | 480, /* nfft */ | 433 | 480, /* nfft */ |
434 | 17476, /* scale */ | 434 | 17476, /* scale */ |
435 | 8, /* scale_shift */ | 435 | 8, /* 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 |
450 | static const kiss_fft_state fft_state48000_960_1 = { | 450 | static const kiss_fft_state fft_state48000_960_1 ICONST_ATTR = { |
451 | 240, /* nfft */ | 451 | 240, /* nfft */ |
452 | 17476, /* scale */ | 452 | 17476, /* scale */ |
453 | 7, /* scale_shift */ | 453 | 7, /* 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 |
468 | static const kiss_fft_state fft_state48000_960_2 = { | 468 | static const kiss_fft_state fft_state48000_960_2 ICONST_ATTR = { |
469 | 120, /* nfft */ | 469 | 120, /* nfft */ |
470 | 17476, /* scale */ | 470 | 17476, /* scale */ |
471 | 6, /* scale_shift */ | 471 | 6, /* 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 |
486 | static const kiss_fft_state fft_state48000_960_3 = { | 486 | static const kiss_fft_state fft_state48000_960_3 ICONST_ATTR = { |
487 | 60, /* nfft */ | 487 | 60, /* nfft */ |
488 | 17476, /* scale */ | 488 | 17476, /* scale */ |
489 | 5, /* scale_shift */ | 489 | 5, /* 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 |
506 | static const opus_val16 mdct_twiddles960[1800] = { | 506 | static const opus_val16 mdct_twiddles960[1800] ICONST_ATTR = { |
507 | 32767, 32767, 32767, 32766, 32765, | 507 | 32767, 32767, 32767, 32766, 32765, |
508 | 32763, 32761, 32759, 32756, 32753, | 508 | 32763, 32761, 32759, 32756, 32753, |
509 | 32750, 32746, 32742, 32738, 32733, | 509 | 32750, 32746, 32742, 32738, 32733, |
@@ -867,7 +867,7 @@ static const opus_val16 mdct_twiddles960[1800] = { | |||
867 | }; | 867 | }; |
868 | #endif | 868 | #endif |
869 | 869 | ||
870 | static const CELTMode mode48000_960_120 = { | 870 | static const CELTMode mode48000_960_120 ICONST_ATTR = { |
871 | 48000, /* Fs */ | 871 | 48000, /* Fs */ |
872 | 120, /* overlap */ | 872 | 120, /* overlap */ |
873 | 21, /* nbEBands */ | 873 | 21, /* nbEBands */ |