Initialize Tizen 2.3
[external/opencore-amr.git] / opencore / codecs_v2 / audio / gsm_amr / amr_nb / enc / src / inter_36_tab.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
32  Filename: inter_36_tab.cpp
33
34 ------------------------------------------------------------------------------
35  INPUT AND OUTPUT DEFINITIONS
36
37  Inputs:
38     None
39
40  Local Stores/Buffers/Pointers Needed:
41     None
42
43  Global Stores/Buffers/Pointers Needed:
44     None
45
46  Outputs:
47     None
48
49  Pointers and Buffers Modified:
50     None
51
52  Local Stores Modified:
53     None
54
55  Global Stores Modified:
56     None
57
58 ------------------------------------------------------------------------------
59  FUNCTION DESCRIPTION
60
61       File             : inter_36.tab
62       Purpose          : Tables for interpolating the normalized correlation
63                          with 1/3 or 1/6 resolution.
64
65
66 ------------------------------------------------------------------------------
67  REQUIREMENTS
68
69  None
70
71 ------------------------------------------------------------------------------
72  REFERENCES
73
74  None
75
76 ------------------------------------------------------------------------------
77  PSEUDO-CODE
78
79
80 ------------------------------------------------------------------------------
81 */
82
83
84 /*----------------------------------------------------------------------------
85 ; INCLUDES
86 ----------------------------------------------------------------------------*/
87 #include "inter_36_tab.h"
88
89 /*--------------------------------------------------------------------------*/
90 #ifdef __cplusplus
91 extern "C"
92 {
93 #endif
94
95     /*----------------------------------------------------------------------------
96     ; MACROS
97     ; Define module specific macros here
98     ----------------------------------------------------------------------------*/
99
100
101     /*----------------------------------------------------------------------------
102     ; DEFINES
103     ; Include all pre-processor statements here. Include conditional
104     ; compile variables also.
105     ----------------------------------------------------------------------------*/
106 #define UP_SAMP_MAX  6
107 #define FIR_SIZE     (UP_SAMP_MAX*L_INTER_SRCH+1)
108
109     /*----------------------------------------------------------------------------
110     ; LOCAL FUNCTION DEFINITIONS
111     ; Function Prototype declaration
112     ----------------------------------------------------------------------------*/
113
114
115     /*----------------------------------------------------------------------------
116     ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
117     ; Variable declaration - defined here and used outside this module
118     ----------------------------------------------------------------------------*/
119     /* 1/6 resolution interpolation filter  (-3 dB at 3600 Hz) */
120     /* Note: The IS641 (7.4) 1/3 resolution filter is simply a subsampled
121              version of the 1/6 resolution filter, i.e. it uses
122              every second coefficient:
123
124              inter_3[k] = inter_6[2*k], 0 <= k <= 3*L_INTER_SRCH
125      */
126
127     const Word16 inter_6[FIR_SIZE] =
128     {
129         29519,
130         28316, 24906, 19838, 13896, 7945, 2755,
131         -1127, -3459, -4304, -3969, -2899, -1561,
132         -336, 534, 970, 1023, 823, 516,
133         220, 0, -131, -194, -215, 0
134     };
135
136     /*----------------------------------------------------------------------------
137     ; EXTERNAL FUNCTION REFERENCES
138     ; Declare functions defined elsewhere and referenced in this module
139     ----------------------------------------------------------------------------*/
140
141
142     /*----------------------------------------------------------------------------
143     ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
144     ; Declare variables used in this module but defined elsewhere
145     ----------------------------------------------------------------------------*/
146
147
148     /*--------------------------------------------------------------------------*/
149 #ifdef __cplusplus
150 }
151 #endif
152
153 /*----------------------------------------------------------------------------
154 ; FUNCTION CODE
155 ----------------------------------------------------------------------------*/
156
157 /*----------------------------------------------------------------------------
158 ; Define all local variables
159 ----------------------------------------------------------------------------*/
160
161
162 /*----------------------------------------------------------------------------
163 ; Function body here
164 ----------------------------------------------------------------------------*/
165
166
167 /*----------------------------------------------------------------------------
168 ; Return nothing or data or data pointer
169 ----------------------------------------------------------------------------*/
170
171
172
173
174