📄 qua_gain_tbl.cpp
字号:
/* ------------------------------------------------------------------ * Copyright (C) 2008 PacketVideo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. * See the License for the specific language governing permissions * and limitations under the License. * ------------------------------------------------------------------- *//****************************************************************************************Portions of this file are derived from the following 3GPP standard: 3GPP TS 26.073 ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec Available from http://www.3gpp.org(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)Permission to distribute, modify and use this file under the standard licenseterms listed above has been obtained from the copyright holder.****************************************************************************************//* Filename: /audio/gsm_amr/c/src/qua_gain_tbl.c Date: 02/05/2002------------------------------------------------------------------------------ REVISION HISTORY Description: Created this file from the reference, qua_gain.tab Description: Added #ifdef __cplusplus and removed "extern" from table definition. Description: Put "extern" back. Description:------------------------------------------------------------------------------ MODULE DESCRIPTION------------------------------------------------------------------------------*//*----------------------------------------------------------------------------; INCLUDES----------------------------------------------------------------------------*/#include "typedef.h"#include "qua_gain.h"/*--------------------------------------------------------------------------*/#ifdef __cplusplusextern "C"{#endif /*---------------------------------------------------------------------------- ; MACROS ; [Define module specific macros here] ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; DEFINES ; [Include all pre-processor statements here. Include conditional ; compile variables also.] ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; LOCAL FUNCTION DEFINITIONS ; [List function prototypes here] ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- ; LOCAL VARIABLE DEFINITIONS ; [Variable declaration - defined here and used outside this module] ----------------------------------------------------------------------------*/ /* The tables contains the following data: * * g_pitch (Q14), * g_fac (Q12), (g_code = g_code0*g_fac), * qua_ener_MR122 (Q10), (log2(g_fac)) * qua_ener (Q10) (20*log10(g_fac)) * * The log2() and log10() values are calculated on the fixed point value * (g_fac Q12) and not on the original floating point value of g_fac * to make the quantizer/MA predictdor use corresponding values. */ /* table used in 'high' rates: MR67 MR74 */ extern const Word16 table_gain_highrates[VQ_SIZE_HIGHRATES*4] = { /* * Note: column 4 (qua_ener) contains the original values from IS641 * to ensure bit-exactness; however, they are not exactly the * rounded value of (20*log10(g_fac)) * */ /*g_pit, g_fac, qua_ener_MR122, qua_ener */ 577, 662, -2692, -16214, 806, 1836, -1185, -7135, 3109, 1052, -2008, -12086, 4181, 1387, -1600, -9629, 2373, 1425, -1560, -9394, 3248, 1985, -1070, -6442, 1827, 2320, -840, -5056, 941, 3314, -313, -1885, 2351, 2977, -471, -2838, 3616, 2420, -777, -4681, 3451, 3096, -414, -2490, 2955, 4301, 72, 434, 1848, 4500, 139, 836, 3884, 5416, 413, 2484, 1187, 7210, 835, 5030, 3083, 9000, 1163, 7002, 7384, 883, -2267, -13647, 5962, 1506, -1478, -8900, 5155, 2134, -963, -5800, 7944, 2009, -1052, -6335, 6507, 2250, -885, -5327, 7670, 2752, -588, -3537, 5952, 3016, -452, -2724, 4898, 3764, -125, -751, 6989, 3588, -196, -1177, 8174, 3978, -43, -260, 6064, 4404, 107, 645, 7709, 5087, 320, 1928, 5523, 6021, 569, 3426, 7769, 7126, 818, 4926, 6060, 7938, 977, 5885, 5594, 11487, 1523, 9172, 10581, 1356, -1633, -9831, 9049, 1597, -1391, -8380, 9794, 2035, -1033, -6220, 8946, 2415, -780, -4700, 10296, 2584, -681, -4099, 9407, 2734, -597, -3595, 8700, 3218, -356, -2144, 9757, 3395, -277, -1669, 10177, 3892, -75, -454, 9170, 4528, 148, 891, 10152, 5004, 296, 1781, 9114, 5735, 497, 2993, 10500, 6266, 628, 3782, 10110, 7631, 919, 5534, 8844, 8727, 1117, 6728, 8956, 12496, 1648, 9921, 12924, 976, -2119, -12753, 11435, 1755, -1252, -7539, 12138, 2328, -835, -5024, 11388, 2368, -810, -4872, 10700, 3064, -429, -2580, 12332, 2861, -530, -3192, 11722, 3327, -307, -1848, 11270, 3700, -150, -904, 10861, 4413, 110, 663, 12082, 4533, 150, 902, 11283, 5205, 354, 2132, 11960, 6305, 637, 3837, 11167, 7534, 900, 5420, 12128, 8329, 1049, 6312, 10969, 10777, 1429, 8604, 10300, 17376, 2135, 12853, 13899, 1681, -1316, -7921, 12580, 2045, -1026, -6179, 13265, 2439, -766, -4610, 14033, 2989, -465, -2802, 13452, 3098, -413, -2482, 12396, 3658, -167, -1006, 13510, 3780, -119, -713, 12880, 4272, 62, 374, 13533, 4861, 253, 1523, 12667, 5457, 424, 2552, 13854, 6106, 590, 3551, 13031, 6483, 678, 4084, 13557, 7721, 937, 5639, 12957, 9311, 1213, 7304, 13714, 11551, 1532, 9221, 12591, 15206, 1938, 11667, 15113, 1540, -1445, -8700, 15072, 2333, -832, -5007, 14527, 2511, -723, -4352, 14692, 3199, -365, -2197, 15382, 3560, -207, -1247,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -