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: /audio/gsm_amr/c/src/pow2_tbl.c
32 
33 ------------------------------------------------------------------------------
34  REVISION HISTORY
35 
36  Description: Added #ifdef __cplusplus and removed "extern" from table
37               definition.
38 
39  Description: Put "extern" back.
40 
41  Who:                       Date:
42  Description:
43 
44 ------------------------------------------------------------------------------
45  MODULE DESCRIPTION
46 
47  This file contains the declaration for log2_tbl[] used by the Pow2() function.
48 
49 ------------------------------------------------------------------------------
50 */
51 
52 /*----------------------------------------------------------------------------
53 ; INCLUDES
54 ----------------------------------------------------------------------------*/
55 #include "typedef.h"
56 #include "pow2.h"
57 
58 /*--------------------------------------------------------------------------*/
59 #ifdef __cplusplus
60 extern "C"
61 {
62 #endif
63 
64     /*----------------------------------------------------------------------------
65     ; MACROS
66     ; [Define module specific macros here]
67     ----------------------------------------------------------------------------*/
68 
69     /*----------------------------------------------------------------------------
70     ; DEFINES
71     ; [Include all pre-processor statements here. Include conditional
72     ; compile variables also.]
73     ----------------------------------------------------------------------------*/
74 
75     /*----------------------------------------------------------------------------
76     ; LOCAL FUNCTION DEFINITIONS
77     ; [List function prototypes here]
78     ----------------------------------------------------------------------------*/
79 
80     /*----------------------------------------------------------------------------
81     ; LOCAL VARIABLE DEFINITIONS
82     ; [Variable declaration - defined here and used outside this module]
83     ----------------------------------------------------------------------------*/
84 
85     const Word16 pow2_tbl[33] =
86     {
87         16384, 16743, 17109, 17484, 17867, 18258, 18658, 19066, 19484, 19911,
88         20347, 20792, 21247, 21713, 22188, 22674, 23170, 23678, 24196, 24726,
89         25268, 25821, 26386, 26964, 27554, 28158, 28774, 29405, 30048, 30706,
90         31379, 32066, 32767
91     };
92 
93     /*--------------------------------------------------------------------------*/
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 /*
99 ------------------------------------------------------------------------------
100  FUNCTION NAME:
101 ------------------------------------------------------------------------------
102  INPUT AND OUTPUT DEFINITIONS
103 
104  Inputs:
105     None
106 
107  Outputs:
108     None
109 
110  Returns:
111     None
112 
113  Global Variables Used:
114     None
115 
116  Local Variables Needed:
117     None
118 
119 ------------------------------------------------------------------------------
120  FUNCTION DESCRIPTION
121 
122  None
123 
124 ------------------------------------------------------------------------------
125  REQUIREMENTS
126 
127  None
128 
129 ------------------------------------------------------------------------------
130  REFERENCES
131 
132  [1] pow2.tab,  UMTS GSM AMR speech codec, R99 - Version 3.2.0, March 2, 2001
133 
134 ------------------------------------------------------------------------------
135  PSEUDO-CODE
136 
137 
138 ------------------------------------------------------------------------------
139  RESOURCES USED [optional]
140 
141  When the code is written for a specific target processor the
142  the resources used should be documented below.
143 
144  HEAP MEMORY USED: x bytes
145 
146  STACK MEMORY USED: x bytes
147 
148  CLOCK CYCLES: (cycle count equation for this function) + (variable
149                 used to represent cycle count for each subroutine
150                 called)
151      where: (cycle count variable) = cycle count for [subroutine
152                                      name]
153 
154 ------------------------------------------------------------------------------
155  CAUTION [optional]
156  [State any special notes, constraints or cautions for users of this function]
157 
158 ------------------------------------------------------------------------------
159 */
160 
161 /*----------------------------------------------------------------------------
162 ; FUNCTION CODE
163 ----------------------------------------------------------------------------*/
164 
165