Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/fix/source/fft.c

Issue 2656823005: iSAC: Untangle some cyclic dependencies (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 /* 11 /*
12 * fft.c 12 * fft.c
13 * 13 *
14 * Fast Fourier Transform 14 * Fast Fourier Transform
15 * 15 *
16 */ 16 */
17 17
18 18
19 #include "fft.h" 19 #include "fft.h"
20 20
21 const int16_t kSortTabFft[240] = { 21 static const int16_t kSortTabFft[240] = {
22 0, 60, 120, 180, 20, 80, 140, 200, 40, 100, 160, 220, 22 0, 60, 120, 180, 20, 80, 140, 200, 40, 100, 160, 220,
23 4, 64, 124, 184, 24, 84, 144, 204, 44, 104, 164, 224, 23 4, 64, 124, 184, 24, 84, 144, 204, 44, 104, 164, 224,
24 8, 68, 128, 188, 28, 88, 148, 208, 48, 108, 168, 228, 24 8, 68, 128, 188, 28, 88, 148, 208, 48, 108, 168, 228,
25 12, 72, 132, 192, 32, 92, 152, 212, 52, 112, 172, 232, 25 12, 72, 132, 192, 32, 92, 152, 212, 52, 112, 172, 232,
26 16, 76, 136, 196, 36, 96, 156, 216, 56, 116, 176, 236, 26 16, 76, 136, 196, 36, 96, 156, 216, 56, 116, 176, 236,
27 1, 61, 121, 181, 21, 81, 141, 201, 41, 101, 161, 221, 27 1, 61, 121, 181, 21, 81, 141, 201, 41, 101, 161, 221,
28 5, 65, 125, 185, 25, 85, 145, 205, 45, 105, 165, 225, 28 5, 65, 125, 185, 25, 85, 145, 205, 45, 105, 165, 225,
29 9, 69, 129, 189, 29, 89, 149, 209, 49, 109, 169, 229, 29 9, 69, 129, 189, 29, 89, 149, 209, 49, 109, 169, 229,
30 13, 73, 133, 193, 33, 93, 153, 213, 53, 113, 173, 233, 30 13, 73, 133, 193, 33, 93, 153, 213, 53, 113, 173, 233,
31 17, 77, 137, 197, 37, 97, 157, 217, 57, 117, 177, 237, 31 17, 77, 137, 197, 37, 97, 157, 217, 57, 117, 177, 237,
32 2, 62, 122, 182, 22, 82, 142, 202, 42, 102, 162, 222, 32 2, 62, 122, 182, 22, 82, 142, 202, 42, 102, 162, 222,
33 6, 66, 126, 186, 26, 86, 146, 206, 46, 106, 166, 226, 33 6, 66, 126, 186, 26, 86, 146, 206, 46, 106, 166, 226,
34 10, 70, 130, 190, 30, 90, 150, 210, 50, 110, 170, 230, 34 10, 70, 130, 190, 30, 90, 150, 210, 50, 110, 170, 230,
35 14, 74, 134, 194, 34, 94, 154, 214, 54, 114, 174, 234, 35 14, 74, 134, 194, 34, 94, 154, 214, 54, 114, 174, 234,
36 18, 78, 138, 198, 38, 98, 158, 218, 58, 118, 178, 238, 36 18, 78, 138, 198, 38, 98, 158, 218, 58, 118, 178, 238,
37 3, 63, 123, 183, 23, 83, 143, 203, 43, 103, 163, 223, 37 3, 63, 123, 183, 23, 83, 143, 203, 43, 103, 163, 223,
38 7, 67, 127, 187, 27, 87, 147, 207, 47, 107, 167, 227, 38 7, 67, 127, 187, 27, 87, 147, 207, 47, 107, 167, 227,
39 11, 71, 131, 191, 31, 91, 151, 211, 51, 111, 171, 231, 39 11, 71, 131, 191, 31, 91, 151, 211, 51, 111, 171, 231,
40 15, 75, 135, 195, 35, 95, 155, 215, 55, 115, 175, 235, 40 15, 75, 135, 195, 35, 95, 155, 215, 55, 115, 175, 235,
41 19, 79, 139, 199, 39, 99, 159, 219, 59, 119, 179, 239 41 19, 79, 139, 199, 39, 99, 159, 219, 59, 119, 179, 239
42 }; 42 };
43 43
44 /* Cosine table in Q14 */ 44 /* Cosine table in Q14 */
45 const int16_t kCosTabFfftQ14[240] = { 45 static const int16_t kCosTabFfftQ14[240] = {
46 16384, 16378, 16362, 16333, 16294, 16244, 16182, 16110, 16026, 15931, 15826, 15709, 46 16384, 16378, 16362, 16333, 16294, 16244, 16182, 16110, 16026, 15931, 15826, 15709,
47 15582, 15444, 15296, 15137, 14968, 14788, 14598, 14399, 14189, 13970, 13741, 13502, 47 15582, 15444, 15296, 15137, 14968, 14788, 14598, 14399, 14189, 13970, 13741, 13502,
48 13255, 12998, 12733, 12458, 12176, 11885, 11585, 11278, 10963, 10641, 10311, 9974, 48 13255, 12998, 12733, 12458, 12176, 11885, 11585, 11278, 10963, 10641, 10311, 9974,
49 9630, 9280, 8923, 8561, 8192, 7818, 7438, 7053, 6664, 6270, 5872, 5469, 49 9630, 9280, 8923, 8561, 8192, 7818, 7438, 7053, 6664, 6270, 5872, 5469,
50 5063, 4653, 4240, 3825, 3406, 2986, 2563, 2139, 1713, 1285, 857, 429, 50 5063, 4653, 4240, 3825, 3406, 2986, 2563, 2139, 1713, 1285, 857, 429,
51 0, -429, -857, -1285, -1713, -2139, -2563, -2986, -3406, -3825, -4 240, -4653, 51 0, -429, -857, -1285, -1713, -2139, -2563, -2986, -3406, -3825, -4 240, -4653,
52 -5063, -5469, -5872, -6270, -6664, -7053, -7438, -7818, -8192, -8561, -8923, -9280, 52 -5063, -5469, -5872, -6270, -6664, -7053, -7438, -7818, -8192, -8561, -8923, -9280,
53 -9630, -9974, -10311, -10641, -10963, -11278, -11585, -11885, -12176, -12458, -12733, -12998, 53 -9630, -9974, -10311, -10641, -10963, -11278, -11585, -11885, -12176, -12458, -12733, -12998,
54 -13255, -13502, -13741, -13970, -14189, -14399, -14598, -14788, -14968, -15137 , -15296, -15444, 54 -13255, -13502, -13741, -13970, -14189, -14399, -14598, -14788, -14968, -15137 , -15296, -15444,
55 -15582, -15709, -15826, -15931, -16026, -16110, -16182, -16244, -16294, -16333 , -16362, -16378, 55 -15582, -15709, -15826, -15931, -16026, -16110, -16182, -16244, -16294, -16333 , -16362, -16378,
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // 18891 30451 406 // 18891 30451
407 // 407 //
408 // If this FFT is called 2 time each frame, i.e. 67 times per second, it will correspond to 408 // If this FFT is called 2 time each frame, i.e. 67 times per second, it will correspond to
409 // a C54 complexity of 67*18891/1000000 = 1.27 MIPS with 16x16-muls, and 67*30 451/1000000 = 409 // a C54 complexity of 67*18891/1000000 = 1.27 MIPS with 16x16-muls, and 67*30 451/1000000 =
410 // = 2.04 MIPS with 16x32-muls. Note that this routine somtimes is called 6 ti mes during the 410 // = 2.04 MIPS with 16x32-muls. Note that this routine somtimes is called 6 ti mes during the
411 // encoding of a frame, i.e. the max complexity would be 7/2*1.27 = 4.4 MIPS f or the 16x16 mul case. 411 // encoding of a frame, i.e. the max complexity would be 7/2*1.27 = 4.4 MIPS f or the 16x16 mul case.
412 412
413 413
414 return 0; 414 return 0;
415 } 415 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698