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 Pathname: .audio/gsm-amr/c/src/inter_36_tab.c 33 34 Date: 02/01/2002 35 36 ------------------------------------------------------------------------------ 37 REVISION HISTORY 38 39 Description: Changed tables from static const to just const. 40 41 Description: Added #ifdef __cplusplus and removed "extern" from table 42 definition. Removed corresponding header file from Include 43 section. 44 45 Description: Put "extern" back. 46 47 Description: 48 49 ------------------------------------------------------------------------------ 50 INPUT AND OUTPUT DEFINITIONS 51 52 Inputs: 53 None 54 55 Local Stores/Buffers/Pointers Needed: 56 None 57 58 Global Stores/Buffers/Pointers Needed: 59 None 60 61 Outputs: 62 None 63 64 Pointers and Buffers Modified: 65 None 66 67 Local Stores Modified: 68 None 69 70 Global Stores Modified: 71 None 72 73 ------------------------------------------------------------------------------ 74 FUNCTION DESCRIPTION 75 76 File : inter_36.tab 77 Purpose : Tables for interpolating the normalized correlation 78 with 1/3 or 1/6 resolution. 79 80 81 ------------------------------------------------------------------------------ 82 REQUIREMENTS 83 84 None 85 86 ------------------------------------------------------------------------------ 87 REFERENCES 88 89 None 90 91 ------------------------------------------------------------------------------ 92 PSEUDO-CODE 93 94 95 ------------------------------------------------------------------------------ 96 RESOURCES USED 97 When the code is written for a specific target processor the 98 the resources used should be documented below. 99 100 STACK USAGE: [stack count for this module] + [variable to represent 101 stack usage for each subroutine called] 102 103 where: [stack usage variable] = stack usage for [subroutine 104 name] (see [filename].ext) 105 106 DATA MEMORY USED: x words 107 108 PROGRAM MEMORY USED: x words 109 110 CLOCK CYCLES: [cycle count equation for this module] + [variable 111 used to represent cycle count for each subroutine 112 called] 113 114 where: [cycle count variable] = cycle count for [subroutine 115 name] (see [filename].ext) 116 117 ------------------------------------------------------------------------------ 118 */ 119 120 121 /*---------------------------------------------------------------------------- 122 ; INCLUDES 123 ----------------------------------------------------------------------------*/ 124 #include "typedef.h" 125 #include "cnst.h" 126 #include "inter_36_tab.h" 127 128 /*--------------------------------------------------------------------------*/ 129 #ifdef __cplusplus 130 extern "C" 131 { 132 #endif 133 134 /*---------------------------------------------------------------------------- 135 ; MACROS 136 ; Define module specific macros here 137 ----------------------------------------------------------------------------*/ 138 139 140 /*---------------------------------------------------------------------------- 141 ; DEFINES 142 ; Include all pre-processor statements here. Include conditional 143 ; compile variables also. 144 ----------------------------------------------------------------------------*/ 145 #define UP_SAMP_MAX 6 146 #define FIR_SIZE (UP_SAMP_MAX*L_INTER_SRCH+1) 147 148 /*---------------------------------------------------------------------------- 149 ; LOCAL FUNCTION DEFINITIONS 150 ; Function Prototype declaration 151 ----------------------------------------------------------------------------*/ 152 153 154 /*---------------------------------------------------------------------------- 155 ; LOCAL STORE/BUFFER/POINTER DEFINITIONS 156 ; Variable declaration - defined here and used outside this module 157 ----------------------------------------------------------------------------*/ 158 /* 1/6 resolution interpolation filter (-3 dB at 3600 Hz) */ 159 /* Note: The IS641 (7.4) 1/3 resolution filter is simply a subsampled 160 version of the 1/6 resolution filter, i.e. it uses 161 every second coefficient: 162 163 inter_3[k] = inter_6[2*k], 0 <= k <= 3*L_INTER_SRCH 164 */ 165 166 const Word16 inter_6[FIR_SIZE] = 167 { 168 29519, 169 28316, 24906, 19838, 13896, 7945, 2755, 170 -1127, -3459, -4304, -3969, -2899, -1561, 171 -336, 534, 970, 1023, 823, 516, 172 220, 0, -131, -194, -215, 0 173 }; 174 175 /*---------------------------------------------------------------------------- 176 ; EXTERNAL FUNCTION REFERENCES 177 ; Declare functions defined elsewhere and referenced in this module 178 ----------------------------------------------------------------------------*/ 179 180 181 /*---------------------------------------------------------------------------- 182 ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES 183 ; Declare variables used in this module but defined elsewhere 184 ----------------------------------------------------------------------------*/ 185 186 187 /*--------------------------------------------------------------------------*/ 188 #ifdef __cplusplus 189 } 190 #endif 191 192 /*---------------------------------------------------------------------------- 193 ; FUNCTION CODE 194 ----------------------------------------------------------------------------*/ 195 196 /*---------------------------------------------------------------------------- 197 ; Define all local variables 198 ----------------------------------------------------------------------------*/ 199 200 201 /*---------------------------------------------------------------------------- 202 ; Function body here 203 ----------------------------------------------------------------------------*/ 204 205 206 /*---------------------------------------------------------------------------- 207 ; Return nothing or data or data pointer 208 ----------------------------------------------------------------------------*/ 209 210 211 212 213 214