diff options
author | William Wilgus <me.theuser@yahoo.com> | 2019-01-04 02:01:18 -0600 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-04-23 14:23:04 +0000 |
commit | 14c6bb798d6bebc80f07e863236adbaf8d156a9c (patch) | |
tree | 551a4b641906c2626af844fa3239c1b2b1ff0ad3 /lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h | |
parent | 75d93937965ec4df70d37df6d4feea04577c996b (diff) | |
download | rockbox-14c6bb798d6bebc80f07e863236adbaf8d156a9c.tar.gz rockbox-14c6bb798d6bebc80f07e863236adbaf8d156a9c.zip |
Sync opus codec to upstream git
Change-Id: I0cfcc0005c4ad7bfbb1aaf454188ce70fb043dc1
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h')
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h | 65 |
1 files changed, 45 insertions, 20 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h b/lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h index 1f13497c69..8717d626cb 100644 --- a/lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h +++ b/lib/rbcodec/codecs/libopus/celt/static_modes_fixed.h | |||
@@ -4,9 +4,14 @@ | |||
4 | #include "modes.h" | 4 | #include "modes.h" |
5 | #include "rate.h" | 5 | #include "rate.h" |
6 | 6 | ||
7 | #ifdef HAVE_ARM_NE10 | ||
8 | #define OVERRIDE_FFT 1 | ||
9 | #include "static_modes_fixed_arm_ne10.h" | ||
10 | #endif | ||
11 | |||
7 | #ifndef DEF_WINDOW120 | 12 | #ifndef DEF_WINDOW120 |
8 | #define DEF_WINDOW120 | 13 | #define DEF_WINDOW120 |
9 | static const opus_val16 window120[120] ICONST_ATTR = { | 14 | static const opus_val16 window120[120] = { |
10 | 2, 20, 55, 108, 178, | 15 | 2, 20, 55, 108, 178, |
11 | 266, 372, 494, 635, 792, | 16 | 266, 372, 494, 635, 792, |
12 | 966, 1157, 1365, 1590, 1831, | 17 | 966, 1157, 1365, 1590, 1831, |
@@ -36,13 +41,13 @@ static const opus_val16 window120[120] ICONST_ATTR = { | |||
36 | 41 | ||
37 | #ifndef DEF_LOGN400 | 42 | #ifndef DEF_LOGN400 |
38 | #define DEF_LOGN400 | 43 | #define DEF_LOGN400 |
39 | static const opus_int16 logN400[21] ICONST_ATTR = { | 44 | static const opus_int16 logN400[21] = { |
40 | 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, }; |
41 | #endif | 46 | #endif |
42 | 47 | ||
43 | #ifndef DEF_PULSE_CACHE50 | 48 | #ifndef DEF_PULSE_CACHE50 |
44 | #define DEF_PULSE_CACHE50 | 49 | #define DEF_PULSE_CACHE50 |
45 | static const opus_int16 cache_index50[105] ICONST_ATTR = { | 50 | static const opus_int16 cache_index50[105] = { |
46 | -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, |
47 | 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, |
48 | 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, |
@@ -51,7 +56,7 @@ static const opus_int16 cache_index50[105] ICONST_ATTR = { | |||
51 | 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, |
52 | 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, |
53 | }; | 58 | }; |
54 | static const unsigned char cache_bits50[392] ICONST_ATTR = { | 59 | static const unsigned char cache_bits50[392] = { |
55 | 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, |
56 | 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, |
57 | 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, |
@@ -79,7 +84,7 @@ static const unsigned char cache_bits50[392] ICONST_ATTR = { | |||
79 | 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, |
80 | 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, |
81 | 182, 234, }; | 86 | 182, 234, }; |
82 | static const unsigned char cache_caps50[168] ICONST_ATTR = { | 87 | static const unsigned char cache_caps50[168] = { |
83 | 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, |
84 | 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, |
85 | 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, |
@@ -96,7 +101,7 @@ static const unsigned char cache_caps50[168] ICONST_ATTR = { | |||
96 | 101 | ||
97 | #ifndef FFT_TWIDDLES48000_960 | 102 | #ifndef FFT_TWIDDLES48000_960 |
98 | #define FFT_TWIDDLES48000_960 | 103 | #define FFT_TWIDDLES48000_960 |
99 | static const kiss_twiddle_cpx fft_twiddles48000_960[480] ICONST_ATTR = { | 104 | static const kiss_twiddle_cpx fft_twiddles48000_960[480] = { |
100 | {32767, 0}, {32766, -429}, | 105 | {32767, 0}, {32766, -429}, |
101 | {32757, -858}, {32743, -1287}, | 106 | {32757, -858}, {32743, -1287}, |
102 | {32724, -1715}, {32698, -2143}, | 107 | {32724, -1715}, {32698, -2143}, |
@@ -424,53 +429,73 @@ static const opus_int16 fft_bitrev60[60] = { | |||
424 | 429 | ||
425 | #ifndef FFT_STATE48000_960_0 | 430 | #ifndef FFT_STATE48000_960_0 |
426 | #define FFT_STATE48000_960_0 | 431 | #define FFT_STATE48000_960_0 |
427 | static const kiss_fft_state fft_state48000_960_0 ICONST_ATTR = { | 432 | static const kiss_fft_state fft_state48000_960_0 = { |
428 | 480, /* nfft */ | 433 | 480, /* nfft */ |
429 | 17476, /* scale */ | 434 | 17476, /* scale */ |
430 | 8, /* scale_shift */ | 435 | 8, /* scale_shift */ |
431 | -1, /* shift */ | 436 | -1, /* shift */ |
432 | {5, 96, 3, 32, 4, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */ | 437 | {5, 96, 3, 32, 4, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */ |
433 | fft_bitrev480, /* bitrev */ | 438 | fft_bitrev480, /* bitrev */ |
434 | fft_twiddles48000_960, /* bitrev */ | 439 | fft_twiddles48000_960, /* bitrev */ |
440 | #ifdef OVERRIDE_FFT | ||
441 | (arch_fft_state *)&cfg_arch_480, | ||
442 | #else | ||
443 | NULL, | ||
444 | #endif | ||
435 | }; | 445 | }; |
436 | #endif | 446 | #endif |
437 | 447 | ||
438 | #ifndef FFT_STATE48000_960_1 | 448 | #ifndef FFT_STATE48000_960_1 |
439 | #define FFT_STATE48000_960_1 | 449 | #define FFT_STATE48000_960_1 |
440 | static const kiss_fft_state fft_state48000_960_1 ICONST_ATTR = { | 450 | static const kiss_fft_state fft_state48000_960_1 = { |
441 | 240, /* nfft */ | 451 | 240, /* nfft */ |
442 | 17476, /* scale */ | 452 | 17476, /* scale */ |
443 | 7, /* scale_shift */ | 453 | 7, /* scale_shift */ |
444 | 1, /* shift */ | 454 | 1, /* shift */ |
445 | {5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ | 455 | {5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ |
446 | fft_bitrev240, /* bitrev */ | 456 | fft_bitrev240, /* bitrev */ |
447 | fft_twiddles48000_960, /* bitrev */ | 457 | fft_twiddles48000_960, /* bitrev */ |
458 | #ifdef OVERRIDE_FFT | ||
459 | (arch_fft_state *)&cfg_arch_240, | ||
460 | #else | ||
461 | NULL, | ||
462 | #endif | ||
448 | }; | 463 | }; |
449 | #endif | 464 | #endif |
450 | 465 | ||
451 | #ifndef FFT_STATE48000_960_2 | 466 | #ifndef FFT_STATE48000_960_2 |
452 | #define FFT_STATE48000_960_2 | 467 | #define FFT_STATE48000_960_2 |
453 | static const kiss_fft_state fft_state48000_960_2 ICONST_ATTR = { | 468 | static const kiss_fft_state fft_state48000_960_2 = { |
454 | 120, /* nfft */ | 469 | 120, /* nfft */ |
455 | 17476, /* scale */ | 470 | 17476, /* scale */ |
456 | 6, /* scale_shift */ | 471 | 6, /* scale_shift */ |
457 | 2, /* shift */ | 472 | 2, /* shift */ |
458 | {5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ | 473 | {5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ |
459 | fft_bitrev120, /* bitrev */ | 474 | fft_bitrev120, /* bitrev */ |
460 | fft_twiddles48000_960, /* bitrev */ | 475 | fft_twiddles48000_960, /* bitrev */ |
476 | #ifdef OVERRIDE_FFT | ||
477 | (arch_fft_state *)&cfg_arch_120, | ||
478 | #else | ||
479 | NULL, | ||
480 | #endif | ||
461 | }; | 481 | }; |
462 | #endif | 482 | #endif |
463 | 483 | ||
464 | #ifndef FFT_STATE48000_960_3 | 484 | #ifndef FFT_STATE48000_960_3 |
465 | #define FFT_STATE48000_960_3 | 485 | #define FFT_STATE48000_960_3 |
466 | static const kiss_fft_state fft_state48000_960_3 ICONST_ATTR = { | 486 | static const kiss_fft_state fft_state48000_960_3 = { |
467 | 60, /* nfft */ | 487 | 60, /* nfft */ |
468 | 17476, /* scale */ | 488 | 17476, /* scale */ |
469 | 5, /* scale_shift */ | 489 | 5, /* scale_shift */ |
470 | 3, /* shift */ | 490 | 3, /* shift */ |
471 | {5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ | 491 | {5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */ |
472 | fft_bitrev60, /* bitrev */ | 492 | fft_bitrev60, /* bitrev */ |
473 | fft_twiddles48000_960, /* bitrev */ | 493 | fft_twiddles48000_960, /* bitrev */ |
494 | #ifdef OVERRIDE_FFT | ||
495 | (arch_fft_state *)&cfg_arch_60, | ||
496 | #else | ||
497 | NULL, | ||
498 | #endif | ||
474 | }; | 499 | }; |
475 | #endif | 500 | #endif |
476 | 501 | ||
@@ -478,7 +503,7 @@ fft_twiddles48000_960, /* bitrev */ | |||
478 | 503 | ||
479 | #ifndef MDCT_TWIDDLES960 | 504 | #ifndef MDCT_TWIDDLES960 |
480 | #define MDCT_TWIDDLES960 | 505 | #define MDCT_TWIDDLES960 |
481 | static const opus_val16 mdct_twiddles960[1800] ICONST_ATTR = { | 506 | static const opus_val16 mdct_twiddles960[1800] = { |
482 | 32767, 32767, 32767, 32766, 32765, | 507 | 32767, 32767, 32767, 32766, 32765, |
483 | 32763, 32761, 32759, 32756, 32753, | 508 | 32763, 32761, 32759, 32756, 32753, |
484 | 32750, 32746, 32742, 32738, 32733, | 509 | 32750, 32746, 32742, 32738, 32733, |
@@ -842,7 +867,7 @@ static const opus_val16 mdct_twiddles960[1800] ICONST_ATTR = { | |||
842 | }; | 867 | }; |
843 | #endif | 868 | #endif |
844 | 869 | ||
845 | static const CELTMode mode48000_960_120 ICONST_ATTR = { | 870 | static const CELTMode mode48000_960_120 = { |
846 | 48000, /* Fs */ | 871 | 48000, /* Fs */ |
847 | 120, /* overlap */ | 872 | 120, /* overlap */ |
848 | 21, /* nbEBands */ | 873 | 21, /* nbEBands */ |