pow2_tbl.cpp revision 4f1efc098cb5791c3e9f483f2af84aef70d2d0a0
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/****************************************************************************************
19Portions 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)
26Permission to distribute, modify and use this file under the standard license
27terms 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
57/*--------------------------------------------------------------------------*/
58#ifdef __cplusplus
59extern "C"
60{
61#endif
62
63    /*----------------------------------------------------------------------------
64    ; MACROS
65    ; [Define module specific macros here]
66    ----------------------------------------------------------------------------*/
67
68    /*----------------------------------------------------------------------------
69    ; DEFINES
70    ; [Include all pre-processor statements here. Include conditional
71    ; compile variables also.]
72    ----------------------------------------------------------------------------*/
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
84    extern const Word16 pow2_tbl[33] =
85    {
86        16384, 16743, 17109, 17484, 17867, 18258, 18658, 19066, 19484, 19911,
87        20347, 20792, 21247, 21713, 22188, 22674, 23170, 23678, 24196, 24726,
88        25268, 25821, 26386, 26964, 27554, 28158, 28774, 29405, 30048, 30706,
89        31379, 32066, 32767
90    };
91
92    /*--------------------------------------------------------------------------*/
93#ifdef __cplusplus
94}
95#endif
96
97/*
98------------------------------------------------------------------------------
99 FUNCTION NAME:
100------------------------------------------------------------------------------
101 INPUT AND OUTPUT DEFINITIONS
102
103 Inputs:
104    None
105
106 Outputs:
107    None
108
109 Returns:
110    None
111
112 Global Variables Used:
113    None
114
115 Local Variables Needed:
116    None
117
118------------------------------------------------------------------------------
119 FUNCTION DESCRIPTION
120
121 None
122
123------------------------------------------------------------------------------
124 REQUIREMENTS
125
126 None
127
128------------------------------------------------------------------------------
129 REFERENCES
130
131 [1] pow2.tab,  UMTS GSM AMR speech codec, R99 - Version 3.2.0, March 2, 2001
132
133------------------------------------------------------------------------------
134 PSEUDO-CODE
135
136
137------------------------------------------------------------------------------
138 RESOURCES USED [optional]
139
140 When the code is written for a specific target processor the
141 the resources used should be documented below.
142
143 HEAP MEMORY USED: x bytes
144
145 STACK MEMORY USED: x bytes
146
147 CLOCK CYCLES: (cycle count equation for this function) + (variable
148                used to represent cycle count for each subroutine
149                called)
150     where: (cycle count variable) = cycle count for [subroutine
151                                     name]
152
153------------------------------------------------------------------------------
154 CAUTION [optional]
155 [State any special notes, constraints or cautions for users of this function]
156
157------------------------------------------------------------------------------
158*/
159
160/*----------------------------------------------------------------------------
161; FUNCTION CODE
162----------------------------------------------------------------------------*/
163
164