⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 q_plsf_3_tbl.cpp

📁 实现3GPP的GSM中AMR语音的CODECS。
💻 CPP
📖 第 1 页 / 共 4 页
字号:
/* ------------------------------------------------------------------ * 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/q_plsf_3_tbl.c     Date: 01/31/2002------------------------------------------------------------------------------ REVISION HISTORY Description: Created this file from the reference, q_plsf_3_tbl.tab Description: Added #ifdef __cplusplus and removed "extern" from table              definition. Description: Put "extern" back. Description:------------------------------------------------------------------------------ MODULE DESCRIPTION------------------------------------------------------------------------------*//*----------------------------------------------------------------------------; INCLUDES----------------------------------------------------------------------------*/#include "typedef.h"/*--------------------------------------------------------------------------*/#ifdef __cplusplusextern "C"{#endif    /*----------------------------------------------------------------------------    ; MACROS    ; [Define module specific macros here]    ----------------------------------------------------------------------------*/    /*----------------------------------------------------------------------------    ; DEFINES    ; [Include all pre-processor statements here. Include conditional    ; compile variables also.]    ----------------------------------------------------------------------------*/#define MR795_1_SIZE  512#define PAST_RQ_INIT_SIZE 8#define DICO1_SIZE  256#define DICO2_SIZE  512#define DICO3_SIZE  512#define MR515_3_SIZE  128    /*----------------------------------------------------------------------------    ; LOCAL FUNCTION DEFINITIONS    ; [List function prototypes here]    ----------------------------------------------------------------------------*/    /*----------------------------------------------------------------------------    ; LOCAL VARIABLE DEFINITIONS    ; [Variable declaration - defined here and used outside this module]    ----------------------------------------------------------------------------*/    /*    ********************************************************************************    *    *      GSM AMR-NB speech codec   R98   Version 7.5.0   March 2, 2001    *                                R99   Version 3.2.0    *                                REL-4 Version 4.0.0    *    ********************************************************************************    *    *      File             : q_plsf_3.tab    *      Purpose          : Table for routine LSF VQ.    *      $Id $    *    ********************************************************************************    */    /* initalization table for MA predictor in dtx mode */    extern const Word16 past_rq_init[80] =    {        -258, -318, -439, -634, -656, -773, -711, -502, -268, -193,        -2,  125,  122,  -39,   -9,  105,  129,  283,  372,  575,        -277, -324, -197, -487, -445, -362, -292,  -27,  177,  543,        342,  517,  516,  130,   27, -104, -120, -140,  -74,  -56,        -564, -943, -1520, -965, -814, -526, -322,   -2,  159,  657,        -312, -284, -386, -597, -493, -526, -418, -229,  105,  449,        -557, -870, -1075, -919, -950, -752, -709, -316,   62,  486,        -314, -191, -203, -330, -160, -103,  -51,  131,  338,  515    };    extern const Word16 mean_lsf_3[10] =    {        1546,        2272,        3778,        5488,        6972,        8382,        10047,        11229,        12766,        13714    };    extern const Word16 pred_fac_3[10] =    {        9556,        10769,        12571,        13292,        14381,        11651,        10588,        9767,        8593,        6484    };    /* first codebook from IS641 */    extern const Word16 dico1_lsf_3[] =    {        6, 82, -131,        154, -56, -735,        183, -65, -265,        9, -210, -361,        113, 718, 1817,        1010, 1214, 1573,        857, 1333, 2276,        827, 1568, 1933,        717, 1989, 2206,        838, 1172, 1823,        721, 1000, 2154,        286, 476, 1509,        -247, -531, 230,        147, -82, 569,        26, -177, -944,        -27, -273, 692,        -164, -264, -183,        224, 790, 1039,        899, 946, 601,        485, 771, 1150,        524, 677, 903,        -140, 375, 778,        410, 676, 429,        301, 530, 1009,        719, 646, 38,        226, 367, 40,        145, -45, -505,        290, 121, -121,        302, 127, 166,        -124, -383, -956,        -358, -455, -977,        715, 878, 894,        978, 923, 211,        477, 272, 64,        188, -78, 17,        -143, -65, 38,        643, 586, 621,        -134, -426, -651,        347, 545, 2820,        1188, 2726, 2442,        142, -80, 1735,        283, 130, 461,        -262, -399, -1145,        -411, 155, 430,        329, 375, 779,        53, -226, -139,        -129, -236, 1682,        285, 744, 1327,        738, 697, 1664,        312, 409, 266,        325, 720, 135,        1, 221, 453,        8, 203, 145,        299, 640, 760,        29, 468, 638,        103, 429, 379,        420, 954, 932,        1326, 1210, 1258,        704, 1012, 1152,        -166, -444, -266,        -316, -130, -376,        191, 1151, 1904,        -240, -543, -1260,        -112, 268, 1207,        70, 1062, 1583,        278, 1360, 1574,        -258, -272, -768,        19, 563, 2240,        -3, -265, 135,        -295, -591, -388,        140, 354, -206,        -260, -504, -795,        -433, -718, -1319,        109, 331, 962,        -429, -87, 652,        -296, 426, 1019,        -239, 775, 851,        489, 1334, 1073,        -334, -332, 25,        543, 1206, 1807,        326, 61, 727,        578, 849, 1405,        -208, -277, 329,        -152, 64, 669,        -434, -678, -727,        -454, -71, 251,        605, 480, 254,        -482, 11, 996,        -289, 395, 486,        722, 1049, 1440,        -30, -316, -786,        -106, -115, -619,        861, 1474, 1412,        1055, 1366, 1184,        812, 1237, 925,        42, -251, -576,        342, 141, -454,        -168, -80, 1359,        -342, -656, -1763,        100, 821, 725,        990, 747, 800,        332, 440, 568,        663, 379, 852,        112, 165, -369,        597, 910, 282,        -8, 834, 1281,        -352, 572, 695,        462, 2246, 1806,        345, 190, 1374,        416, 915, 2166,        168, -82, 280,        -516, -446, 840,        47, 533, 44,        -362, -711, -1143,        22, 193, 1472,        -85, 233, 1813,        -62, 579, 1504,        550, 944, 1749,        723, 650, 1148,        972, 884, 1395,        -425, 643, 0,        1000, 952, 1098,        249, 1446, 672,        -334, -87, 2172,        -554, 1882, 2672,        140, 1826, 1853,        920, 1749, 2590,        1076, 1933, 2038,        -137, -443, -1555,        1269, 1174, 468,        -493, -122, 1521,        -451, 1033, 1214,        482, 1695, 1118,        815, 649, 384,        -446, -692, 107,        -319, -605, -118,        -207, -505, 525,        -468, -12, 2736,        75, 1934, 1305,        880, 2358, 2267,        1285, 1575, 2004,        -48, -304, -1186,        -435, -461, -251,        -366, -404, -547,        -289, -605, -597,        -538, -810, -165,        -120, 3, 356,        639, 1241, 1502,        96, 177, 750,        -435, -585, -1174,        -356, 109, -79,        -485, 288, 2005,        9, 1116, 731,        880, 2134, 946,        -265, 1585, 1065,        1157, 1210, 843,        -498, -668, 431,        374, 321, -229,        1440, 2101, 1381,        449, 461, 1155,        -105, 39, -384,        -263, 367, 182,        -371, -660, 773,        -188, 1151, 971,        1333, 1632, 1435,        774, 1267, 1221,        -482, -832, -1489,        -237, -210, 860,        890, 1615, 1064,        472, 1062, 1192,        185, 1077, 989,        -568, -992, -1704,        -449, -902, -2043,        -142, -377, -458,        -210, -554, -1029,        -11, 1133, 2265,        -329, -675, -893,        -250, 657, 1187,        519, 1510, 1779,        520, 539, 1403,        527, 1421, 1302,        -563, -871, -1248,        -147, -463, 879,        -76, 2334, 2840,        563, 2573, 2385,        632, 1926, 2920,        719, 2023, 1840,        -545, -723, 1108,        129, -125, 884,        1417, 1632, 925,        -94, 1566, 1751,        -341, 1533, 1551,        591, 395, -274,        -76, 981, 2831,        153, 2985, 1844,        1032, 2565, 2749,        1508, 2832, 1879,        791, 1199, 538,        -190, -453, 1489,        -278, -548, 1158,        -245, 1941, 2044,        1024, 1560, 1650,        512, 253, 466,        -62, -323, 1151,        -473, -376, 507,        -433, 1380, 2162,        899, 1943, 1445,        134, 704, 440,        460, 525, -28,        -450, 279, 1338,        0, 971, 252,        -445, -627, -991,        -348, -602, -1424,        398, 712, 1656,        -107, 314, -178,        93, 2226, 2238,        518, 849, 656,        -462, -711, -447,        174, -34, 1191,        -119, 42, 1005,        -372, 274, 758,        1036, 2352, 1838,        675, 1724, 1498,        430, 1286, 2133,        -129, -439, 0,        -373, 800, 2144,        6, 1587, 2478,        478, 596, 2128,        -428, -736, 1505,        385, 178, 980,        139, 449, 1225,        -526, -842, -982,        145, 1554, 1242,        623, 1448, 656,        349, 1016, 1482,        31, -280, 415,        -316, 724, 1641,        360, 1058, 556,        -436, -358, 1201,        -355, 1123, 1939,        401, 1584, 2248,        -527, -1012, 355,        233, 238, 2233,        -550, -897, -639,        -365, -501, 1957,        389, 1860, 1621,        162, 1132, 1264,        -237, 1174, 1390,        -640, -411, 116,        -228, 1694, 2298,        1639, 2186, 2267,        562, 1273, 2658,        323, 338, 1774,        578, 1107, 852,        22, 594, 934,        -143, 718, 446    };    /* second codebook from IS641 */    extern const Word16 dico2_lsf_3[] =    {        50, 71, -9,        -338, -698, -1407,        102, -138, -820,        -310, -469, -1147,        414, 67, -267,        1060, 814, 1441,        1548, 1360, 1272,        1754, 1895, 1661,        2019, 2133, 1820,        1808, 2318, 1845,        644, -93, 454,        858, 329, -136,        489, -258, -128,        -198, -745, -41,        -52, -265, -985,        346, 137, 479,        -1741, -748, -684,        -1163, -1725, -367,        -895, -1145, -784,        -488, -946, -968,        -85, -390, -725,        215, -340, -171,        1020, 916, 1969,        564, 179, 746,        662, 977, 1734,        887, 622, 914,        939, 856, 1165,        309, 688, 803,        917, 161, 570,        118, -20, -283,        -816, -42, 204,        -1228, -325, -462,        -963, -202, -143,        -988, -484, -361,        -702, -978, -477,        -302, -790, -1188,        -100, -786, -1088,        -1054, -947, -1684,        -202, -843, -782,        -1039, -1378, -901,        -624, -110, -85,        356, 213, -10,        -493, 364, 774,        425, 822, 479,        -83, 557, 520,        -992, -1560, -572,        -603, -741, -26,        -502, -638, -903,        209, 306, 147,        -316, -593, -596,        -85, -211, -225,        -918, -529, 117,        233, -439, -738,        1101, 751, 633,        1457, 1716, 1511,        1765, 1457, 910,        1122, 1156, 849,        1354, 868, 470,        -871, -1150, -1796,        -871, -861, -992,        -118, 155, 212,        -1051, -849, -606,        -1117, -1849, -2750,        -1019, -1427, -1869,        370, -184, -414,        959, 493, 104,        958, 1039, 543,        154, 653, 201,        1249, 507, 150,        663, 503, 230,        623, 777, 675,        659, 88, -110,        843, 244, 224,        382, 541, 302,        724, 433, 666,        1166, 734, 341,        -138, 20, -397,        -1183, -424, -46,        -321, -352, -124,        1333, 1021, 1080,        262, 366, 723,        922, 283, -551,        31, -636, -611,        -689, -697, -415,        -952, -779, -201,        -1329, -598, -359,        -953, -1285, 166,        493, 305, 221,        846, 703, 610,        840, 936, 774,        -723, -1324, -1261,        -357, -1025, -1388,        -1096, -1376, -365,        -1416, -1881, -608,        -1798, -1727, -674,        -545, -1173, -703,        678, 786, 148,        -123, 696, 1288,        644, 350, -10,        414, 614, 15,        137, 344, -211,        -814, -1512, -819,        -391, -930, -588,        47, -591, -898,        -909, -1097, -163,        -1272, -1167, -157,        -1464, -1525, -389,        -1274, -1188, -624,        671, 213, 454,        124, -274, -525,        -729, -496, -152,        -1344, 122, 135,        -2905, -589, -394,        -1728, 441, -50,        1476, 904, 787,        316, 236, -440,        -347, 217, 413,        -911, -917, 121,        -455, -932, 202,        -92, -465, -375,        488, 390, 474,        876, 729, 316,        -1815, -1312, -669,        87, 962, 432,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -