lsp_lsf_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 Filename: /audio/gsm_amr/c/src/lsp_lsf_tbl.c 31 32------------------------------------------------------------------------------ 33 REVISION HISTORY 34 35 Description: Created this file from the reference, lsp_lsf.tab 36 37 Description: Added #ifdef __cplusplus and removed "extern" from table 38 definition. 39 40 Description: Put "extern" back. 41 42------------------------------------------------------------------------------ 43 MODULE DESCRIPTION 44 45------------------------------------------------------------------------------ 46*/ 47 48/*---------------------------------------------------------------------------- 49; INCLUDES 50----------------------------------------------------------------------------*/ 51#include "typedef.h" 52 53/*--------------------------------------------------------------------------*/ 54#ifdef __cplusplus 55extern "C" 56{ 57#endif 58 59 /*---------------------------------------------------------------------------- 60 ; MACROS 61 ; [Define module specific macros here] 62 ----------------------------------------------------------------------------*/ 63 64 /*---------------------------------------------------------------------------- 65 ; DEFINES 66 ; [Include all pre-processor statements here. Include conditional 67 ; compile variables also.] 68 ----------------------------------------------------------------------------*/ 69 70 /*---------------------------------------------------------------------------- 71 ; LOCAL FUNCTION DEFINITIONS 72 ; [List function prototypes here] 73 ----------------------------------------------------------------------------*/ 74 75 /*---------------------------------------------------------------------------- 76 ; LOCAL VARIABLE DEFINITIONS 77 ; [Variable declaration - defined here and used outside this module] 78 ----------------------------------------------------------------------------*/ 79 80 extern const Word16 table[65] = 81 { 82 32767, 32729, 32610, 32413, 32138, 31786, 31357, 30853, 83 30274, 29622, 28899, 28106, 27246, 26320, 25330, 24279, 84 23170, 22006, 20788, 19520, 18205, 16846, 15447, 14010, 85 12540, 11039, 9512, 7962, 6393, 4808, 3212, 1608, 86 0, -1608, -3212, -4808, -6393, -7962, -9512, -11039, 87 -12540, -14010, -15447, -16846, -18205, -19520, -20788, -22006, 88 -23170, -24279, -25330, -26320, -27246, -28106, -28899, -29622, 89 -30274, -30853, -31357, -31786, -32138, -32413, -32610, -32729, 90 (Word16) 0x8000 91 }; 92 93 /* 0x8000 = -32768 (used to silence the compiler) */ 94 95 /* slope used to compute y = acos(x) */ 96 97 extern const Word16 slope[64] = 98 { 99 -26887, -8812, -5323, -3813, -2979, -2444, -2081, -1811, 100 -1608, -1450, -1322, -1219, -1132, -1059, -998, -946, 101 -901, -861, -827, -797, -772, -750, -730, -713, 102 -699, -687, -677, -668, -662, -657, -654, -652, 103 -652, -654, -657, -662, -668, -677, -687, -699, 104 -713, -730, -750, -772, -797, -827, -861, -901, 105 -946, -998, -1059, -1132, -1219, -1322, -1450, -1608, 106 -1811, -2081, -2444, -2979, -3813, -5323, -8812, -26887 107 }; 108 109 /*--------------------------------------------------------------------------*/ 110#ifdef __cplusplus 111} 112#endif 113 114