1 /*
2  * Copyright (C) 2004-2010 NXP Software
3  * Copyright (C) 2010 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __LVEQNB_COEFFS_H__
19 #define __LVEQNB_COEFFS_H__
20 
21 /************************************************************************************/
22 /*                                                                                  */
23 /* Gain table for (10^(Gain/20) - 1)                                                */
24 /*                                                                                  */
25 /************************************************************************************/
26 #define LVEQNB_Gain_Neg15_dB                             (-0.822172f)
27 #define LVEQNB_Gain_Neg14_dB                             (-0.800474f)
28 #define LVEQNB_Gain_Neg13_dB                             (-0.776128f)
29 #define LVEQNB_Gain_Neg12_dB                             (-0.748811f)
30 #define LVEQNB_Gain_Neg11_dB                             (-0.718162f)
31 #define LVEQNB_Gain_Neg10_dB                             (-0.683772f)
32 #define LVEQNB_Gain_Neg9_dB                              (-0.645187f)
33 #define LVEQNB_Gain_Neg8_dB                              (-0.601893f)
34 #define LVEQNB_Gain_Neg7_dB                              (-0.553316f)
35 #define LVEQNB_Gain_Neg6_dB                              (-0.498813f)
36 #define LVEQNB_Gain_Neg5_dB                              (-0.437659f)
37 #define LVEQNB_Gain_Neg4_dB                              (-0.369043f)
38 #define LVEQNB_Gain_Neg3_dB                              (-0.292054f)
39 #define LVEQNB_Gain_Neg2_dB                              (-0.205672f)
40 #define LVEQNB_Gain_Neg1_dB                              (-0.108749f)
41 #define LVEQNB_Gain_0_dB                                  0.000000f
42 #define LVEQNB_Gain_1_dB                                  0.122018f
43 #define LVEQNB_Gain_2_dB                                  0.258925f
44 #define LVEQNB_Gain_3_dB                                  0.412538f
45 #define LVEQNB_Gain_4_dB                                  0.584893f
46 #define LVEQNB_Gain_5_dB                                  0.778279f
47 #define LVEQNB_Gain_6_dB                                  0.995262f
48 #define LVEQNB_Gain_7_dB                                  1.238721f
49 #define LVEQNB_Gain_8_dB                                  1.511886f
50 #define LVEQNB_Gain_9_dB                                  1.818383f
51 #define LVEQNB_Gain_10_dB                                 2.162278f
52 #define LVEQNB_Gain_11_dB                                 2.548134f
53 #define LVEQNB_Gain_12_dB                                 2.981072f
54 #define LVEQNB_Gain_13_dB                                 3.466836f
55 #define LVEQNB_Gain_14_dB                                 4.011872f
56 #define LVEQNB_Gain_15_dB                                 4.623413f
57 
58 /************************************************************************************/
59 /*                                                                                  */
60 /* Frequency table for 2*Pi/Fs                                                      */
61 /*                                                                                  */
62 /************************************************************************************/
63 #define LVEQNB_2PiOn_8000                                0.000785f
64 #define LVEQNB_2PiOn_11025                               0.000570f
65 #define LVEQNB_2PiOn_12000                               0.000524f
66 #define LVEQNB_2PiOn_16000                               0.000393f
67 #define LVEQNB_2PiOn_22050                               0.000285f
68 #define LVEQNB_2PiOn_24000                               0.000262f
69 #define LVEQNB_2PiOn_32000                               0.000196f
70 #define LVEQNB_2PiOn_44100                               0.000142f
71 #define LVEQNB_2PiOn_48000                               0.000131f
72 
73 #define LVEQNB_2PiOn_88200                               0.000071f
74 #define LVEQNB_2PiOn_96000                               0.000065f
75 #define LVEQNB_2PiOn_176400                              0.000036f
76 #define LVEQNB_2PiOn_192000                              0.000033f
77 
78 /************************************************************************************/
79 /*                                                                                  */
80 /* 50D table for 50 / ( 1 + Gain )                                                  */
81 /*                                                                                  */
82 /************************************************************************************/
83 #define LVEQNB_100D_Neg15_dB                             5.623413f
84 #define LVEQNB_100D_Neg14_dB                             5.011872f
85 #define LVEQNB_100D_Neg13_dB                             4.466836f
86 #define LVEQNB_100D_Neg12_dB                             3.981072f
87 #define LVEQNB_100D_Neg11_dB                             3.548134f
88 #define LVEQNB_100D_Neg10_dB                             3.162278f
89 #define LVEQNB_100D_Neg9_dB                              2.818383f
90 #define LVEQNB_100D_Neg8_dB                              2.511886f
91 #define LVEQNB_100D_Neg7_dB                              2.238721f
92 #define LVEQNB_100D_Neg6_dB                              1.995262f
93 #define LVEQNB_100D_Neg5_dB                              1.778279f
94 #define LVEQNB_100D_Neg4_dB                              1.584893f
95 #define LVEQNB_100D_Neg3_dB                              1.412538f
96 #define LVEQNB_100D_Neg2_dB                              1.258925f
97 #define LVEQNB_100D_Neg1_dB                              1.122018f
98 #define LVEQNB_100D_0_dB                                 1.000000f
99 
100 #endif
101