summaryrefslogtreecommitdiffstats
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-43dfa7d084.tar.gz
rockbox-43dfa7d084.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)
#if defined(CUSTOM_MODES)
static const opus_uint32 CELT_PVQ_U_DATA[1488]={
#else
-static const opus_uint32 CELT_PVQ_U_DATA[1272]={
+static const opus_uint32 CELT_PVQ_U_DATA[1272] ICONST_ATTR ={
#endif
/*N=0, K=0...176:*/
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]={
};
#if defined(CUSTOM_MODES)
-static const opus_uint32 *const CELT_PVQ_U_ROW[15]={
+static const opus_uint32 *const CELT_PVQ_U_ROW[15] ICONST_ATTR ={
CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 208,CELT_PVQ_U_DATA+ 415,
CELT_PVQ_U_DATA+ 621,CELT_PVQ_U_DATA+ 826,CELT_PVQ_U_DATA+1030,
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){
#ifdef USE_SMALL_DIV_TABLE
/* Result of 2^32/(2*i+1), except for i=0. */
-const opus_uint32 SMALL_DIV_TABLE[129] = {
+const opus_uint32 SMALL_DIV_TABLE[129] ICONST_ATTR = {
0xFFFFFFFF, 0x55555555, 0x33333333, 0x24924924,
0x1C71C71C, 0x1745D174, 0x13B13B13, 0x11111111,
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 @@
#ifndef DEF_WINDOW120
#define DEF_WINDOW120
-static const opus_val16 window120[120] = {
+static const opus_val16 window120[120] ICONST_ATTR = {
2, 20, 55, 108, 178,
266, 372, 494, 635, 792,
966, 1157, 1365, 1590, 1831,
@@ -41,13 +41,13 @@ static const opus_val16 window120[120] = {
#ifndef DEF_LOGN400
#define DEF_LOGN400
-static const opus_int16 logN400[21] = {
+static const opus_int16 logN400[21] ICONST_ATTR = {
0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 16, 16, 16, 21, 21, 24, 29, 34, 36, };
#endif
#ifndef DEF_PULSE_CACHE50
#define DEF_PULSE_CACHE50
-static const opus_int16 cache_index50[105] = {
+static const opus_int16 cache_index50[105] ICONST_ATTR = {
-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 41, 41, 41,
82, 82, 123, 164, 200, 222, 0, 0, 0, 0, 0, 0, 0, 0, 41,
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] = {
305, 305, 305, 318, 318, 343, 351, 358, 364, 240, 240, 240, 240, 240, 240,
240, 240, 305, 305, 305, 305, 343, 343, 343, 351, 351, 370, 376, 382, 387,
};
-static const unsigned char cache_bits50[392] = {
+static const unsigned char cache_bits50[392] ICONST_ATTR = {
40, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
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] = {
106, 151, 192, 231, 5, 59, 111, 158, 202, 243, 5, 55, 103, 147, 187,
224, 5, 60, 113, 161, 206, 248, 4, 65, 122, 175, 224, 4, 67, 127,
182, 234, };
-static const unsigned char cache_caps50[168] = {
+static const unsigned char cache_caps50[168] ICONST_ATTR = {
224, 224, 224, 224, 224, 224, 224, 224, 160, 160, 160, 160, 185, 185, 185,
178, 178, 168, 134, 61, 37, 224, 224, 224, 224, 224, 224, 224, 224, 240,
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] = {
#ifndef FFT_TWIDDLES48000_960
#define FFT_TWIDDLES48000_960
-static const kiss_twiddle_cpx fft_twiddles48000_960[480] = {
+static const kiss_twiddle_cpx fft_twiddles48000_960[480] ICONST_ATTR = {
{32767, 0}, {32766, -429},
{32757, -858}, {32743, -1287},
{32724, -1715}, {32698, -2143},
@@ -429,7 +429,7 @@ static const opus_int16 fft_bitrev60[60] = {
#ifndef FFT_STATE48000_960_0
#define FFT_STATE48000_960_0
-static const kiss_fft_state fft_state48000_960_0 = {
+static const kiss_fft_state fft_state48000_960_0 ICONST_ATTR = {
480, /* nfft */
17476, /* scale */
8, /* scale_shift */
@@ -447,7 +447,7 @@ NULL,
#ifndef FFT_STATE48000_960_1
#define FFT_STATE48000_960_1
-static const kiss_fft_state fft_state48000_960_1 = {
+static const kiss_fft_state fft_state48000_960_1 ICONST_ATTR = {
240, /* nfft */
17476, /* scale */
7, /* scale_shift */
@@ -465,7 +465,7 @@ NULL,
#ifndef FFT_STATE48000_960_2
#define FFT_STATE48000_960_2
-static const kiss_fft_state fft_state48000_960_2 = {
+static const kiss_fft_state fft_state48000_960_2 ICONST_ATTR = {
120, /* nfft */
17476, /* scale */
6, /* scale_shift */
@@ -483,7 +483,7 @@ NULL,
#ifndef FFT_STATE48000_960_3
#define FFT_STATE48000_960_3
-static const kiss_fft_state fft_state48000_960_3 = {
+static const kiss_fft_state fft_state48000_960_3 ICONST_ATTR = {
60, /* nfft */
17476, /* scale */
5, /* scale_shift */
@@ -503,7 +503,7 @@ NULL,
#ifndef MDCT_TWIDDLES960
#define MDCT_TWIDDLES960
-static const opus_val16 mdct_twiddles960[1800] = {
+static const opus_val16 mdct_twiddles960[1800] ICONST_ATTR = {
32767, 32767, 32767, 32766, 32765,
32763, 32761, 32759, 32756, 32753,
32750, 32746, 32742, 32738, 32733,
@@ -867,7 +867,7 @@ static const opus_val16 mdct_twiddles960[1800] = {
};
#endif
-static const CELTMode mode48000_960_120 = {
+static const CELTMode mode48000_960_120 ICONST_ATTR = {
48000, /* Fs */
120, /* overlap */
21, /* nbEBands */