Reverse the ordering of the FFT stage to optimize a degenerate radix-4 case.
This also happens to increase the accuracy since it appears that the new ordering is optimal (at least for 20 ms frames), whereas the previous ordering was pessimal.
This commit is contained in:
parent
c8f4e1608a
commit
e2bcb3fe9b
4 changed files with 201 additions and 159 deletions
|
@ -1,10 +1,10 @@
|
||||||
CFLAGS=-O2 -Wall -Wextra -DHAVE_CONFIG_H
|
CFLAGS=-O2 -Wall -Wextra -DHAVE_CONFIG_H
|
||||||
INCLUDES=-I../ -I../.. -I../../include
|
INCLUDES=-I. -I../ -I../.. -I../../include
|
||||||
|
|
||||||
all: dump_modes
|
all: dump_modes
|
||||||
|
|
||||||
dump_modes:
|
dump_modes:
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) -DCUSTOM_MODES dump_modes.c ../modes.c ../cwrs.c ../rate.c ../entenc.c ../entdec.c ../mathops.c ../mdct.c ../kiss_fft.c -o dump_modes -lm
|
$(CC) $(CFLAGS) $(INCLUDES) -DCUSTOM_MODES_ONLY -DCUSTOM_MODES dump_modes.c ../modes.c ../cwrs.c ../rate.c ../entenc.c ../entdec.c ../mathops.c ../mdct.c ../kiss_fft.c -o dump_modes -lm
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f dump_modes
|
rm -f dump_modes
|
||||||
|
|
100
celt/kiss_fft.c
100
celt/kiss_fft.c
|
@ -85,38 +85,61 @@ static void kf_bfly4(
|
||||||
int mm
|
int mm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const kiss_twiddle_cpx *tw1,*tw2,*tw3;
|
int i;
|
||||||
kiss_fft_cpx scratch[6];
|
|
||||||
const size_t m2=2*m;
|
|
||||||
const size_t m3=3*m;
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
kiss_fft_cpx * Fout_beg = Fout;
|
if (m==1)
|
||||||
for (i=0;i<N;i++)
|
|
||||||
{
|
{
|
||||||
Fout = Fout_beg + i*mm;
|
/* Degenerate case where all the twiddles are 1. */
|
||||||
tw3 = tw2 = tw1 = st->twiddles;
|
for (i=0;i<N;i++)
|
||||||
for (j=0;j<m;j++)
|
|
||||||
{
|
{
|
||||||
C_MUL(scratch[0],Fout[m] , *tw1 );
|
kiss_fft_cpx scratch0, scratch1;
|
||||||
C_MUL(scratch[1],Fout[m2] , *tw2 );
|
|
||||||
C_MUL(scratch[2],Fout[m3] , *tw3 );
|
|
||||||
|
|
||||||
C_SUB( scratch[5] , *Fout, scratch[1] );
|
C_SUB( scratch0 , *Fout, Fout[2] );
|
||||||
C_ADDTO(*Fout, scratch[1]);
|
C_ADDTO(*Fout, Fout[2]);
|
||||||
C_ADD( scratch[3] , scratch[0] , scratch[2] );
|
C_ADD( scratch1 , Fout[1] , Fout[3] );
|
||||||
C_SUB( scratch[4] , scratch[0] , scratch[2] );
|
C_SUB( Fout[2], *Fout, scratch1 );
|
||||||
C_SUB( Fout[m2], *Fout, scratch[3] );
|
C_ADDTO( *Fout , scratch1 );
|
||||||
tw1 += fstride;
|
C_SUB( scratch1 , Fout[1] , Fout[3] );
|
||||||
tw2 += fstride*2;
|
|
||||||
tw3 += fstride*3;
|
|
||||||
C_ADDTO( *Fout , scratch[3] );
|
|
||||||
|
|
||||||
Fout[m].r = scratch[5].r + scratch[4].i;
|
Fout[1].r = scratch0.r + scratch1.i;
|
||||||
Fout[m].i = scratch[5].i - scratch[4].r;
|
Fout[1].i = scratch0.i - scratch1.r;
|
||||||
Fout[m3].r = scratch[5].r - scratch[4].i;
|
Fout[3].r = scratch0.r - scratch1.i;
|
||||||
Fout[m3].i = scratch[5].i + scratch[4].r;
|
Fout[3].i = scratch0.i + scratch1.r;
|
||||||
++Fout;
|
Fout+=4;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int j;
|
||||||
|
kiss_fft_cpx scratch[6];
|
||||||
|
const kiss_twiddle_cpx *tw1,*tw2,*tw3;
|
||||||
|
const int m2=2*m;
|
||||||
|
const int m3=3*m;
|
||||||
|
kiss_fft_cpx * Fout_beg = Fout;
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
{
|
||||||
|
Fout = Fout_beg + i*mm;
|
||||||
|
tw3 = tw2 = tw1 = st->twiddles;
|
||||||
|
for (j=0;j<m;j++)
|
||||||
|
{
|
||||||
|
C_MUL(scratch[0],Fout[m] , *tw1 );
|
||||||
|
C_MUL(scratch[1],Fout[m2] , *tw2 );
|
||||||
|
C_MUL(scratch[2],Fout[m3] , *tw3 );
|
||||||
|
|
||||||
|
C_SUB( scratch[5] , *Fout, scratch[1] );
|
||||||
|
C_ADDTO(*Fout, scratch[1]);
|
||||||
|
C_ADD( scratch[3] , scratch[0] , scratch[2] );
|
||||||
|
C_SUB( scratch[4] , scratch[0] , scratch[2] );
|
||||||
|
C_SUB( Fout[m2], *Fout, scratch[3] );
|
||||||
|
tw1 += fstride;
|
||||||
|
tw2 += fstride*2;
|
||||||
|
tw3 += fstride*3;
|
||||||
|
C_ADDTO( *Fout , scratch[3] );
|
||||||
|
|
||||||
|
Fout[m].r = scratch[5].r + scratch[4].i;
|
||||||
|
Fout[m].i = scratch[5].i - scratch[4].r;
|
||||||
|
Fout[m3].r = scratch[5].r - scratch[4].i;
|
||||||
|
Fout[m3].i = scratch[5].i + scratch[4].r;
|
||||||
|
++Fout;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,6 +314,9 @@ static
|
||||||
int kf_factor(int n,opus_int16 * facbuf)
|
int kf_factor(int n,opus_int16 * facbuf)
|
||||||
{
|
{
|
||||||
int p=4;
|
int p=4;
|
||||||
|
int i;
|
||||||
|
int stages=0;
|
||||||
|
int nbak = n;
|
||||||
|
|
||||||
/*factor out powers of 4, powers of 2, then any remaining primes */
|
/*factor out powers of 4, powers of 2, then any remaining primes */
|
||||||
do {
|
do {
|
||||||
|
@ -312,9 +338,25 @@ int kf_factor(int n,opus_int16 * facbuf)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
*facbuf++ = p;
|
facbuf[2*stages] = p;
|
||||||
*facbuf++ = n;
|
stages++;
|
||||||
} while (n > 1);
|
} while (n > 1);
|
||||||
|
n = nbak;
|
||||||
|
/* Reverse the order to get the radix 4 at the end, so we can use the
|
||||||
|
fast degenerate case. It turns out that reversing the order also
|
||||||
|
improves the noise behaviour. */
|
||||||
|
for (i=0;i<stages/2;i++)
|
||||||
|
{
|
||||||
|
int tmp;
|
||||||
|
tmp = facbuf[2*i];
|
||||||
|
facbuf[2*i] = facbuf[2*(stages-i-1)];
|
||||||
|
facbuf[2*(stages-i-1)] = tmp;
|
||||||
|
}
|
||||||
|
for (i=0;i<stages;i++)
|
||||||
|
{
|
||||||
|
n /= facbuf[2*i];
|
||||||
|
facbuf[2*i+1] = n;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -341,84 +341,84 @@ static const kiss_twiddle_cpx fft_twiddles48000_960[480] = {
|
||||||
#ifndef FFT_BITREV480
|
#ifndef FFT_BITREV480
|
||||||
#define FFT_BITREV480
|
#define FFT_BITREV480
|
||||||
static const opus_int16 fft_bitrev480[480] = {
|
static const opus_int16 fft_bitrev480[480] = {
|
||||||
0, 120, 240, 360, 30, 150, 270, 390, 60, 180, 300, 420, 90, 210, 330,
|
0, 96, 192, 288, 384, 32, 128, 224, 320, 416, 64, 160, 256, 352, 448,
|
||||||
450, 15, 135, 255, 375, 45, 165, 285, 405, 75, 195, 315, 435, 105, 225,
|
16, 112, 208, 304, 400, 48, 144, 240, 336, 432, 80, 176, 272, 368, 464,
|
||||||
345, 465, 5, 125, 245, 365, 35, 155, 275, 395, 65, 185, 305, 425, 95,
|
4, 100, 196, 292, 388, 36, 132, 228, 324, 420, 68, 164, 260, 356, 452,
|
||||||
215, 335, 455, 20, 140, 260, 380, 50, 170, 290, 410, 80, 200, 320, 440,
|
20, 116, 212, 308, 404, 52, 148, 244, 340, 436, 84, 180, 276, 372, 468,
|
||||||
110, 230, 350, 470, 10, 130, 250, 370, 40, 160, 280, 400, 70, 190, 310,
|
8, 104, 200, 296, 392, 40, 136, 232, 328, 424, 72, 168, 264, 360, 456,
|
||||||
430, 100, 220, 340, 460, 25, 145, 265, 385, 55, 175, 295, 415, 85, 205,
|
24, 120, 216, 312, 408, 56, 152, 248, 344, 440, 88, 184, 280, 376, 472,
|
||||||
325, 445, 115, 235, 355, 475, 1, 121, 241, 361, 31, 151, 271, 391, 61,
|
12, 108, 204, 300, 396, 44, 140, 236, 332, 428, 76, 172, 268, 364, 460,
|
||||||
181, 301, 421, 91, 211, 331, 451, 16, 136, 256, 376, 46, 166, 286, 406,
|
28, 124, 220, 316, 412, 60, 156, 252, 348, 444, 92, 188, 284, 380, 476,
|
||||||
76, 196, 316, 436, 106, 226, 346, 466, 6, 126, 246, 366, 36, 156, 276,
|
1, 97, 193, 289, 385, 33, 129, 225, 321, 417, 65, 161, 257, 353, 449,
|
||||||
396, 66, 186, 306, 426, 96, 216, 336, 456, 21, 141, 261, 381, 51, 171,
|
17, 113, 209, 305, 401, 49, 145, 241, 337, 433, 81, 177, 273, 369, 465,
|
||||||
291, 411, 81, 201, 321, 441, 111, 231, 351, 471, 11, 131, 251, 371, 41,
|
5, 101, 197, 293, 389, 37, 133, 229, 325, 421, 69, 165, 261, 357, 453,
|
||||||
161, 281, 401, 71, 191, 311, 431, 101, 221, 341, 461, 26, 146, 266, 386,
|
21, 117, 213, 309, 405, 53, 149, 245, 341, 437, 85, 181, 277, 373, 469,
|
||||||
56, 176, 296, 416, 86, 206, 326, 446, 116, 236, 356, 476, 2, 122, 242,
|
9, 105, 201, 297, 393, 41, 137, 233, 329, 425, 73, 169, 265, 361, 457,
|
||||||
362, 32, 152, 272, 392, 62, 182, 302, 422, 92, 212, 332, 452, 17, 137,
|
25, 121, 217, 313, 409, 57, 153, 249, 345, 441, 89, 185, 281, 377, 473,
|
||||||
257, 377, 47, 167, 287, 407, 77, 197, 317, 437, 107, 227, 347, 467, 7,
|
13, 109, 205, 301, 397, 45, 141, 237, 333, 429, 77, 173, 269, 365, 461,
|
||||||
127, 247, 367, 37, 157, 277, 397, 67, 187, 307, 427, 97, 217, 337, 457,
|
29, 125, 221, 317, 413, 61, 157, 253, 349, 445, 93, 189, 285, 381, 477,
|
||||||
22, 142, 262, 382, 52, 172, 292, 412, 82, 202, 322, 442, 112, 232, 352,
|
2, 98, 194, 290, 386, 34, 130, 226, 322, 418, 66, 162, 258, 354, 450,
|
||||||
472, 12, 132, 252, 372, 42, 162, 282, 402, 72, 192, 312, 432, 102, 222,
|
18, 114, 210, 306, 402, 50, 146, 242, 338, 434, 82, 178, 274, 370, 466,
|
||||||
342, 462, 27, 147, 267, 387, 57, 177, 297, 417, 87, 207, 327, 447, 117,
|
6, 102, 198, 294, 390, 38, 134, 230, 326, 422, 70, 166, 262, 358, 454,
|
||||||
237, 357, 477, 3, 123, 243, 363, 33, 153, 273, 393, 63, 183, 303, 423,
|
22, 118, 214, 310, 406, 54, 150, 246, 342, 438, 86, 182, 278, 374, 470,
|
||||||
93, 213, 333, 453, 18, 138, 258, 378, 48, 168, 288, 408, 78, 198, 318,
|
10, 106, 202, 298, 394, 42, 138, 234, 330, 426, 74, 170, 266, 362, 458,
|
||||||
438, 108, 228, 348, 468, 8, 128, 248, 368, 38, 158, 278, 398, 68, 188,
|
26, 122, 218, 314, 410, 58, 154, 250, 346, 442, 90, 186, 282, 378, 474,
|
||||||
308, 428, 98, 218, 338, 458, 23, 143, 263, 383, 53, 173, 293, 413, 83,
|
14, 110, 206, 302, 398, 46, 142, 238, 334, 430, 78, 174, 270, 366, 462,
|
||||||
203, 323, 443, 113, 233, 353, 473, 13, 133, 253, 373, 43, 163, 283, 403,
|
30, 126, 222, 318, 414, 62, 158, 254, 350, 446, 94, 190, 286, 382, 478,
|
||||||
73, 193, 313, 433, 103, 223, 343, 463, 28, 148, 268, 388, 58, 178, 298,
|
3, 99, 195, 291, 387, 35, 131, 227, 323, 419, 67, 163, 259, 355, 451,
|
||||||
418, 88, 208, 328, 448, 118, 238, 358, 478, 4, 124, 244, 364, 34, 154,
|
19, 115, 211, 307, 403, 51, 147, 243, 339, 435, 83, 179, 275, 371, 467,
|
||||||
274, 394, 64, 184, 304, 424, 94, 214, 334, 454, 19, 139, 259, 379, 49,
|
7, 103, 199, 295, 391, 39, 135, 231, 327, 423, 71, 167, 263, 359, 455,
|
||||||
169, 289, 409, 79, 199, 319, 439, 109, 229, 349, 469, 9, 129, 249, 369,
|
23, 119, 215, 311, 407, 55, 151, 247, 343, 439, 87, 183, 279, 375, 471,
|
||||||
39, 159, 279, 399, 69, 189, 309, 429, 99, 219, 339, 459, 24, 144, 264,
|
11, 107, 203, 299, 395, 43, 139, 235, 331, 427, 75, 171, 267, 363, 459,
|
||||||
384, 54, 174, 294, 414, 84, 204, 324, 444, 114, 234, 354, 474, 14, 134,
|
27, 123, 219, 315, 411, 59, 155, 251, 347, 443, 91, 187, 283, 379, 475,
|
||||||
254, 374, 44, 164, 284, 404, 74, 194, 314, 434, 104, 224, 344, 464, 29,
|
15, 111, 207, 303, 399, 47, 143, 239, 335, 431, 79, 175, 271, 367, 463,
|
||||||
149, 269, 389, 59, 179, 299, 419, 89, 209, 329, 449, 119, 239, 359, 479,
|
31, 127, 223, 319, 415, 63, 159, 255, 351, 447, 95, 191, 287, 383, 479,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FFT_BITREV240
|
#ifndef FFT_BITREV240
|
||||||
#define FFT_BITREV240
|
#define FFT_BITREV240
|
||||||
static const opus_int16 fft_bitrev240[240] = {
|
static const opus_int16 fft_bitrev240[240] = {
|
||||||
0, 60, 120, 180, 15, 75, 135, 195, 30, 90, 150, 210, 45, 105, 165,
|
0, 48, 96, 144, 192, 16, 64, 112, 160, 208, 32, 80, 128, 176, 224,
|
||||||
225, 5, 65, 125, 185, 20, 80, 140, 200, 35, 95, 155, 215, 50, 110,
|
4, 52, 100, 148, 196, 20, 68, 116, 164, 212, 36, 84, 132, 180, 228,
|
||||||
170, 230, 10, 70, 130, 190, 25, 85, 145, 205, 40, 100, 160, 220, 55,
|
8, 56, 104, 152, 200, 24, 72, 120, 168, 216, 40, 88, 136, 184, 232,
|
||||||
115, 175, 235, 1, 61, 121, 181, 16, 76, 136, 196, 31, 91, 151, 211,
|
12, 60, 108, 156, 204, 28, 76, 124, 172, 220, 44, 92, 140, 188, 236,
|
||||||
46, 106, 166, 226, 6, 66, 126, 186, 21, 81, 141, 201, 36, 96, 156,
|
1, 49, 97, 145, 193, 17, 65, 113, 161, 209, 33, 81, 129, 177, 225,
|
||||||
216, 51, 111, 171, 231, 11, 71, 131, 191, 26, 86, 146, 206, 41, 101,
|
5, 53, 101, 149, 197, 21, 69, 117, 165, 213, 37, 85, 133, 181, 229,
|
||||||
161, 221, 56, 116, 176, 236, 2, 62, 122, 182, 17, 77, 137, 197, 32,
|
9, 57, 105, 153, 201, 25, 73, 121, 169, 217, 41, 89, 137, 185, 233,
|
||||||
92, 152, 212, 47, 107, 167, 227, 7, 67, 127, 187, 22, 82, 142, 202,
|
13, 61, 109, 157, 205, 29, 77, 125, 173, 221, 45, 93, 141, 189, 237,
|
||||||
37, 97, 157, 217, 52, 112, 172, 232, 12, 72, 132, 192, 27, 87, 147,
|
2, 50, 98, 146, 194, 18, 66, 114, 162, 210, 34, 82, 130, 178, 226,
|
||||||
207, 42, 102, 162, 222, 57, 117, 177, 237, 3, 63, 123, 183, 18, 78,
|
6, 54, 102, 150, 198, 22, 70, 118, 166, 214, 38, 86, 134, 182, 230,
|
||||||
138, 198, 33, 93, 153, 213, 48, 108, 168, 228, 8, 68, 128, 188, 23,
|
10, 58, 106, 154, 202, 26, 74, 122, 170, 218, 42, 90, 138, 186, 234,
|
||||||
83, 143, 203, 38, 98, 158, 218, 53, 113, 173, 233, 13, 73, 133, 193,
|
14, 62, 110, 158, 206, 30, 78, 126, 174, 222, 46, 94, 142, 190, 238,
|
||||||
28, 88, 148, 208, 43, 103, 163, 223, 58, 118, 178, 238, 4, 64, 124,
|
3, 51, 99, 147, 195, 19, 67, 115, 163, 211, 35, 83, 131, 179, 227,
|
||||||
184, 19, 79, 139, 199, 34, 94, 154, 214, 49, 109, 169, 229, 9, 69,
|
7, 55, 103, 151, 199, 23, 71, 119, 167, 215, 39, 87, 135, 183, 231,
|
||||||
129, 189, 24, 84, 144, 204, 39, 99, 159, 219, 54, 114, 174, 234, 14,
|
11, 59, 107, 155, 203, 27, 75, 123, 171, 219, 43, 91, 139, 187, 235,
|
||||||
74, 134, 194, 29, 89, 149, 209, 44, 104, 164, 224, 59, 119, 179, 239,
|
15, 63, 111, 159, 207, 31, 79, 127, 175, 223, 47, 95, 143, 191, 239,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FFT_BITREV120
|
#ifndef FFT_BITREV120
|
||||||
#define FFT_BITREV120
|
#define FFT_BITREV120
|
||||||
static const opus_int16 fft_bitrev120[120] = {
|
static const opus_int16 fft_bitrev120[120] = {
|
||||||
0, 30, 60, 90, 15, 45, 75, 105, 5, 35, 65, 95, 20, 50, 80,
|
0, 24, 48, 72, 96, 8, 32, 56, 80, 104, 16, 40, 64, 88, 112,
|
||||||
110, 10, 40, 70, 100, 25, 55, 85, 115, 1, 31, 61, 91, 16, 46,
|
4, 28, 52, 76, 100, 12, 36, 60, 84, 108, 20, 44, 68, 92, 116,
|
||||||
76, 106, 6, 36, 66, 96, 21, 51, 81, 111, 11, 41, 71, 101, 26,
|
1, 25, 49, 73, 97, 9, 33, 57, 81, 105, 17, 41, 65, 89, 113,
|
||||||
56, 86, 116, 2, 32, 62, 92, 17, 47, 77, 107, 7, 37, 67, 97,
|
5, 29, 53, 77, 101, 13, 37, 61, 85, 109, 21, 45, 69, 93, 117,
|
||||||
22, 52, 82, 112, 12, 42, 72, 102, 27, 57, 87, 117, 3, 33, 63,
|
2, 26, 50, 74, 98, 10, 34, 58, 82, 106, 18, 42, 66, 90, 114,
|
||||||
93, 18, 48, 78, 108, 8, 38, 68, 98, 23, 53, 83, 113, 13, 43,
|
6, 30, 54, 78, 102, 14, 38, 62, 86, 110, 22, 46, 70, 94, 118,
|
||||||
73, 103, 28, 58, 88, 118, 4, 34, 64, 94, 19, 49, 79, 109, 9,
|
3, 27, 51, 75, 99, 11, 35, 59, 83, 107, 19, 43, 67, 91, 115,
|
||||||
39, 69, 99, 24, 54, 84, 114, 14, 44, 74, 104, 29, 59, 89, 119,
|
7, 31, 55, 79, 103, 15, 39, 63, 87, 111, 23, 47, 71, 95, 119,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FFT_BITREV60
|
#ifndef FFT_BITREV60
|
||||||
#define FFT_BITREV60
|
#define FFT_BITREV60
|
||||||
static const opus_int16 fft_bitrev60[60] = {
|
static const opus_int16 fft_bitrev60[60] = {
|
||||||
0, 15, 30, 45, 5, 20, 35, 50, 10, 25, 40, 55, 1, 16, 31,
|
0, 12, 24, 36, 48, 4, 16, 28, 40, 52, 8, 20, 32, 44, 56,
|
||||||
46, 6, 21, 36, 51, 11, 26, 41, 56, 2, 17, 32, 47, 7, 22,
|
1, 13, 25, 37, 49, 5, 17, 29, 41, 53, 9, 21, 33, 45, 57,
|
||||||
37, 52, 12, 27, 42, 57, 3, 18, 33, 48, 8, 23, 38, 53, 13,
|
2, 14, 26, 38, 50, 6, 18, 30, 42, 54, 10, 22, 34, 46, 58,
|
||||||
28, 43, 58, 4, 19, 34, 49, 9, 24, 39, 54, 14, 29, 44, 59,
|
3, 15, 27, 39, 51, 7, 19, 31, 43, 55, 11, 23, 35, 47, 59,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ static const opus_int16 fft_bitrev60[60] = {
|
||||||
static const kiss_fft_state fft_state48000_960_0 = {
|
static const kiss_fft_state fft_state48000_960_0 = {
|
||||||
480, /* nfft */
|
480, /* nfft */
|
||||||
-1, /* shift */
|
-1, /* shift */
|
||||||
{4, 120, 4, 30, 2, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, }, /* factors */
|
{5, 96, 3, 32, 2, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */
|
||||||
fft_bitrev480, /* bitrev */
|
fft_bitrev480, /* bitrev */
|
||||||
fft_twiddles48000_960, /* bitrev */
|
fft_twiddles48000_960, /* bitrev */
|
||||||
};
|
};
|
||||||
|
@ -438,7 +438,7 @@ fft_twiddles48000_960, /* bitrev */
|
||||||
static const kiss_fft_state fft_state48000_960_1 = {
|
static const kiss_fft_state fft_state48000_960_1 = {
|
||||||
240, /* nfft */
|
240, /* nfft */
|
||||||
1, /* shift */
|
1, /* shift */
|
||||||
{4, 60, 4, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
{5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
||||||
fft_bitrev240, /* bitrev */
|
fft_bitrev240, /* bitrev */
|
||||||
fft_twiddles48000_960, /* bitrev */
|
fft_twiddles48000_960, /* bitrev */
|
||||||
};
|
};
|
||||||
|
@ -449,7 +449,7 @@ fft_twiddles48000_960, /* bitrev */
|
||||||
static const kiss_fft_state fft_state48000_960_2 = {
|
static const kiss_fft_state fft_state48000_960_2 = {
|
||||||
120, /* nfft */
|
120, /* nfft */
|
||||||
2, /* shift */
|
2, /* shift */
|
||||||
{4, 30, 2, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
{5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
||||||
fft_bitrev120, /* bitrev */
|
fft_bitrev120, /* bitrev */
|
||||||
fft_twiddles48000_960, /* bitrev */
|
fft_twiddles48000_960, /* bitrev */
|
||||||
};
|
};
|
||||||
|
@ -460,7 +460,7 @@ fft_twiddles48000_960, /* bitrev */
|
||||||
static const kiss_fft_state fft_state48000_960_3 = {
|
static const kiss_fft_state fft_state48000_960_3 = {
|
||||||
60, /* nfft */
|
60, /* nfft */
|
||||||
3, /* shift */
|
3, /* shift */
|
||||||
{4, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
{5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
||||||
fft_bitrev60, /* bitrev */
|
fft_bitrev60, /* bitrev */
|
||||||
fft_twiddles48000_960, /* bitrev */
|
fft_twiddles48000_960, /* bitrev */
|
||||||
};
|
};
|
||||||
|
|
|
@ -341,84 +341,84 @@ static const kiss_twiddle_cpx fft_twiddles48000_960[480] = {
|
||||||
#ifndef FFT_BITREV480
|
#ifndef FFT_BITREV480
|
||||||
#define FFT_BITREV480
|
#define FFT_BITREV480
|
||||||
static const opus_int16 fft_bitrev480[480] = {
|
static const opus_int16 fft_bitrev480[480] = {
|
||||||
0, 120, 240, 360, 30, 150, 270, 390, 60, 180, 300, 420, 90, 210, 330,
|
0, 96, 192, 288, 384, 32, 128, 224, 320, 416, 64, 160, 256, 352, 448,
|
||||||
450, 15, 135, 255, 375, 45, 165, 285, 405, 75, 195, 315, 435, 105, 225,
|
16, 112, 208, 304, 400, 48, 144, 240, 336, 432, 80, 176, 272, 368, 464,
|
||||||
345, 465, 5, 125, 245, 365, 35, 155, 275, 395, 65, 185, 305, 425, 95,
|
4, 100, 196, 292, 388, 36, 132, 228, 324, 420, 68, 164, 260, 356, 452,
|
||||||
215, 335, 455, 20, 140, 260, 380, 50, 170, 290, 410, 80, 200, 320, 440,
|
20, 116, 212, 308, 404, 52, 148, 244, 340, 436, 84, 180, 276, 372, 468,
|
||||||
110, 230, 350, 470, 10, 130, 250, 370, 40, 160, 280, 400, 70, 190, 310,
|
8, 104, 200, 296, 392, 40, 136, 232, 328, 424, 72, 168, 264, 360, 456,
|
||||||
430, 100, 220, 340, 460, 25, 145, 265, 385, 55, 175, 295, 415, 85, 205,
|
24, 120, 216, 312, 408, 56, 152, 248, 344, 440, 88, 184, 280, 376, 472,
|
||||||
325, 445, 115, 235, 355, 475, 1, 121, 241, 361, 31, 151, 271, 391, 61,
|
12, 108, 204, 300, 396, 44, 140, 236, 332, 428, 76, 172, 268, 364, 460,
|
||||||
181, 301, 421, 91, 211, 331, 451, 16, 136, 256, 376, 46, 166, 286, 406,
|
28, 124, 220, 316, 412, 60, 156, 252, 348, 444, 92, 188, 284, 380, 476,
|
||||||
76, 196, 316, 436, 106, 226, 346, 466, 6, 126, 246, 366, 36, 156, 276,
|
1, 97, 193, 289, 385, 33, 129, 225, 321, 417, 65, 161, 257, 353, 449,
|
||||||
396, 66, 186, 306, 426, 96, 216, 336, 456, 21, 141, 261, 381, 51, 171,
|
17, 113, 209, 305, 401, 49, 145, 241, 337, 433, 81, 177, 273, 369, 465,
|
||||||
291, 411, 81, 201, 321, 441, 111, 231, 351, 471, 11, 131, 251, 371, 41,
|
5, 101, 197, 293, 389, 37, 133, 229, 325, 421, 69, 165, 261, 357, 453,
|
||||||
161, 281, 401, 71, 191, 311, 431, 101, 221, 341, 461, 26, 146, 266, 386,
|
21, 117, 213, 309, 405, 53, 149, 245, 341, 437, 85, 181, 277, 373, 469,
|
||||||
56, 176, 296, 416, 86, 206, 326, 446, 116, 236, 356, 476, 2, 122, 242,
|
9, 105, 201, 297, 393, 41, 137, 233, 329, 425, 73, 169, 265, 361, 457,
|
||||||
362, 32, 152, 272, 392, 62, 182, 302, 422, 92, 212, 332, 452, 17, 137,
|
25, 121, 217, 313, 409, 57, 153, 249, 345, 441, 89, 185, 281, 377, 473,
|
||||||
257, 377, 47, 167, 287, 407, 77, 197, 317, 437, 107, 227, 347, 467, 7,
|
13, 109, 205, 301, 397, 45, 141, 237, 333, 429, 77, 173, 269, 365, 461,
|
||||||
127, 247, 367, 37, 157, 277, 397, 67, 187, 307, 427, 97, 217, 337, 457,
|
29, 125, 221, 317, 413, 61, 157, 253, 349, 445, 93, 189, 285, 381, 477,
|
||||||
22, 142, 262, 382, 52, 172, 292, 412, 82, 202, 322, 442, 112, 232, 352,
|
2, 98, 194, 290, 386, 34, 130, 226, 322, 418, 66, 162, 258, 354, 450,
|
||||||
472, 12, 132, 252, 372, 42, 162, 282, 402, 72, 192, 312, 432, 102, 222,
|
18, 114, 210, 306, 402, 50, 146, 242, 338, 434, 82, 178, 274, 370, 466,
|
||||||
342, 462, 27, 147, 267, 387, 57, 177, 297, 417, 87, 207, 327, 447, 117,
|
6, 102, 198, 294, 390, 38, 134, 230, 326, 422, 70, 166, 262, 358, 454,
|
||||||
237, 357, 477, 3, 123, 243, 363, 33, 153, 273, 393, 63, 183, 303, 423,
|
22, 118, 214, 310, 406, 54, 150, 246, 342, 438, 86, 182, 278, 374, 470,
|
||||||
93, 213, 333, 453, 18, 138, 258, 378, 48, 168, 288, 408, 78, 198, 318,
|
10, 106, 202, 298, 394, 42, 138, 234, 330, 426, 74, 170, 266, 362, 458,
|
||||||
438, 108, 228, 348, 468, 8, 128, 248, 368, 38, 158, 278, 398, 68, 188,
|
26, 122, 218, 314, 410, 58, 154, 250, 346, 442, 90, 186, 282, 378, 474,
|
||||||
308, 428, 98, 218, 338, 458, 23, 143, 263, 383, 53, 173, 293, 413, 83,
|
14, 110, 206, 302, 398, 46, 142, 238, 334, 430, 78, 174, 270, 366, 462,
|
||||||
203, 323, 443, 113, 233, 353, 473, 13, 133, 253, 373, 43, 163, 283, 403,
|
30, 126, 222, 318, 414, 62, 158, 254, 350, 446, 94, 190, 286, 382, 478,
|
||||||
73, 193, 313, 433, 103, 223, 343, 463, 28, 148, 268, 388, 58, 178, 298,
|
3, 99, 195, 291, 387, 35, 131, 227, 323, 419, 67, 163, 259, 355, 451,
|
||||||
418, 88, 208, 328, 448, 118, 238, 358, 478, 4, 124, 244, 364, 34, 154,
|
19, 115, 211, 307, 403, 51, 147, 243, 339, 435, 83, 179, 275, 371, 467,
|
||||||
274, 394, 64, 184, 304, 424, 94, 214, 334, 454, 19, 139, 259, 379, 49,
|
7, 103, 199, 295, 391, 39, 135, 231, 327, 423, 71, 167, 263, 359, 455,
|
||||||
169, 289, 409, 79, 199, 319, 439, 109, 229, 349, 469, 9, 129, 249, 369,
|
23, 119, 215, 311, 407, 55, 151, 247, 343, 439, 87, 183, 279, 375, 471,
|
||||||
39, 159, 279, 399, 69, 189, 309, 429, 99, 219, 339, 459, 24, 144, 264,
|
11, 107, 203, 299, 395, 43, 139, 235, 331, 427, 75, 171, 267, 363, 459,
|
||||||
384, 54, 174, 294, 414, 84, 204, 324, 444, 114, 234, 354, 474, 14, 134,
|
27, 123, 219, 315, 411, 59, 155, 251, 347, 443, 91, 187, 283, 379, 475,
|
||||||
254, 374, 44, 164, 284, 404, 74, 194, 314, 434, 104, 224, 344, 464, 29,
|
15, 111, 207, 303, 399, 47, 143, 239, 335, 431, 79, 175, 271, 367, 463,
|
||||||
149, 269, 389, 59, 179, 299, 419, 89, 209, 329, 449, 119, 239, 359, 479,
|
31, 127, 223, 319, 415, 63, 159, 255, 351, 447, 95, 191, 287, 383, 479,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FFT_BITREV240
|
#ifndef FFT_BITREV240
|
||||||
#define FFT_BITREV240
|
#define FFT_BITREV240
|
||||||
static const opus_int16 fft_bitrev240[240] = {
|
static const opus_int16 fft_bitrev240[240] = {
|
||||||
0, 60, 120, 180, 15, 75, 135, 195, 30, 90, 150, 210, 45, 105, 165,
|
0, 48, 96, 144, 192, 16, 64, 112, 160, 208, 32, 80, 128, 176, 224,
|
||||||
225, 5, 65, 125, 185, 20, 80, 140, 200, 35, 95, 155, 215, 50, 110,
|
4, 52, 100, 148, 196, 20, 68, 116, 164, 212, 36, 84, 132, 180, 228,
|
||||||
170, 230, 10, 70, 130, 190, 25, 85, 145, 205, 40, 100, 160, 220, 55,
|
8, 56, 104, 152, 200, 24, 72, 120, 168, 216, 40, 88, 136, 184, 232,
|
||||||
115, 175, 235, 1, 61, 121, 181, 16, 76, 136, 196, 31, 91, 151, 211,
|
12, 60, 108, 156, 204, 28, 76, 124, 172, 220, 44, 92, 140, 188, 236,
|
||||||
46, 106, 166, 226, 6, 66, 126, 186, 21, 81, 141, 201, 36, 96, 156,
|
1, 49, 97, 145, 193, 17, 65, 113, 161, 209, 33, 81, 129, 177, 225,
|
||||||
216, 51, 111, 171, 231, 11, 71, 131, 191, 26, 86, 146, 206, 41, 101,
|
5, 53, 101, 149, 197, 21, 69, 117, 165, 213, 37, 85, 133, 181, 229,
|
||||||
161, 221, 56, 116, 176, 236, 2, 62, 122, 182, 17, 77, 137, 197, 32,
|
9, 57, 105, 153, 201, 25, 73, 121, 169, 217, 41, 89, 137, 185, 233,
|
||||||
92, 152, 212, 47, 107, 167, 227, 7, 67, 127, 187, 22, 82, 142, 202,
|
13, 61, 109, 157, 205, 29, 77, 125, 173, 221, 45, 93, 141, 189, 237,
|
||||||
37, 97, 157, 217, 52, 112, 172, 232, 12, 72, 132, 192, 27, 87, 147,
|
2, 50, 98, 146, 194, 18, 66, 114, 162, 210, 34, 82, 130, 178, 226,
|
||||||
207, 42, 102, 162, 222, 57, 117, 177, 237, 3, 63, 123, 183, 18, 78,
|
6, 54, 102, 150, 198, 22, 70, 118, 166, 214, 38, 86, 134, 182, 230,
|
||||||
138, 198, 33, 93, 153, 213, 48, 108, 168, 228, 8, 68, 128, 188, 23,
|
10, 58, 106, 154, 202, 26, 74, 122, 170, 218, 42, 90, 138, 186, 234,
|
||||||
83, 143, 203, 38, 98, 158, 218, 53, 113, 173, 233, 13, 73, 133, 193,
|
14, 62, 110, 158, 206, 30, 78, 126, 174, 222, 46, 94, 142, 190, 238,
|
||||||
28, 88, 148, 208, 43, 103, 163, 223, 58, 118, 178, 238, 4, 64, 124,
|
3, 51, 99, 147, 195, 19, 67, 115, 163, 211, 35, 83, 131, 179, 227,
|
||||||
184, 19, 79, 139, 199, 34, 94, 154, 214, 49, 109, 169, 229, 9, 69,
|
7, 55, 103, 151, 199, 23, 71, 119, 167, 215, 39, 87, 135, 183, 231,
|
||||||
129, 189, 24, 84, 144, 204, 39, 99, 159, 219, 54, 114, 174, 234, 14,
|
11, 59, 107, 155, 203, 27, 75, 123, 171, 219, 43, 91, 139, 187, 235,
|
||||||
74, 134, 194, 29, 89, 149, 209, 44, 104, 164, 224, 59, 119, 179, 239,
|
15, 63, 111, 159, 207, 31, 79, 127, 175, 223, 47, 95, 143, 191, 239,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FFT_BITREV120
|
#ifndef FFT_BITREV120
|
||||||
#define FFT_BITREV120
|
#define FFT_BITREV120
|
||||||
static const opus_int16 fft_bitrev120[120] = {
|
static const opus_int16 fft_bitrev120[120] = {
|
||||||
0, 30, 60, 90, 15, 45, 75, 105, 5, 35, 65, 95, 20, 50, 80,
|
0, 24, 48, 72, 96, 8, 32, 56, 80, 104, 16, 40, 64, 88, 112,
|
||||||
110, 10, 40, 70, 100, 25, 55, 85, 115, 1, 31, 61, 91, 16, 46,
|
4, 28, 52, 76, 100, 12, 36, 60, 84, 108, 20, 44, 68, 92, 116,
|
||||||
76, 106, 6, 36, 66, 96, 21, 51, 81, 111, 11, 41, 71, 101, 26,
|
1, 25, 49, 73, 97, 9, 33, 57, 81, 105, 17, 41, 65, 89, 113,
|
||||||
56, 86, 116, 2, 32, 62, 92, 17, 47, 77, 107, 7, 37, 67, 97,
|
5, 29, 53, 77, 101, 13, 37, 61, 85, 109, 21, 45, 69, 93, 117,
|
||||||
22, 52, 82, 112, 12, 42, 72, 102, 27, 57, 87, 117, 3, 33, 63,
|
2, 26, 50, 74, 98, 10, 34, 58, 82, 106, 18, 42, 66, 90, 114,
|
||||||
93, 18, 48, 78, 108, 8, 38, 68, 98, 23, 53, 83, 113, 13, 43,
|
6, 30, 54, 78, 102, 14, 38, 62, 86, 110, 22, 46, 70, 94, 118,
|
||||||
73, 103, 28, 58, 88, 118, 4, 34, 64, 94, 19, 49, 79, 109, 9,
|
3, 27, 51, 75, 99, 11, 35, 59, 83, 107, 19, 43, 67, 91, 115,
|
||||||
39, 69, 99, 24, 54, 84, 114, 14, 44, 74, 104, 29, 59, 89, 119,
|
7, 31, 55, 79, 103, 15, 39, 63, 87, 111, 23, 47, 71, 95, 119,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FFT_BITREV60
|
#ifndef FFT_BITREV60
|
||||||
#define FFT_BITREV60
|
#define FFT_BITREV60
|
||||||
static const opus_int16 fft_bitrev60[60] = {
|
static const opus_int16 fft_bitrev60[60] = {
|
||||||
0, 15, 30, 45, 5, 20, 35, 50, 10, 25, 40, 55, 1, 16, 31,
|
0, 12, 24, 36, 48, 4, 16, 28, 40, 52, 8, 20, 32, 44, 56,
|
||||||
46, 6, 21, 36, 51, 11, 26, 41, 56, 2, 17, 32, 47, 7, 22,
|
1, 13, 25, 37, 49, 5, 17, 29, 41, 53, 9, 21, 33, 45, 57,
|
||||||
37, 52, 12, 27, 42, 57, 3, 18, 33, 48, 8, 23, 38, 53, 13,
|
2, 14, 26, 38, 50, 6, 18, 30, 42, 54, 10, 22, 34, 46, 58,
|
||||||
28, 43, 58, 4, 19, 34, 49, 9, 24, 39, 54, 14, 29, 44, 59,
|
3, 15, 27, 39, 51, 7, 19, 31, 43, 55, 11, 23, 35, 47, 59,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ static const kiss_fft_state fft_state48000_960_0 = {
|
||||||
480, /* nfft */
|
480, /* nfft */
|
||||||
0.002083333f, /* scale */
|
0.002083333f, /* scale */
|
||||||
-1, /* shift */
|
-1, /* shift */
|
||||||
{4, 120, 4, 30, 2, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, }, /* factors */
|
{5, 96, 3, 32, 2, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, }, /* factors */
|
||||||
fft_bitrev480, /* bitrev */
|
fft_bitrev480, /* bitrev */
|
||||||
fft_twiddles48000_960, /* bitrev */
|
fft_twiddles48000_960, /* bitrev */
|
||||||
};
|
};
|
||||||
|
@ -440,7 +440,7 @@ static const kiss_fft_state fft_state48000_960_1 = {
|
||||||
240, /* nfft */
|
240, /* nfft */
|
||||||
0.004166667f, /* scale */
|
0.004166667f, /* scale */
|
||||||
1, /* shift */
|
1, /* shift */
|
||||||
{4, 60, 4, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
{5, 48, 3, 16, 4, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
||||||
fft_bitrev240, /* bitrev */
|
fft_bitrev240, /* bitrev */
|
||||||
fft_twiddles48000_960, /* bitrev */
|
fft_twiddles48000_960, /* bitrev */
|
||||||
};
|
};
|
||||||
|
@ -452,7 +452,7 @@ static const kiss_fft_state fft_state48000_960_2 = {
|
||||||
120, /* nfft */
|
120, /* nfft */
|
||||||
0.008333333f, /* scale */
|
0.008333333f, /* scale */
|
||||||
2, /* shift */
|
2, /* shift */
|
||||||
{4, 30, 2, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
{5, 24, 3, 8, 2, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
||||||
fft_bitrev120, /* bitrev */
|
fft_bitrev120, /* bitrev */
|
||||||
fft_twiddles48000_960, /* bitrev */
|
fft_twiddles48000_960, /* bitrev */
|
||||||
};
|
};
|
||||||
|
@ -464,7 +464,7 @@ static const kiss_fft_state fft_state48000_960_3 = {
|
||||||
60, /* nfft */
|
60, /* nfft */
|
||||||
0.016666667f, /* scale */
|
0.016666667f, /* scale */
|
||||||
3, /* shift */
|
3, /* shift */
|
||||||
{4, 15, 3, 5, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
{5, 12, 3, 4, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, /* factors */
|
||||||
fft_bitrev60, /* bitrev */
|
fft_bitrev60, /* bitrev */
|
||||||
fft_twiddles48000_960, /* bitrev */
|
fft_twiddles48000_960, /* bitrev */
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue