Git init
[external/opencore-amr.git] / opencore / codecs_v2 / audio / gsm_amr / amr_nb / common / src / lsp_lsf_tbl.cpp
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /****************************************************************************************
19 Portions of this file are derived from the following 3GPP standard:
20
21     3GPP TS 26.073
22     ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
23     Available from http://www.3gpp.org
24
25 (C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
26 Permission to distribute, modify and use this file under the standard license
27 terms listed above has been obtained from the copyright holder.
28 ****************************************************************************************/
29 /*
30  Filename: lsp_lsf_tbl.cpp
31
32 ------------------------------------------------------------------------------
33  MODULE DESCRIPTION
34
35 ------------------------------------------------------------------------------
36 */
37
38 /*----------------------------------------------------------------------------
39 ; INCLUDES
40 ----------------------------------------------------------------------------*/
41 #include "typedef.h"
42
43 /*--------------------------------------------------------------------------*/
44 #ifdef __cplusplus
45 extern "C"
46 {
47 #endif
48
49     /*----------------------------------------------------------------------------
50     ; MACROS
51     ; [Define module specific macros here]
52     ----------------------------------------------------------------------------*/
53
54     /*----------------------------------------------------------------------------
55     ; DEFINES
56     ; [Include all pre-processor statements here. Include conditional
57     ; compile variables also.]
58     ----------------------------------------------------------------------------*/
59
60     /*----------------------------------------------------------------------------
61     ; LOCAL FUNCTION DEFINITIONS
62     ; [List function prototypes here]
63     ----------------------------------------------------------------------------*/
64
65     /*----------------------------------------------------------------------------
66     ; LOCAL VARIABLE DEFINITIONS
67     ; [Variable declaration - defined here and used outside this module]
68     ----------------------------------------------------------------------------*/
69
70     extern const Word16 table[];
71     const Word16 table[65] =
72     {
73         32767, 32729, 32610, 32413, 32138, 31786, 31357, 30853,
74         30274, 29622, 28899, 28106, 27246, 26320, 25330, 24279,
75         23170, 22006, 20788, 19520, 18205, 16846, 15447, 14010,
76         12540, 11039, 9512, 7962, 6393, 4808, 3212, 1608,
77         0, -1608, -3212, -4808, -6393, -7962, -9512, -11039,
78         -12540, -14010, -15447, -16846, -18205, -19520, -20788, -22006,
79         -23170, -24279, -25330, -26320, -27246, -28106, -28899, -29622,
80         -30274, -30853, -31357, -31786, -32138, -32413, -32610, -32729,
81         (Word16) 0x8000
82     };
83
84     /* 0x8000 = -32768 (used to silence the compiler) */
85
86     /* slope used to compute y = acos(x) */
87
88     extern const Word16 slope[];
89     const Word16 slope[64] =
90     {
91         -26887, -8812, -5323, -3813, -2979, -2444, -2081, -1811,
92         -1608, -1450, -1322, -1219, -1132, -1059, -998, -946,
93         -901, -861, -827, -797, -772, -750, -730, -713,
94         -699, -687, -677, -668, -662, -657, -654, -652,
95         -652, -654, -657, -662, -668, -677, -687, -699,
96         -713, -730, -750, -772, -797, -827, -861, -901,
97         -946, -998, -1059, -1132, -1219, -1322, -1450, -1608,
98         -1811, -2081, -2444, -2979, -3813, -5323, -8812, -26887
99     };
100
101     /*--------------------------------------------------------------------------*/
102 #ifdef __cplusplus
103 }
104 #endif
105