Git init
[external/opencore-amr.git] / opencore / codecs_v2 / audio / gsm_amr / amr_nb / common / src / grid_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
31  Filename: grid_tbl.cpp
32
33 ------------------------------------------------------------------------------
34  MODULE DESCRIPTION
35
36  This file contains the declaration for grid_tbl[] used by the az_lsp()
37  function.
38
39  //  Table for az_lsp()
40  //
41  // grid[0] = 1.0;
42  // grid[grid_points+1] = -1.0;
43  // for (i = 1; i < grid_points; i++)
44  //   grid[i] = cos((6.283185307*i)/(2.0*grid_points));
45  //
46  //
47
48 ------------------------------------------------------------------------------
49 */
50
51 /*----------------------------------------------------------------------------
52 ; INCLUDES
53 ----------------------------------------------------------------------------*/
54 #include "az_lsp.h"
55
56 /*--------------------------------------------------------------------------*/
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61
62     /*----------------------------------------------------------------------------
63     ; MACROS
64     ; [Define module specific macros here]
65     ----------------------------------------------------------------------------*/
66
67     /*----------------------------------------------------------------------------
68     ; DEFINES
69     ; [Include all pre-processor statements here. Include conditional
70     ; compile variables also.]
71     ----------------------------------------------------------------------------*/
72 #define grid_points 60
73
74     /*----------------------------------------------------------------------------
75     ; LOCAL FUNCTION DEFINITIONS
76     ; [List function prototypes here]
77     ----------------------------------------------------------------------------*/
78
79     /*----------------------------------------------------------------------------
80     ; LOCAL VARIABLE DEFINITIONS
81     ; [Variable declaration - defined here and used outside this module]
82     ----------------------------------------------------------------------------*/
83     const Word16 grid[grid_points + 1] =
84     {
85         32760, 32723, 32588, 32364, 32051, 31651,
86         31164, 30591, 29935, 29196, 28377, 27481,
87         26509, 25465, 24351, 23170, 21926, 20621,
88         19260, 17846, 16384, 14876, 13327, 11743,
89         10125, 8480, 6812, 5126, 3425, 1714,
90         0, -1714, -3425, -5126, -6812, -8480,
91         -10125, -11743, -13327, -14876, -16384, -17846,
92         -19260, -20621, -21926, -23170, -24351, -25465,
93         -26509, -27481, -28377, -29196, -29935, -30591,
94         -31164, -31651, -32051, -32364, -32588, -32723,
95         -32760
96     };
97
98     /*--------------------------------------------------------------------------*/
99 #ifdef __cplusplus
100 }
101 #endif
102
103 /*
104 ------------------------------------------------------------------------------
105  FUNCTION NAME:
106 ------------------------------------------------------------------------------
107  INPUT AND OUTPUT DEFINITIONS
108
109  Inputs:
110     None
111
112  Outputs:
113     None
114
115  Returns:
116     None
117
118  Global Variables Used:
119     None
120
121  Local Variables Needed:
122     None
123
124 ------------------------------------------------------------------------------
125  FUNCTION DESCRIPTION
126
127  None
128
129 ------------------------------------------------------------------------------
130  REQUIREMENTS
131
132  None
133
134 ------------------------------------------------------------------------------
135  REFERENCES
136
137  [1] grid.tab,  UMTS GSM AMR speech codec, R99 - Version 3.2.0, March 2, 2001
138
139 ------------------------------------------------------------------------------
140  PSEUDO-CODE
141
142
143 ------------------------------------------------------------------------------
144  CAUTION [optional]
145  [State any special notes, constraints or cautions for users of this function]
146
147 ------------------------------------------------------------------------------
148 */
149
150 /*----------------------------------------------------------------------------
151 ; FUNCTION CODE
152 ----------------------------------------------------------------------------*/
153