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/inv_sqrt_tbl.c 32 33 ------------------------------------------------------------------------------ 34 REVISION HISTORY 35 36 Description: Changed table name to inv_sqrt_tbl 37 38 Description: Added #ifdef __cplusplus and removed "extern" from table 39 definition. 40 41 Description: Put "extern" back. 42 43 Who: Date: 44 Description: 45 46 ------------------------------------------------------------------------------ 47 MODULE DESCRIPTION 48 49 This file contains the declaration for table[] used by the inv_sqrt function. 50 51 ------------------------------------------------------------------------------ 52 */ 53 54 /*---------------------------------------------------------------------------- 55 ; INCLUDES 56 ----------------------------------------------------------------------------*/ 57 #include "typedef.h" 58 #include "inv_sqrt.h" 59 60 /*--------------------------------------------------------------------------*/ 61 #ifdef __cplusplus 62 extern "C" 63 { 64 #endif 65 66 /*---------------------------------------------------------------------------- 67 ; MACROS 68 ; [Define module specific macros here] 69 ----------------------------------------------------------------------------*/ 70 71 /*---------------------------------------------------------------------------- 72 ; DEFINES 73 ; [Include all pre-processor statements here. Include conditional 74 ; compile variables also.] 75 ----------------------------------------------------------------------------*/ 76 77 /*---------------------------------------------------------------------------- 78 ; LOCAL FUNCTION DEFINITIONS 79 ; [List function prototypes here] 80 ----------------------------------------------------------------------------*/ 81 82 /*---------------------------------------------------------------------------- 83 ; LOCAL VARIABLE DEFINITIONS 84 ; [Variable declaration - defined here and used outside this module] 85 ----------------------------------------------------------------------------*/ 86 const Word16 inv_sqrt_tbl[49] = 87 { 88 89 32767, 31790, 30894, 30070, 29309, 28602, 27945, 27330, 26755, 26214, 90 25705, 25225, 24770, 24339, 23930, 23541, 23170, 22817, 22479, 22155, 91 21845, 21548, 21263, 20988, 20724, 20470, 20225, 19988, 19760, 19539, 92 19326, 19119, 18919, 18725, 18536, 18354, 18176, 18004, 17837, 17674, 93 17515, 17361, 17211, 17064, 16921, 16782, 16646, 16514, 16384 94 }; 95 96 /*--------------------------------------------------------------------------*/ 97 #ifdef __cplusplus 98 } 99 #endif 100 101 /* 102 ------------------------------------------------------------------------------ 103 FUNCTION NAME: 104 ------------------------------------------------------------------------------ 105 INPUT AND OUTPUT DEFINITIONS 106 107 Inputs: 108 None 109 110 Outputs: 111 None 112 113 Returns: 114 None 115 116 Global Variables Used: 117 None 118 119 Local Variables Needed: 120 None 121 122 ------------------------------------------------------------------------------ 123 FUNCTION DESCRIPTION 124 125 None 126 127 ------------------------------------------------------------------------------ 128 REQUIREMENTS 129 130 None 131 132 ------------------------------------------------------------------------------ 133 REFERENCES 134 135 [1] inv_sqrt.tab file, UMTS GSM AMR speech codec, R99 - Version 3.2.0, 136 March 2, 2001 137 138 ------------------------------------------------------------------------------ 139 PSEUDO-CODE 140 141 142 ------------------------------------------------------------------------------ 143 RESOURCES USED [optional] 144 145 When the code is written for a specific target processor the 146 the resources used should be documented below. 147 148 HEAP MEMORY USED: x bytes 149 150 STACK MEMORY USED: x bytes 151 152 CLOCK CYCLES: (cycle count equation for this function) + (variable 153 used to represent cycle count for each subroutine 154 called) 155 where: (cycle count variable) = cycle count for [subroutine 156 name] 157 158 ------------------------------------------------------------------------------ 159 CAUTION [optional] 160 [State any special notes, constraints or cautions for users of this function] 161 162 ------------------------------------------------------------------------------ 163 */ 164 165 /*---------------------------------------------------------------------------- 166 ; FUNCTION CODE 167 ----------------------------------------------------------------------------*/ 168 169