Project Ne10
An open, optimized software library for the ARM architecture.
NE10_fft_common_varibles.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-16 ARM Limited and Contributors.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of ARM Limited nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY ARM LIMITED AND CONTRIBUTORS "AS IS" AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 /*
29  * NE10 Library : dsp/NE10_fft_common_varibles.h
30  */
31 
32 #include "NE10_types.h"
33 
34 #ifndef NE10_FFT_COMMON_VARIBLES_H
35 #define NE10_FFT_COMMON_VARIBLES_H
36 
38 // common varibles
40 
41 /* Twiddles used in Radix-8 FFT */
42 const static ne10_float32_t TW_81_F32 = 0.70710678; // sqrt (2) / 2
43 const static ne10_float32_t TW_81N_F32 = -0.70710678; // - TW_81_F32
44 
45 /* Twiddles used in Radix-5 FFT */
46 const static ne10_fft_cpx_float32_t TW_5A_F32 =
47  {
48  0.309016994374947, // cos (2 * pi / 5)
49  -0.951056516295154 // - sin (2 * pi / 5)
50  };
51 const static ne10_fft_cpx_int32_t TW_5A_S32 =
52  {
53  663608942, // round (TW_5A_F32.r * 2^31)
54  -2042378317 // round (TW_5A_F32.i * 2^31)
55  };
56 
57 const static ne10_fft_cpx_float32_t TW_5B_F32 =
58  {
59  -0.809016994374947, // cos (4 * pi / 5)
60  -0.587785252292473 // - sin (4 * pi / 5)
61  };
62 const static ne10_fft_cpx_int32_t TW_5B_S32 =
63  {
64  -1737350766, // round (TW_5B_F32.r * 2^31)
65  -1262259218 // round (TW_5B_F32.i * 2^31)
66  };
67 
68 /* Twiddles used in Radix-3 FFT */
69 const static ne10_float32_t TW_3I_F32 = 0.866025403784439; // sqrt (3) / 2
70 const static ne10_float32_t TW_3IN_F32 = - 0.866025403784439; // - TW_3IN_F32
71 const static ne10_int32_t TW_3I_S32 = 1859775393; // round (TW_3I_F32 * 2^31)
72 const static ne10_int32_t TW_3IN_S32 = -1859775393; // round (TW_3IN_F32 * 2^31)
73 
74 #endif // NE10_FFT_COMMON_VARIBLES_H
int32_t ne10_int32_t
Definition: NE10_types.h:76
float ne10_float32_t
Definition: NE10_types.h:80
Structure for the 32-bit fixed point FFT function.
Definition: NE10_types.h:325