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/sqrt_l_tbl.c 32 33 ------------------------------------------------------------------------------ 34 REVISION HISTORY 35 36 Description: Changed the table name to sqrt_l_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 sqrt_l_table[] used by the sqrt_l_exp 50 function. 51 52 sqrt_l_tbl[i] = sqrt((i+16)*2^-6) * 2^15, i.e. sqrt(x) scaled Q15 53 54 ------------------------------------------------------------------------------ 55 */ 56 57 /*---------------------------------------------------------------------------- 58 ; INCLUDES 59 ----------------------------------------------------------------------------*/ 60 #include "typedef.h" 61 62 /*--------------------------------------------------------------------------*/ 63 #ifdef __cplusplus 64 extern "C" 65 { 66 #endif 67 68 /*---------------------------------------------------------------------------- 69 ; MACROS 70 ; [Define module specific macros here] 71 ----------------------------------------------------------------------------*/ 72 73 /*---------------------------------------------------------------------------- 74 ; DEFINES 75 ; [Include all pre-processor statements here. Include conditional 76 ; compile variables also.] 77 ----------------------------------------------------------------------------*/ 78 79 /*---------------------------------------------------------------------------- 80 ; LOCAL FUNCTION DEFINITIONS 81 ; [List function prototypes here] 82 ----------------------------------------------------------------------------*/ 83 84 /*---------------------------------------------------------------------------- 85 ; LOCAL VARIABLE DEFINITIONS 86 ; [Variable declaration - defined here and used outside this module] 87 ----------------------------------------------------------------------------*/ 88 extern const Word16 sqrt_l_tbl[50] = 89 { 90 16384, 16888, 17378, 17854, 18318, 18770, 19212, 19644, 20066, 20480, 91 20886, 21283, 21674, 22058, 22435, 22806, 23170, 23530, 23884, 24232, 92 24576, 24915, 25249, 25580, 25905, 26227, 26545, 26859, 27170, 27477, 93 27780, 28081, 28378, 28672, 28963, 29251, 29537, 29819, 30099, 30377, 94 30652, 30924, 31194, 31462, 31727, 31991, 32252, 32511, 32767, 32767 95 }; 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] inv_sqrt.tab file, UMTS GSM AMR speech codec, R99 - Version 3.2.0, 138 March 2, 2001 139 140 ------------------------------------------------------------------------------ 141 PSEUDO-CODE 142 143 144 ------------------------------------------------------------------------------ 145 RESOURCES USED [optional] 146 147 When the code is written for a specific target processor the 148 the resources used should be documented below. 149 150 HEAP MEMORY USED: x bytes 151 152 STACK MEMORY USED: x bytes 153 154 CLOCK CYCLES: (cycle count equation for this function) + (variable 155 used to represent cycle count for each subroutine 156 called) 157 where: (cycle count variable) = cycle count for [subroutine 158 name] 159 160 ------------------------------------------------------------------------------ 161 CAUTION [optional] 162 [State any special notes, constraints or cautions for users of this function] 163 164 ------------------------------------------------------------------------------ 165 */ 166 167 /*---------------------------------------------------------------------------- 168 ; FUNCTION CODE 169 ----------------------------------------------------------------------------*/ 170 171