From patchwork Mon Jan 4 00:28:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24767 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id CBA5544B782 for ; Mon, 4 Jan 2021 02:28:33 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 82E7668A8FD; Mon, 4 Jan 2021 02:28:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0DD78689F4F for ; Mon, 4 Jan 2021 02:28:26 +0200 (EET) Received: by mail-wm1-f48.google.com with SMTP id c133so16825467wme.4 for ; Sun, 03 Jan 2021 16:28:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:reply-to:mime-version :content-transfer-encoding; bh=TXN+PpVXxUpi4oAXuTTrGokKVfDGzuP0/qZXOMIdGSw=; b=rBIsvv6rz8oNo/9JMdYvV3pXTLLIEfRgHypV3vFn4jpcTy3ydhgTIr3A4RpEr0sb0I Kes3YXTVrMDrcu7UrFriRcL52qcnJLXZaQntzIPo9lnlQ6wkj/pUB5QyLi0F69BROfjB LnFO0fFAa2VjVSLx5/zmg5pp68oih3ap3nxWK/eBLFxNpiPwfrBYPx7YxKqCZeoyfUJq cCydl3D+L3kF5iyrfhje8MbUB+Q1dpfZ/nLkEzslzMEMwJuidUEr7DxrFSub65Man8eN sGBRyHGy+lM25CcYX1cyDYtjMB/zjOGG0xYJdPU0+0NJ5lj9uX5vmrKScL4GYwcnuVKJ qY/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :mime-version:content-transfer-encoding; bh=TXN+PpVXxUpi4oAXuTTrGokKVfDGzuP0/qZXOMIdGSw=; b=jcu8qOl3LT66DZYutOBu34PQ0ETVyfCKZu5sLah1Z6N2TKVrGnEPIFhljaf+JwwofZ HN39jYAbsU7TFqsWiLeG8zpNZV4Zjr/t39ivANYPApUXf8aAJ5aF1GkxKpWcmh/LV3vU lHkxk25Wujlrd0IUgnqqcBlopiokVGdNJojM5yJaQXlc63r0ThIex1rc6CaLUM2U04lT 0VLqyyCHYTwDoJpAGHq5XZyZeBH8F1eh5fvNSu0OCGHQgkFDT74KG2vHcCsjghG2vudo FA0ziZg1HjT8ZFTQP+qvPdZ5OZw0peunydSGnKfZqJEXZnrz13XSC9Hk/8wesZHo1frW 5bEA== X-Gm-Message-State: AOAM530Ym2/+IEFmtn+pSEhwGFoDwhuAdZkrybSNiPw1UGF8FS2pKbts yJ/HEkIAjLXH5BERK8Y3bmvjsHsARws= X-Google-Smtp-Source: ABdhPJzM11Zm8hWMOtS4YdYNqGZulkTLbs8s+1XRffZOA613kLLnnM726frcGxx9C5xGjtcW4gMoDA== X-Received: by 2002:a1c:98cc:: with SMTP id a195mr24782873wme.150.1609720103867; Sun, 03 Jan 2021 16:28:23 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:22 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:01 +0100 Message-Id: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/16] avcodec/g723_1: Deduplicate arrays X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Saves about 17KB. Signed-off-by: Andreas Rheinhardt --- libavcodec/g723_1.c | 1099 +++++++++++++++++++++++++++++++++++++++- libavcodec/g723_1.h | 1075 +-------------------------------------- libavcodec/g723_1dec.c | 12 +- libavcodec/g723_1enc.c | 20 +- 4 files changed, 1110 insertions(+), 1096 deletions(-) diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index 1deff495de..0c47458c23 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -29,6 +29,1077 @@ #include "celp_math.h" #include "g723_1.h" +const int16_t ff_g723_1_cos_tab[COS_TBL_SIZE + 1] = { + 16384, 16383, 16379, 16373, 16364, 16353, 16340, 16324, + 16305, 16284, 16261, 16235, 16207, 16176, 16143, 16107, + 16069, 16029, 15986, 15941, 15893, 15843, 15791, 15736, + 15679, 15619, 15557, 15493, 15426, 15357, 15286, 15213, + 15137, 15059, 14978, 14896, 14811, 14724, 14635, 14543, + 14449, 14354, 14256, 14155, 14053, 13949, 13842, 13733, + 13623, 13510, 13395, 13279, 13160, 13039, 12916, 12792, + 12665, 12537, 12406, 12274, 12140, 12004, 11866, 11727, + 11585, 11442, 11297, 11151, 11003, 10853, 10702, 10549, + 10394, 10238, 10080, 9921, 9760, 9598, 9434, 9269, + 9102, 8935, 8765, 8595, 8423, 8250, 8076, 7900, + 7723, 7545, 7366, 7186, 7005, 6823, 6639, 6455, + 6270, 6084, 5897, 5708, 5520, 5330, 5139, 4948, + 4756, 4563, 4370, 4176, 3981, 3786, 3590, 3393, + 3196, 2999, 2801, 2603, 2404, 2205, 2006, 1806, + 1606, 1406, 1205, 1005, 804, 603, 402, 201, + 0, -201, -402, -603, -804, -1005, -1205, -1406, + -1606, -1806, -2006, -2205, -2404, -2603, -2801, -2999, + -3196, -3393, -3590, -3786, -3981, -4176, -4370, -4563, + -4756, -4948, -5139, -5330, -5520, -5708, -5897, -6084, + -6270, -6455, -6639, -6823, -7005, -7186, -7366, -7545, + -7723, -7900, -8076, -8250, -8423, -8595, -8765, -8935, + -9102, -9269, -9434, -9598, -9760, -9921, -10080, -10238, + -10394, -10549, -10702, -10853, -11003, -11151, -11297, -11442, + -11585, -11727, -11866, -12004, -12140, -12274, -12406, -12537, + -12665, -12792, -12916, -13039, -13160, -13279, -13395, -13510, + -13623, -13733, -13842, -13949, -14053, -14155, -14256, -14354, + -14449, -14543, -14635, -14724, -14811, -14896, -14978, -15059, + -15137, -15213, -15286, -15357, -15426, -15493, -15557, -15619, + -15679, -15736, -15791, -15843, -15893, -15941, -15986, -16029, + -16069, -16107, -16143, -16176, -16207, -16235, -16261, -16284, + -16305, -16324, -16340, -16353, -16364, -16373, -16379, -16383, + -16384, -16383, -16379, -16373, -16364, -16353, -16340, -16324, + -16305, -16284, -16261, -16235, -16207, -16176, -16143, -16107, + -16069, -16029, -15986, -15941, -15893, -15843, -15791, -15736, + -15679, -15619, -15557, -15493, -15426, -15357, -15286, -15213, + -15137, -15059, -14978, -14896, -14811, -14724, -14635, -14543, + -14449, -14354, -14256, -14155, -14053, -13949, -13842, -13733, + -13623, -13510, -13395, -13279, -13160, -13039, -12916, -12792, + -12665, -12537, -12406, -12274, -12140, -12004, -11866, -11727, + -11585, -11442, -11297, -11151, -11003, -10853, -10702, -10549, + -10394, -10238, -10080, -9921, -9760, -9598, -9434, -9269, + -9102, -8935, -8765, -8595, -8423, -8250, -8076, -7900, + -7723, -7545, -7366, -7186, -7005, -6823, -6639, -6455, + -6270, -6084, -5897, -5708, -5520, -5330, -5139, -4948, + -4756, -4563, -4370, -4176, -3981, -3786, -3590, -3393, + -3196, -2999, -2801, -2603, -2404, -2205, -2006, -1806, + -1606, -1406, -1205, -1005, -804, -603, -402, -201, + 0, 201, 402, 603, 804, 1005, 1205, 1406, + 1606, 1806, 2006, 2205, 2404, 2603, 2801, 2999, + 3196, 3393, 3590, 3786, 3981, 4176, 4370, 4563, + 4756, 4948, 5139, 5330, 5520, 5708, 5897, 6084, + 6270, 6455, 6639, 6823, 7005, 7186, 7366, 7545, + 7723, 7900, 8076, 8250, 8423, 8595, 8765, 8935, + 9102, 9269, 9434, 9598, 9760, 9921, 10080, 10238, + 10394, 10549, 10702, 10853, 11003, 11151, 11297, 11442, + 11585, 11727, 11866, 12004, 12140, 12274, 12406, 12537, + 12665, 12792, 12916, 13039, 13160, 13279, 13395, 13510, + 13623, 13733, 13842, 13949, 14053, 14155, 14256, 14354, + 14449, 14543, 14635, 14724, 14811, 14896, 14978, 15059, + 15137, 15213, 15286, 15357, 15426, 15493, 15557, 15619, + 15679, 15736, 15791, 15843, 15893, 15941, 15986, 16029, + 16069, 16107, 16143, 16176, 16207, 16235, 16261, 16284, + 16305, 16324, 16340, 16353, 16364, 16373, 16379, 16383, + 16384 +}; + +const int16_t ff_g723_1_lsp_band0[LSP_CB_SIZE][3] = { + { 0, 0, 0}, { -270, -1372, -1032}, { -541, -1650, -1382}, + { -723, -2011, -2213}, { -941, -1122, -1942}, { -780, -1145, -2454}, + { -884, -1309, -1373}, {-1051, -1523, -1766}, {-1083, -1622, -2300}, + { -777, -1377, -2147}, { -935, -1467, -2763}, { -802, -1327, -3471}, + { -935, -1959, -3999}, { -240, -89, 222}, { -661, -257, -160}, + { -994, -466, -419}, { -188, -164, -278}, { -342, -512, -415}, + { -607, -511, -797}, { 16, 19, -716}, { 374, 425, -972}, + { -346, 245, -282}, { -265, 506, -754}, { -620, -147, 1955}, + { -742, -860, 2597}, { -150, -352, 2704}, { 305, 880, 1954}, + { 123, 731, 2766}, { -348, 765, 3327}, { 618, 221, 3258}, + { -178, -47, 4219}, { 393, 1304, 3842}, { 698, 1702, 4801}, + { 63, -584, 1229}, { -215, -732, 1704}, { 172, -335, 1909}, + { -2, 216, 1797}, { 353, 127, 2205}, {-1208, 188, 11}, + { -513, -75, -683}, { -973, 222, -646}, { -616, -843, -388}, + { -950, -1113, -359}, {-1431, -623, -705}, {-1398, -1063, -178}, + { -45, -461, 35}, { -9, -657, -216}, { 127, -1078, 95}, + { -950, -1156, 584}, {-1480, -1494, 449}, { -120, -705, 516}, + { -368, -961, 727}, { -378, -526, 973}, { -793, -614, 676}, + { -801, -755, 1287}, {-1476, -340, 1636}, { -505, -1254, 1543}, + {-1243, -1622, 1532}, { -776, -1477, -655}, {-1151, -1296, -823}, + {-1153, -1672, -1124}, {-1291, -2003, -1702}, { -622, -1283, 57}, + { -471, -1611, 509}, {-1060, -1570, -139}, { -873, -2156, -536}, + {-1716, -2021, -364}, {-2150, -3218, -1291}, {-1248, -1945, -2904}, + {-1215, -2633, -2855}, { 167, -244, 84}, { 349, -412, -217}, + { -40, -352, 632}, { 227, -529, 405}, { 68, -383, -443}, + { 167, -558, -706}, { -275, -854, -14}, { -351, -1089, -449}, + { 341, -72, -289}, { 603, -106, -474}, { 322, -219, -649}, + { 179, -317, -998}, { 450, -291, -996}, { 555, 195, -525}, + { 784, 272, -831}, { -148, -384, -849}, { 82, -536, -1357}, + { 238, -172, -1354}, { 422, -268, -1841}, { 297, -737, -2079}, + { -111, -801, -598}, { 1, -668, -984}, { -131, -818, -1299}, + { -329, -521, -1310}, { -151, -778, -1834}, { -93, -352, -1746}, + { -568, -640, -1821}, { -509, -941, -2183}, { 464, -815, -1250}, + { 79, -1133, -1597}, { -184, -1353, -2123}, { -196, -410, -2427}, + { -192, -833, -2810}, { -259, -1382, -3045}, { -217, 4, -1166}, + { -800, -325, -1219}, { -363, -830, -898}, { -661, -1134, -960}, + { -386, -980, -1501}, { -627, -1159, -1722}, { -903, -829, -855}, + { -685, -829, -1313}, {-1065, -959, -1405}, { 441, 25, -847}, + { 655, -27, -1181}, { 1159, -110, -705}, { 856, 253, -1671}, + { 415, 404, -1}, { 322, 903, -398}, { 670, 499, -292}, + { 803, 591, -610}, { 1144, 591, -814}, { 717, 183, 393}, + { 857, 381, 106}, { 609, 62, -27}, { 792, 198, -325}, + { 735, 805, 88}, { 1142, 812, 78}, { 1028, 366, -292}, + { 1309, 743, -237}, { 1615, 589, -79}, { 1010, 639, -243}, + { 999, 964, -311}, { 1500, 1137, -615}, { 988, 357, 646}, + { 1227, 667, 683}, { 1164, 1565, 894}, { 1392, 2015, 477}, + { 1138, 533, 250}, { 1437, 896, 391}, { 1765, 1118, 99}, + { 1112, 1090, 802}, { 1596, 846, 1134}, { 937, 1161, 279}, + { 1719, 1254, 683}, { 1338, 1086, 35}, { 1419, 1324, 428}, + { 1428, 1524, 40}, { 2108, 1594, 89}, { 1015, 544, 1222}, + { 1121, 925, 1263}, { 1030, 1318, 1485}, { 1295, 789, 1817}, + { 1323, 1272, 1909}, { 1724, 1237, 1803}, { 1797, 1689, 858}, + { 2149, 1367, 1301}, { 2302, 1867, 761}, { 2863, 2351, 1053}, + { 52, 163, -76}, { 230, 309, -492}, { -71, 619, 39}, + { -218, 856, 499}, { -654, 736, -207}, { -535, 1259, 155}, + { -480, 1476, 643}, { 262, 1081, 102}, { 309, 1592, -182}, + { 627, 1629, 534}, { 337, 643, 456}, { 758, 670, 713}, + { 202, 1126, 658}, { 612, 1131, 666}, { 686, 1223, 1136}, + { -131, 377, 525}, { 42, 708, 907}, { 87, 1488, 1035}, + { 432, 2117, 904}, { 137, 981, 1332}, { -447, 1014, 1136}, + { -839, 1793, 1246}, { -559, 297, 198}, { -850, 685, 446}, + {-1273, 632, 826}, { -401, -544, 173}, { -753, -793, 144}, + { -436, -9, 772}, { -115, -243, 1310}, { -670, -269, 374}, + {-1027, -13, 639}, { -887, -81, 1137}, {-1277, -455, 158}, + {-1411, -720, 736}, { 172, 88, 403}, { 386, 255, 756}, + { -500, 522, 910}, { -958, 659, 1388}, { -395, 301, 1344}, + { -356, 768, 1813}, { -613, 841, 2419}, { 445, -122, 252}, + { 629, -87, 723}, { 283, -253, 870}, { 456, -116, 1381}, + { 757, 180, 1059}, { 532, 408, 1509}, { 947, 288, 1806}, + { 1325, 994, 2524}, { 892, 1219, 3023}, { 1397, 1596, 3406}, + { 1143, 1552, 2546}, { 1850, 1433, 2710}, { -10, 134, 1002}, + { 154, 499, 1323}, { 508, 792, 1117}, { 509, 1340, 1616}, + { 762, 862, 1608}, { 787, 740, 2320}, { 794, 1727, 1283}, + { 465, 2108, 1660}, { -120, 1451, 1613}, { -386, 2016, 2169}, + { 891, 1225, 2050}, { 456, 1480, 2185}, { 1493, 1283, 1209}, + { 1397, 1636, 1518}, { 1776, 1738, 1552}, { 1572, 1698, 2141}, + { 1389, 2126, 1271}, { 1959, 2413, 1119}, { 1365, 2892, 1505}, + { 2206, 1971, 1623}, { 2076, 1950, 2280}, { 1717, 2291, 1867}, + { 2366, 2515, 1953}, { 2865, 2838, 2522}, { 2535, 3465, 2011}, + { 3381, 4127, 2638}, { 836, 2667, 2289}, { 1761, 2773, 2337}, + { 1415, 3325, 2911}, { 2354, 3138, 3126}, { 2659, 4192, 4010}, + { 1048, 1786, 1818}, { 1242, 2111, 2240}, { 1512, 2079, 2780}, + { 1573, 2491, 3138}, { 2230, 2377, 2782}, { 416, 1773, 2704}, + { 725, 2336, 3297}, { 1252, 2373, 3978}, { 2094, 2268, 3568}, + { 2011, 2712, 4528}, { 1341, 3507, 3876}, { 1216, 3919, 4922}, + { 1693, 4793, 6012} +}; + +const int16_t ff_g723_1_lsp_band1[LSP_CB_SIZE][3] = { + { 0, 0, 0}, {-2114, -1302, 76}, {-2652, -1278, -1368}, + {-2847, -828, -349}, {-3812, -2190, -349}, {-3946, -364, -449}, + {-2725, -4492, -3607}, {-3495, -4764, -1744}, { -51, -756, 84}, + { -153, -1191, 504}, { 108, -1418, 1167}, { -835, -896, 390}, + { -569, -1702, 87}, {-1151, -1818, 933}, {-1826, -2547, 411}, + {-1842, -1818, 1451}, {-2438, -1611, 781}, {-2747, -2477, 1311}, + { -940, 1252, 477}, {-1629, 1688, 602}, {-1202, 617, 280}, + {-1737, 393, 580}, {-1528, 1077, 1199}, {-2165, -161, 1408}, + {-2504, -1087, 2371}, {-3458, -175, 1395}, {-1397, -98, -843}, + {-2252, -177, -1149}, {-1489, -726, -1283}, {-1558, -265, -1744}, + {-1867, -821, -1897}, {-2062, -1516, -2340}, {-2595, -1142, -2861}, + { 170, 46, -819}, { -193, -204, -1151}, { 326, -196, -1532}, + { 780, 329, -816}, { 201, 369, -1243}, { 650, -209, -1060}, + { 1144, -15, -1216}, { 1203, -259, -1867}, { -890, -564, -1430}, + { -638, -852, -1921}, { 177, -739, -1358}, { -261, -526, -1666}, + { 206, -407, -2255}, { 338, -526, -822}, { 421, -1095, -1009}, + { 765, -607, -1408}, { 825, -1295, -2004}, { 357, -905, -1815}, + { -58, -1248, -1588}, { -596, -1436, -2046}, { -73, -1159, -2116}, + { -115, -1382, -2581}, { -160, -1723, -1952}, { -6, -2196, -2954}, + { -649, -1705, -2603}, { -617, -1453, -3282}, { -949, -2019, -3102}, + { -812, 1544, 1937}, {-1854, 574, 2000}, {-1463, 1140, 2649}, + {-2683, 1748, 1452}, {-2486, 2241, 2523}, { 783, 1910, 1435}, + { 581, 2682, 1376}, { 236, 2197, 1885}, { -453, 2943, 2057}, + { -682, 2178, 2565}, {-1342, 3201, 3328}, { -288, -184, 262}, + { 121, -149, -183}, { 758, -412, 206}, { 1038, -204, 853}, + { 1577, -457, 700}, { 937, -640, -567}, { 1508, -528, -1024}, + { -225, -527, -427}, { -564, -1095, -332}, { -742, -353, -186}, + {-1288, -459, 84}, {-1853, -484, -274}, {-1554, -731, 825}, + {-2425, -234, 382}, {-1722, 293, -271}, {-2515, 425, -564}, + {-2599, 818, 464}, { -358, 118, -375}, { -613, 198, -874}, + { -690, 683, -324}, {-1352, 1155, -168}, {-1093, 129, -324}, + {-1184, 611, -858}, { 433, 386, -372}, { -120, 486, -634}, + { 234, 851, -631}, { 602, 128, 46}, { 1099, 410, 159}, + { 715, -145, -424}, { 1198, -85, -593}, { 1390, 367, -358}, + { 1683, 362, -964}, { 1711, 622, 45}, { 2033, 833, -383}, + { 2890, 549, -506}, { 7, 401, 52}, { 72, 811, 415}, + { 566, 668, 41}, { 467, 1218, 130}, { 68, 957, -187}, + { -25, 1649, -103}, { -661, 260, 214}, { -925, -94, 612}, + { -321, -422, 965}, { -788, -672, 1783}, { 400, -673, 779}, + { 741, -595, 1635}, { -161, 307, 657}, { -382, 836, 871}, + { -814, 400, 1223}, { 364, 606, 1247}, { 57, 75, 1571}, + { 151, 471, 2287}, { -81, 1021, 1502}, { 227, 1470, 1097}, + { 658, 1275, 1653}, { 664, 1478, 2377}, { 263, -127, 444}, + { 264, 89, 969}, { 794, 171, 576}, { 821, 186, 1226}, + { 404, 462, 517}, { 339, 918, 794}, { 1280, 1423, 196}, + { 1453, 2019, 365}, { 1615, 1481, 672}, { 2394, 1708, 508}, + { 806, 1238, 573}, { 713, 1158, 1078}, { 1285, 1436, 1232}, + { 1790, 1188, 1141}, { 765, 643, 864}, { 1032, 797, 1279}, + { 900, 563, 1827}, { 1514, 673, 2312}, { 1544, 1129, 3240}, + { 1469, 1050, 1594}, { 1945, 1318, 1988}, { 2397, 2026, 2060}, + { 3538, 2057, 2620}, { 1249, -118, 74}, { 1727, 194, 421}, + { 2078, -50, -463}, { 970, 688, -432}, { 1149, 952, -110}, + { 1254, 1275, -651}, { 1386, 929, 401}, { 1960, 1167, 232}, + { 407, -752, -243}, { 859, -1118, 172}, { -227, -860, -992}, + { -796, -1175, -1380}, { 8, -1282, -388}, { 353, -1781, -1037}, + { -732, -397, -807}, { -853, -28, -1342}, {-1229, -1207, -1959}, + {-1015, -1125, -2543}, {-1452, -1791, -2725}, {-1891, -2416, -3269}, + { -918, -1629, -783}, { -580, -2155, -698}, {-1097, -2364, -96}, + {-1387, -1513, 7}, {-1588, -2076, -664}, {-1473, -2740, -784}, + {-2378, -3149, -56}, {-2856, -2092, -169}, {-3391, -3708, 316}, + {-1176, -890, -614}, {-1944, -1061, -800}, { -299, -1517, -1000}, + { -640, -1850, -1526}, {-1454, -1536, -1233}, {-1890, -1955, -1756}, + {-1086, -1921, -2122}, { -750, -2325, -2260}, {-1325, -2413, -2673}, + {-1114, -2542, -3459}, {-1341, -2901, -3963}, {-1160, -2226, -1393}, + {-1001, -2772, -1573}, {-1594, -2641, -1978}, {-1534, -3046, -2624}, + {-2224, -2196, -675}, {-2807, -3054, -1102}, {-2008, -2840, -1186}, + {-1980, -3332, -1695}, {-1715, -3562, -505}, {-2527, -4000, -1887}, + {-2333, -2734, -2296}, {-3440, -2401, -3211}, {-2008, -3528, -3337}, + {-2247, -3291, -4510}, { -475, 949, 155}, { -149, 1365, 545}, + { -757, 1644, 1083}, { -217, 2053, 1353}, {-1433, 2301, 1462}, + { 495, 1661, 529}, { 10, 2037, 740}, { 2082, 1898, 978}, + { 2831, 2294, 911}, { 842, 793, 420}, { 1223, 1023, 863}, + { 1237, 451, 780}, { 1744, 708, 822}, { 1533, 284, 1384}, + { 2135, 609, 1538}, { 2305, 626, 540}, { 2368, 1187, 955}, + { 2586, 1255, -7}, { 3116, 1131, 726}, { 3431, 1730, 428}, + { 2734, 1648, 1307}, { 2988, 1231, 2010}, { 3523, 2024, 1488}, + { 1034, 1657, 871}, { 1206, 2163, 1036}, { 1807, 2372, 1233}, + { 1808, 1769, 1493}, { 1573, 2332, 1779}, { 1216, 1609, 1866}, + { 1480, 1898, 2513}, { 465, 2708, 2776}, { 771, 3638, 3338}, + { 1869, 2599, 2623}, { 2825, 2745, 2468}, { 2638, 2439, 1585}, + { 2094, 2970, 1308}, { 2022, 3057, 1999}, { 3428, 2912, 1816}, + { 4536, 2974, 2129}, { 1046, 2563, 2086}, { 1363, 3562, 2318}, + { 2511, 1891, 2984}, { 1866, 2306, 3986}, { 3272, 2924, 3682}, + { 3146, 3564, 2272}, { 3592, 3968, 2822}, { 2431, 3369, 3069}, + { 1931, 4709, 3090}, { 2629, 4220, 3986}, { 4639, 4056, 3664}, + { 4035, 5334, 4912} +}; + +const int16_t ff_g723_1_lsp_band2[LSP_CB_SIZE][4] = { + { 0, 0, 0, 0}, { 601, 512, -542, 334}, + { 428, 1087, -484, -132}, { 652, 622, -391, -572}, + { 378, 799, 141, -860}, { 1040, 409, 112, -554}, + { 1123, 670, -75, -847}, { 1421, 494, -315, -1095}, + { 787, 1001, 114, -460}, { 988, 1672, 216, -681}, + { 1007, 1241, -132, -1247}, { 1073, 399, 186, -5}, + { 1262, 193, -694, -129}, { 325, 196, 51, -641}, + { 861, -59, 350, -458}, { 1261, 567, 586, -346}, + { 1532, 885, 210, -517}, { 2027, 937, 113, -792}, + { 1383, 1064, 334, 38}, { 1964, 1468, 459, 133}, + { 2062, 1186, -98, -121}, { 2577, 1445, 506, -373}, + { 2310, 1682, -2, -960}, { 2876, 1939, 765, 138}, + { 3581, 2360, 649, -414}, { 219, 176, -398, -309}, + { 434, -78, -435, -880}, { -344, 301, 265, -552}, + { -915, 470, 657, -380}, { 419, -432, -163, -453}, + { 351, -953, 8, -562}, { 789, -43, 20, -958}, + { 302, -594, -352, -1159}, { 1040, 108, -668, -924}, + { 1333, 210, -1217, -1663}, { 483, 589, -350, -1140}, + { 1003, 824, -802, -1184}, { 745, 58, -589, -1443}, + { 346, 247, -915, -1683}, { 270, 796, -720, -2043}, + { 1208, 722, -222, -193}, { 1486, 1180, -412, -672}, + { 1722, 179, -69, -521}, { 2047, 860, -666, -1410}, + { -146, 222, -281, -805}, { -189, 90, -114, -1307}, + { -152, 1086, -241, -764}, { -439, 733, -601, -1302}, + { -833, -167, -351, -601}, { -856, -422, -411, -1059}, + { -747, -355, -582, -1644}, { -837, 210, -916, -1144}, + {-1800, 32, -878, -1687}, { -48, -23, -1146, 52}, + { -350, -409, -1656, -364}, { 265, -728, -858, -577}, + { 458, -247, -1141, -997}, { 691, -407, -1988, -1161}, + { -66, -104, -705, -1249}, { -431, -93, -1191, -1844}, + { 203, -732, -1000, -1693}, { 10, -832, -1846, -1819}, + { 493, -128, -1436, -1768}, { 488, -311, -1730, -2540}, + { -653, -532, -1150, -1172}, {-1086, -289, -1706, -1533}, + { -699, -1205, -1216, -1766}, {-1032, -1481, -2074, -1523}, + { -721, -1220, -2277, -2600}, { 12, -539, -1484, -1131}, + { -40, -911, -2106, -441}, { -471, -484, -2267, -1549}, + { -141, -988, -3006, -1721}, {-1545, -2102, -583, 342}, + {-1383, -2772, -386, -13}, {-2118, -2589, -1205, 72}, + {-2147, -3231, -965, 390}, {-2949, -3300, -621, 637}, + {-3907, -4138, -865, 803}, {-1287, -845, -375, -548}, + {-1416, -1169, -487, -1277}, {-1400, -1690, -1027, -418}, + {-2018, -1909, -1188, -1260}, {-1418, -2222, -2029, -128}, + {-2067, -2998, -2693, -310}, { -950, -1028, -1538, 185}, + {-1616, -915, -2205, -549}, { 19, -821, -1145, 352}, + { 184, -1175, -1356, -627}, { -547, -1088, -1661, -911}, + { -216, -1502, -2197, -948}, { -795, -1306, -2374, -451}, + { -924, -1889, -2796, -680}, { -600, -1614, -3609, -885}, + {-2392, -2528, 319, 303}, {-2908, -2095, -310, 573}, + {-3460, -2141, 49, -113}, {-2231, -448, 675, -146}, + {-2805, -532, 1231, 479}, {-2684, -486, -200, 611}, + {-3525, -971, -198, 704}, {-3707, 173, 349, 254}, + {-4734, -1447, -34, 880}, { 777, -512, 114, -10}, + { 1250, -66, 442, -5}, { 604, 613, 452, -352}, + { 1224, 777, 675, -1014}, {-1372, -79, -1208, -238}, + {-2389, -17, -1157, -818}, {-1504, -673, -1133, -1060}, + {-1984, -799, -2005, -1973}, {-2037, -798, -1068, -105}, + {-3190, -899, -1817, -194}, { -156, -886, 394, -318}, + { -258, -1283, 551, 202}, { -536, -1729, 910, 331}, + { -847, -1109, 795, -163}, {-1171, -1128, 715, 519}, + {-1080, -1319, 1685, 668}, {-1000, -1921, 96, 211}, + {-1487, -2148, 831, 174}, {-1139, -374, 414, -4}, + {-1517, -1383, 396, -352}, {-1012, 439, -59, -967}, + {-1812, 706, -440, -1030}, {-1971, -329, -34, -827}, + {-2472, -1588, -151, -606}, {-2161, 374, -281, 76}, + {-3012, 231, -15, -690}, { 1104, 566, 721, 209}, + { 1685, 564, 383, 98}, { 1898, 750, 792, -97}, + { 556, -64, 561, -93}, { 876, 162, 913, -22}, + { 961, 675, 1296, 140}, { 756, -396, 851, 544}, + { 360, -303, 1341, 396}, { 878, -22, 1464, 863}, + { -309, -273, 642, -129}, { -686, -82, 842, 454}, + { -5, -47, 1069, 998}, { -94, 967, 1277, 298}, + { -489, 385, 1473, 746}, { -369, -717, 1333, 242}, + { 281, -993, 1726, 924}, { 464, 601, 1575, 1376}, + { -250, 206, 2339, 1175}, { -438, 377, -597, -285}, + {-1020, 787, -790, -287}, { -458, -410, 215, 295}, + { -589, -860, -121, 797}, {-1175, 122, -437, 466}, + {-1480, -121, 367, 924}, { 234, 323, 770, -555}, + { 145, 30, 996, 26}, { 66, 849, 93, -145}, + { -117, 1261, 474, -399}, {-1495, 1051, 218, -506}, + {-1390, 694, 994, 88}, { 616, 7, 78, 304}, + { 1060, 52, -62, 835}, { 833, 454, 649, 1359}, + { -770, 464, 47, 93}, { -574, 1199, -39, 379}, + { 114, -98, 488, 485}, { 727, 244, 606, 696}, + { -76, 455, 671, 546}, { -565, -13, 145, 819}, + { -376, 569, 448, 1128}, { 218, 122, 265, 1167}, + { 230, 738, 932, 1003}, { 138, 477, 36, 450}, + { 404, 787, -73, 1000}, { 497, 1259, 387, 1231}, + { 17, 207, 195, -79}, { 562, 358, 53, -158}, + { 493, 387, 478, 189}, { 678, 831, 640, 558}, + { -197, 523, 613, 57}, { 429, 894, 769, 111}, + { 67, 1174, 568, 511}, { 1242, 824, 251, 840}, + { 1419, 1074, 864, 481}, { 924, 1474, 669, 724}, + { 1539, 1879, 654, 1590}, { 445, 337, 1111, 541}, + { 472, 1421, 1264, 1094}, { 794, 735, 1103, 668}, + { 1055, 863, 1192, 1020}, { 778, 1105, 806, 1798}, + { 1052, 1527, 1587, 2151}, { 881, 1552, 1265, 391}, + { 726, 872, 1812, 601}, { 1469, 280, 1008, 616}, + { 1403, 577, 1803, 1244}, { 1650, 1314, 1148, 1072}, + { 1297, 1669, 1911, 1026}, { 2093, 1044, 2115, 1189}, + { 1644, 1961, 2587, 1512}, { 25, -315, -9, -106}, + { 290, -339, 428, -444}, { -68, -783, 735, 772}, + { 245, -555, 468, 47}, { 334, -895, 814, 146}, + { 235, 368, -964, -959}, { -203, 315, -1566, -1217}, + { 801, 17, -276, -354}, { 894, -495, -789, -635}, + { 716, 291, -1189, -357}, { 560, -260, -733, -2}, + { 679, -508, -1429, 211}, { -51, -62, -428, 557}, + { 322, -638, -211, 614}, { -878, -1057, -84, -71}, + { -388, -1415, -167, -318}, { -754, -1574, 214, -539}, + {-1419, -2004, -92, -787}, { -47, -856, -347, -255}, + { 23, -1211, -173, 320}, { -658, -487, -893, 353}, + { -783, -1587, -584, 507}, {-1420, -859, -378, 441}, + {-2095, -1491, -137, 439}, { -321, -1450, -1288, -12}, + { -359, -2113, -553, -8}, { -831, -1918, -1561, 32}, + {-1014, -2487, -1359, -939}, { -475, -311, -169, -236}, + { -907, -426, 276, -611}, { -96, -400, 50, -710}, + { -426, -1022, -10, -985}, { -197, -258, -744, -575}, + { -611, -930, -771, -394}, { -267, -776, -612, -939}, + { -256, -1346, -802, -1122}, { -796, -1570, -825, -754}, + { 712, 876, 141, 227}, { 981, 1509, 85, 124}, + { 1462, 1228, 979, -39}, { 1734, 999, 1481, 440}, + { 2293, 1116, 769, 440}, { 2504, 1480, 1241, 356}, + { 2474, 1909, 1558, 810}, { 917, 1134, 607, -134}, + { 509, 1809, 781, -123}, { 1712, 1506, 559, -423}, + { 2037, 2317, 726, -155}, { 3031, 2676, 1203, 331}, + { 3664, 3274, 1768, 531}, { 1610, 1839, 867, 183}, + { 1774, 1972, 1538, 97}, { 1822, 2158, 1282, 659}, + { 2222, 2758, 1818, 900}, { 3251, 2124, 1723, 996}, + { 3633, 2336, 2408, 1453}, { 2923, 3517, 2567, 1318}, +}; + +const int32_t ff_g723_1_combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE] = { + {118755, 98280, 80730, 65780, 53130, + 42504, 33649, 26334, 20349, 15504, + 11628, 8568, 6188, 4368, 3003, + 2002, 1287, 792, 462, 252, + 126, 56, 21, 6, 1, + 0, 0, 0, 0, 0}, + + { 23751, 20475, 17550, 14950, 12650, + 10626, 8855, 7315, 5985, 4845, + 3876, 3060, 2380, 1820, 1365, + 1001, 715, 495, 330, 210, + 126, 70, 35, 15, 5, + 1, 0, 0, 0, 0}, + + { 3654, 3276, 2925, 2600, 2300, + 2024, 1771, 1540, 1330, 1140, + 969, 816, 680, 560, 455, + 364, 286, 220, 165, 120, + 84, 56, 35, 20, 10, + 4, 1, 0, 0, 0}, + + { 406, 378, 351, 325, 300, + 276, 253, 231, 210, 190, + 171, 153, 136, 120, 105, + 91, 78, 66, 55, 45, + 36, 28, 21, 15, 10, + 6, 3, 1, 0, 0}, + + { 29, 28, 27, 26, 25, + 24, 23, 22, 21, 20, + 19, 18, 17, 16, 15, + 14, 13, 12, 11, 10, + 9, 8, 7, 6, 5, + 4, 3, 2, 1, 0}, + + { 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1}, +}; + +const int16_t ff_g723_1_fixed_cb_gain[GAIN_LEVELS] = { + 1, 2, 3, 4, 6, 9, 13, 18, + 26, 38, 55, 80, 115, 166, 240, 348, + 502, 726, 1050, 1517, 2193, 3170, 4582, 6623, +}; + +const int16_t ff_g723_1_adaptive_cb_gain85[85 * 20] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 800, 1496, 167, -256, + -338, -39, -136, -1, -4, -6, -73, -8, + -15, 12, 23, 2, 16, 30, 3, -5, + -462, -686, 493, 2575, 311, -13, -28, -14, + -404, -5, -19, 13, 20, 72, 107, -77, + 8, 13, -9, -48, 1483, 144, 784, 928, + 1243, -134, -1, -37, -52, -94, -13, -71, + -6, -84, -8, -44, -112, -10, -59, -70, + -77, 275, 3522, 1056, -1254, 0, -4, -757, + -68, -95, 1, 16, -59, 4, -17, -227, + -5, 21, 269, 80, -125, -40, -264, 381, + 5027, 0, 0, -4, -8, -1542, 0, -2, + 0, 2, 0, 6, 38, 12, 81, -117, + 138, 332, 2215, 2574, 1339, -1, -6, -299, + -404, -109, -2, -18, -44, -21, -52, -348, + -11, -27, -181, -210, 3685, 2883, -887, 866, + -1639, -828, -507, -48, -45, -164, -648, 199, + 156, -194, -152, 46, 368, 288, -88, 86, + 1396, 2146, 2235, 345, 942, -118, -281, -305, + -7, -54, -182, -190, -292, -29, -45, -47, + -80, -123, -128, -19, 13, 4475, 3549, -804, + -655, 0, -1222, -768, -39, -26, -3, -2, + -969, 0, 219, 174, 0, 179, 141, -32, + -724, 254, 242, 6049, 2462, -32, -3, -3, + -2233, -370, 11, 10, -3, 267, -94, -89, + 108, -38, -36, -909, 626, -1713, 6121, 4561, + -1061, -23, -179, -2287, -1270, -68, 65, -233, + 640, -174, 477, -1704, 40, -111, 396, 295, + -350, 1391, 7985, 511, -405, -7, -118, -3892, + -15, -10, 29, 170, -678, 10, -43, -249, + -8, 34, 197, 12, 3144, -529, 608, 2530, + 3878, -603, -17, -22, -390, -918, 101, -116, + 19, -485, 81, -93, -744, 125, -144, -599, + 2589, -689, 3045, 5603, -404, -409, -29, -566, + -1916, -10, 108, -481, 128, -885, 235, -1041, + 63, -17, 75, 138, 3107, 513, 1374, -3594, + -4922, -589, -16, -115, -788, -1478, -97, -260, + -43, 681, 112, 301, 933, 154, 413, -1079, + 2468, 6010, 1107, -390, 1961, -372, -2204, -74, + -9, -234, -905, -166, -406, 58, 143, 26, + -295, -719, -132, 46, 4773, 2766, 2368, 4862, + -4044, -1390, -467, -342, -1443, -998, -806, -690, + -399, -1416, -821, -702, 1178, 682, 584, 1200, + 1665, -1879, 1443, 1701, 8562, -169, -215, -127, + -176, -4475, 190, -146, 165, -172, 195, -149, + -870, 982, -754, -889, 2716, 9011, -1007, 755, + -1785, -450, -4956, -61, -34, -194, -1493, 167, + 554, -125, -415, 46, 296, 982, -109, 82, + -2727, 7548, 1285, 938, 3420, -453, -3478, -100, + -53, -714, 1256, 213, -592, 156, -432, -73, + 569, -1576, -268, -196, 3677, 882, 4050, 1202, + 2323, -825, -47, -1001, -88, -329, -198, -909, + -218, -269, -64, -297, -521, -125, -574, -170, + 2046, -753, 122, 10102, 603, -255, -34, 0, + -6229, -22, 94, -15, 5, -1261, 464, -75, + -75, 27, -4, -372, 449, -1815, 10690, 3870, + -527, -12, -201, -6976, -914, -16, 49, -293, + 1184, -106, 428, -2525, 14, -58, 344, 124, + -941, 2352, 5049, 3650, 2637, -54, -337, -1556, + -813, -424, 135, 290, -725, 209, -524, -1125, + 151, -378, -812, -587, -1879, 796, 3117, 9569, + -404, -215, -38, -593, -5589, -9, 91, 357, + -151, 1097, -464, -1821, -46, 19, 76, 236, + -1715, 2043, -2096, 9946, 4001, -179, -254, -268, + -6038, -977, 213, -219, 261, 1041, -1240, 1272, + 418, -498, 511, -2429, -5772, -618, -3921, 284, + -3155, -2033, -23, -938, -4, -607, -218, -1381, + -148, 100, 10, 68, -1111, -119, -755, 54, + 382, 4748, 8003, -2064, 2198, -8, -1376, -3909, + -260, -294, -110, -186, -2319, 48, 598, 1008, + -51, -637, -1073, 277, -867, 3015, 11926, -1675, + 947, -45, -555, -8681, -171, -54, 159, 631, + -2195, -88, 308, 1219, 50, -174, -690, 96, + -4933, -432, 6757, 3771, 1352, -1485, -11, -2786, + -867, -111, -130, 2034, 178, 1135, 99, -1555, + 407, 35, -557, -311, 152, 9726, 4231, -1928, + 1490, -1, -5774, -1092, -226, -135, -90, -39, + -2511, 17, 1144, 498, -13, -884, -384, 175, + 2512, 193, 9033, 5361, -3148, -385, -2, -4980, + -1754, -605, -29, -1385, -106, -822, -63, -2956, + 482, 37, 1735, 1030, 8464, 2844, 12, 549, + 2132, -4373, -493, 0, -18, -277, -1469, -6, + -2, -284, -95, 0, -1101, -370, -1, -71, + 2141, -2602, 7166, 9046, -1350, -279, -413, -3134, + -4994, -111, 340, -936, 1138, -1182, 1436, -3957, + 176, -214, 590, 745, -244, 278, 13307, 1227, + -161, -3, -4, -10808, -91, -1, 4, 198, + -226, 18, -20, -997, -2, 2, 131, 12, + -1947, 8217, 6269, 917, -2559, -231, -4121, -2399, + -51, -399, 976, 745, -3144, 108, -460, -350, + -304, 1283, 979, 143, -1810, 2061, -2781, 6056, + 10058, -200, -259, -472, -2238, -6174, 227, -307, + 349, 669, -761, 1028, 1111, -1265, 1707, -3717, + 7827, 9161, -3409, 2473, -1510, -3739, -5122, -709, + -373, -139, -4376, 1628, 1906, -1181, -1382, 514, + 721, 844, -314, 228, -1430, 8313, 9541, -2955, + 1626, -124, -4218, -5556, -533, -161, 725, 832, + -4841, -257, 1499, 1721, 142, -825, -947, 293, + 2819, -4247, 5391, 8673, 2756, -485, -1101, -1774, + -4591, -463, 730, -927, 1397, -1492, 2248, -2854, + -474, 714, -907, -1459, 141, 14552, 690, 257, + -112, -1, -12926, -29, -4, 0, -125, -5, + -613, -2, -228, -10, 0, 99, 4, 1, + 11938, -1859, 1806, -962, -884, -8699, -211, -199, + -56, -47, 1355, -1316, 205, 701, -109, 106, + 644, -100, 97, -51, 3728, 1982, 2264, 4584, + 3131, -848, -239, -312, -1282, -598, -451, -515, + -273, -1043, -554, -633, -712, -378, -432, -876, + -1181, 766, 720, 14303, -216, -85, -35, -31, + -12486, -2, 55, 51, -33, 1031, -668, -628, + -15, 10, 9, 189, -4385, 4826, 10112, 1569, + 3388, -1173, -1421, -6242, -150, -700, 1291, 2706, + -2979, 420, -462, -969, 906, -998, -2091, -324, + -448, 1932, 15591, -1842, 657, -12, -227, -14837, + -207, -26, 52, 427, -1838, -50, 217, 1753, + 18, -77, -626, 74, -4141, 1844, 3962, 5517, + 6220, -1046, -207, -958, -1858, -2361, 466, 1001, + -446, 1394, -621, -1334, 1572, -700, -1504, -2094, + 729, -2299, 14755, 3657, -952, -32, -322, -13288, + -816, -55, 102, -656, 2071, -162, 513, -3294, + 42, -133, 857, 212, -1385, 5801, 13339, -3137, + 1344, -117, -2054, -10861, -600, -110, 490, 1127, + -4723, -265, 1111, 2554, 113, -476, -1094, 257, + 4710, 9661, 1073, -2467, 3274, -1354, -5697, -70, + -371, -654, -2777, -308, -633, 709, 1455, 161, + -941, -1930, -214, 493, 1843, -3624, 12422, 6898, + -1559, -207, -802, -9419, -2904, -148, 407, -1397, + 2748, -775, 1526, -5230, 175, -344, 1182, 656, + 1433, 2394, 2507, 1380, 8780, -125, -349, -383, + -116, -4705, -209, -219, -366, -120, -201, -211, + -768, -1283, -1343, -740, -1712, 12915, 5883, -2197, + 991, -179, -10181, -2112, -294, -60, 1350, 615, + -4638, -229, 1732, 789, 103, -781, -356, 133, + 15072, 2158, -1245, 910, -496, -13865, -284, -94, + -50, -15, -1986, 1145, 164, -837, -119, 69, + 456, 65, -37, 27, 4655, 7319, 4916, 586, + -3381, -1322, -3270, -1475, -20, -697, -2079, -1396, + -2196, -166, -261, -175, 960, 1510, 1014, 120, + 1191, -2140, 5120, 13498, -1418, -86, -279, -1600, + -11121, -122, 155, -372, 669, -981, 1763, -4218, + 103, -185, 443, 1168, -1530, -817, 8191, 9632, + -1452, -143, -40, -4095, -5663, -128, -76, 765, + 408, 900, 480, -4815, -135, -72, 726, 854, + -3236, 607, 1696, -2106, 11485, -639, -22, -175, + -270, -8051, 119, 335, -62, -416, 78, 218, + 2268, -425, -1189, 1476, 3203, -1903, -837, 9679, + 7057, -626, -221, -42, -5718, -3039, 372, 163, + -97, -1892, 1124, 494, -1380, 819, 360, -4169, + 213, -655, 17015, 620, -384, -2, -26, -17671, + -23, -9, 8, -221, 681, -8, 24, -644, + 5, -15, 399, 14, 5088, 35, -3339, 3726, + 8488, -1580, 0, -680, -847, -4397, -10, 1037, + 7, -1157, -8, 759, -2636, -18, 1730, -1930, + -988, 1454, -2688, 15039, 2682, -59, -129, -441, + -13805, -439, 87, -162, 238, 907, -1335, 2467, + 161, -238, 440, -2462, -4865, -2842, -53, 5495, + 6523, -1445, -493, 0, -1843, -2597, -844, -16, + -9, 1632, 953, 18, 1937, 1131, 21, -2188, + 3076, 15069, -2914, 1810, -971, -577, -13860, -518, + -200, -57, -2829, 547, 2680, -339, -1665, 322, + 182, 893, -172, 107, 1311, 5355, 11054, 2299, + -3654, -105, -1750, -7458, -322, -814, -428, -885, + -3613, -184, -751, -1551, 292, 1194, 2465, 512, + 4035, 5619, 4618, 1815, 1912, -994, -1927, -1301, + -201, -223, -1384, -1137, -1583, -447, -622, -511, + -471, -656, -539, -211, -2131, 2754, -4501, 12879, + 7432, -277, -463, -1236, -10124, -3371, 358, -585, + 756, 1675, -2165, 3538, 967, -1249, 2042, -5842, + 5618, -515, 3219, -4149, 4857, -1926, -16, -632, + -1050, -1440, 176, -1104, 101, 1422, -130, 815, + -1666, 152, -954, 1230, 1838, -1709, 1139, 16867, + 716, -206, -178, -79, -17366, -31, 191, -127, + 118, -1892, 1759, -1173, -80, 74, -49, -737, + 1978, -3845, 10050, 11854, -2492, -238, -902, -6164, + -8576, -379, 464, -1213, 2358, -1431, 2782, -7271, + 301, -585, 1529, 1803, -2600, 11246, 11289, -3647, + 1463, -412, -7720, -7778, -812, -130, 1784, 1791, + -7749, -578, 2504, 2513, 232, -1004, -1008, 325, + 3442, 907, 2725, 8970, 3638, -723, -50, -453, + -4911, -808, -190, -572, -150, -1884, -496, -1492, + -764, -201, -605, -1992, -126, 17498, 3481, -2003, + 1090, 0, -18689, -739, -244, -72, 135, 26, + -3717, -15, 2139, 425, 8, -1165, -231, 133, + -1814, 1048, -2164, 4070, 16272, -200, -67, -285, + -1011, -16160, 116, -239, 138, 450, -260, 537, + 1801, -1041, 2149, -4042, 9354, 12580, -1883, 962, + -617, -5341, -9660, -216, -56, -23, -7183, 1075, + 1446, -549, -738, 110, 352, 474, -71, 36, + 1708, 4199, 7387, 6335, 1003, -178, -1076, -3330, + -2449, -61, -437, -770, -1893, -660, -1623, -2856, + -104, -257, -452, -388, -2624, 5623, 17310, -2353, + 592, -420, -1930, -18288, -338, -21, 900, 2772, + -5941, -376, 807, 2486, 94, -203, -625, 85, + 1211, -850, 1193, -1926, 15992, -89, -44, -86, + -226, -15609, 62, -88, 61, 142, -100, 140, + -1182, 830, -1165, 1880, 3983, -2054, 11506, -19, + 3622, -968, -257, -8080, 0, -801, 499, -2797, + 1442, 4, -2, 13, -880, 454, -2544, 4, + -786, -1354, 16092, 7246, -1665, -37, -111, -15805, + -3205, -169, -65, 772, 1330, 348, 599, -7117, + -80, -137, 1636, 736, -4316, -511, 6674, 11665, + 4633, -1137, -15, -2719, -8305, -1310, -134, 1758, + 208, 3073, 364, -4752, 1220, 144, -1887, -3299, + 7912, 4557, 1937, 1885, 7037, -3821, -1267, -229, + -216, -3022, -2200, -935, -538, -910, -524, -222, + -3398, -1957, -832, -809, 3434, 2967, 5867, 8196, + 8766, -720, -537, -2101, -4100, -4690, -622, -1230, + -1062, -1718, -1484, -2935, -1837, -1588, -3139, -4385, + 5881, 9176, 8119, 3934, 3355, -2111, -5139, -4023, + -944, -687, -3294, -2914, -4547, -1412, -2203, -1949, + -1204, -1879, -1662, -805 +}; + +const int16_t ff_g723_1_adaptive_cb_gain170[170 * 20] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 212, 715, 670, + 809, -36, -2, -31, -27, -39, -10, -33, + -9, -31, -8, -29, -38, -10, -35, -33, + 1296, 1316, -168, -320, -815, -102, -105, -1, + -6, -40, -104, 13, 13, 25, 25, -3, + 64, 65, -8, -15, -589, 680, 2478, 308, + -596, -21, -28, -375, -5, -21, 24, 89, + -102, 11, -12, -46, -21, 24, 90, 11, + -735, -487, -5, 2948, 468, -33, -14, 0, + -530, -13, -21, 0, 0, 132, 87, 0, + 21, 13, 0, -84, 1042, 1730, 1068, 333, + 626, -66, -182, -69, -6, -23, -110, -67, + -112, -21, -35, -21, -39, -66, -40, -12, + 486, -769, 4074, 2825, -1107, -14, -36, -1013, + -487, -74, 22, -120, 191, -83, 132, -702, + 32, -52, 275, 191, 1521, -767, -124, 4320, + 1026, -141, -35, 0, -1139, -64, 71, 11, + -5, -401, 202, 32, -95, 48, 7, -270, + 2425, 1267, 3439, -91, -1166, -359, -98, -722, + 0, -83, -187, -509, -266, 13, 7, 19, + 172, 90, 244, -6, -1251, 975, 173, 4039, + 2005, -95, -58, -1, -996, -245, 74, 13, + -10, 308, -240, -42, 153, -119, -21, -494, + 1820, 632, 1322, 2062, 1031, -202, -24, -106, + -259, -64, -70, -146, -51, -229, -79, -166, + -114, -39, -83, -129, -447, 4904, 244, -315, + -2038, -12, -1467, -3, -6, -253, 134, 6, + -73, -8, 94, 4, -55, 610, 30, -39, + -208, -1102, 463, -448, 5653, -2, -74, -13, + -12, -1950, -14, 5, 31, -5, -30, 12, + 71, 380, -159, 154, 4739, 2600, -1864, 856, + -1554, -1371, -412, -212, -44, -147, -752, 539, + 295, -247, -135, 97, 449, 246, -176, 81, + 1894, 3533, 35, -26, 2145, -219, -762, 0, + 0, -280, -408, -4, -7, 3, 5, 0, + -248, -462, -4, 3, -2699, 1841, 4072, 2443, + 1582, -444, -207, -1012, -364, -152, 303, 670, + -457, 402, -274, -607, 260, -177, -393, -236, + -844, 3358, 6106, -1059, -537, -43, -688, -2275, + -68, -17, 173, 314, -1251, -54, 217, 395, + -27, 110, 200, -34, 1251, 1016, 3020, 2210, + 1445, -95, -63, -556, -298, -127, -77, -230, + -187, -168, -137, -407, -110, -89, -266, -194, + 2099, 2277, 4038, 3533, -2870, -269, -316, -995, + -762, -503, -291, -517, -561, -452, -491, -871, + 367, 399, 707, 619, 400, -1114, 8516, 2422, + -1117, -9, -75, -4426, -358, -76, 27, -208, + 579, -59, 164, -1259, 27, -75, 580, 165, + -4398, -2011, 3912, -2407, 2258, -1180, -247, -934, + -353, -311, -540, 1050, 480, -646, -295, 575, + 606, 277, -539, 331, 1767, -1447, 4240, 6160, + -757, -190, -127, -1097, -2316, -35, 156, -457, + 374, -664, 544, -1594, 81, -66, 195, 284, + 1594, -1463, 1035, 6938, 1920, -155, -130, -65, + -2938, -225, 142, -100, 92, -675, 619, -438, + -186, 171, -121, -813, -562, 4716, 4085, -591, + 2421, -19, -1357, -1018, -21, -357, 162, 140, + -1175, -20, 170, 147, 83, -696, -603, 87, + 1552, 8778, -935, 354, -1424, -147, -4703, -53, + -7, -123, -831, 88, 501, -33, -189, 20, + 134, 763, -81, 30, 4831, -4431, 41, -1479, + -2976, -1424, -1198, 0, -133, -540, 1306, -12, + 11, 436, -400, 3, 877, -804, 7, -268, + 2090, 1192, 1006, 1645, 4853, -266, -86, -61, + -165, -1437, -152, -128, -73, -210, -119, -101, + -619, -353, -298, -487, 2386, 5712, 1426, -94, + 1350, -347, -1991, -124, 0, -111, -832, -207, + -497, 13, 32, 8, -196, -470, -117, 7, + -1349, 1091, 1659, 8891, 313, -111, -72, -168, + -4825, -5, 89, 136, -110, 732, -592, -900, + 25, -20, -31, -170, 9980, 916, -381, -808, + 88, -6080, -51, -8, -39, 0, -558, 232, + 21, 492, 45, -18, -53, -4, 2, 4, + 2338, -1031, -248, 3928, 6484, -333, -64, -3, + -942, -2566, 147, 35, -15, -560, 247, 59, + -925, 408, 98, -1555, 6166, -1240, -337, 3672, + -1277, -2320, -93, -6, -823, -99, 466, 126, + -25, -1382, 278, 75, 480, -96, -26, 286, + 4377, -132, -2588, 1701, 4865, -1169, -1, -409, + -176, -1444, 35, 691, -20, -454, 13, 268, + -1299, 39, 768, -505, 2594, 3295, 3944, 1481, + 682, -410, -662, -949, -133, -28, -521, -624, + -793, -234, -297, -356, -108, -137, -164, -61, + 4151, 624, 815, 4485, 2229, -1052, -23, -40, + -1228, -303, -158, -206, -31, -1136, -170, -223, + -565, -84, -111, -610, -3575, -361, 4924, 2791, + 4698, -780, -7, -1480, -475, -1347, -78, 1074, + 108, 609, 61, -839, 1025, 103, -1412, -800, + -2518, 3791, 8623, 315, 2465, -387, -877, -4538, + -6, -370, 582, 1325, -1995, 48, -73, -166, + 378, -570, -1297, -47, -691, 2989, 9957, -421, + -1142, -29, -545, -6051, -10, -79, 126, 420, + -1817, -17, 76, 256, -48, 208, 694, -29, + -1918, 104, -3190, -3410, -4440, -224, 0, -621, + -709, -1203, 12, -373, 20, -399, 21, -664, + -519, 28, -864, -924, -3359, -1668, 1854, 6939, + 1430, -688, -169, -209, -2939, -124, -341, 380, + 188, 1422, 706, -785, 293, 145, -161, -606, + 42, 9706, 3164, -952, 907, 0, -5750, -611, + -55, -50, -25, -8, -1874, 2, 564, 183, + -2, -537, -175, 52, 1607, 785, 2862, 4327, + 3307, -157, -37, -500, -1143, -667, -77, -280, + -137, -424, -207, -756, -324, -158, -577, -873, + 6801, 3416, 2227, 1682, -3217, -2823, -712, -302, + -172, -631, -1418, -924, -464, -698, -350, -228, + 1335, 670, 437, 330, 3459, 3898, 364, 7841, + -2640, -730, -927, -8, -3753, -425, -823, -76, + -86, -1655, -1865, -174, 557, 628, 58, 1263, + -5902, -3458, -2465, -1886, 4334, -2126, -730, -371, + -217, -1146, -1245, -888, -520, -679, -398, -283, + 1561, 915, 652, 499, -3710, 1133, 7849, 3443, + -215, -840, -78, -3760, -723, -2, 256, 1777, + -543, 779, -238, -1649, -48, 14, 103, 45, + 4132, 2828, 2, -4212, -4116, -1042, -488, 0, + -1083, -1034, -713, 0, 0, 1062, 727, 0, + 1038, 710, 0, -1058, 5875, 8496, -1796, 1376, + -1786, -2107, -4406, -197, -115, -194, -3047, 644, + 931, -493, -713, 150, 640, 926, -195, 150, + 3143, 3483, 3546, -793, 4489, -603, -740, -767, + -38, -1230, -668, -680, -754, 152, 168, 171, + -861, -954, -971, 217, 2845, 7965, 3695, -5432, + 3978, -494, -3873, -833, -1801, -966, -1383, -641, + -1796, 943, 2641, 1225, -691, -1934, -897, 1319, + 1538, 150, 7139, 2049, 3097, -144, -1, -3110, + -256, -585, -14, -670, -65, -192, -18, -892, + -290, -28, -1349, -387, 618, 7520, 4729, -238, + -3373, -23, -3452, -1365, -3, -694, -283, -178, + -2170, 8, 109, 68, 127, 1548, 973, -49, + 2965, -3013, 7912, 7076, -1997, -536, -554, -3821, + -3056, -243, 545, -1431, 1455, -1280, 1301, -3417, + 361, -367, 964, 862, 2443, -929, -1113, 9677, + 4138, -364, -52, -75, -5716, -1045, 138, 166, + -63, -1443, 549, 657, -617, 234, 281, -2444, + 1966, 3309, 10085, -3399, 2105, -236, -668, -6207, + -705, -270, -397, -1210, -2037, 408, 686, 2092, + -252, -425, -1295, 436, -112, -1368, 8868, 4822, + 2048, 0, -114, -4800, -1419, -256, -9, 61, + 740, 33, 402, -2610, 14, 171, -1108, -602, + -2597, 438, -1839, 6229, 7266, -411, -11, -206, + -2368, -3223, 69, -291, 49, 987, -166, 699, + 1152, -194, 816, -2763, 3454, 553, 9127, 4946, + -5596, -728, -18, -5084, -1493, -1911, -116, -1924, + -308, -1042, -166, -2755, 1179, 188, 3117, 1689, + -532, -663, 12262, 2495, -1004, -17, -26, -9177, + -380, -61, -21, 398, 496, 81, 101, -1867, + -32, -40, 751, 152, -2100, 1317, -1509, 11425, + 2997, -269, -105, -139, -7967, -548, 168, -193, + 121, 1464, -918, 1052, 384, -240, 276, -2090, + 1193, -2697, 11259, 5373, -763, -86, -444, -7737, + -1762, -35, 196, -819, 1853, -391, 884, -3692, + 55, -125, 525, 250, 2405, -471, 11079, 203, + 782, -353, -13, -7491, -2, -37, 69, -1626, + 318, -29, 5, -137, -114, 22, -529, -9, + -1871, 5685, 11290, -2662, 1353, -213, -1972, -7780, + -432, -111, 649, 1289, -3917, -304, 923, 1834, + 154, -469, -932, 220, -3768, 5927, -3093, 5041, + 5212, -866, -2144, -584, -1551, -1658, 1363, -711, + 1119, 1159, -1824, 951, 1198, -1885, 984, -1603, + -2546, 9502, 5969, -2440, 1928, -395, -5511, -2175, + -363, -226, 1477, 927, -3462, -379, 1415, 889, + 299, -1118, -702, 287, -4963, 3568, 4592, 5508, + 3451, -1503, -777, -1287, -1851, -727, 1080, 1391, + -1000, 1668, -1199, -1543, 1045, -751, -967, -1160, + 1745, -2586, 3983, 10899, -1551, -186, -408, -968, + -7250, -146, 275, -424, 628, -1161, 1720, -2649, + 165, -244, 377, 1032, 867, -456, -727, 3369, + 11822, -45, -12, -32, -692, -8531, 24, 38, + -20, -178, 93, 149, -625, 329, 525, -2431, + 7535, 2422, 1926, 1405, 1599, -3466, -358, -226, + -120, -156, -1114, -886, -284, -646, -207, -165, + -735, -236, -188, -137, 1041, -735, -142, 13209, + 1515, -66, -33, -1, -10649, -140, 46, 9, + -6, -839, 593, 114, -96, 68, 13, -1222, + 7950, 6745, -1444, -1008, 2721, -3857, -2777, -127, + -62, -452, -3273, 700, 594, 489, 415, -88, + -1320, -1120, 239, 167, -4754, -1379, 4522, -578, + -5733, -1379, -116, -1248, -20, -2006, -400, 1312, + 380, -167, -48, 159, -1663, -482, 1582, -202, + 3220, 5978, 5923, 2430, -2689, -633, -2181, -2141, + -360, -441, -1175, -1164, -2161, -477, -886, -878, + 528, 981, 972, 398, 377, 1312, 13978, -1470, + 677, -8, -105, -11925, -132, -28, -30, -321, + -1119, 33, 117, 1254, -15, -54, -577, 60, + -3435, 6770, 314, -885, 5686, -720, -2797, -6, + -47, -1973, 1419, 65, -129, -185, 366, 16, + 1192, -2349, -109, 307, 3171, 8774, -2260, 2679, + 3069, -613, -4699, -312, -438, -575, -1698, 437, + 1210, -518, -1435, 369, -594, -1643, 423, -501, + 5557, 1509, 5407, -125, -7386, -1884, -139, -1784, + 0, -3330, -511, -1834, -498, 42, 11, 41, + 2505, 680, 2438, -56, -2838, 2595, 13228, 271, + 1793, -491, -411, -10680, -4, -196, 449, 2291, + -2095, 47, -42, -219, 310, -284, -1447, -29, + 664, -278, 14966, 951, -711, -26, -4, -13672, + -55, -30, 11, -606, 253, -38, 16, -869, + 28, -12, 650, 41, 808, 1770, 8658, 5863, + -1486, -39, -191, -4576, -2098, -134, -87, -427, + -935, -289, -633, -3098, 73, 160, 785, 531, + 3063, 1539, 2000, -542, 9576, -572, -144, -244, + -17, -5597, -287, -374, -188, 101, 51, 66, + -1790, -900, -1169, 317, 514, 14083, -323, 896, + -891, -16, -12106, -6, -49, -48, -442, 10, + 277, -28, -770, 17, 27, 766, -17, 48, + 892, 158, 5237, 11057, -1603, -48, -1, -1674, + -7462, -156, -8, -285, -50, -602, -106, -3534, + 87, 15, 512, 1082, -1612, 2564, -4296, 12526, + 5710, -158, -401, -1126, -9576, -1990, 252, -422, + 672, 1232, -1960, 3284, 561, -893, 1497, -4365, + 4889, -6878, 612, 6109, 4753, -1459, -2887, -22, + -2277, -1379, 2052, -182, 257, -1823, 2564, -228, + -1418, 1995, -177, -1772, 3053, -506, 2403, 9625, + 1322, -569, -15, -352, -5655, -106, 94, -448, + 74, -1794, 297, -1412, -246, 40, -194, -777, + -754, 12904, 4480, -2113, 1471, -34, -10163, -1225, + -272, -132, 594, 206, -3529, -97, 1664, 577, + 67, -1159, -402, 189, 4255, 1476, 5055, 2393, + 2912, -1105, -132, -1559, -349, -517, -383, -1313, + -455, -621, -215, -738, -756, -262, -898, -425, + -1371, 535, 1417, 14604, -997, -114, -17, -122, + -13017, -60, 44, 118, -46, 1222, -477, -1263, + -83, 32, 86, 888, 5368, -1744, 4083, -1236, + 3753, -1758, -185, -1017, -93, -860, 571, -1338, + 434, 405, -131, 308, -1229, 399, -935, 283, + 1588, -3097, 14415, 3699, -1171, -154, -585, -12683, + -835, -83, 300, -1397, 2725, -358, 699, -3255, + 113, -221, 1030, 264, 212, 7989, 9471, -3344, + 2009, -2, -3895, -5475, -682, -246, -103, -123, + -4618, 43, 1630, 1933, -26, -979, -1161, 410, + 856, 2294, -627, 6930, 6929, -44, -321, -24, + -2931, -2930, -119, 32, 87, -362, -970, 265, + -362, -970, 265, -2931, 2357, -4187, 7162, 7683, + 3371, -339, -1070, -3131, -3603, -693, 602, -1030, + 1830, -1105, 1963, -3359, -485, 861, -1474, -1581, + 350, 4585, 14053, -3819, 1218, -7, -1283, -12054, + -890, -90, -97, -300, -3933, 81, 1068, 3275, + -26, -341, -1045, 284, -3248, 3531, 475, 2137, + 11711, -644, -761, -13, -278, -8372, 700, 94, + -102, 423, -460, -62, 2322, -2524, -340, -1528, + -3017, 3852, 1725, 8440, 5257, -555, -905, -181, + -4348, -1686, 709, 317, -405, 1554, -1984, -889, + 968, -1236, -553, -2708, -909, 3196, 15512, -2528, + 1066, -50, -623, -14686, -390, -69, 177, 861, + -3026, -140, 493, 2393, 59, -208, -1009, 164, + 959, -3370, 9617, 9545, -1761, -56, -693, -5645, + -5561, -189, 197, -563, 1978, -558, 1963, -5603, + 103, -362, 1034, 1026, 7575, 11796, -4845, 3252, + -1703, -3502, -8493, -1433, -645, -177, -5454, 2240, + 3488, -1503, -2341, 961, 787, 1226, -503, 338, + 6409, 1722, 1764, -4191, 6015, -2507, -181, -189, + -1072, -2208, -673, -690, -185, 1639, 440, 451, + -2353, -632, -647, 1538, -2420, 12161, 5038, 1286, + -2098, -357, -9027, -1549, -100, -268, 1796, 744, + -3740, 190, -954, -395, -310, 1557, 645, 164, + -2232, -1341, 7246, 9470, -1977, -304, -109, -3204, + -5474, -238, -182, 987, 593, 1290, 775, -4188, + -269, -161, 874, 1143, 1030, 7034, 4231, 1551, + 3077, -64, -3019, -1093, -146, -577, -442, -266, + -1816, -97, -666, -400, -193, -1321, -794, -291, + 5121, 11835, -477, -1749, 2298, -1601, -8549, -13, + -186, -322, -3699, 149, 344, 546, 1264, -50, + -718, -1660, 66, 245, -3328, 3827, 5921, 9976, + -1045, -676, -894, -2140, -6075, -66, 777, 1203, + -1383, 2027, -2330, -3605, -212, 244, 377, 636, + 3813, 5718, -4666, -3412, 5674, -887, -1995, -1329, + -710, -1965, -1331, 1086, 1628, 794, 1191, -972, + -1320, -1980, 1616, 1181, 1348, -3672, 13154, 6938, + -1690, -110, -823, -10561, -2938, -174, 302, -1082, + 2948, -570, 1555, -5570, 139, -379, 1357, 716, + 2151, -3586, 6949, 12131, -1224, -282, -785, -2947, + -8982, -91, 470, -912, 1521, -1592, 2655, -5145, + 160, -268, 519, 906, -2889, 9647, 10276, -2728, + 995, -509, -5680, -6445, -454, -60, 1701, 1812, + -6051, -481, 1606, 1711, 175, -586, -624, 165, + 6177, 2184, 555, 1985, 6589, -2329, -291, -18, + -240, -2650, -823, -209, -74, -748, -264, -67, + -2484, -878, -223, -798, -492, 391, 17166, -681, + 240, -14, -9, -17987, -28, -3, 11, 515, + -410, -20, 16, 713, 7, -5, -252, 10, + 12628, 5448, -2630, 3011, -2695, -9733, -1811, -422, + -553, -443, -4199, 2027, 874, -2321, -1001, 483, + 2077, 896, -432, 495, -3628, -534, 3447, 7002, + 6751, -803, -17, -725, -2992, -2782, -118, 763, + 112, 1550, 228, -1473, 1495, 220, -1420, -2885, + -5239, 5901, 8107, 3650, 4846, -1675, -2125, -4012, + -813, -1433, 1887, 2592, -2920, 1167, -1315, -1806, + 1550, -1745, -2398, -1080, 6157, 6678, 4099, -1074, + 2348, -2314, -2722, -1025, -70, -336, -2509, -1540, + -1670, 403, 437, 268, -882, -957, -587, 153, + 1079, 16099, 242, -881, 1690, -71, -15820, -3, + -47, -174, -1060, -16, -238, 58, 865, 13, + -111, -1661, -25, 90, -278, 227, -1039, 1636, + 16945, -4, -3, -65, -163, -17526, 3, -17, + 14, 27, -22, 103, 287, -234, 1074, -1693, + 15778, -1454, 574, -603, -107, -15195, -129, -20, + -22, 0, 1400, -553, 51, 581, -53, 21, + 103, -9, 3, -3, 2406, -836, 13224, 7993, + -4266, -353, -42, -10673, -3899, -1111, 122, -1942, + 674, -1174, 407, -6451, 626, -217, 3443, 2081, + 3184, 14368, -3336, 2255, -1801, -619, -12600, -679, + -310, -198, -2793, 648, 2926, -438, -1977, 459, + 350, 1580, -366, 247, -1698, 17076, 2504, -539, + -646, -176, -17798, -382, -17, -25, 1770, 259, + -2610, -55, 561, 82, -67, 673, 98, -21, + 2375, -797, -2696, 14483, 5383, -344, -38, -443, + -12803, -1769, 115, 391, -131, -2100, 705, 2384, + -780, 262, 886, -4759, -2691, 2554, -4520, 9573, + 10655, -442, -398, -1247, -5594, -6930, 419, -742, + 704, 1572, -1492, 2641, 1750, -1661, 2939, -6226, + -4332, -4399, -1657, 4880, 7375, -1145, -1181, -167, + -1453, -3319, -1163, -438, -444, 1290, 1310, 493, + 1950, 1980, 745, -2196, -3498, 7405, 9955, 2693, + -2971, -746, -3347, -6049, -442, -538, 1581, 2125, + -4499, 575, -1217, -1636, -634, 1342, 1805, 488, + 6717, -3792, 7739, 2798, 3489, -2754, -877, -3655, + -477, -743, 1554, -3173, 1791, -1147, 647, -1321, + -1430, 807, -1648, -595, 5263, 9770, 3463, 1069, + -3971, -1690, -5826, -732, -69, -962, -3138, -1112, + -2065, -343, -637, -226, 1275, 2368, 839, 259, + 1243, -2634, 16772, 1871, 332, -94, -423, -17169, + -213, -6, 199, -1273, 2696, -142, 300, -1915, + -25, 53, -339, -37, 2691, 2836, 3105, 5711, + 4817, -442, -491, -588, -1991, -1416, -465, -510, + -537, -938, -988, -1082, -791, -834, -913, -1679, + 4366, 2944, 7210, 3627, 1161, -1163, -529, -3172, + -803, -82, -784, -1921, -1295, -966, -651, -1596, + -309, -208, -511, -257, 13888, 3951, -671, -2305, + 3354, -11773, -953, -27, -324, -686, -3349, 569, + 161, 1954, 556, -94, -2843, -809, 137, 472, + 7053, 5847, 2929, 8378, -4794, -3036, -2086, -523, + -4284, -1403, -2517, -1261, -1045, -3607, -2990, -1498, + 2064, 1711, 857, 2451, -2191, 12838, 9182, -3915, + 1617, -293, -10059, -5146, -935, -159, 1717, 1228, + -7195, -523, 3068, 2194, 216, -1267, -906, 386, + -4881, 13114, 5767, -435, 4155, -1454, -10498, -2030, + -11, -1054, 3907, 1718, -4616, -129, 348, 153, + 1238, -3326, -1462, 110, 7843, -1250, 210, 7106, + -5203, -3754, -95, -2, -3082, -1652, 598, -100, + 16, -3402, 542, -91, 2491, -397, 66, 2257, + -2463, 8168, 14551, -3908, 1828, -370, -4072, -12923, + -932, -204, 1228, 2188, -7254, -587, 1948, 3471, + 274, -911, -1623, 436, -1579, 347, -272, -2735, + 16031, -152, -7, -4, -456, -15686, 33, -26, + 5, -263, 58, -45, 1545, -340, 266, 2676, + -6327, 1328, 5093, -5079, 7617, -2443, -107, -1583, + -1574, -3541, 513, 1967, -413, -1961, 411, 1578, + 2941, -617, -2367, 2361, 3286, -4509, 11306, 11025, + -2623, -659, -1241, -7802, -7419, -420, 904, -2267, + 3112, -2211, 3034, -7608, 526, -722, 1810, 1765, + 5567, 17853, -3754, 1166, -519, -1892, -19455, -860, + -83, -16, -6067, 1275, 4090, -396, -1271, 267, + 176, 566, -119, 37, -2136, -424, 15292, 5108, + -1648, -278, -10, -14273, -1593, -165, -55, 1993, + 396, 666, 132, -4768, -214, -42, 1538, 514, + 2267, -3297, 2549, 16563, -791, -313, -663, -396, + -16745, -38, 456, -352, 513, -2291, 3333, -2576, + 109, -159, 123, 799, 3655, 1899, -3364, 6279, + 12510, -815, -220, -690, -2406, -9552, -423, 750, + 390, -1400, -728, 1289, -2791, -1450, 2568, -4794, + 8052, 2285, -6193, 5138, 6003, -3957, -318, -2341, + -1611, -2199, -1123, 3044, 864, -2525, -716, 1942, + -2950, -837, 2269, -1882, -386, -2291, 7679, 15387, + -2723, -9, -320, -3599, -14452, -452, -54, 181, + 1074, 362, 2152, -7212, -64, -380, 1276, 2557, + 2777, -1173, 3984, 13079, 2508, -470, -84, -969, + -10440, -384, 198, -675, 285, -2217, 936, -3180, + -425, 179, -610, -2002, -1879, 1771, -2684, 16705, + 1833, -215, -191, -439, -17032, -205, 203, -308, + 290, 1916, -1805, 2736, 210, -198, 300, -1869, + 1052, 4495, 15519, 1467, -4032, -67, -1233, -14700, + -131, -992, -288, -997, -4257, -94, -402, -1389, + 259, 1106, 3819, 361, 3010, 2544, 6969, 7559, + 1996, -553, -395, -2964, -3487, -243, -467, -1280, + -1082, -1388, -1174, -3215, -366, -310, -849, -921, + -5209, -1867, 8713, 10351, 1549, -1656, -212, -4634, + -6540, -146, -593, 2770, 993, 3291, 1180, -5505, + 492, 176, -824, -979, -4314, 8513, 913, 7547, + -2723, -1135, -4423, -50, -3476, -452, 2241, 240, + -474, 1987, -3921, -420, -717, 1415, 151, 1254, + 12929, -1219, 2448, 1757, 6303, -10204, -90, -365, + -188, -2425, 962, -1932, 182, -1386, 130, -262, + -4974, 469, -941, -676, 6465, 4132, 3167, 3160, + 5697, -2551, -1042, -612, -609, -1981, -1630, -1249, + -798, -1247, -797, -611, -2248, -1437, -1101, -1099, + -3636, 4859, 18914, -1335, 810, -807, -1441, -21836, + -108, -40, 1078, 4198, -5609, -296, 396, 1541, + 179, -240, -936, 66, 8844, 7864, 654, -4063, + -5680, -4774, -3774, -26, -1007, -1969, -4245, -353, + -314, 2193, 1950, 162, 3066, 2726, 226, -1408, + 1859, 2634, 9228, 996, 9464, -211, -423, -5197, + -60, -5467, -299, -1047, -1483, -113, -160, -561, + -1074, -1521, -5330, -575, 2949, 12260, 10290, -497, + -3943, -530, -9174, -6463, -15, -949, -2206, -1852, + -7700, 89, 372, 312, 709, 2950, 2476, -119, + -2903, 1552, 14867, 9970, -496, -514, -147, -13491, + -6068, -15, 275, 2634, -1408, 1766, -944, -9047, + -87, 47, 450, 302, 3243, 8234, 7586, 3373, + 2151, -642, -4138, -3512, -694, -282, -1630, -1501, + -3812, -667, -1695, -1561, -425, -1081, -996, -442, + -9631, 60, 3501, 5359, 10150, -5662, 0, -748, + -1752, -6288, 35, 2058, -12, 3150, -19, -1145, + 5967, -37, -2169, -3320, -6874, -2553, -5446, -2195, + -7841, -2884, -397, -1810, -294, -3753, -1071, -2285, + -848, -921, -342, -729, -3290, -1221, -2606, -1050, + -3413, -1141, 4630, 13612, 7897, -711, -79, -1308, + -11310, -3806, -237, 964, 322, 2836, 948, -3847, + 1645, 550, -2231, -6561, 4410, -5678, 8006, -3992, + 3811, -1187, -1968, -3912, -973, -886, 1528, -2155, + 2775, 1074, -1383, 1951, -1025, 1321, -1862, 928, + 5659, 11535, 2203, -452, 7169, -1954, -8121, -296, + -12, -3137, -3984, -761, -1551, 156, 318, 60, + -2476, -5048, -964, 197, 2914, -2914, 3485, -3965, + 13675, -518, -518, -741, -959, -11414, 518, -620, + 620, 705, -705, 843, -2433, 2432, -2909, 3310, + 7843, 1907, 1022, 8882, 7972, -3755, -222, -63, + -4815, -3879, -913, -489, -119, -4252, -1034, -554, + -3816, -928, -497, -4322, 13807, 9531, 1436, 1612, + 1779, -11636, -5544, -125, -158, -193, -8032, -1210, + -835, -1358, -938, -141, -1499, -1035, -156, -175, + 13620, -5337, 5450, -2263, 1723, -11322, -1738, -1813, + -312, -181, 4436, -4531, 1775, 1881, -737, 752, + -1432, 561, -573, 238, 5297, 8374, 8872, 7694, + 6538, -1712, -4280, -4804, -3613, -2609, -2707, -2868, + -4534, -2487, -3932, -4166, -2113, -3341, -3540, -3070 +}; + int ff_g723_1_scale_vector(int16_t *dst, const int16_t *vector, int length) { int bits, max = 0; @@ -98,9 +1169,9 @@ void ff_g723_1_gen_acb_excitation(int16_t *vector, int16_t *prev_excitation, /* Select quantization table */ if (cur_rate == RATE_6300 && pitch_lag < SUBFRAME_LEN - 2) { - cb_ptr = adaptive_cb_gain85; + cb_ptr = ff_g723_1_adaptive_cb_gain85; } else - cb_ptr = adaptive_cb_gain170; + cb_ptr = ff_g723_1_adaptive_cb_gain170; /* Calculate adaptive vector */ cb_ptr += subfrm->ad_cb_gain * 20; @@ -125,8 +1196,8 @@ static void lsp2lpc(int16_t *lpc) for (j = 0; j < LPC_ORDER; j++) { int index = (lpc[j] >> 7) & 0x1FF; int offset = lpc[j] & 0x7f; - int temp1 = cos_tab[index] * (1 << 16); - int temp2 = (cos_tab[index + 1] - cos_tab[index]) * + int temp1 = ff_g723_1_cos_tab[index] * (1 << 16); + int temp2 = (ff_g723_1_cos_tab[index + 1] - ff_g723_1_cos_tab[index]) * (((offset << 8) + 0x80) << 1); lpc[j] = -(av_sat_dadd32(1 << 15, temp1 + temp2) >> 16); @@ -215,16 +1286,16 @@ void ff_g723_1_inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp, } /* Get the VQ table entry corresponding to the transmitted index */ - cur_lsp[0] = lsp_band0[lsp_index[0]][0]; - cur_lsp[1] = lsp_band0[lsp_index[0]][1]; - cur_lsp[2] = lsp_band0[lsp_index[0]][2]; - cur_lsp[3] = lsp_band1[lsp_index[1]][0]; - cur_lsp[4] = lsp_band1[lsp_index[1]][1]; - cur_lsp[5] = lsp_band1[lsp_index[1]][2]; - cur_lsp[6] = lsp_band2[lsp_index[2]][0]; - cur_lsp[7] = lsp_band2[lsp_index[2]][1]; - cur_lsp[8] = lsp_band2[lsp_index[2]][2]; - cur_lsp[9] = lsp_band2[lsp_index[2]][3]; + cur_lsp[0] = ff_g723_1_lsp_band0[lsp_index[0]][0]; + cur_lsp[1] = ff_g723_1_lsp_band0[lsp_index[0]][1]; + cur_lsp[2] = ff_g723_1_lsp_band0[lsp_index[0]][2]; + cur_lsp[3] = ff_g723_1_lsp_band1[lsp_index[1]][0]; + cur_lsp[4] = ff_g723_1_lsp_band1[lsp_index[1]][1]; + cur_lsp[5] = ff_g723_1_lsp_band1[lsp_index[1]][2]; + cur_lsp[6] = ff_g723_1_lsp_band2[lsp_index[2]][0]; + cur_lsp[7] = ff_g723_1_lsp_band2[lsp_index[2]][1]; + cur_lsp[8] = ff_g723_1_lsp_band2[lsp_index[2]][2]; + cur_lsp[9] = ff_g723_1_lsp_band2[lsp_index[2]][3]; /* Add predicted vector & DC component to the previously quantized vector */ for (i = 0; i < LPC_ORDER; i++) { diff --git a/libavcodec/g723_1.h b/libavcodec/g723_1.h index d60d481e67..7cd57b76b4 100644 --- a/libavcodec/g723_1.h +++ b/libavcodec/g723_1.h @@ -243,433 +243,21 @@ static const int16_t dc_lsp[LPC_ORDER] = { }; /* Cosine table scaled by 2^14 */ -static const int16_t cos_tab[COS_TBL_SIZE + 1] = { - 16384, 16383, 16379, 16373, 16364, 16353, 16340, 16324, - 16305, 16284, 16261, 16235, 16207, 16176, 16143, 16107, - 16069, 16029, 15986, 15941, 15893, 15843, 15791, 15736, - 15679, 15619, 15557, 15493, 15426, 15357, 15286, 15213, - 15137, 15059, 14978, 14896, 14811, 14724, 14635, 14543, - 14449, 14354, 14256, 14155, 14053, 13949, 13842, 13733, - 13623, 13510, 13395, 13279, 13160, 13039, 12916, 12792, - 12665, 12537, 12406, 12274, 12140, 12004, 11866, 11727, - 11585, 11442, 11297, 11151, 11003, 10853, 10702, 10549, - 10394, 10238, 10080, 9921, 9760, 9598, 9434, 9269, - 9102, 8935, 8765, 8595, 8423, 8250, 8076, 7900, - 7723, 7545, 7366, 7186, 7005, 6823, 6639, 6455, - 6270, 6084, 5897, 5708, 5520, 5330, 5139, 4948, - 4756, 4563, 4370, 4176, 3981, 3786, 3590, 3393, - 3196, 2999, 2801, 2603, 2404, 2205, 2006, 1806, - 1606, 1406, 1205, 1005, 804, 603, 402, 201, - 0, -201, -402, -603, -804, -1005, -1205, -1406, - -1606, -1806, -2006, -2205, -2404, -2603, -2801, -2999, - -3196, -3393, -3590, -3786, -3981, -4176, -4370, -4563, - -4756, -4948, -5139, -5330, -5520, -5708, -5897, -6084, - -6270, -6455, -6639, -6823, -7005, -7186, -7366, -7545, - -7723, -7900, -8076, -8250, -8423, -8595, -8765, -8935, - -9102, -9269, -9434, -9598, -9760, -9921, -10080, -10238, - -10394, -10549, -10702, -10853, -11003, -11151, -11297, -11442, - -11585, -11727, -11866, -12004, -12140, -12274, -12406, -12537, - -12665, -12792, -12916, -13039, -13160, -13279, -13395, -13510, - -13623, -13733, -13842, -13949, -14053, -14155, -14256, -14354, - -14449, -14543, -14635, -14724, -14811, -14896, -14978, -15059, - -15137, -15213, -15286, -15357, -15426, -15493, -15557, -15619, - -15679, -15736, -15791, -15843, -15893, -15941, -15986, -16029, - -16069, -16107, -16143, -16176, -16207, -16235, -16261, -16284, - -16305, -16324, -16340, -16353, -16364, -16373, -16379, -16383, - -16384, -16383, -16379, -16373, -16364, -16353, -16340, -16324, - -16305, -16284, -16261, -16235, -16207, -16176, -16143, -16107, - -16069, -16029, -15986, -15941, -15893, -15843, -15791, -15736, - -15679, -15619, -15557, -15493, -15426, -15357, -15286, -15213, - -15137, -15059, -14978, -14896, -14811, -14724, -14635, -14543, - -14449, -14354, -14256, -14155, -14053, -13949, -13842, -13733, - -13623, -13510, -13395, -13279, -13160, -13039, -12916, -12792, - -12665, -12537, -12406, -12274, -12140, -12004, -11866, -11727, - -11585, -11442, -11297, -11151, -11003, -10853, -10702, -10549, - -10394, -10238, -10080, -9921, -9760, -9598, -9434, -9269, - -9102, -8935, -8765, -8595, -8423, -8250, -8076, -7900, - -7723, -7545, -7366, -7186, -7005, -6823, -6639, -6455, - -6270, -6084, -5897, -5708, -5520, -5330, -5139, -4948, - -4756, -4563, -4370, -4176, -3981, -3786, -3590, -3393, - -3196, -2999, -2801, -2603, -2404, -2205, -2006, -1806, - -1606, -1406, -1205, -1005, -804, -603, -402, -201, - 0, 201, 402, 603, 804, 1005, 1205, 1406, - 1606, 1806, 2006, 2205, 2404, 2603, 2801, 2999, - 3196, 3393, 3590, 3786, 3981, 4176, 4370, 4563, - 4756, 4948, 5139, 5330, 5520, 5708, 5897, 6084, - 6270, 6455, 6639, 6823, 7005, 7186, 7366, 7545, - 7723, 7900, 8076, 8250, 8423, 8595, 8765, 8935, - 9102, 9269, 9434, 9598, 9760, 9921, 10080, 10238, - 10394, 10549, 10702, 10853, 11003, 11151, 11297, 11442, - 11585, 11727, 11866, 12004, 12140, 12274, 12406, 12537, - 12665, 12792, 12916, 13039, 13160, 13279, 13395, 13510, - 13623, 13733, 13842, 13949, 14053, 14155, 14256, 14354, - 14449, 14543, 14635, 14724, 14811, 14896, 14978, 15059, - 15137, 15213, 15286, 15357, 15426, 15493, 15557, 15619, - 15679, 15736, 15791, 15843, 15893, 15941, 15986, 16029, - 16069, 16107, 16143, 16176, 16207, 16235, 16261, 16284, - 16305, 16324, 16340, 16353, 16364, 16373, 16379, 16383, - 16384 -}; +extern const int16_t ff_g723_1_cos_tab[COS_TBL_SIZE + 1]; +#define G723_1_COS_TAB_FIRST_ELEMENT 16384 /** * LSP VQ tables */ -static const int16_t lsp_band0[LSP_CB_SIZE][3] = { - { 0, 0, 0}, { -270, -1372, -1032}, { -541, -1650, -1382}, - { -723, -2011, -2213}, { -941, -1122, -1942}, { -780, -1145, -2454}, - { -884, -1309, -1373}, {-1051, -1523, -1766}, {-1083, -1622, -2300}, - { -777, -1377, -2147}, { -935, -1467, -2763}, { -802, -1327, -3471}, - { -935, -1959, -3999}, { -240, -89, 222}, { -661, -257, -160}, - { -994, -466, -419}, { -188, -164, -278}, { -342, -512, -415}, - { -607, -511, -797}, { 16, 19, -716}, { 374, 425, -972}, - { -346, 245, -282}, { -265, 506, -754}, { -620, -147, 1955}, - { -742, -860, 2597}, { -150, -352, 2704}, { 305, 880, 1954}, - { 123, 731, 2766}, { -348, 765, 3327}, { 618, 221, 3258}, - { -178, -47, 4219}, { 393, 1304, 3842}, { 698, 1702, 4801}, - { 63, -584, 1229}, { -215, -732, 1704}, { 172, -335, 1909}, - { -2, 216, 1797}, { 353, 127, 2205}, {-1208, 188, 11}, - { -513, -75, -683}, { -973, 222, -646}, { -616, -843, -388}, - { -950, -1113, -359}, {-1431, -623, -705}, {-1398, -1063, -178}, - { -45, -461, 35}, { -9, -657, -216}, { 127, -1078, 95}, - { -950, -1156, 584}, {-1480, -1494, 449}, { -120, -705, 516}, - { -368, -961, 727}, { -378, -526, 973}, { -793, -614, 676}, - { -801, -755, 1287}, {-1476, -340, 1636}, { -505, -1254, 1543}, - {-1243, -1622, 1532}, { -776, -1477, -655}, {-1151, -1296, -823}, - {-1153, -1672, -1124}, {-1291, -2003, -1702}, { -622, -1283, 57}, - { -471, -1611, 509}, {-1060, -1570, -139}, { -873, -2156, -536}, - {-1716, -2021, -364}, {-2150, -3218, -1291}, {-1248, -1945, -2904}, - {-1215, -2633, -2855}, { 167, -244, 84}, { 349, -412, -217}, - { -40, -352, 632}, { 227, -529, 405}, { 68, -383, -443}, - { 167, -558, -706}, { -275, -854, -14}, { -351, -1089, -449}, - { 341, -72, -289}, { 603, -106, -474}, { 322, -219, -649}, - { 179, -317, -998}, { 450, -291, -996}, { 555, 195, -525}, - { 784, 272, -831}, { -148, -384, -849}, { 82, -536, -1357}, - { 238, -172, -1354}, { 422, -268, -1841}, { 297, -737, -2079}, - { -111, -801, -598}, { 1, -668, -984}, { -131, -818, -1299}, - { -329, -521, -1310}, { -151, -778, -1834}, { -93, -352, -1746}, - { -568, -640, -1821}, { -509, -941, -2183}, { 464, -815, -1250}, - { 79, -1133, -1597}, { -184, -1353, -2123}, { -196, -410, -2427}, - { -192, -833, -2810}, { -259, -1382, -3045}, { -217, 4, -1166}, - { -800, -325, -1219}, { -363, -830, -898}, { -661, -1134, -960}, - { -386, -980, -1501}, { -627, -1159, -1722}, { -903, -829, -855}, - { -685, -829, -1313}, {-1065, -959, -1405}, { 441, 25, -847}, - { 655, -27, -1181}, { 1159, -110, -705}, { 856, 253, -1671}, - { 415, 404, -1}, { 322, 903, -398}, { 670, 499, -292}, - { 803, 591, -610}, { 1144, 591, -814}, { 717, 183, 393}, - { 857, 381, 106}, { 609, 62, -27}, { 792, 198, -325}, - { 735, 805, 88}, { 1142, 812, 78}, { 1028, 366, -292}, - { 1309, 743, -237}, { 1615, 589, -79}, { 1010, 639, -243}, - { 999, 964, -311}, { 1500, 1137, -615}, { 988, 357, 646}, - { 1227, 667, 683}, { 1164, 1565, 894}, { 1392, 2015, 477}, - { 1138, 533, 250}, { 1437, 896, 391}, { 1765, 1118, 99}, - { 1112, 1090, 802}, { 1596, 846, 1134}, { 937, 1161, 279}, - { 1719, 1254, 683}, { 1338, 1086, 35}, { 1419, 1324, 428}, - { 1428, 1524, 40}, { 2108, 1594, 89}, { 1015, 544, 1222}, - { 1121, 925, 1263}, { 1030, 1318, 1485}, { 1295, 789, 1817}, - { 1323, 1272, 1909}, { 1724, 1237, 1803}, { 1797, 1689, 858}, - { 2149, 1367, 1301}, { 2302, 1867, 761}, { 2863, 2351, 1053}, - { 52, 163, -76}, { 230, 309, -492}, { -71, 619, 39}, - { -218, 856, 499}, { -654, 736, -207}, { -535, 1259, 155}, - { -480, 1476, 643}, { 262, 1081, 102}, { 309, 1592, -182}, - { 627, 1629, 534}, { 337, 643, 456}, { 758, 670, 713}, - { 202, 1126, 658}, { 612, 1131, 666}, { 686, 1223, 1136}, - { -131, 377, 525}, { 42, 708, 907}, { 87, 1488, 1035}, - { 432, 2117, 904}, { 137, 981, 1332}, { -447, 1014, 1136}, - { -839, 1793, 1246}, { -559, 297, 198}, { -850, 685, 446}, - {-1273, 632, 826}, { -401, -544, 173}, { -753, -793, 144}, - { -436, -9, 772}, { -115, -243, 1310}, { -670, -269, 374}, - {-1027, -13, 639}, { -887, -81, 1137}, {-1277, -455, 158}, - {-1411, -720, 736}, { 172, 88, 403}, { 386, 255, 756}, - { -500, 522, 910}, { -958, 659, 1388}, { -395, 301, 1344}, - { -356, 768, 1813}, { -613, 841, 2419}, { 445, -122, 252}, - { 629, -87, 723}, { 283, -253, 870}, { 456, -116, 1381}, - { 757, 180, 1059}, { 532, 408, 1509}, { 947, 288, 1806}, - { 1325, 994, 2524}, { 892, 1219, 3023}, { 1397, 1596, 3406}, - { 1143, 1552, 2546}, { 1850, 1433, 2710}, { -10, 134, 1002}, - { 154, 499, 1323}, { 508, 792, 1117}, { 509, 1340, 1616}, - { 762, 862, 1608}, { 787, 740, 2320}, { 794, 1727, 1283}, - { 465, 2108, 1660}, { -120, 1451, 1613}, { -386, 2016, 2169}, - { 891, 1225, 2050}, { 456, 1480, 2185}, { 1493, 1283, 1209}, - { 1397, 1636, 1518}, { 1776, 1738, 1552}, { 1572, 1698, 2141}, - { 1389, 2126, 1271}, { 1959, 2413, 1119}, { 1365, 2892, 1505}, - { 2206, 1971, 1623}, { 2076, 1950, 2280}, { 1717, 2291, 1867}, - { 2366, 2515, 1953}, { 2865, 2838, 2522}, { 2535, 3465, 2011}, - { 3381, 4127, 2638}, { 836, 2667, 2289}, { 1761, 2773, 2337}, - { 1415, 3325, 2911}, { 2354, 3138, 3126}, { 2659, 4192, 4010}, - { 1048, 1786, 1818}, { 1242, 2111, 2240}, { 1512, 2079, 2780}, - { 1573, 2491, 3138}, { 2230, 2377, 2782}, { 416, 1773, 2704}, - { 725, 2336, 3297}, { 1252, 2373, 3978}, { 2094, 2268, 3568}, - { 2011, 2712, 4528}, { 1341, 3507, 3876}, { 1216, 3919, 4922}, - { 1693, 4793, 6012} -}; - -static const int16_t lsp_band1[LSP_CB_SIZE][3] = { - { 0, 0, 0}, {-2114, -1302, 76}, {-2652, -1278, -1368}, - {-2847, -828, -349}, {-3812, -2190, -349}, {-3946, -364, -449}, - {-2725, -4492, -3607}, {-3495, -4764, -1744}, { -51, -756, 84}, - { -153, -1191, 504}, { 108, -1418, 1167}, { -835, -896, 390}, - { -569, -1702, 87}, {-1151, -1818, 933}, {-1826, -2547, 411}, - {-1842, -1818, 1451}, {-2438, -1611, 781}, {-2747, -2477, 1311}, - { -940, 1252, 477}, {-1629, 1688, 602}, {-1202, 617, 280}, - {-1737, 393, 580}, {-1528, 1077, 1199}, {-2165, -161, 1408}, - {-2504, -1087, 2371}, {-3458, -175, 1395}, {-1397, -98, -843}, - {-2252, -177, -1149}, {-1489, -726, -1283}, {-1558, -265, -1744}, - {-1867, -821, -1897}, {-2062, -1516, -2340}, {-2595, -1142, -2861}, - { 170, 46, -819}, { -193, -204, -1151}, { 326, -196, -1532}, - { 780, 329, -816}, { 201, 369, -1243}, { 650, -209, -1060}, - { 1144, -15, -1216}, { 1203, -259, -1867}, { -890, -564, -1430}, - { -638, -852, -1921}, { 177, -739, -1358}, { -261, -526, -1666}, - { 206, -407, -2255}, { 338, -526, -822}, { 421, -1095, -1009}, - { 765, -607, -1408}, { 825, -1295, -2004}, { 357, -905, -1815}, - { -58, -1248, -1588}, { -596, -1436, -2046}, { -73, -1159, -2116}, - { -115, -1382, -2581}, { -160, -1723, -1952}, { -6, -2196, -2954}, - { -649, -1705, -2603}, { -617, -1453, -3282}, { -949, -2019, -3102}, - { -812, 1544, 1937}, {-1854, 574, 2000}, {-1463, 1140, 2649}, - {-2683, 1748, 1452}, {-2486, 2241, 2523}, { 783, 1910, 1435}, - { 581, 2682, 1376}, { 236, 2197, 1885}, { -453, 2943, 2057}, - { -682, 2178, 2565}, {-1342, 3201, 3328}, { -288, -184, 262}, - { 121, -149, -183}, { 758, -412, 206}, { 1038, -204, 853}, - { 1577, -457, 700}, { 937, -640, -567}, { 1508, -528, -1024}, - { -225, -527, -427}, { -564, -1095, -332}, { -742, -353, -186}, - {-1288, -459, 84}, {-1853, -484, -274}, {-1554, -731, 825}, - {-2425, -234, 382}, {-1722, 293, -271}, {-2515, 425, -564}, - {-2599, 818, 464}, { -358, 118, -375}, { -613, 198, -874}, - { -690, 683, -324}, {-1352, 1155, -168}, {-1093, 129, -324}, - {-1184, 611, -858}, { 433, 386, -372}, { -120, 486, -634}, - { 234, 851, -631}, { 602, 128, 46}, { 1099, 410, 159}, - { 715, -145, -424}, { 1198, -85, -593}, { 1390, 367, -358}, - { 1683, 362, -964}, { 1711, 622, 45}, { 2033, 833, -383}, - { 2890, 549, -506}, { 7, 401, 52}, { 72, 811, 415}, - { 566, 668, 41}, { 467, 1218, 130}, { 68, 957, -187}, - { -25, 1649, -103}, { -661, 260, 214}, { -925, -94, 612}, - { -321, -422, 965}, { -788, -672, 1783}, { 400, -673, 779}, - { 741, -595, 1635}, { -161, 307, 657}, { -382, 836, 871}, - { -814, 400, 1223}, { 364, 606, 1247}, { 57, 75, 1571}, - { 151, 471, 2287}, { -81, 1021, 1502}, { 227, 1470, 1097}, - { 658, 1275, 1653}, { 664, 1478, 2377}, { 263, -127, 444}, - { 264, 89, 969}, { 794, 171, 576}, { 821, 186, 1226}, - { 404, 462, 517}, { 339, 918, 794}, { 1280, 1423, 196}, - { 1453, 2019, 365}, { 1615, 1481, 672}, { 2394, 1708, 508}, - { 806, 1238, 573}, { 713, 1158, 1078}, { 1285, 1436, 1232}, - { 1790, 1188, 1141}, { 765, 643, 864}, { 1032, 797, 1279}, - { 900, 563, 1827}, { 1514, 673, 2312}, { 1544, 1129, 3240}, - { 1469, 1050, 1594}, { 1945, 1318, 1988}, { 2397, 2026, 2060}, - { 3538, 2057, 2620}, { 1249, -118, 74}, { 1727, 194, 421}, - { 2078, -50, -463}, { 970, 688, -432}, { 1149, 952, -110}, - { 1254, 1275, -651}, { 1386, 929, 401}, { 1960, 1167, 232}, - { 407, -752, -243}, { 859, -1118, 172}, { -227, -860, -992}, - { -796, -1175, -1380}, { 8, -1282, -388}, { 353, -1781, -1037}, - { -732, -397, -807}, { -853, -28, -1342}, {-1229, -1207, -1959}, - {-1015, -1125, -2543}, {-1452, -1791, -2725}, {-1891, -2416, -3269}, - { -918, -1629, -783}, { -580, -2155, -698}, {-1097, -2364, -96}, - {-1387, -1513, 7}, {-1588, -2076, -664}, {-1473, -2740, -784}, - {-2378, -3149, -56}, {-2856, -2092, -169}, {-3391, -3708, 316}, - {-1176, -890, -614}, {-1944, -1061, -800}, { -299, -1517, -1000}, - { -640, -1850, -1526}, {-1454, -1536, -1233}, {-1890, -1955, -1756}, - {-1086, -1921, -2122}, { -750, -2325, -2260}, {-1325, -2413, -2673}, - {-1114, -2542, -3459}, {-1341, -2901, -3963}, {-1160, -2226, -1393}, - {-1001, -2772, -1573}, {-1594, -2641, -1978}, {-1534, -3046, -2624}, - {-2224, -2196, -675}, {-2807, -3054, -1102}, {-2008, -2840, -1186}, - {-1980, -3332, -1695}, {-1715, -3562, -505}, {-2527, -4000, -1887}, - {-2333, -2734, -2296}, {-3440, -2401, -3211}, {-2008, -3528, -3337}, - {-2247, -3291, -4510}, { -475, 949, 155}, { -149, 1365, 545}, - { -757, 1644, 1083}, { -217, 2053, 1353}, {-1433, 2301, 1462}, - { 495, 1661, 529}, { 10, 2037, 740}, { 2082, 1898, 978}, - { 2831, 2294, 911}, { 842, 793, 420}, { 1223, 1023, 863}, - { 1237, 451, 780}, { 1744, 708, 822}, { 1533, 284, 1384}, - { 2135, 609, 1538}, { 2305, 626, 540}, { 2368, 1187, 955}, - { 2586, 1255, -7}, { 3116, 1131, 726}, { 3431, 1730, 428}, - { 2734, 1648, 1307}, { 2988, 1231, 2010}, { 3523, 2024, 1488}, - { 1034, 1657, 871}, { 1206, 2163, 1036}, { 1807, 2372, 1233}, - { 1808, 1769, 1493}, { 1573, 2332, 1779}, { 1216, 1609, 1866}, - { 1480, 1898, 2513}, { 465, 2708, 2776}, { 771, 3638, 3338}, - { 1869, 2599, 2623}, { 2825, 2745, 2468}, { 2638, 2439, 1585}, - { 2094, 2970, 1308}, { 2022, 3057, 1999}, { 3428, 2912, 1816}, - { 4536, 2974, 2129}, { 1046, 2563, 2086}, { 1363, 3562, 2318}, - { 2511, 1891, 2984}, { 1866, 2306, 3986}, { 3272, 2924, 3682}, - { 3146, 3564, 2272}, { 3592, 3968, 2822}, { 2431, 3369, 3069}, - { 1931, 4709, 3090}, { 2629, 4220, 3986}, { 4639, 4056, 3664}, - { 4035, 5334, 4912} -}; - -static const int16_t lsp_band2[LSP_CB_SIZE][4] = { - { 0, 0, 0, 0}, { 601, 512, -542, 334}, - { 428, 1087, -484, -132}, { 652, 622, -391, -572}, - { 378, 799, 141, -860}, { 1040, 409, 112, -554}, - { 1123, 670, -75, -847}, { 1421, 494, -315, -1095}, - { 787, 1001, 114, -460}, { 988, 1672, 216, -681}, - { 1007, 1241, -132, -1247}, { 1073, 399, 186, -5}, - { 1262, 193, -694, -129}, { 325, 196, 51, -641}, - { 861, -59, 350, -458}, { 1261, 567, 586, -346}, - { 1532, 885, 210, -517}, { 2027, 937, 113, -792}, - { 1383, 1064, 334, 38}, { 1964, 1468, 459, 133}, - { 2062, 1186, -98, -121}, { 2577, 1445, 506, -373}, - { 2310, 1682, -2, -960}, { 2876, 1939, 765, 138}, - { 3581, 2360, 649, -414}, { 219, 176, -398, -309}, - { 434, -78, -435, -880}, { -344, 301, 265, -552}, - { -915, 470, 657, -380}, { 419, -432, -163, -453}, - { 351, -953, 8, -562}, { 789, -43, 20, -958}, - { 302, -594, -352, -1159}, { 1040, 108, -668, -924}, - { 1333, 210, -1217, -1663}, { 483, 589, -350, -1140}, - { 1003, 824, -802, -1184}, { 745, 58, -589, -1443}, - { 346, 247, -915, -1683}, { 270, 796, -720, -2043}, - { 1208, 722, -222, -193}, { 1486, 1180, -412, -672}, - { 1722, 179, -69, -521}, { 2047, 860, -666, -1410}, - { -146, 222, -281, -805}, { -189, 90, -114, -1307}, - { -152, 1086, -241, -764}, { -439, 733, -601, -1302}, - { -833, -167, -351, -601}, { -856, -422, -411, -1059}, - { -747, -355, -582, -1644}, { -837, 210, -916, -1144}, - {-1800, 32, -878, -1687}, { -48, -23, -1146, 52}, - { -350, -409, -1656, -364}, { 265, -728, -858, -577}, - { 458, -247, -1141, -997}, { 691, -407, -1988, -1161}, - { -66, -104, -705, -1249}, { -431, -93, -1191, -1844}, - { 203, -732, -1000, -1693}, { 10, -832, -1846, -1819}, - { 493, -128, -1436, -1768}, { 488, -311, -1730, -2540}, - { -653, -532, -1150, -1172}, {-1086, -289, -1706, -1533}, - { -699, -1205, -1216, -1766}, {-1032, -1481, -2074, -1523}, - { -721, -1220, -2277, -2600}, { 12, -539, -1484, -1131}, - { -40, -911, -2106, -441}, { -471, -484, -2267, -1549}, - { -141, -988, -3006, -1721}, {-1545, -2102, -583, 342}, - {-1383, -2772, -386, -13}, {-2118, -2589, -1205, 72}, - {-2147, -3231, -965, 390}, {-2949, -3300, -621, 637}, - {-3907, -4138, -865, 803}, {-1287, -845, -375, -548}, - {-1416, -1169, -487, -1277}, {-1400, -1690, -1027, -418}, - {-2018, -1909, -1188, -1260}, {-1418, -2222, -2029, -128}, - {-2067, -2998, -2693, -310}, { -950, -1028, -1538, 185}, - {-1616, -915, -2205, -549}, { 19, -821, -1145, 352}, - { 184, -1175, -1356, -627}, { -547, -1088, -1661, -911}, - { -216, -1502, -2197, -948}, { -795, -1306, -2374, -451}, - { -924, -1889, -2796, -680}, { -600, -1614, -3609, -885}, - {-2392, -2528, 319, 303}, {-2908, -2095, -310, 573}, - {-3460, -2141, 49, -113}, {-2231, -448, 675, -146}, - {-2805, -532, 1231, 479}, {-2684, -486, -200, 611}, - {-3525, -971, -198, 704}, {-3707, 173, 349, 254}, - {-4734, -1447, -34, 880}, { 777, -512, 114, -10}, - { 1250, -66, 442, -5}, { 604, 613, 452, -352}, - { 1224, 777, 675, -1014}, {-1372, -79, -1208, -238}, - {-2389, -17, -1157, -818}, {-1504, -673, -1133, -1060}, - {-1984, -799, -2005, -1973}, {-2037, -798, -1068, -105}, - {-3190, -899, -1817, -194}, { -156, -886, 394, -318}, - { -258, -1283, 551, 202}, { -536, -1729, 910, 331}, - { -847, -1109, 795, -163}, {-1171, -1128, 715, 519}, - {-1080, -1319, 1685, 668}, {-1000, -1921, 96, 211}, - {-1487, -2148, 831, 174}, {-1139, -374, 414, -4}, - {-1517, -1383, 396, -352}, {-1012, 439, -59, -967}, - {-1812, 706, -440, -1030}, {-1971, -329, -34, -827}, - {-2472, -1588, -151, -606}, {-2161, 374, -281, 76}, - {-3012, 231, -15, -690}, { 1104, 566, 721, 209}, - { 1685, 564, 383, 98}, { 1898, 750, 792, -97}, - { 556, -64, 561, -93}, { 876, 162, 913, -22}, - { 961, 675, 1296, 140}, { 756, -396, 851, 544}, - { 360, -303, 1341, 396}, { 878, -22, 1464, 863}, - { -309, -273, 642, -129}, { -686, -82, 842, 454}, - { -5, -47, 1069, 998}, { -94, 967, 1277, 298}, - { -489, 385, 1473, 746}, { -369, -717, 1333, 242}, - { 281, -993, 1726, 924}, { 464, 601, 1575, 1376}, - { -250, 206, 2339, 1175}, { -438, 377, -597, -285}, - {-1020, 787, -790, -287}, { -458, -410, 215, 295}, - { -589, -860, -121, 797}, {-1175, 122, -437, 466}, - {-1480, -121, 367, 924}, { 234, 323, 770, -555}, - { 145, 30, 996, 26}, { 66, 849, 93, -145}, - { -117, 1261, 474, -399}, {-1495, 1051, 218, -506}, - {-1390, 694, 994, 88}, { 616, 7, 78, 304}, - { 1060, 52, -62, 835}, { 833, 454, 649, 1359}, - { -770, 464, 47, 93}, { -574, 1199, -39, 379}, - { 114, -98, 488, 485}, { 727, 244, 606, 696}, - { -76, 455, 671, 546}, { -565, -13, 145, 819}, - { -376, 569, 448, 1128}, { 218, 122, 265, 1167}, - { 230, 738, 932, 1003}, { 138, 477, 36, 450}, - { 404, 787, -73, 1000}, { 497, 1259, 387, 1231}, - { 17, 207, 195, -79}, { 562, 358, 53, -158}, - { 493, 387, 478, 189}, { 678, 831, 640, 558}, - { -197, 523, 613, 57}, { 429, 894, 769, 111}, - { 67, 1174, 568, 511}, { 1242, 824, 251, 840}, - { 1419, 1074, 864, 481}, { 924, 1474, 669, 724}, - { 1539, 1879, 654, 1590}, { 445, 337, 1111, 541}, - { 472, 1421, 1264, 1094}, { 794, 735, 1103, 668}, - { 1055, 863, 1192, 1020}, { 778, 1105, 806, 1798}, - { 1052, 1527, 1587, 2151}, { 881, 1552, 1265, 391}, - { 726, 872, 1812, 601}, { 1469, 280, 1008, 616}, - { 1403, 577, 1803, 1244}, { 1650, 1314, 1148, 1072}, - { 1297, 1669, 1911, 1026}, { 2093, 1044, 2115, 1189}, - { 1644, 1961, 2587, 1512}, { 25, -315, -9, -106}, - { 290, -339, 428, -444}, { -68, -783, 735, 772}, - { 245, -555, 468, 47}, { 334, -895, 814, 146}, - { 235, 368, -964, -959}, { -203, 315, -1566, -1217}, - { 801, 17, -276, -354}, { 894, -495, -789, -635}, - { 716, 291, -1189, -357}, { 560, -260, -733, -2}, - { 679, -508, -1429, 211}, { -51, -62, -428, 557}, - { 322, -638, -211, 614}, { -878, -1057, -84, -71}, - { -388, -1415, -167, -318}, { -754, -1574, 214, -539}, - {-1419, -2004, -92, -787}, { -47, -856, -347, -255}, - { 23, -1211, -173, 320}, { -658, -487, -893, 353}, - { -783, -1587, -584, 507}, {-1420, -859, -378, 441}, - {-2095, -1491, -137, 439}, { -321, -1450, -1288, -12}, - { -359, -2113, -553, -8}, { -831, -1918, -1561, 32}, - {-1014, -2487, -1359, -939}, { -475, -311, -169, -236}, - { -907, -426, 276, -611}, { -96, -400, 50, -710}, - { -426, -1022, -10, -985}, { -197, -258, -744, -575}, - { -611, -930, -771, -394}, { -267, -776, -612, -939}, - { -256, -1346, -802, -1122}, { -796, -1570, -825, -754}, - { 712, 876, 141, 227}, { 981, 1509, 85, 124}, - { 1462, 1228, 979, -39}, { 1734, 999, 1481, 440}, - { 2293, 1116, 769, 440}, { 2504, 1480, 1241, 356}, - { 2474, 1909, 1558, 810}, { 917, 1134, 607, -134}, - { 509, 1809, 781, -123}, { 1712, 1506, 559, -423}, - { 2037, 2317, 726, -155}, { 3031, 2676, 1203, 331}, - { 3664, 3274, 1768, 531}, { 1610, 1839, 867, 183}, - { 1774, 1972, 1538, 97}, { 1822, 2158, 1282, 659}, - { 2222, 2758, 1818, 900}, { 3251, 2124, 1723, 996}, - { 3633, 2336, 2408, 1453}, { 2923, 3517, 2567, 1318}, -}; +extern const int16_t ff_g723_1_lsp_band0[LSP_CB_SIZE][3]; +extern const int16_t ff_g723_1_lsp_band1[LSP_CB_SIZE][3]; +extern const int16_t ff_g723_1_lsp_band2[LSP_CB_SIZE][4]; /** * Used for the coding/decoding of the pulses positions * for the MP-MLQ codebook */ -static const int32_t combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE] = { - {118755, 98280, 80730, 65780, 53130, - 42504, 33649, 26334, 20349, 15504, - 11628, 8568, 6188, 4368, 3003, - 2002, 1287, 792, 462, 252, - 126, 56, 21, 6, 1, - 0, 0, 0, 0, 0}, - - { 23751, 20475, 17550, 14950, 12650, - 10626, 8855, 7315, 5985, 4845, - 3876, 3060, 2380, 1820, 1365, - 1001, 715, 495, 330, 210, - 126, 70, 35, 15, 5, - 1, 0, 0, 0, 0}, - - { 3654, 3276, 2925, 2600, 2300, - 2024, 1771, 1540, 1330, 1140, - 969, 816, 680, 560, 455, - 364, 286, 220, 165, 120, - 84, 56, 35, 20, 10, - 4, 1, 0, 0, 0}, - - { 406, 378, 351, 325, 300, - 276, 253, 231, 210, 190, - 171, 153, 136, 120, 105, - 91, 78, 66, 55, 45, - 36, 28, 21, 15, 10, - 6, 3, 1, 0, 0}, - - { 29, 28, 27, 26, 25, - 24, 23, 22, 21, 20, - 19, 18, 17, 16, 15, - 14, 13, 12, 11, 10, - 9, 8, 7, 6, 5, - 4, 3, 2, 1, 0}, - - { 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1}, -}; +extern const int32_t ff_g723_1_combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE]; static const int16_t pitch_contrib[340] = { 60, 0, 0, 2489, 60, 0, 0, 5217, @@ -727,655 +315,10 @@ static const int8_t pulses[4] = {6, 5, 6, 5}; */ static const int32_t max_pos[4] = {593775, 142506, 593775, 142506}; -static const int16_t fixed_cb_gain[GAIN_LEVELS] = { - 1, 2, 3, 4, 6, 9, 13, 18, - 26, 38, 55, 80, 115, 166, 240, 348, - 502, 726, 1050, 1517, 2193, 3170, 4582, 6623, -}; - -static const int16_t adaptive_cb_gain85[85 * 20] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 800, 1496, 167, -256, - -338, -39, -136, -1, -4, -6, -73, -8, - -15, 12, 23, 2, 16, 30, 3, -5, - -462, -686, 493, 2575, 311, -13, -28, -14, - -404, -5, -19, 13, 20, 72, 107, -77, - 8, 13, -9, -48, 1483, 144, 784, 928, - 1243, -134, -1, -37, -52, -94, -13, -71, - -6, -84, -8, -44, -112, -10, -59, -70, - -77, 275, 3522, 1056, -1254, 0, -4, -757, - -68, -95, 1, 16, -59, 4, -17, -227, - -5, 21, 269, 80, -125, -40, -264, 381, - 5027, 0, 0, -4, -8, -1542, 0, -2, - 0, 2, 0, 6, 38, 12, 81, -117, - 138, 332, 2215, 2574, 1339, -1, -6, -299, - -404, -109, -2, -18, -44, -21, -52, -348, - -11, -27, -181, -210, 3685, 2883, -887, 866, - -1639, -828, -507, -48, -45, -164, -648, 199, - 156, -194, -152, 46, 368, 288, -88, 86, - 1396, 2146, 2235, 345, 942, -118, -281, -305, - -7, -54, -182, -190, -292, -29, -45, -47, - -80, -123, -128, -19, 13, 4475, 3549, -804, - -655, 0, -1222, -768, -39, -26, -3, -2, - -969, 0, 219, 174, 0, 179, 141, -32, - -724, 254, 242, 6049, 2462, -32, -3, -3, - -2233, -370, 11, 10, -3, 267, -94, -89, - 108, -38, -36, -909, 626, -1713, 6121, 4561, - -1061, -23, -179, -2287, -1270, -68, 65, -233, - 640, -174, 477, -1704, 40, -111, 396, 295, - -350, 1391, 7985, 511, -405, -7, -118, -3892, - -15, -10, 29, 170, -678, 10, -43, -249, - -8, 34, 197, 12, 3144, -529, 608, 2530, - 3878, -603, -17, -22, -390, -918, 101, -116, - 19, -485, 81, -93, -744, 125, -144, -599, - 2589, -689, 3045, 5603, -404, -409, -29, -566, - -1916, -10, 108, -481, 128, -885, 235, -1041, - 63, -17, 75, 138, 3107, 513, 1374, -3594, - -4922, -589, -16, -115, -788, -1478, -97, -260, - -43, 681, 112, 301, 933, 154, 413, -1079, - 2468, 6010, 1107, -390, 1961, -372, -2204, -74, - -9, -234, -905, -166, -406, 58, 143, 26, - -295, -719, -132, 46, 4773, 2766, 2368, 4862, - -4044, -1390, -467, -342, -1443, -998, -806, -690, - -399, -1416, -821, -702, 1178, 682, 584, 1200, - 1665, -1879, 1443, 1701, 8562, -169, -215, -127, - -176, -4475, 190, -146, 165, -172, 195, -149, - -870, 982, -754, -889, 2716, 9011, -1007, 755, - -1785, -450, -4956, -61, -34, -194, -1493, 167, - 554, -125, -415, 46, 296, 982, -109, 82, - -2727, 7548, 1285, 938, 3420, -453, -3478, -100, - -53, -714, 1256, 213, -592, 156, -432, -73, - 569, -1576, -268, -196, 3677, 882, 4050, 1202, - 2323, -825, -47, -1001, -88, -329, -198, -909, - -218, -269, -64, -297, -521, -125, -574, -170, - 2046, -753, 122, 10102, 603, -255, -34, 0, - -6229, -22, 94, -15, 5, -1261, 464, -75, - -75, 27, -4, -372, 449, -1815, 10690, 3870, - -527, -12, -201, -6976, -914, -16, 49, -293, - 1184, -106, 428, -2525, 14, -58, 344, 124, - -941, 2352, 5049, 3650, 2637, -54, -337, -1556, - -813, -424, 135, 290, -725, 209, -524, -1125, - 151, -378, -812, -587, -1879, 796, 3117, 9569, - -404, -215, -38, -593, -5589, -9, 91, 357, - -151, 1097, -464, -1821, -46, 19, 76, 236, - -1715, 2043, -2096, 9946, 4001, -179, -254, -268, - -6038, -977, 213, -219, 261, 1041, -1240, 1272, - 418, -498, 511, -2429, -5772, -618, -3921, 284, - -3155, -2033, -23, -938, -4, -607, -218, -1381, - -148, 100, 10, 68, -1111, -119, -755, 54, - 382, 4748, 8003, -2064, 2198, -8, -1376, -3909, - -260, -294, -110, -186, -2319, 48, 598, 1008, - -51, -637, -1073, 277, -867, 3015, 11926, -1675, - 947, -45, -555, -8681, -171, -54, 159, 631, - -2195, -88, 308, 1219, 50, -174, -690, 96, - -4933, -432, 6757, 3771, 1352, -1485, -11, -2786, - -867, -111, -130, 2034, 178, 1135, 99, -1555, - 407, 35, -557, -311, 152, 9726, 4231, -1928, - 1490, -1, -5774, -1092, -226, -135, -90, -39, - -2511, 17, 1144, 498, -13, -884, -384, 175, - 2512, 193, 9033, 5361, -3148, -385, -2, -4980, - -1754, -605, -29, -1385, -106, -822, -63, -2956, - 482, 37, 1735, 1030, 8464, 2844, 12, 549, - 2132, -4373, -493, 0, -18, -277, -1469, -6, - -2, -284, -95, 0, -1101, -370, -1, -71, - 2141, -2602, 7166, 9046, -1350, -279, -413, -3134, - -4994, -111, 340, -936, 1138, -1182, 1436, -3957, - 176, -214, 590, 745, -244, 278, 13307, 1227, - -161, -3, -4, -10808, -91, -1, 4, 198, - -226, 18, -20, -997, -2, 2, 131, 12, - -1947, 8217, 6269, 917, -2559, -231, -4121, -2399, - -51, -399, 976, 745, -3144, 108, -460, -350, - -304, 1283, 979, 143, -1810, 2061, -2781, 6056, - 10058, -200, -259, -472, -2238, -6174, 227, -307, - 349, 669, -761, 1028, 1111, -1265, 1707, -3717, - 7827, 9161, -3409, 2473, -1510, -3739, -5122, -709, - -373, -139, -4376, 1628, 1906, -1181, -1382, 514, - 721, 844, -314, 228, -1430, 8313, 9541, -2955, - 1626, -124, -4218, -5556, -533, -161, 725, 832, - -4841, -257, 1499, 1721, 142, -825, -947, 293, - 2819, -4247, 5391, 8673, 2756, -485, -1101, -1774, - -4591, -463, 730, -927, 1397, -1492, 2248, -2854, - -474, 714, -907, -1459, 141, 14552, 690, 257, - -112, -1, -12926, -29, -4, 0, -125, -5, - -613, -2, -228, -10, 0, 99, 4, 1, - 11938, -1859, 1806, -962, -884, -8699, -211, -199, - -56, -47, 1355, -1316, 205, 701, -109, 106, - 644, -100, 97, -51, 3728, 1982, 2264, 4584, - 3131, -848, -239, -312, -1282, -598, -451, -515, - -273, -1043, -554, -633, -712, -378, -432, -876, - -1181, 766, 720, 14303, -216, -85, -35, -31, - -12486, -2, 55, 51, -33, 1031, -668, -628, - -15, 10, 9, 189, -4385, 4826, 10112, 1569, - 3388, -1173, -1421, -6242, -150, -700, 1291, 2706, - -2979, 420, -462, -969, 906, -998, -2091, -324, - -448, 1932, 15591, -1842, 657, -12, -227, -14837, - -207, -26, 52, 427, -1838, -50, 217, 1753, - 18, -77, -626, 74, -4141, 1844, 3962, 5517, - 6220, -1046, -207, -958, -1858, -2361, 466, 1001, - -446, 1394, -621, -1334, 1572, -700, -1504, -2094, - 729, -2299, 14755, 3657, -952, -32, -322, -13288, - -816, -55, 102, -656, 2071, -162, 513, -3294, - 42, -133, 857, 212, -1385, 5801, 13339, -3137, - 1344, -117, -2054, -10861, -600, -110, 490, 1127, - -4723, -265, 1111, 2554, 113, -476, -1094, 257, - 4710, 9661, 1073, -2467, 3274, -1354, -5697, -70, - -371, -654, -2777, -308, -633, 709, 1455, 161, - -941, -1930, -214, 493, 1843, -3624, 12422, 6898, - -1559, -207, -802, -9419, -2904, -148, 407, -1397, - 2748, -775, 1526, -5230, 175, -344, 1182, 656, - 1433, 2394, 2507, 1380, 8780, -125, -349, -383, - -116, -4705, -209, -219, -366, -120, -201, -211, - -768, -1283, -1343, -740, -1712, 12915, 5883, -2197, - 991, -179, -10181, -2112, -294, -60, 1350, 615, - -4638, -229, 1732, 789, 103, -781, -356, 133, - 15072, 2158, -1245, 910, -496, -13865, -284, -94, - -50, -15, -1986, 1145, 164, -837, -119, 69, - 456, 65, -37, 27, 4655, 7319, 4916, 586, - -3381, -1322, -3270, -1475, -20, -697, -2079, -1396, - -2196, -166, -261, -175, 960, 1510, 1014, 120, - 1191, -2140, 5120, 13498, -1418, -86, -279, -1600, - -11121, -122, 155, -372, 669, -981, 1763, -4218, - 103, -185, 443, 1168, -1530, -817, 8191, 9632, - -1452, -143, -40, -4095, -5663, -128, -76, 765, - 408, 900, 480, -4815, -135, -72, 726, 854, - -3236, 607, 1696, -2106, 11485, -639, -22, -175, - -270, -8051, 119, 335, -62, -416, 78, 218, - 2268, -425, -1189, 1476, 3203, -1903, -837, 9679, - 7057, -626, -221, -42, -5718, -3039, 372, 163, - -97, -1892, 1124, 494, -1380, 819, 360, -4169, - 213, -655, 17015, 620, -384, -2, -26, -17671, - -23, -9, 8, -221, 681, -8, 24, -644, - 5, -15, 399, 14, 5088, 35, -3339, 3726, - 8488, -1580, 0, -680, -847, -4397, -10, 1037, - 7, -1157, -8, 759, -2636, -18, 1730, -1930, - -988, 1454, -2688, 15039, 2682, -59, -129, -441, - -13805, -439, 87, -162, 238, 907, -1335, 2467, - 161, -238, 440, -2462, -4865, -2842, -53, 5495, - 6523, -1445, -493, 0, -1843, -2597, -844, -16, - -9, 1632, 953, 18, 1937, 1131, 21, -2188, - 3076, 15069, -2914, 1810, -971, -577, -13860, -518, - -200, -57, -2829, 547, 2680, -339, -1665, 322, - 182, 893, -172, 107, 1311, 5355, 11054, 2299, - -3654, -105, -1750, -7458, -322, -814, -428, -885, - -3613, -184, -751, -1551, 292, 1194, 2465, 512, - 4035, 5619, 4618, 1815, 1912, -994, -1927, -1301, - -201, -223, -1384, -1137, -1583, -447, -622, -511, - -471, -656, -539, -211, -2131, 2754, -4501, 12879, - 7432, -277, -463, -1236, -10124, -3371, 358, -585, - 756, 1675, -2165, 3538, 967, -1249, 2042, -5842, - 5618, -515, 3219, -4149, 4857, -1926, -16, -632, - -1050, -1440, 176, -1104, 101, 1422, -130, 815, - -1666, 152, -954, 1230, 1838, -1709, 1139, 16867, - 716, -206, -178, -79, -17366, -31, 191, -127, - 118, -1892, 1759, -1173, -80, 74, -49, -737, - 1978, -3845, 10050, 11854, -2492, -238, -902, -6164, - -8576, -379, 464, -1213, 2358, -1431, 2782, -7271, - 301, -585, 1529, 1803, -2600, 11246, 11289, -3647, - 1463, -412, -7720, -7778, -812, -130, 1784, 1791, - -7749, -578, 2504, 2513, 232, -1004, -1008, 325, - 3442, 907, 2725, 8970, 3638, -723, -50, -453, - -4911, -808, -190, -572, -150, -1884, -496, -1492, - -764, -201, -605, -1992, -126, 17498, 3481, -2003, - 1090, 0, -18689, -739, -244, -72, 135, 26, - -3717, -15, 2139, 425, 8, -1165, -231, 133, - -1814, 1048, -2164, 4070, 16272, -200, -67, -285, - -1011, -16160, 116, -239, 138, 450, -260, 537, - 1801, -1041, 2149, -4042, 9354, 12580, -1883, 962, - -617, -5341, -9660, -216, -56, -23, -7183, 1075, - 1446, -549, -738, 110, 352, 474, -71, 36, - 1708, 4199, 7387, 6335, 1003, -178, -1076, -3330, - -2449, -61, -437, -770, -1893, -660, -1623, -2856, - -104, -257, -452, -388, -2624, 5623, 17310, -2353, - 592, -420, -1930, -18288, -338, -21, 900, 2772, - -5941, -376, 807, 2486, 94, -203, -625, 85, - 1211, -850, 1193, -1926, 15992, -89, -44, -86, - -226, -15609, 62, -88, 61, 142, -100, 140, - -1182, 830, -1165, 1880, 3983, -2054, 11506, -19, - 3622, -968, -257, -8080, 0, -801, 499, -2797, - 1442, 4, -2, 13, -880, 454, -2544, 4, - -786, -1354, 16092, 7246, -1665, -37, -111, -15805, - -3205, -169, -65, 772, 1330, 348, 599, -7117, - -80, -137, 1636, 736, -4316, -511, 6674, 11665, - 4633, -1137, -15, -2719, -8305, -1310, -134, 1758, - 208, 3073, 364, -4752, 1220, 144, -1887, -3299, - 7912, 4557, 1937, 1885, 7037, -3821, -1267, -229, - -216, -3022, -2200, -935, -538, -910, -524, -222, - -3398, -1957, -832, -809, 3434, 2967, 5867, 8196, - 8766, -720, -537, -2101, -4100, -4690, -622, -1230, - -1062, -1718, -1484, -2935, -1837, -1588, -3139, -4385, - 5881, 9176, 8119, 3934, 3355, -2111, -5139, -4023, - -944, -687, -3294, -2914, -4547, -1412, -2203, -1949, - -1204, -1879, -1662, -805 -}; +extern const int16_t ff_g723_1_fixed_cb_gain[GAIN_LEVELS]; -static const int16_t adaptive_cb_gain170[170 * 20] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 776, 212, 715, 670, - 809, -36, -2, -31, -27, -39, -10, -33, - -9, -31, -8, -29, -38, -10, -35, -33, - 1296, 1316, -168, -320, -815, -102, -105, -1, - -6, -40, -104, 13, 13, 25, 25, -3, - 64, 65, -8, -15, -589, 680, 2478, 308, - -596, -21, -28, -375, -5, -21, 24, 89, - -102, 11, -12, -46, -21, 24, 90, 11, - -735, -487, -5, 2948, 468, -33, -14, 0, - -530, -13, -21, 0, 0, 132, 87, 0, - 21, 13, 0, -84, 1042, 1730, 1068, 333, - 626, -66, -182, -69, -6, -23, -110, -67, - -112, -21, -35, -21, -39, -66, -40, -12, - 486, -769, 4074, 2825, -1107, -14, -36, -1013, - -487, -74, 22, -120, 191, -83, 132, -702, - 32, -52, 275, 191, 1521, -767, -124, 4320, - 1026, -141, -35, 0, -1139, -64, 71, 11, - -5, -401, 202, 32, -95, 48, 7, -270, - 2425, 1267, 3439, -91, -1166, -359, -98, -722, - 0, -83, -187, -509, -266, 13, 7, 19, - 172, 90, 244, -6, -1251, 975, 173, 4039, - 2005, -95, -58, -1, -996, -245, 74, 13, - -10, 308, -240, -42, 153, -119, -21, -494, - 1820, 632, 1322, 2062, 1031, -202, -24, -106, - -259, -64, -70, -146, -51, -229, -79, -166, - -114, -39, -83, -129, -447, 4904, 244, -315, - -2038, -12, -1467, -3, -6, -253, 134, 6, - -73, -8, 94, 4, -55, 610, 30, -39, - -208, -1102, 463, -448, 5653, -2, -74, -13, - -12, -1950, -14, 5, 31, -5, -30, 12, - 71, 380, -159, 154, 4739, 2600, -1864, 856, - -1554, -1371, -412, -212, -44, -147, -752, 539, - 295, -247, -135, 97, 449, 246, -176, 81, - 1894, 3533, 35, -26, 2145, -219, -762, 0, - 0, -280, -408, -4, -7, 3, 5, 0, - -248, -462, -4, 3, -2699, 1841, 4072, 2443, - 1582, -444, -207, -1012, -364, -152, 303, 670, - -457, 402, -274, -607, 260, -177, -393, -236, - -844, 3358, 6106, -1059, -537, -43, -688, -2275, - -68, -17, 173, 314, -1251, -54, 217, 395, - -27, 110, 200, -34, 1251, 1016, 3020, 2210, - 1445, -95, -63, -556, -298, -127, -77, -230, - -187, -168, -137, -407, -110, -89, -266, -194, - 2099, 2277, 4038, 3533, -2870, -269, -316, -995, - -762, -503, -291, -517, -561, -452, -491, -871, - 367, 399, 707, 619, 400, -1114, 8516, 2422, - -1117, -9, -75, -4426, -358, -76, 27, -208, - 579, -59, 164, -1259, 27, -75, 580, 165, - -4398, -2011, 3912, -2407, 2258, -1180, -247, -934, - -353, -311, -540, 1050, 480, -646, -295, 575, - 606, 277, -539, 331, 1767, -1447, 4240, 6160, - -757, -190, -127, -1097, -2316, -35, 156, -457, - 374, -664, 544, -1594, 81, -66, 195, 284, - 1594, -1463, 1035, 6938, 1920, -155, -130, -65, - -2938, -225, 142, -100, 92, -675, 619, -438, - -186, 171, -121, -813, -562, 4716, 4085, -591, - 2421, -19, -1357, -1018, -21, -357, 162, 140, - -1175, -20, 170, 147, 83, -696, -603, 87, - 1552, 8778, -935, 354, -1424, -147, -4703, -53, - -7, -123, -831, 88, 501, -33, -189, 20, - 134, 763, -81, 30, 4831, -4431, 41, -1479, - -2976, -1424, -1198, 0, -133, -540, 1306, -12, - 11, 436, -400, 3, 877, -804, 7, -268, - 2090, 1192, 1006, 1645, 4853, -266, -86, -61, - -165, -1437, -152, -128, -73, -210, -119, -101, - -619, -353, -298, -487, 2386, 5712, 1426, -94, - 1350, -347, -1991, -124, 0, -111, -832, -207, - -497, 13, 32, 8, -196, -470, -117, 7, - -1349, 1091, 1659, 8891, 313, -111, -72, -168, - -4825, -5, 89, 136, -110, 732, -592, -900, - 25, -20, -31, -170, 9980, 916, -381, -808, - 88, -6080, -51, -8, -39, 0, -558, 232, - 21, 492, 45, -18, -53, -4, 2, 4, - 2338, -1031, -248, 3928, 6484, -333, -64, -3, - -942, -2566, 147, 35, -15, -560, 247, 59, - -925, 408, 98, -1555, 6166, -1240, -337, 3672, - -1277, -2320, -93, -6, -823, -99, 466, 126, - -25, -1382, 278, 75, 480, -96, -26, 286, - 4377, -132, -2588, 1701, 4865, -1169, -1, -409, - -176, -1444, 35, 691, -20, -454, 13, 268, - -1299, 39, 768, -505, 2594, 3295, 3944, 1481, - 682, -410, -662, -949, -133, -28, -521, -624, - -793, -234, -297, -356, -108, -137, -164, -61, - 4151, 624, 815, 4485, 2229, -1052, -23, -40, - -1228, -303, -158, -206, -31, -1136, -170, -223, - -565, -84, -111, -610, -3575, -361, 4924, 2791, - 4698, -780, -7, -1480, -475, -1347, -78, 1074, - 108, 609, 61, -839, 1025, 103, -1412, -800, - -2518, 3791, 8623, 315, 2465, -387, -877, -4538, - -6, -370, 582, 1325, -1995, 48, -73, -166, - 378, -570, -1297, -47, -691, 2989, 9957, -421, - -1142, -29, -545, -6051, -10, -79, 126, 420, - -1817, -17, 76, 256, -48, 208, 694, -29, - -1918, 104, -3190, -3410, -4440, -224, 0, -621, - -709, -1203, 12, -373, 20, -399, 21, -664, - -519, 28, -864, -924, -3359, -1668, 1854, 6939, - 1430, -688, -169, -209, -2939, -124, -341, 380, - 188, 1422, 706, -785, 293, 145, -161, -606, - 42, 9706, 3164, -952, 907, 0, -5750, -611, - -55, -50, -25, -8, -1874, 2, 564, 183, - -2, -537, -175, 52, 1607, 785, 2862, 4327, - 3307, -157, -37, -500, -1143, -667, -77, -280, - -137, -424, -207, -756, -324, -158, -577, -873, - 6801, 3416, 2227, 1682, -3217, -2823, -712, -302, - -172, -631, -1418, -924, -464, -698, -350, -228, - 1335, 670, 437, 330, 3459, 3898, 364, 7841, - -2640, -730, -927, -8, -3753, -425, -823, -76, - -86, -1655, -1865, -174, 557, 628, 58, 1263, - -5902, -3458, -2465, -1886, 4334, -2126, -730, -371, - -217, -1146, -1245, -888, -520, -679, -398, -283, - 1561, 915, 652, 499, -3710, 1133, 7849, 3443, - -215, -840, -78, -3760, -723, -2, 256, 1777, - -543, 779, -238, -1649, -48, 14, 103, 45, - 4132, 2828, 2, -4212, -4116, -1042, -488, 0, - -1083, -1034, -713, 0, 0, 1062, 727, 0, - 1038, 710, 0, -1058, 5875, 8496, -1796, 1376, - -1786, -2107, -4406, -197, -115, -194, -3047, 644, - 931, -493, -713, 150, 640, 926, -195, 150, - 3143, 3483, 3546, -793, 4489, -603, -740, -767, - -38, -1230, -668, -680, -754, 152, 168, 171, - -861, -954, -971, 217, 2845, 7965, 3695, -5432, - 3978, -494, -3873, -833, -1801, -966, -1383, -641, - -1796, 943, 2641, 1225, -691, -1934, -897, 1319, - 1538, 150, 7139, 2049, 3097, -144, -1, -3110, - -256, -585, -14, -670, -65, -192, -18, -892, - -290, -28, -1349, -387, 618, 7520, 4729, -238, - -3373, -23, -3452, -1365, -3, -694, -283, -178, - -2170, 8, 109, 68, 127, 1548, 973, -49, - 2965, -3013, 7912, 7076, -1997, -536, -554, -3821, - -3056, -243, 545, -1431, 1455, -1280, 1301, -3417, - 361, -367, 964, 862, 2443, -929, -1113, 9677, - 4138, -364, -52, -75, -5716, -1045, 138, 166, - -63, -1443, 549, 657, -617, 234, 281, -2444, - 1966, 3309, 10085, -3399, 2105, -236, -668, -6207, - -705, -270, -397, -1210, -2037, 408, 686, 2092, - -252, -425, -1295, 436, -112, -1368, 8868, 4822, - 2048, 0, -114, -4800, -1419, -256, -9, 61, - 740, 33, 402, -2610, 14, 171, -1108, -602, - -2597, 438, -1839, 6229, 7266, -411, -11, -206, - -2368, -3223, 69, -291, 49, 987, -166, 699, - 1152, -194, 816, -2763, 3454, 553, 9127, 4946, - -5596, -728, -18, -5084, -1493, -1911, -116, -1924, - -308, -1042, -166, -2755, 1179, 188, 3117, 1689, - -532, -663, 12262, 2495, -1004, -17, -26, -9177, - -380, -61, -21, 398, 496, 81, 101, -1867, - -32, -40, 751, 152, -2100, 1317, -1509, 11425, - 2997, -269, -105, -139, -7967, -548, 168, -193, - 121, 1464, -918, 1052, 384, -240, 276, -2090, - 1193, -2697, 11259, 5373, -763, -86, -444, -7737, - -1762, -35, 196, -819, 1853, -391, 884, -3692, - 55, -125, 525, 250, 2405, -471, 11079, 203, - 782, -353, -13, -7491, -2, -37, 69, -1626, - 318, -29, 5, -137, -114, 22, -529, -9, - -1871, 5685, 11290, -2662, 1353, -213, -1972, -7780, - -432, -111, 649, 1289, -3917, -304, 923, 1834, - 154, -469, -932, 220, -3768, 5927, -3093, 5041, - 5212, -866, -2144, -584, -1551, -1658, 1363, -711, - 1119, 1159, -1824, 951, 1198, -1885, 984, -1603, - -2546, 9502, 5969, -2440, 1928, -395, -5511, -2175, - -363, -226, 1477, 927, -3462, -379, 1415, 889, - 299, -1118, -702, 287, -4963, 3568, 4592, 5508, - 3451, -1503, -777, -1287, -1851, -727, 1080, 1391, - -1000, 1668, -1199, -1543, 1045, -751, -967, -1160, - 1745, -2586, 3983, 10899, -1551, -186, -408, -968, - -7250, -146, 275, -424, 628, -1161, 1720, -2649, - 165, -244, 377, 1032, 867, -456, -727, 3369, - 11822, -45, -12, -32, -692, -8531, 24, 38, - -20, -178, 93, 149, -625, 329, 525, -2431, - 7535, 2422, 1926, 1405, 1599, -3466, -358, -226, - -120, -156, -1114, -886, -284, -646, -207, -165, - -735, -236, -188, -137, 1041, -735, -142, 13209, - 1515, -66, -33, -1, -10649, -140, 46, 9, - -6, -839, 593, 114, -96, 68, 13, -1222, - 7950, 6745, -1444, -1008, 2721, -3857, -2777, -127, - -62, -452, -3273, 700, 594, 489, 415, -88, - -1320, -1120, 239, 167, -4754, -1379, 4522, -578, - -5733, -1379, -116, -1248, -20, -2006, -400, 1312, - 380, -167, -48, 159, -1663, -482, 1582, -202, - 3220, 5978, 5923, 2430, -2689, -633, -2181, -2141, - -360, -441, -1175, -1164, -2161, -477, -886, -878, - 528, 981, 972, 398, 377, 1312, 13978, -1470, - 677, -8, -105, -11925, -132, -28, -30, -321, - -1119, 33, 117, 1254, -15, -54, -577, 60, - -3435, 6770, 314, -885, 5686, -720, -2797, -6, - -47, -1973, 1419, 65, -129, -185, 366, 16, - 1192, -2349, -109, 307, 3171, 8774, -2260, 2679, - 3069, -613, -4699, -312, -438, -575, -1698, 437, - 1210, -518, -1435, 369, -594, -1643, 423, -501, - 5557, 1509, 5407, -125, -7386, -1884, -139, -1784, - 0, -3330, -511, -1834, -498, 42, 11, 41, - 2505, 680, 2438, -56, -2838, 2595, 13228, 271, - 1793, -491, -411, -10680, -4, -196, 449, 2291, - -2095, 47, -42, -219, 310, -284, -1447, -29, - 664, -278, 14966, 951, -711, -26, -4, -13672, - -55, -30, 11, -606, 253, -38, 16, -869, - 28, -12, 650, 41, 808, 1770, 8658, 5863, - -1486, -39, -191, -4576, -2098, -134, -87, -427, - -935, -289, -633, -3098, 73, 160, 785, 531, - 3063, 1539, 2000, -542, 9576, -572, -144, -244, - -17, -5597, -287, -374, -188, 101, 51, 66, - -1790, -900, -1169, 317, 514, 14083, -323, 896, - -891, -16, -12106, -6, -49, -48, -442, 10, - 277, -28, -770, 17, 27, 766, -17, 48, - 892, 158, 5237, 11057, -1603, -48, -1, -1674, - -7462, -156, -8, -285, -50, -602, -106, -3534, - 87, 15, 512, 1082, -1612, 2564, -4296, 12526, - 5710, -158, -401, -1126, -9576, -1990, 252, -422, - 672, 1232, -1960, 3284, 561, -893, 1497, -4365, - 4889, -6878, 612, 6109, 4753, -1459, -2887, -22, - -2277, -1379, 2052, -182, 257, -1823, 2564, -228, - -1418, 1995, -177, -1772, 3053, -506, 2403, 9625, - 1322, -569, -15, -352, -5655, -106, 94, -448, - 74, -1794, 297, -1412, -246, 40, -194, -777, - -754, 12904, 4480, -2113, 1471, -34, -10163, -1225, - -272, -132, 594, 206, -3529, -97, 1664, 577, - 67, -1159, -402, 189, 4255, 1476, 5055, 2393, - 2912, -1105, -132, -1559, -349, -517, -383, -1313, - -455, -621, -215, -738, -756, -262, -898, -425, - -1371, 535, 1417, 14604, -997, -114, -17, -122, - -13017, -60, 44, 118, -46, 1222, -477, -1263, - -83, 32, 86, 888, 5368, -1744, 4083, -1236, - 3753, -1758, -185, -1017, -93, -860, 571, -1338, - 434, 405, -131, 308, -1229, 399, -935, 283, - 1588, -3097, 14415, 3699, -1171, -154, -585, -12683, - -835, -83, 300, -1397, 2725, -358, 699, -3255, - 113, -221, 1030, 264, 212, 7989, 9471, -3344, - 2009, -2, -3895, -5475, -682, -246, -103, -123, - -4618, 43, 1630, 1933, -26, -979, -1161, 410, - 856, 2294, -627, 6930, 6929, -44, -321, -24, - -2931, -2930, -119, 32, 87, -362, -970, 265, - -362, -970, 265, -2931, 2357, -4187, 7162, 7683, - 3371, -339, -1070, -3131, -3603, -693, 602, -1030, - 1830, -1105, 1963, -3359, -485, 861, -1474, -1581, - 350, 4585, 14053, -3819, 1218, -7, -1283, -12054, - -890, -90, -97, -300, -3933, 81, 1068, 3275, - -26, -341, -1045, 284, -3248, 3531, 475, 2137, - 11711, -644, -761, -13, -278, -8372, 700, 94, - -102, 423, -460, -62, 2322, -2524, -340, -1528, - -3017, 3852, 1725, 8440, 5257, -555, -905, -181, - -4348, -1686, 709, 317, -405, 1554, -1984, -889, - 968, -1236, -553, -2708, -909, 3196, 15512, -2528, - 1066, -50, -623, -14686, -390, -69, 177, 861, - -3026, -140, 493, 2393, 59, -208, -1009, 164, - 959, -3370, 9617, 9545, -1761, -56, -693, -5645, - -5561, -189, 197, -563, 1978, -558, 1963, -5603, - 103, -362, 1034, 1026, 7575, 11796, -4845, 3252, - -1703, -3502, -8493, -1433, -645, -177, -5454, 2240, - 3488, -1503, -2341, 961, 787, 1226, -503, 338, - 6409, 1722, 1764, -4191, 6015, -2507, -181, -189, - -1072, -2208, -673, -690, -185, 1639, 440, 451, - -2353, -632, -647, 1538, -2420, 12161, 5038, 1286, - -2098, -357, -9027, -1549, -100, -268, 1796, 744, - -3740, 190, -954, -395, -310, 1557, 645, 164, - -2232, -1341, 7246, 9470, -1977, -304, -109, -3204, - -5474, -238, -182, 987, 593, 1290, 775, -4188, - -269, -161, 874, 1143, 1030, 7034, 4231, 1551, - 3077, -64, -3019, -1093, -146, -577, -442, -266, - -1816, -97, -666, -400, -193, -1321, -794, -291, - 5121, 11835, -477, -1749, 2298, -1601, -8549, -13, - -186, -322, -3699, 149, 344, 546, 1264, -50, - -718, -1660, 66, 245, -3328, 3827, 5921, 9976, - -1045, -676, -894, -2140, -6075, -66, 777, 1203, - -1383, 2027, -2330, -3605, -212, 244, 377, 636, - 3813, 5718, -4666, -3412, 5674, -887, -1995, -1329, - -710, -1965, -1331, 1086, 1628, 794, 1191, -972, - -1320, -1980, 1616, 1181, 1348, -3672, 13154, 6938, - -1690, -110, -823, -10561, -2938, -174, 302, -1082, - 2948, -570, 1555, -5570, 139, -379, 1357, 716, - 2151, -3586, 6949, 12131, -1224, -282, -785, -2947, - -8982, -91, 470, -912, 1521, -1592, 2655, -5145, - 160, -268, 519, 906, -2889, 9647, 10276, -2728, - 995, -509, -5680, -6445, -454, -60, 1701, 1812, - -6051, -481, 1606, 1711, 175, -586, -624, 165, - 6177, 2184, 555, 1985, 6589, -2329, -291, -18, - -240, -2650, -823, -209, -74, -748, -264, -67, - -2484, -878, -223, -798, -492, 391, 17166, -681, - 240, -14, -9, -17987, -28, -3, 11, 515, - -410, -20, 16, 713, 7, -5, -252, 10, - 12628, 5448, -2630, 3011, -2695, -9733, -1811, -422, - -553, -443, -4199, 2027, 874, -2321, -1001, 483, - 2077, 896, -432, 495, -3628, -534, 3447, 7002, - 6751, -803, -17, -725, -2992, -2782, -118, 763, - 112, 1550, 228, -1473, 1495, 220, -1420, -2885, - -5239, 5901, 8107, 3650, 4846, -1675, -2125, -4012, - -813, -1433, 1887, 2592, -2920, 1167, -1315, -1806, - 1550, -1745, -2398, -1080, 6157, 6678, 4099, -1074, - 2348, -2314, -2722, -1025, -70, -336, -2509, -1540, - -1670, 403, 437, 268, -882, -957, -587, 153, - 1079, 16099, 242, -881, 1690, -71, -15820, -3, - -47, -174, -1060, -16, -238, 58, 865, 13, - -111, -1661, -25, 90, -278, 227, -1039, 1636, - 16945, -4, -3, -65, -163, -17526, 3, -17, - 14, 27, -22, 103, 287, -234, 1074, -1693, - 15778, -1454, 574, -603, -107, -15195, -129, -20, - -22, 0, 1400, -553, 51, 581, -53, 21, - 103, -9, 3, -3, 2406, -836, 13224, 7993, - -4266, -353, -42, -10673, -3899, -1111, 122, -1942, - 674, -1174, 407, -6451, 626, -217, 3443, 2081, - 3184, 14368, -3336, 2255, -1801, -619, -12600, -679, - -310, -198, -2793, 648, 2926, -438, -1977, 459, - 350, 1580, -366, 247, -1698, 17076, 2504, -539, - -646, -176, -17798, -382, -17, -25, 1770, 259, - -2610, -55, 561, 82, -67, 673, 98, -21, - 2375, -797, -2696, 14483, 5383, -344, -38, -443, - -12803, -1769, 115, 391, -131, -2100, 705, 2384, - -780, 262, 886, -4759, -2691, 2554, -4520, 9573, - 10655, -442, -398, -1247, -5594, -6930, 419, -742, - 704, 1572, -1492, 2641, 1750, -1661, 2939, -6226, - -4332, -4399, -1657, 4880, 7375, -1145, -1181, -167, - -1453, -3319, -1163, -438, -444, 1290, 1310, 493, - 1950, 1980, 745, -2196, -3498, 7405, 9955, 2693, - -2971, -746, -3347, -6049, -442, -538, 1581, 2125, - -4499, 575, -1217, -1636, -634, 1342, 1805, 488, - 6717, -3792, 7739, 2798, 3489, -2754, -877, -3655, - -477, -743, 1554, -3173, 1791, -1147, 647, -1321, - -1430, 807, -1648, -595, 5263, 9770, 3463, 1069, - -3971, -1690, -5826, -732, -69, -962, -3138, -1112, - -2065, -343, -637, -226, 1275, 2368, 839, 259, - 1243, -2634, 16772, 1871, 332, -94, -423, -17169, - -213, -6, 199, -1273, 2696, -142, 300, -1915, - -25, 53, -339, -37, 2691, 2836, 3105, 5711, - 4817, -442, -491, -588, -1991, -1416, -465, -510, - -537, -938, -988, -1082, -791, -834, -913, -1679, - 4366, 2944, 7210, 3627, 1161, -1163, -529, -3172, - -803, -82, -784, -1921, -1295, -966, -651, -1596, - -309, -208, -511, -257, 13888, 3951, -671, -2305, - 3354, -11773, -953, -27, -324, -686, -3349, 569, - 161, 1954, 556, -94, -2843, -809, 137, 472, - 7053, 5847, 2929, 8378, -4794, -3036, -2086, -523, - -4284, -1403, -2517, -1261, -1045, -3607, -2990, -1498, - 2064, 1711, 857, 2451, -2191, 12838, 9182, -3915, - 1617, -293, -10059, -5146, -935, -159, 1717, 1228, - -7195, -523, 3068, 2194, 216, -1267, -906, 386, - -4881, 13114, 5767, -435, 4155, -1454, -10498, -2030, - -11, -1054, 3907, 1718, -4616, -129, 348, 153, - 1238, -3326, -1462, 110, 7843, -1250, 210, 7106, - -5203, -3754, -95, -2, -3082, -1652, 598, -100, - 16, -3402, 542, -91, 2491, -397, 66, 2257, - -2463, 8168, 14551, -3908, 1828, -370, -4072, -12923, - -932, -204, 1228, 2188, -7254, -587, 1948, 3471, - 274, -911, -1623, 436, -1579, 347, -272, -2735, - 16031, -152, -7, -4, -456, -15686, 33, -26, - 5, -263, 58, -45, 1545, -340, 266, 2676, - -6327, 1328, 5093, -5079, 7617, -2443, -107, -1583, - -1574, -3541, 513, 1967, -413, -1961, 411, 1578, - 2941, -617, -2367, 2361, 3286, -4509, 11306, 11025, - -2623, -659, -1241, -7802, -7419, -420, 904, -2267, - 3112, -2211, 3034, -7608, 526, -722, 1810, 1765, - 5567, 17853, -3754, 1166, -519, -1892, -19455, -860, - -83, -16, -6067, 1275, 4090, -396, -1271, 267, - 176, 566, -119, 37, -2136, -424, 15292, 5108, - -1648, -278, -10, -14273, -1593, -165, -55, 1993, - 396, 666, 132, -4768, -214, -42, 1538, 514, - 2267, -3297, 2549, 16563, -791, -313, -663, -396, - -16745, -38, 456, -352, 513, -2291, 3333, -2576, - 109, -159, 123, 799, 3655, 1899, -3364, 6279, - 12510, -815, -220, -690, -2406, -9552, -423, 750, - 390, -1400, -728, 1289, -2791, -1450, 2568, -4794, - 8052, 2285, -6193, 5138, 6003, -3957, -318, -2341, - -1611, -2199, -1123, 3044, 864, -2525, -716, 1942, - -2950, -837, 2269, -1882, -386, -2291, 7679, 15387, - -2723, -9, -320, -3599, -14452, -452, -54, 181, - 1074, 362, 2152, -7212, -64, -380, 1276, 2557, - 2777, -1173, 3984, 13079, 2508, -470, -84, -969, - -10440, -384, 198, -675, 285, -2217, 936, -3180, - -425, 179, -610, -2002, -1879, 1771, -2684, 16705, - 1833, -215, -191, -439, -17032, -205, 203, -308, - 290, 1916, -1805, 2736, 210, -198, 300, -1869, - 1052, 4495, 15519, 1467, -4032, -67, -1233, -14700, - -131, -992, -288, -997, -4257, -94, -402, -1389, - 259, 1106, 3819, 361, 3010, 2544, 6969, 7559, - 1996, -553, -395, -2964, -3487, -243, -467, -1280, - -1082, -1388, -1174, -3215, -366, -310, -849, -921, - -5209, -1867, 8713, 10351, 1549, -1656, -212, -4634, - -6540, -146, -593, 2770, 993, 3291, 1180, -5505, - 492, 176, -824, -979, -4314, 8513, 913, 7547, - -2723, -1135, -4423, -50, -3476, -452, 2241, 240, - -474, 1987, -3921, -420, -717, 1415, 151, 1254, - 12929, -1219, 2448, 1757, 6303, -10204, -90, -365, - -188, -2425, 962, -1932, 182, -1386, 130, -262, - -4974, 469, -941, -676, 6465, 4132, 3167, 3160, - 5697, -2551, -1042, -612, -609, -1981, -1630, -1249, - -798, -1247, -797, -611, -2248, -1437, -1101, -1099, - -3636, 4859, 18914, -1335, 810, -807, -1441, -21836, - -108, -40, 1078, 4198, -5609, -296, 396, 1541, - 179, -240, -936, 66, 8844, 7864, 654, -4063, - -5680, -4774, -3774, -26, -1007, -1969, -4245, -353, - -314, 2193, 1950, 162, 3066, 2726, 226, -1408, - 1859, 2634, 9228, 996, 9464, -211, -423, -5197, - -60, -5467, -299, -1047, -1483, -113, -160, -561, - -1074, -1521, -5330, -575, 2949, 12260, 10290, -497, - -3943, -530, -9174, -6463, -15, -949, -2206, -1852, - -7700, 89, 372, 312, 709, 2950, 2476, -119, - -2903, 1552, 14867, 9970, -496, -514, -147, -13491, - -6068, -15, 275, 2634, -1408, 1766, -944, -9047, - -87, 47, 450, 302, 3243, 8234, 7586, 3373, - 2151, -642, -4138, -3512, -694, -282, -1630, -1501, - -3812, -667, -1695, -1561, -425, -1081, -996, -442, - -9631, 60, 3501, 5359, 10150, -5662, 0, -748, - -1752, -6288, 35, 2058, -12, 3150, -19, -1145, - 5967, -37, -2169, -3320, -6874, -2553, -5446, -2195, - -7841, -2884, -397, -1810, -294, -3753, -1071, -2285, - -848, -921, -342, -729, -3290, -1221, -2606, -1050, - -3413, -1141, 4630, 13612, 7897, -711, -79, -1308, - -11310, -3806, -237, 964, 322, 2836, 948, -3847, - 1645, 550, -2231, -6561, 4410, -5678, 8006, -3992, - 3811, -1187, -1968, -3912, -973, -886, 1528, -2155, - 2775, 1074, -1383, 1951, -1025, 1321, -1862, 928, - 5659, 11535, 2203, -452, 7169, -1954, -8121, -296, - -12, -3137, -3984, -761, -1551, 156, 318, 60, - -2476, -5048, -964, 197, 2914, -2914, 3485, -3965, - 13675, -518, -518, -741, -959, -11414, 518, -620, - 620, 705, -705, 843, -2433, 2432, -2909, 3310, - 7843, 1907, 1022, 8882, 7972, -3755, -222, -63, - -4815, -3879, -913, -489, -119, -4252, -1034, -554, - -3816, -928, -497, -4322, 13807, 9531, 1436, 1612, - 1779, -11636, -5544, -125, -158, -193, -8032, -1210, - -835, -1358, -938, -141, -1499, -1035, -156, -175, - 13620, -5337, 5450, -2263, 1723, -11322, -1738, -1813, - -312, -181, 4436, -4531, 1775, 1881, -737, 752, - -1432, 561, -573, 238, 5297, 8374, 8872, 7694, - 6538, -1712, -4280, -4804, -3613, -2609, -2707, -2868, - -4534, -2487, -3932, -4166, -2113, -3341, -3540, -3070 -}; +extern const int16_t ff_g723_1_adaptive_cb_gain85 [ 85 * 20]; +extern const int16_t ff_g723_1_adaptive_cb_gain170[170 * 20]; /** * 0.65^i (Zero part) and 0.75^i (Pole part) scaled by 2^15 diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c index f601d31d00..b9baa4f364 100644 --- a/libavcodec/g723_1dec.c +++ b/libavcodec/g723_1dec.c @@ -221,16 +221,16 @@ static void gen_fcb_excitation(int16_t *vector, G723_1_Subframe *subfrm, j = PULSE_MAX - pulses[index]; temp = subfrm->pulse_pos; for (i = 0; i < SUBFRAME_LEN / GRID_SIZE; i++) { - temp -= combinatorial_table[j][i]; + temp -= ff_g723_1_combinatorial_table[j][i]; if (temp >= 0) continue; - temp += combinatorial_table[j++][i]; + temp += ff_g723_1_combinatorial_table[j++][i]; if (subfrm->pulse_sign & (1 << (PULSE_MAX - j))) { vector[subfrm->grid_index + GRID_SIZE * i] = - -fixed_cb_gain[subfrm->amp_index]; + -ff_g723_1_fixed_cb_gain[subfrm->amp_index]; } else { vector[subfrm->grid_index + GRID_SIZE * i] = - fixed_cb_gain[subfrm->amp_index]; + ff_g723_1_fixed_cb_gain[subfrm->amp_index]; } if (j == PULSE_MAX) break; @@ -238,7 +238,7 @@ static void gen_fcb_excitation(int16_t *vector, G723_1_Subframe *subfrm, if (subfrm->dirac_train == 1) ff_g723_1_gen_dirac_train(vector, pitch_lag); } else { /* 5300 bps */ - int cb_gain = fixed_cb_gain[subfrm->amp_index]; + int cb_gain = ff_g723_1_fixed_cb_gain[subfrm->amp_index]; int cb_shift = subfrm->grid_index; int cb_sign = subfrm->pulse_sign; int cb_pos = subfrm->pulse_pos; @@ -915,7 +915,7 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data, int16_t *vector_ptr = p->excitation + PITCH_MAX; /* Update interpolation gain memory */ - p->interp_gain = fixed_cb_gain[(p->subframe[2].amp_index + + p->interp_gain = ff_g723_1_fixed_cb_gain[(p->subframe[2].amp_index + p->subframe[3].amp_index) >> 1]; for (i = 0; i < SUBFRAMES; i++) { gen_fcb_excitation(vector_ptr, &p->subframe[i], p->cur_rate, diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c index b2ba3c2230..d8ed4bbb2b 100644 --- a/libavcodec/g723_1enc.c +++ b/libavcodec/g723_1enc.c @@ -242,14 +242,14 @@ static void lpc2lsp(int16_t *lpc, int16_t *prev_lsp, int16_t *lsp) p = 0; temp = 0; for (i = 0; i <= LPC_ORDER / 2; i++) - temp += f[2 * i] * cos_tab[0]; + temp += f[2 * i] * G723_1_COS_TAB_FIRST_ELEMENT; prev_val = av_clipl_int32(temp << 1); count = 0; for (i = 1; i < COS_TBL_SIZE / 2; i++) { /* Evaluate */ temp = 0; for (j = 0; j <= LPC_ORDER / 2; j++) - temp += f[LPC_ORDER - 2 * j + p] * cos_tab[i * j % COS_TBL_SIZE]; + temp += f[LPC_ORDER - 2 * j + p] * ff_g723_1_cos_tab[i * j % COS_TBL_SIZE]; cur_val = av_clipl_int32(temp << 1); /* Check for sign change, indicating a zero crossing */ @@ -273,7 +273,7 @@ static void lpc2lsp(int16_t *lpc, int16_t *prev_lsp, int16_t *lsp) temp = 0; for (j = 0; j <= LPC_ORDER / 2; j++) temp += f[LPC_ORDER - 2 * j + p] * - cos_tab[i * j % COS_TBL_SIZE]; + ff_g723_1_cos_tab[i * j % COS_TBL_SIZE]; cur_val = av_clipl_int32(temp << 1); } prev_val = cur_val; @@ -298,11 +298,11 @@ static void lpc2lsp(int16_t *lpc, int16_t *prev_lsp, int16_t *lsp) \ for (i = 0; i < LSP_CB_SIZE; i++) { \ for (j = 0; j < size; j++){ \ - temp[j] = (weight[j + (offset)] * lsp_band##num[i][j] + \ + temp[j] = (weight[j + (offset)] * ff_g723_1_lsp_band##num[i][j] + \ (1 << 14)) >> 15; \ } \ error = ff_g723_1_dot_product(lsp + (offset), temp, size) << 1; \ - error -= ff_g723_1_dot_product(lsp_band##num[i], temp, size); \ + error -= ff_g723_1_dot_product(ff_g723_1_lsp_band##num[i], temp, size); \ if (error > max) { \ max = error; \ lsp_index[num] = i; \ @@ -642,7 +642,7 @@ static void acb_search(G723_1_ChannelContext *p, int16_t *residual, { int16_t flt_buf[PITCH_ORDER][SUBFRAME_LEN]; - const int16_t *cb_tbl = adaptive_cb_gain85; + const int16_t *cb_tbl = ff_g723_1_adaptive_cb_gain85; int ccr_buf[PITCH_ORDER * SUBFRAMES << 2]; @@ -720,7 +720,7 @@ static void acb_search(G723_1_ChannelContext *p, int16_t *residual, /* Select quantization table */ if (!odd_frame && pitch_lag + i - 1 >= SUBFRAME_LEN - 2 || odd_frame && pitch_lag >= SUBFRAME_LEN - 2) { - cb_tbl = adaptive_cb_gain170; + cb_tbl = ff_g723_1_adaptive_cb_gain170; tbl_size = 170; } @@ -838,7 +838,7 @@ static void get_fcb_param(FCBParam *optim, int16_t *impulse_resp, min = 1 << 30; max_amp_index = GAIN_LEVELS - 2; for (j = max_amp_index; j >= 2; j--) { - temp = av_clipl_int32((int64_t) fixed_cb_gain[j] * + temp = av_clipl_int32((int64_t) ff_g723_1_fixed_cb_gain[j] * impulse_corr[0] << 1); temp = FFABS(temp - amp); if (temp < min) { @@ -855,7 +855,7 @@ static void get_fcb_param(FCBParam *optim, int16_t *impulse_resp, ccr2[k] = ccr1[k]; } param.amp_index = max_amp_index + j - 2; - amp = fixed_cb_gain[param.amp_index]; + amp = ff_g723_1_fixed_cb_gain[param.amp_index]; param.pulse_sign[0] = (ccr2[param.pulse_pos[0]] < 0) ? -amp : amp; temp_corr[param.pulse_pos[0]] = 1; @@ -942,7 +942,7 @@ static void pack_fcb_param(G723_1_Subframe *subfrm, FCBParam *optim, for (i = 0; i < SUBFRAME_LEN >> 1; i++) { int val = buf[optim->grid_index + (i << 1)]; if (!val) { - subfrm->pulse_pos += combinatorial_table[j][i]; + subfrm->pulse_pos += ff_g723_1_combinatorial_table[j][i]; } else { subfrm->pulse_sign <<= 1; if (val < 0) From patchwork Mon Jan 4 00:28:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24772 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 1F81D44907C for ; Mon, 4 Jan 2021 02:28:59 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 064E268AA42; Mon, 4 Jan 2021 02:28:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1D31468A9C9 for ; Mon, 4 Jan 2021 02:28:50 +0200 (EET) Received: by mail-wr1-f42.google.com with SMTP id q18so30406848wrn.1 for ; Sun, 03 Jan 2021 16:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=V7MeEj7wRkPM75auyuEMv+2YzJVZUSDPMP0xC1MHyi0=; b=DGN+EKghLoHHa1HBoJWNNm8DNhQyZ+6QuM83hpkk4A/NkAS99SjHyCWVzD8myqFB3k bxQreqndd+bkcp8O3JR2F7EcpyhS/2qHPrHrUT6/moQTmY8fUAOfavqvQJCuAGv4XnuB uVDNW/3D2K/vPUEAop1StVZzcdYYI/eJlOxdtgUShYzPC0Gxxb1V7WWDoOSDc53QXs3W YTuIQYi7ATxQwMemLI2L00nJUkPEInNo3B4+tj/K72d9M5210OGUQK4PcemlHB3f/0XX fhHZAnK4oFfr4OMza+dhLOB4qNEyZDcnm3wSW7v2zklyWu6vvQ+iyLS3Q6l0ptCxxeD7 EQ5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=V7MeEj7wRkPM75auyuEMv+2YzJVZUSDPMP0xC1MHyi0=; b=FXlHd2XytF3mzlqxKuDCkFdqiMM3xP+vcBw1LscM/eopy39VFrh35/d+RynsID6owY zEWvrO4Akd7YxG6xx0XMQNen/DAVRcU3OczHh3MOHoOZOl/7jXchfgq2RMiTWOfWb5I+ uAH098ILt4pAozfJx90ElbrK9SRv78VOzBP9Lk4d97ETFsKFYgohc47BjfOiwNB5g4QQ VZiWTfaGpSGCCMjqpiCGTanNd7IOXxEQ6LsyiFo4cWCq0xPeud+YCvg2VSDIZw9R3k8p J7H9wSeH6BoR+NQJ7HDNKRbIOi6hqLo/0VZlpy7aOACsvsZutu81jj4qkqYgBbXw/cPc 7wow== X-Gm-Message-State: AOAM532omTfoiw9JZG2yh3r3GRmTzUEm6EwYmi0J2RBxkhj2BojoR64F sVJjNBnbvmKAGKagDpnh4y4bP9HhIrE= X-Google-Smtp-Source: ABdhPJzVH04DP3NC+No+dQWVOeqrF+GfQv4wW5vTd61wdDiwGqqLrpUm7M2Tkbuut/FNMejLEtuRbA== X-Received: by 2002:a05:6000:1811:: with SMTP id m17mr23636495wrh.67.1609720129280; Sun, 03 Jan 2021 16:28:49 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:48 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:02 +0100 Message-Id: <20210104002816.2321974-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 02/16] avcodec/g723_1: Move tables to their only user X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavcodec/g723_1.h | 120 ----------------------------------------- libavcodec/g723_1dec.c | 72 +++++++++++++++++++++++++ libavcodec/g723_1enc.c | 48 +++++++++++++++++ 3 files changed, 120 insertions(+), 120 deletions(-) diff --git a/libavcodec/g723_1.h b/libavcodec/g723_1.h index 7cd57b76b4..521f220b2a 100644 --- a/libavcodec/g723_1.h +++ b/libavcodec/g723_1.h @@ -221,11 +221,6 @@ void ff_g723_1_inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp, static const uint8_t frame_size[4] = { 24, 20, 4, 1 }; -/** - * Postfilter gain weighting factors scaled by 2^15 - */ -static const int16_t ppf_gain_weight[2] = {0x1800, 0x2000}; - /** * LSP DC component */ @@ -259,129 +254,14 @@ extern const int16_t ff_g723_1_lsp_band2[LSP_CB_SIZE][4]; */ extern const int32_t ff_g723_1_combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE]; -static const int16_t pitch_contrib[340] = { - 60, 0, 0, 2489, 60, 0, 0, 5217, - 1, 6171, 0, 3953, 0, 10364, 1, 9357, - -1, 8843, 1, 9396, 0, 5794, -1, 10816, - 2, 11606, -2, 12072, 0, 8616, 1, 12170, - 0, 14440, 0, 7787, -1, 13721, 0, 18205, - 0, 14471, 0, 15807, 1, 15275, 0, 13480, - -1, 18375, -1, 0, 1, 11194, -1, 13010, - 1, 18836, -2, 20354, 1, 16233, -1, 0, - 60, 0, 0, 12130, 0, 13385, 1, 17834, - 1, 20875, 0, 21996, 1, 0, 1, 18277, - -1, 21321, 1, 13738, -1, 19094, -1, 20387, - -1, 0, 0, 21008, 60, 0, -2, 22807, - 0, 15900, 1, 0, 0, 17989, -1, 22259, - 1, 24395, 1, 23138, 0, 23948, 1, 22997, - 2, 22604, -1, 25942, 0, 26246, 1, 25321, - 0, 26423, 0, 24061, 0, 27247, 60, 0, - -1, 25572, 1, 23918, 1, 25930, 2, 26408, - -1, 19049, 1, 27357, -1, 24538, 60, 0, - -1, 25093, 0, 28549, 1, 0, 0, 22793, - -1, 25659, 0, 29377, 0, 30276, 0, 26198, - 1, 22521, -1, 28919, 0, 27384, 1, 30162, - -1, 0, 0, 24237, -1, 30062, 0, 21763, - 1, 30917, 60, 0, 0, 31284, 0, 29433, - 1, 26821, 1, 28655, 0, 31327, 2, 30799, - 1, 31389, 0, 32322, 1, 31760, -2, 31830, - 0, 26936, -1, 31180, 1, 30875, 0, 27873, - -1, 30429, 1, 31050, 0, 0, 0, 31912, - 1, 31611, 0, 31565, 0, 25557, 0, 31357, - 60, 0, 1, 29536, 1, 28985, -1, 26984, - -1, 31587, 2, 30836, -2, 31133, 0, 30243, - -1, 30742, -1, 32090, 60, 0, 2, 30902, - 60, 0, 0, 30027, 0, 29042, 60, 0, - 0, 31756, 0, 24553, 0, 25636, -2, 30501, - 60, 0, -1, 29617, 0, 30649, 60, 0, - 0, 29274, 2, 30415, 0, 27480, 0, 31213, - -1, 28147, 0, 30600, 1, 31652, 2, 29068, - 60, 0, 1, 28571, 1, 28730, 1, 31422, - 0, 28257, 0, 24797, 60, 0, 0, 0, - 60, 0, 0, 22105, 0, 27852, 60, 0, - 60, 0, -1, 24214, 0, 24642, 0, 23305, - 60, 0, 60, 0, 1, 22883, 0, 21601, - 60, 0, 2, 25650, 60, 0, -2, 31253, - -2, 25144, 0, 17998 -}; - /** * Number of non-zero pulses in the MP-MLQ excitation */ static const int8_t pulses[4] = {6, 5, 6, 5}; -/** - * Size of the MP-MLQ fixed excitation codebooks - */ -static const int32_t max_pos[4] = {593775, 142506, 593775, 142506}; - extern const int16_t ff_g723_1_fixed_cb_gain[GAIN_LEVELS]; extern const int16_t ff_g723_1_adaptive_cb_gain85 [ 85 * 20]; extern const int16_t ff_g723_1_adaptive_cb_gain170[170 * 20]; -/** - * 0.65^i (Zero part) and 0.75^i (Pole part) scaled by 2^15 - */ -static const int16_t postfilter_tbl[2][LPC_ORDER] = { - /* Zero */ - {21299, 13844, 8999, 5849, 3802, 2471, 1606, 1044, 679, 441}, - /* Pole */ - {24576, 18432, 13824, 10368, 7776, 5832, 4374, 3281, 2460, 1845} -}; - -/** - * Hamming window coefficients scaled by 2^15 - */ -static const int16_t hamming_window[LPC_FRAME] = { - 2621, 2631, 2659, 2705, 2770, 2853, 2955, 3074, 3212, 3367, - 3541, 3731, 3939, 4164, 4405, 4663, 4937, 5226, 5531, 5851, - 6186, 6534, 6897, 7273, 7661, 8062, 8475, 8899, 9334, 9780, - 10235, 10699, 11172, 11653, 12141, 12636, 13138, 13645, 14157, 14673, - 15193, 15716, 16242, 16769, 17298, 17827, 18356, 18884, 19411, 19935, - 20457, 20975, 21489, 21999, 22503, 23002, 23494, 23978, 24455, 24924, - 25384, 25834, 26274, 26704, 27122, 27529, 27924, 28306, 28675, 29031, - 29373, 29700, 30012, 30310, 30592, 30857, 31107, 31340, 31557, 31756, - 31938, 32102, 32249, 32377, 32488, 32580, 32654, 32710, 32747, 32766, - 32766, 32747, 32710, 32654, 32580, 32488, 32377, 32249, 32102, 31938, - 31756, 31557, 31340, 31107, 30857, 30592, 30310, 30012, 29700, 29373, - 29031, 28675, 28306, 27924, 27529, 27122, 26704, 26274, 25834, 25384, - 24924, 24455, 23978, 23494, 23002, 22503, 21999, 21489, 20975, 20457, - 19935, 19411, 18884, 18356, 17827, 17298, 16769, 16242, 15716, 15193, - 14673, 14157, 13645, 13138, 12636, 12141, 11653, 11172, 10699, 10235, - 9780, 9334, 8899, 8475, 8062, 7661, 7273, 6897, 6534, 6186, - 5851, 5531, 5226, 4937, 4663, 4405, 4164, 3939, 3731, 3541, - 3367, 3212, 3074, 2955, 2853, 2770, 2705, 2659, 2631, 2621 -}; - -/** - * Binomial window coefficients scaled by 2^15 - */ -static const int16_t binomial_window[LPC_ORDER] = { - 32749, 32695, 32604, 32477, 32315, 32118, 31887, 31622, 31324, 30995 -}; - -/** - * 0.994^i scaled by 2^15 - */ -static const int16_t bandwidth_expand[LPC_ORDER] = { - 32571, 32376, 32182, 31989, 31797, 31606, 31416, 31228, 31040, 30854 -}; - -/** - * 0.5^i scaled by 2^15 - */ -static const int16_t percept_flt_tbl[2][LPC_ORDER] = { - /* Zero part */ - {29491, 26542, 23888, 21499, 19349, 17414, 15673, 14106, 12695, 11425}, - /* Pole part */ - {16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32} -}; - -static const int cng_adaptive_cb_lag[4] = { 1, 0, 1, 3 }; - -static const int cng_filt[4] = { 273, 998, 499, 333 }; - -static const int cng_bseg[3] = { 2048, 18432, 231233 }; - #endif /* AVCODEC_G723_1_H */ diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c index b9baa4f364..fddd4b03c0 100644 --- a/libavcodec/g723_1dec.c +++ b/libavcodec/g723_1dec.c @@ -40,6 +40,78 @@ #define CNG_RANDOM_SEED 12345 +/** + * Postfilter gain weighting factors scaled by 2^15 + */ +static const int16_t ppf_gain_weight[2] = {0x1800, 0x2000}; + +static const int16_t pitch_contrib[340] = { + 60, 0, 0, 2489, 60, 0, 0, 5217, + 1, 6171, 0, 3953, 0, 10364, 1, 9357, + -1, 8843, 1, 9396, 0, 5794, -1, 10816, + 2, 11606, -2, 12072, 0, 8616, 1, 12170, + 0, 14440, 0, 7787, -1, 13721, 0, 18205, + 0, 14471, 0, 15807, 1, 15275, 0, 13480, + -1, 18375, -1, 0, 1, 11194, -1, 13010, + 1, 18836, -2, 20354, 1, 16233, -1, 0, + 60, 0, 0, 12130, 0, 13385, 1, 17834, + 1, 20875, 0, 21996, 1, 0, 1, 18277, + -1, 21321, 1, 13738, -1, 19094, -1, 20387, + -1, 0, 0, 21008, 60, 0, -2, 22807, + 0, 15900, 1, 0, 0, 17989, -1, 22259, + 1, 24395, 1, 23138, 0, 23948, 1, 22997, + 2, 22604, -1, 25942, 0, 26246, 1, 25321, + 0, 26423, 0, 24061, 0, 27247, 60, 0, + -1, 25572, 1, 23918, 1, 25930, 2, 26408, + -1, 19049, 1, 27357, -1, 24538, 60, 0, + -1, 25093, 0, 28549, 1, 0, 0, 22793, + -1, 25659, 0, 29377, 0, 30276, 0, 26198, + 1, 22521, -1, 28919, 0, 27384, 1, 30162, + -1, 0, 0, 24237, -1, 30062, 0, 21763, + 1, 30917, 60, 0, 0, 31284, 0, 29433, + 1, 26821, 1, 28655, 0, 31327, 2, 30799, + 1, 31389, 0, 32322, 1, 31760, -2, 31830, + 0, 26936, -1, 31180, 1, 30875, 0, 27873, + -1, 30429, 1, 31050, 0, 0, 0, 31912, + 1, 31611, 0, 31565, 0, 25557, 0, 31357, + 60, 0, 1, 29536, 1, 28985, -1, 26984, + -1, 31587, 2, 30836, -2, 31133, 0, 30243, + -1, 30742, -1, 32090, 60, 0, 2, 30902, + 60, 0, 0, 30027, 0, 29042, 60, 0, + 0, 31756, 0, 24553, 0, 25636, -2, 30501, + 60, 0, -1, 29617, 0, 30649, 60, 0, + 0, 29274, 2, 30415, 0, 27480, 0, 31213, + -1, 28147, 0, 30600, 1, 31652, 2, 29068, + 60, 0, 1, 28571, 1, 28730, 1, 31422, + 0, 28257, 0, 24797, 60, 0, 0, 0, + 60, 0, 0, 22105, 0, 27852, 60, 0, + 60, 0, -1, 24214, 0, 24642, 0, 23305, + 60, 0, 60, 0, 1, 22883, 0, 21601, + 60, 0, 2, 25650, 60, 0, -2, 31253, + -2, 25144, 0, 17998 +}; + +/** + * Size of the MP-MLQ fixed excitation codebooks + */ +static const int32_t max_pos[4] = {593775, 142506, 593775, 142506}; + +/** + * 0.65^i (Zero part) and 0.75^i (Pole part) scaled by 2^15 + */ +static const int16_t postfilter_tbl[2][LPC_ORDER] = { + /* Zero */ + {21299, 13844, 8999, 5849, 3802, 2471, 1606, 1044, 679, 441}, + /* Pole */ + {24576, 18432, 13824, 10368, 7776, 5832, 4374, 3281, 2460, 1845} +}; + +static const int cng_adaptive_cb_lag[4] = { 1, 0, 1, 3 }; + +static const int cng_filt[4] = { 273, 998, 499, 333 }; + +static const int cng_bseg[3] = { 2048, 18432, 231233 }; + static av_cold int g723_1_decode_init(AVCodecContext *avctx) { G723_1_Context *s = avctx->priv_data; diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c index d8ed4bbb2b..11b0c7f71e 100644 --- a/libavcodec/g723_1enc.c +++ b/libavcodec/g723_1enc.c @@ -40,6 +40,54 @@ #define BITSTREAM_WRITER_LE #include "put_bits.h" +/** + * Hamming window coefficients scaled by 2^15 + */ +static const int16_t hamming_window[LPC_FRAME] = { + 2621, 2631, 2659, 2705, 2770, 2853, 2955, 3074, 3212, 3367, + 3541, 3731, 3939, 4164, 4405, 4663, 4937, 5226, 5531, 5851, + 6186, 6534, 6897, 7273, 7661, 8062, 8475, 8899, 9334, 9780, + 10235, 10699, 11172, 11653, 12141, 12636, 13138, 13645, 14157, 14673, + 15193, 15716, 16242, 16769, 17298, 17827, 18356, 18884, 19411, 19935, + 20457, 20975, 21489, 21999, 22503, 23002, 23494, 23978, 24455, 24924, + 25384, 25834, 26274, 26704, 27122, 27529, 27924, 28306, 28675, 29031, + 29373, 29700, 30012, 30310, 30592, 30857, 31107, 31340, 31557, 31756, + 31938, 32102, 32249, 32377, 32488, 32580, 32654, 32710, 32747, 32766, + 32766, 32747, 32710, 32654, 32580, 32488, 32377, 32249, 32102, 31938, + 31756, 31557, 31340, 31107, 30857, 30592, 30310, 30012, 29700, 29373, + 29031, 28675, 28306, 27924, 27529, 27122, 26704, 26274, 25834, 25384, + 24924, 24455, 23978, 23494, 23002, 22503, 21999, 21489, 20975, 20457, + 19935, 19411, 18884, 18356, 17827, 17298, 16769, 16242, 15716, 15193, + 14673, 14157, 13645, 13138, 12636, 12141, 11653, 11172, 10699, 10235, + 9780, 9334, 8899, 8475, 8062, 7661, 7273, 6897, 6534, 6186, + 5851, 5531, 5226, 4937, 4663, 4405, 4164, 3939, 3731, 3541, + 3367, 3212, 3074, 2955, 2853, 2770, 2705, 2659, 2631, 2621 +}; + +/** + * Binomial window coefficients scaled by 2^15 + */ +static const int16_t binomial_window[LPC_ORDER] = { + 32749, 32695, 32604, 32477, 32315, 32118, 31887, 31622, 31324, 30995 +}; + +/** + * 0.994^i scaled by 2^15 + */ +static const int16_t bandwidth_expand[LPC_ORDER] = { + 32571, 32376, 32182, 31989, 31797, 31606, 31416, 31228, 31040, 30854 +}; + +/** + * 0.5^i scaled by 2^15 + */ +static const int16_t percept_flt_tbl[2][LPC_ORDER] = { + /* Zero part */ + {29491, 26542, 23888, 21499, 19349, 17414, 15673, 14106, 12695, 11425}, + /* Pole part */ + {16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32} +}; + static av_cold int g723_1_encode_init(AVCodecContext *avctx) { G723_1_Context *s = avctx->priv_data; From patchwork Mon Jan 4 00:28:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24774 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id EB0A444907C for ; Mon, 4 Jan 2021 02:29:02 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CB8F768AA15; Mon, 4 Jan 2021 02:29:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B674268A993 for ; Mon, 4 Jan 2021 02:28:51 +0200 (EET) Received: by mail-wr1-f43.google.com with SMTP id i9so30367381wrc.4 for ; Sun, 03 Jan 2021 16:28:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=o6SH0h15wdWB9T0nI9erQ+e9+6qZQabo7AABG1pY0uw=; b=AMvlf8vde76aRhFYMgQKUsyZR77822ImV2qHGmwOxw9d2/Z7LJCCAbW9u+8VZ7vh/C mQxC4Z7CAQOeHsDNHhFvwR8VsIkPr0AS9++2vAhhCa9HaQEjyGSgoQ/Xl9asMZfIVcjU xyjKfgAghe6mceTbiT/dXgv6t5sTn1YaQtKMFsq3MzN4x6xsI83RLLn9LjIw2TFW15m3 p+YvykGsjkkR9XTgSBx8NRak0bJDzJSgIuKZv+NRkpcREMBpn6FGSNno6alRXkHg6lEz XrdD4en89h7iMQkZ6ioSxtEUuuBKXR984hPbbIKdPYvTzUneGglb8PNfEukMtgTGiNA8 6bLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=o6SH0h15wdWB9T0nI9erQ+e9+6qZQabo7AABG1pY0uw=; b=I5P/tA6TELKhicvac0AihgaTz3SXED6ppjY+zbnBJ4aDgNiJ3iL7tfeGy/8a9V7LVy eTmeKIU3h9y/8oH6AcJn9bvYg1fc+vUdA5r00F1fWN2gfqG/L6SXwoRayqW++S+5bVoQ e3tqv6HQOnkmH1VbME6J/k8w5kHskXmC9fpE2sI1sf/xcJKGogZXgEkhVWqivGv/scOA 6Coxz7sW6ApyTp4MW8Y3u0Z/yFkuoKFOx+DhqRrK0AZhaeTFLVphaBE2YIZIGwvIBGHM C+wrR+H8hD4GryzDvuMijEzMEnjPeAtveckVagpO70w8p7ylolivONNIRMpk4PyeAD49 gDaQ== X-Gm-Message-State: AOAM532vyh1vLKmaPb5E59ID08BDb3eEvWSLH+UTEsjlKtYIO0KR1ZMm A1QoZCmKv+uYbDlmGnjD9eWlWIOtAZo= X-Google-Smtp-Source: ABdhPJyyw/4VoPGhejBKkV+r5ydsvXiq1TCtoz5bncDyKrjuPCAViDvKJYJecJQ3qUvGgTpzrkiMrA== X-Received: by 2002:a5d:4a06:: with SMTP id m6mr80798992wrq.189.1609720130228; Sun, 03 Jan 2021 16:28:50 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:49 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:03 +0100 Message-Id: <20210104002816.2321974-3-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/16] avcodec/metasound: Deduplicate data X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Saves about 13KB; also reduces the amount of relocations. Signed-off-by: Andreas Rheinhardt --- libavcodec/metasound.c | 12 +- libavcodec/metasound_data.c | 448 +----------------------------------- libavcodec/metasound_data.h | 3 - 3 files changed, 9 insertions(+), 454 deletions(-) diff --git a/libavcodec/metasound.c b/libavcodec/metasound.c index 396310ba1e..27cf1dd83f 100644 --- a/libavcodec/metasound.c +++ b/libavcodec/metasound.c @@ -341,22 +341,16 @@ static av_cold int metasound_decode_init(AVCodecContext *avctx) tctx->mtab = &ff_metasound_mode2224s; break; case (1 << 16) + (44 << 8) + 32: - tctx->mtab = &ff_metasound_mode4432; - break; case (2 << 16) + (44 << 8) + 32: - tctx->mtab = &ff_metasound_mode4432s; + tctx->mtab = &ff_metasound_mode4432; break; case (1 << 16) + (44 << 8) + 40: - tctx->mtab = &ff_metasound_mode4440; - break; case (2 << 16) + (44 << 8) + 40: - tctx->mtab = &ff_metasound_mode4440s; + tctx->mtab = &ff_metasound_mode4440; break; case (1 << 16) + (44 << 8) + 48: - tctx->mtab = &ff_metasound_mode4448; - break; case (2 << 16) + (44 << 8) + 48: - tctx->mtab = &ff_metasound_mode4448s; + tctx->mtab = &ff_metasound_mode4448; break; default: av_log(avctx, AV_LOG_ERROR, diff --git a/libavcodec/metasound_data.c b/libavcodec/metasound_data.c index da2548af9d..d027690e3d 100644 --- a/libavcodec/metasound_data.c +++ b/libavcodec/metasound_data.c @@ -12168,72 +12168,6 @@ static const float lsp8[] = { 0.2217, 0.2632, 0.2706, 0.2624, 0.2162, 0.2453, 0.2460, 0.2531, }; -static const float lsp8s[] = { - 0.2702, 0.5096, 0.6437, 0.7672, 0.9639, 1.0696, 1.2625, 1.5789, - 1.9285, 2.2383, 2.5129, 2.8470, 0.1740, 0.3677, 0.6082, 0.8387, - 1.1084, 1.3721, 1.6362, 1.8733, 2.0640, 2.3442, 2.6087, 2.8548, - 0.1536, 0.3279, 0.5143, 0.6859, 0.9763, 1.2744, 1.5605, 1.8566, - 2.1007, 2.3450, 2.6075, 2.8850, 0.2075, 0.4533, 0.7709, 1.0377, - 1.2953, 1.5132, 1.7826, 2.0351, 2.2590, 2.4996, 2.6795, 2.8748, - 0.1393, 0.2453, 0.3754, 0.5453, 0.8148, 1.1289, 1.4389, 1.7592, - 2.0353, 2.3215, 2.5934, 2.8588, 0.1250, 0.3627, 0.7613, 1.1380, - 1.4163, 1.5565, 1.6920, 1.8130, 1.8678, 2.0427, 2.4318, 2.8544, - 0.2256, 0.4223, 0.6452, 0.8599, 1.0673, 1.3118, 1.5486, 1.8366, - 2.0759, 2.3026, 2.5284, 2.8030, 0.2304, 0.4404, 0.6891, 0.8964, - 1.1510, 1.4202, 1.6483, 1.8580, 2.1181, 2.3686, 2.6078, 2.9128, - 0.2230, 0.3816, 0.5520, 0.6062, 0.7909, 1.0988, 1.4330, 1.7846, - 2.0713, 2.3457, 2.6048, 2.8708, 0.2447, 0.5800, 0.8249, 0.9905, - 1.1721, 1.3990, 1.6694, 1.9064, 2.1307, 2.4255, 2.6815, 2.9117, - 0.1974, 0.3812, 0.5802, 0.7759, 0.9280, 1.1547, 1.4170, 1.6369, - 1.8890, 2.2587, 2.5626, 2.8239, 0.1209, 0.2510, 0.4841, 0.8048, - 1.1197, 1.3563, 1.6073, 1.8926, 2.1350, 2.3669, 2.6291, 2.8985, - 0.2352, 0.4347, 0.6582, 0.8178, 0.9548, 1.1654, 1.4942, 1.8812, - 2.1703, 2.3779, 2.6412, 2.8871, 0.2091, 0.4084, 0.6730, 0.9151, - 1.1259, 1.3262, 1.5937, 1.8129, 2.0237, 2.3317, 2.5778, 2.8620, - 0.1167, 0.2406, 0.4520, 0.7298, 0.9848, 1.2448, 1.5137, 1.7874, - 2.0280, 2.3020, 2.5914, 2.8794, 0.3003, 0.4966, 0.6520, 0.8505, - 1.1600, 1.3981, 1.5805, 1.8346, 2.0757, 2.3102, 2.5760, 2.8499, - 0.2451, 0.4163, 0.5960, 0.7805, 0.9507, 1.2438, 1.5587, 1.8581, - 2.0735, 2.3198, 2.5704, 2.8220, 0.3112, 0.5517, 0.7032, 0.8528, - 1.1489, 1.4257, 1.6848, 1.9388, 2.1577, 2.4265, 2.6678, 2.9051, - 0.2249, 0.3897, 0.5559, 0.7473, 1.0158, 1.3581, 1.6914, 1.9930, - 2.1843, 2.3534, 2.5512, 2.8065, 0.2600, 0.4574, 0.7349, 0.9691, - 1.1696, 1.3848, 1.6335, 1.9021, 2.1174, 2.3481, 2.5902, 2.8390, - 0.2246, 0.3372, 0.4560, 0.5249, 0.7056, 1.0273, 1.3810, 1.7132, - 1.9819, 2.2574, 2.5410, 2.8491, 0.1419, 0.4834, 0.8835, 1.1453, - 1.2839, 1.4224, 1.5593, 1.7877, 2.1285, 2.4070, 2.6043, 2.8511, - 0.1886, 0.3677, 0.5617, 0.8099, 1.1277, 1.3841, 1.5804, 1.8136, - 2.0307, 2.2805, 2.5399, 2.8322, 0.2351, 0.4151, 0.6675, 0.8713, - 1.0464, 1.3292, 1.6586, 1.9281, 2.1355, 2.3495, 2.6222, 2.8782, - 0.2700, 0.4489, 0.6206, 0.7121, 0.7737, 0.9848, 1.3658, 1.7433, - 2.0139, 2.2243, 2.4806, 2.8175, 0.2479, 0.4425, 0.6490, 0.8745, - 1.1161, 1.3849, 1.6773, 1.9566, 2.1491, 2.3624, 2.5685, 2.8114, - 0.2035, 0.3701, 0.5567, 0.7953, 1.0082, 1.2758, 1.5373, 1.7822, - 2.0175, 2.2601, 2.4759, 2.7771, 0.1856, 0.3461, 0.5998, 0.9041, - 1.2383, 1.4612, 1.6667, 1.9305, 2.1617, 2.4107, 2.6477, 2.8656, - 0.2107, 0.3715, 0.5289, 0.6651, 0.8420, 1.1168, 1.4401, 1.7230, - 1.9901, 2.2687, 2.5452, 2.8655, 0.1218, 0.2999, 0.6348, 0.9482, - 1.2745, 1.5876, 1.9129, 2.2348, 2.4020, 2.4922, 2.6351, 2.8357, - 0.1617, 0.3483, 0.5869, 0.8163, 1.0366, 1.2344, 1.4609, 1.7029, - 1.9476, 2.2337, 2.5258, 2.8442, 0.2505, 0.4894, 0.7510, 0.9152, - 1.0845, 1.3657, 1.6528, 1.8346, 2.0160, 2.2811, 2.5338, 2.8136, - 0.0947, 0.1158, 0.0578, -0.0337, -0.0066, 0.0104, -0.0447, -0.0505, - -0.0778, -0.0293, 0.0251, -0.0143, 0.0349, -0.0227, -0.0909, 0.0523, - 0.0325, -0.0410, -0.1045, -0.0899, -0.0009, 0.0075, -0.0575, -0.0855, - -0.0129, 0.0575, 0.0597, 0.0391, 0.0371, -0.0184, -0.0083, 0.0287, - 0.0143, 0.0167, 0.0120, -0.0168, 0.0452, 0.0223, -0.0352, 0.0119, - -0.0496, -0.0965, -0.0661, -0.0072, 0.1099, 0.0843, -0.0087, -0.0478, - -0.0128, -0.0120, -0.0004, 0.0731, 0.1047, 0.0630, 0.0196, -0.0103, - -0.0399, -0.0986, -0.0912, -0.0390, -0.0247, -0.0694, -0.0749, -0.0066, - 0.0223, 0.0634, 0.0343, -0.0134, 0.0727, 0.0241, 0.0066, 0.0437, - 0.0610, 0.0364, 0.0248, -0.0358, -0.0686, -0.0104, 0.0426, 0.0088, - -0.0137, -0.0165, 0.0671, 0.0815, -0.0863, -0.0644, -0.0088, 0.0023, - 0.0482, 0.1174, 0.1270, 0.0594, 0.0165, 0.0949, 0.1098, 0.0137, - 0.4951, 0.4999, 0.4958, 0.4907, 0.4984, 0.4965, 0.4958, 0.4996, - 0.4987, 0.4958, 0.4986, 0.4977, 0.2841, 0.2186, 0.1474, 0.1687, - 0.2217, 0.2632, 0.2706, 0.2624, 0.2162, 0.2453, 0.2460, 0.2531, -}; - static const float lsp11[] = { 0.1103, 0.3862, 0.6863, 0.8447, 0.9231, 1.0261, 1.1248, 1.4057, 1.6621, 1.8010, 1.8692, 2.0704, 2.3490, 2.6060, 2.7539, 2.8977, @@ -12401,173 +12335,6 @@ static const float lsp11[] = { 0.1486, 0.1342, 0.1215, 0.1423, 0.1634, 0.1588, 0.1539, 0.1857, }; -static const float lsp11s[] = { - 0.1103, 0.3862, 0.6863, 0.8447, 0.9231, 1.0261, 1.1248, 1.4057, - 1.6621, 1.8010, 1.8692, 2.0704, 2.3490, 2.6060, 2.7539, 2.8977, - 0.1273, 0.2407, 0.3812, 0.6004, 0.7767, 0.9383, 1.1344, 1.3351, - 1.5233, 1.7262, 1.9466, 2.1739, 2.3495, 2.5162, 2.7164, 2.9202, - 0.2010, 0.3330, 0.4488, 0.6465, 0.8046, 0.9889, 1.1479, 1.2964, - 1.4770, 1.6606, 1.8789, 2.1155, 2.3287, 2.5199, 2.7101, 2.9119, - 0.1168, 0.2197, 0.3279, 0.4691, 0.6268, 0.8251, 1.0533, 1.2714, - 1.4712, 1.6762, 1.8831, 2.1114, 2.3230, 2.5297, 2.7365, 2.9270, - 0.1405, 0.3109, 0.4986, 0.6891, 0.8634, 1.0583, 1.2594, 1.4349, - 1.6232, 1.8116, 1.9905, 2.1935, 2.3799, 2.5656, 2.7661, 2.9486, - 0.1703, 0.3057, 0.4403, 0.5225, 0.5969, 0.8110, 1.0729, 1.3215, - 1.5407, 1.7381, 1.9477, 2.1680, 2.3586, 2.5612, 2.7630, 2.9410, - 0.1128, 0.2628, 0.4523, 0.6495, 0.8176, 0.9816, 1.1746, 1.3710, - 1.5568, 1.7518, 1.9497, 2.1452, 2.3346, 2.5389, 2.7362, 2.9264, - 0.1809, 0.3287, 0.5205, 0.7264, 0.9298, 1.1217, 1.2970, 1.4894, - 1.6874, 1.8493, 2.0576, 2.2382, 2.4097, 2.6041, 2.7796, 2.9389, - 0.2502, 0.4709, 0.6892, 0.8346, 0.9209, 1.0455, 1.2399, 1.4616, - 1.6463, 1.8380, 2.0475, 2.2397, 2.4665, 2.6550, 2.7701, 2.8895, - 0.1040, 0.2340, 0.3964, 0.5740, 0.7764, 0.9941, 1.2000, 1.4014, - 1.6024, 1.7974, 1.9939, 2.1959, 2.3783, 2.5663, 2.7613, 2.9484, - 0.1912, 0.3393, 0.4743, 0.6313, 0.8014, 0.9879, 1.1855, 1.3922, - 1.5678, 1.7289, 1.9271, 2.1165, 2.3089, 2.5414, 2.7448, 2.9269, - 0.0965, 0.2025, 0.3398, 0.4990, 0.6934, 0.9386, 1.1730, 1.3766, - 1.5783, 1.7783, 1.9790, 2.1831, 2.3670, 2.5578, 2.7641, 2.9516, - 0.2126, 0.3652, 0.5545, 0.7170, 0.8674, 1.0640, 1.2558, 1.4061, - 1.5904, 1.8095, 1.9760, 2.1505, 2.3549, 2.5575, 2.7023, 2.8877, - 0.1827, 0.3426, 0.4894, 0.6488, 0.7960, 0.9535, 1.1217, 1.2798, - 1.4566, 1.6453, 1.8044, 2.0042, 2.2379, 2.4611, 2.6697, 2.8966, - 0.2034, 0.3822, 0.5231, 0.6960, 0.9200, 1.0394, 1.1616, 1.3772, - 1.5493, 1.7330, 1.9646, 2.1233, 2.3334, 2.5361, 2.7087, 2.9470, - 0.1050, 0.2060, 0.3705, 0.5998, 0.8337, 1.0577, 1.2559, 1.4327, - 1.6334, 1.8165, 1.9853, 2.2058, 2.4063, 2.5818, 2.7625, 2.9458, - 0.1419, 0.4053, 0.6660, 0.8911, 1.0405, 1.1547, 1.2506, 1.3926, - 1.5669, 1.7527, 1.9694, 2.2054, 2.3889, 2.5743, 2.7586, 2.9174, - 0.1514, 0.2825, 0.4309, 0.5772, 0.7470, 0.9703, 1.1462, 1.3316, - 1.5321, 1.7259, 1.9282, 2.1266, 2.3106, 2.5064, 2.7067, 2.9094, - 0.1693, 0.3156, 0.4878, 0.6635, 0.8206, 0.9569, 1.1154, 1.3064, - 1.5109, 1.7184, 1.9179, 2.1036, 2.2763, 2.4820, 2.6949, 2.9105, - 0.1432, 0.2718, 0.4241, 0.5564, 0.6939, 0.9011, 1.1582, 1.3948, - 1.6181, 1.8024, 1.9814, 2.1740, 2.3459, 2.5456, 2.7491, 2.9307, - 0.2294, 0.3857, 0.5590, 0.7434, 0.9189, 1.0941, 1.2740, 1.4456, - 1.6178, 1.7994, 1.9689, 2.1644, 2.3525, 2.5385, 2.7468, 2.9405, - 0.1667, 0.3109, 0.4612, 0.6032, 0.7375, 0.8866, 1.0840, 1.3053, - 1.4982, 1.7044, 1.9146, 2.1117, 2.2942, 2.4983, 2.7084, 2.9132, - 0.1810, 0.3205, 0.4696, 0.6231, 0.7641, 0.9959, 1.2427, 1.4361, - 1.5889, 1.7544, 1.9083, 2.0733, 2.2457, 2.4461, 2.6793, 2.9098, - 0.1164, 0.3753, 0.6068, 0.7503, 1.0100, 1.2131, 1.3793, 1.5302, - 1.6300, 1.7950, 1.9057, 2.1031, 2.3830, 2.5745, 2.6949, 2.8779, - 0.1571, 0.4378, 0.6735, 0.8312, 0.8944, 0.9818, 1.1622, 1.4094, - 1.6423, 1.8066, 1.9258, 2.1838, 2.4363, 2.6279, 2.7358, 2.8790, - 0.1398, 0.2686, 0.4248, 0.6156, 0.7870, 1.0035, 1.2012, 1.3689, - 1.5363, 1.7398, 1.9604, 2.1619, 2.3345, 2.5097, 2.7271, 2.9368, - 0.1913, 0.3338, 0.4987, 0.6446, 0.7852, 1.0163, 1.1886, 1.3610, - 1.5379, 1.7230, 1.8880, 2.0862, 2.2960, 2.4928, 2.7122, 2.9151, - 0.0908, 0.1752, 0.2899, 0.5365, 0.7761, 1.0100, 1.2124, 1.4060, - 1.6019, 1.8010, 1.9774, 2.1905, 2.3733, 2.5623, 2.7660, 2.9565, - 0.1773, 0.3179, 0.4925, 0.6864, 0.8452, 0.9897, 1.1860, 1.3722, - 1.5515, 1.7658, 1.9802, 2.1819, 2.3620, 2.5442, 2.7250, 2.9220, - 0.1286, 0.2341, 0.3689, 0.5364, 0.7176, 0.9350, 1.1083, 1.2943, - 1.4974, 1.7059, 1.9047, 2.1145, 2.3242, 2.5361, 2.7453, 2.9329, - 0.2273, 0.3834, 0.5565, 0.7192, 0.8431, 0.9962, 1.1763, 1.3571, - 1.5774, 1.7419, 1.9202, 2.1131, 2.2919, 2.4898, 2.6895, 2.9180, - 0.1775, 0.3058, 0.4274, 0.6023, 0.8151, 1.0734, 1.3211, 1.5178, - 1.6706, 1.8154, 1.9686, 2.1537, 2.3461, 2.5276, 2.7181, 2.9121, - 0.1653, 0.4304, 0.6361, 0.7824, 0.9183, 1.0452, 1.2071, 1.4077, - 1.6206, 1.8299, 2.0089, 2.1948, 2.3900, 2.5982, 2.7844, 2.9487, - 0.1492, 0.2609, 0.3820, 0.5485, 0.7243, 0.9319, 1.1538, 1.3579, - 1.5266, 1.7002, 1.8873, 2.1016, 2.3175, 2.5221, 2.7241, 2.9243, - 0.2074, 0.3781, 0.5209, 0.6869, 0.8577, 0.9875, 1.1849, 1.3568, - 1.4907, 1.7335, 1.8902, 2.1224, 2.3099, 2.4918, 2.7023, 2.8765, - 0.1359, 0.2254, 0.3286, 0.4432, 0.6586, 0.8964, 1.1125, 1.3523, - 1.5626, 1.7579, 1.9846, 2.1905, 2.3548, 2.5542, 2.7663, 2.9346, - 0.1430, 0.2966, 0.4685, 0.6493, 0.8315, 1.0304, 1.2220, 1.4082, - 1.5995, 1.7888, 1.9774, 2.1737, 2.3607, 2.5577, 2.7558, 2.9405, - 0.1477, 0.2694, 0.4056, 0.5626, 0.7051, 0.8647, 1.0491, 1.2488, - 1.4814, 1.7072, 1.9150, 2.1147, 2.3038, 2.5144, 2.7184, 2.9202, - 0.1690, 0.3033, 0.4580, 0.6686, 0.8536, 1.0293, 1.2124, 1.3998, - 1.5718, 1.7607, 1.9580, 2.1245, 2.2971, 2.4762, 2.6896, 2.9177, - 0.1092, 0.2779, 0.4853, 0.6880, 0.9011, 1.0953, 1.2752, 1.4618, - 1.6623, 1.8484, 2.0264, 2.2152, 2.4017, 2.5835, 2.7671, 2.9436, - 0.1497, 0.3637, 0.6014, 0.8032, 0.9963, 1.1835, 1.3741, 1.5698, - 1.7382, 1.9094, 2.0710, 2.2392, 2.4082, 2.5926, 2.7762, 2.9536, - 0.1434, 0.2492, 0.3966, 0.5934, 0.8033, 1.0657, 1.2796, 1.4276, - 1.5745, 1.7833, 1.9288, 2.1247, 2.3543, 2.5412, 2.7049, 2.8872, - 0.1612, 0.2926, 0.4574, 0.6387, 0.8265, 1.0180, 1.1808, 1.3526, - 1.5564, 1.7536, 1.9187, 2.1192, 2.3149, 2.5006, 2.7101, 2.9217, - 0.0828, 0.1863, 0.3235, 0.5050, 0.7250, 0.9867, 1.2093, 1.3941, - 1.5980, 1.7932, 1.9809, 2.1894, 2.3918, 2.5773, 2.7540, 2.9329, - 0.2001, 0.3655, 0.5290, 0.6761, 0.8027, 0.9972, 1.2090, 1.4255, - 1.6085, 1.7825, 1.9804, 2.1681, 2.3457, 2.5325, 2.7319, 2.9196, - 0.1505, 0.2767, 0.4254, 0.6054, 0.7821, 0.9567, 1.1294, 1.3080, - 1.4984, 1.6954, 1.8666, 2.0736, 2.2875, 2.4969, 2.7072, 2.9163, - 0.1589, 0.4151, 0.5749, 0.6651, 0.8061, 1.0470, 1.2616, 1.3690, - 1.4985, 1.7808, 1.9825, 2.1068, 2.2751, 2.5448, 2.7133, 2.8689, - 0.0916, 0.1846, 0.3788, 0.6329, 0.8774, 1.0687, 1.2653, 1.4561, - 1.6573, 1.8449, 2.0402, 2.2254, 2.3968, 2.5861, 2.7792, 2.9508, - 0.2282, 0.4159, 0.5834, 0.6899, 0.8108, 1.0321, 1.2795, 1.5262, - 1.6936, 1.8469, 2.0922, 2.2607, 2.3795, 2.5301, 2.7386, 2.9530, - 0.1651, 0.3004, 0.4555, 0.6179, 0.7891, 0.9584, 1.1372, 1.3707, - 1.5951, 1.7880, 1.9434, 2.1465, 2.3311, 2.5081, 2.6977, 2.8970, - 0.1279, 0.3828, 0.6330, 0.8323, 0.9652, 1.1175, 1.2319, 1.3511, - 1.5115, 1.6392, 1.7835, 1.9558, 2.2008, 2.4635, 2.6910, 2.9058, - 0.1193, 0.2185, 0.3521, 0.5311, 0.7378, 0.9239, 1.1105, 1.3217, - 1.5362, 1.7504, 1.9536, 2.1627, 2.3560, 2.5506, 2.7548, 2.9453, - 0.1806, 0.3432, 0.4981, 0.6948, 0.8928, 1.0527, 1.2467, 1.4140, - 1.6326, 1.7950, 1.9935, 2.1969, 2.3512, 2.5682, 2.7445, 2.9277, - 0.1846, 0.3112, 0.4568, 0.5891, 0.7317, 0.8493, 1.0204, 1.2022, - 1.3688, 1.6020, 1.8428, 2.0710, 2.2725, 2.4879, 2.7057, 2.9160, - 0.0880, 0.2514, 0.5332, 0.7272, 0.8906, 1.1354, 1.3199, 1.4941, - 1.6010, 1.7151, 1.8712, 2.0643, 2.2755, 2.5375, 2.7054, 2.8891, - 0.1382, 0.2833, 0.4658, 0.6897, 0.9071, 1.0716, 1.2469, 1.4143, - 1.5910, 1.7947, 1.9805, 2.1581, 2.3338, 2.5215, 2.7292, 2.9211, - 0.1061, 0.3494, 0.6327, 0.8570, 0.9748, 1.0560, 1.1529, 1.3250, - 1.6032, 1.8340, 1.9711, 2.1157, 2.3011, 2.5464, 2.8078, 2.9803, - 0.1603, 0.2839, 0.4307, 0.5980, 0.7980, 1.0399, 1.1971, 1.3524, - 1.5715, 1.7838, 1.9468, 2.1498, 2.3627, 2.5514, 2.7327, 2.9148, - 0.1691, 0.3117, 0.4796, 0.6895, 0.8732, 1.0164, 1.1916, 1.3707, - 1.5384, 1.7202, 1.8857, 2.0672, 2.2487, 2.4593, 2.6789, 2.8940, - 0.0965, 0.1702, 0.3191, 0.5721, 0.8100, 1.0241, 1.2272, 1.4196, - 1.6093, 1.8057, 1.9884, 2.2037, 2.3925, 2.5805, 2.7578, 2.9366, - 0.1950, 0.3519, 0.5272, 0.6973, 0.8732, 1.0656, 1.2112, 1.3959, - 1.6116, 1.7821, 1.9445, 2.1592, 2.3348, 2.5142, 2.7440, 2.9297, - 0.1388, 0.2557, 0.4120, 0.5727, 0.7354, 0.9196, 1.0985, 1.2805, - 1.4643, 1.6535, 1.8340, 2.0546, 2.2758, 2.4778, 2.6921, 2.9122, - 0.1823, 0.3336, 0.4957, 0.6771, 0.8563, 1.0137, 1.2299, 1.3849, - 1.5718, 1.7667, 1.9193, 2.1326, 2.3135, 2.5268, 2.7133, 2.8998, - 0.0790, 0.1901, 0.4083, 0.6456, 0.8463, 1.0285, 1.2297, 1.4181, - 1.6159, 1.8056, 1.9971, 2.1912, 2.3816, 2.5746, 2.7692, 2.9497, - 0.0049, 0.0116, 0.0045, 0.0039, -0.0010, -0.0122, -0.0205, -0.0034, - -0.0140, -0.0041, 0.0191, -0.0322, 0.0002, -0.0124, -0.0269, 0.0059, - 0.0586, 0.0339, -0.0389, -0.0319, -0.0079, -0.0205, -0.0363, -0.0211, - 0.0241, 0.0595, 0.0469, 0.0283, 0.0176, -0.0183, -0.0173, -0.0004, - 0.0024, 0.0145, 0.0534, 0.0197, -0.0065, -0.0067, 0.0133, 0.0358, - -0.0104, -0.0386, -0.0109, -0.0078, 0.0275, 0.0565, 0.0251, -0.0027, - -0.0053, 0.0171, 0.0088, 0.0495, 0.0141, 0.0039, -0.0445, -0.0426, - -0.0184, -0.0280, -0.0223, 0.0039, -0.0171, -0.0606, -0.0786, -0.0430, - 0.0544, 0.0595, 0.0320, -0.0012, 0.0108, 0.0185, 0.0066, 0.0408, - 0.0552, -0.0073, -0.0247, -0.0480, -0.0288, 0.0186, 0.0212, -0.0013, - 0.0403, 0.0598, 0.0690, 0.0516, -0.0298, -0.0177, 0.0278, 0.0168, - -0.0106, 0.0251, 0.0386, 0.0331, -0.0052, 0.0133, 0.0291, -0.0158, - -0.0329, -0.0367, 0.0287, 0.0462, -0.0176, 0.0049, 0.0242, -0.0034, - 0.0135, 0.0086, -0.0149, 0.0241, 0.0504, 0.0246, -0.0273, -0.0369, - -0.0108, -0.0449, -0.0625, -0.0414, -0.0292, -0.0571, -0.0440, -0.0088, - 0.0098, 0.0009, -0.0004, 0.0007, -0.0314, -0.0208, -0.0138, -0.0277, - -0.0044, 0.0522, 0.0315, -0.0270, -0.0277, -0.0256, -0.0103, -0.0201, - -0.0287, -0.0279, -0.0182, 0.0472, 0.0613, 0.0450, 0.0413, 0.0333, - 0.0444, 0.0223, 0.0061, 0.0316, 0.0321, 0.0501, 0.0460, 0.0250, - 0.0227, 0.0235, 0.0099, 0.0185, -0.0347, -0.0684, -0.0189, 0.0242, - -0.0190, -0.0273, -0.0012, -0.0253, 0.0293, -0.0231, -0.0219, -0.0010, - 0.0153, 0.0128, -0.0166, -0.0435, -0.0417, -0.0121, -0.0351, -0.0390, - 0.0077, -0.0278, -0.0355, 0.0092, -0.0063, 0.0005, 0.0216, 0.0461, - 0.0538, 0.0451, 0.0298, -0.0130, 0.0058, 0.0206, 0.0471, 0.0499, - 0.0280, 0.0086, -0.0007, -0.0317, 0.0259, 0.0176, 0.0043, 0.0212, - 0.0138, 0.0106, 0.0220, -0.0025, 0.0050, 0.0122, -0.0051, -0.0086, - -0.0472, -0.0005, 0.0193, 0.0032, 0.0246, 0.0222, 0.0090, -0.0320, - -0.0713, -0.0526, -0.0151, -0.0440, -0.0648, -0.0466, -0.0092, 0.0115, - -0.0129, 0.0053, -0.0344, -0.0385, 0.0392, 0.0599, 0.0414, 0.0165, - -0.0098, -0.0320, -0.0261, -0.0055, -0.0139, -0.0110, 0.0084, 0.0172, - -0.0492, -0.0537, -0.0320, -0.0036, 0.0265, 0.0385, 0.0064, -0.0280, - -0.0230, 0.0134, 0.0241, 0.0106, 0.0387, 0.0105, 0.0068, 0.0260, - 0.4940, 0.4911, 0.4849, 0.4820, 0.4837, 0.4839, 0.4824, 0.4799, - 0.4812, 0.4782, 0.4788, 0.4711, 0.4706, 0.4671, 0.4601, 0.4578, - 0.2954, 0.2121, 0.1859, 0.1958, 0.1474, 0.1086, 0.1351, 0.1362, - 0.1486, 0.1342, 0.1215, 0.1423, 0.1634, 0.1588, 0.1539, 0.1857, -}; - static const float lsp16[] = { 0.1813, 0.3911, 0.6301, 0.8012, 1.0057, 1.2041, 1.4271, 1.6943, 1.9402, 2.1733, 2.3521, 2.4989, 2.5839, 2.6846, 2.7634, 2.8950, @@ -12914,173 +12681,6 @@ static const float lsp22[] = { 0.4239, 0.4331, 0.4522, 0.4423, 0.4475, 0.4387, 0.4525, 0.4446, }; -static const float lsp22s[] = { - 0.0664, 0.1875, 0.4300, 0.6730, 0.8793, 1.0640, 1.2563, 1.4433, - 1.6394, 1.8176, 2.0029, 2.1921, 2.3796, 2.5671, 2.7595, 2.9536, - 0.2128, 0.4052, 0.5311, 0.6404, 0.7875, 0.8775, 1.0974, 1.3261, - 1.5563, 1.6790, 1.8339, 2.1195, 2.3226, 2.4609, 2.6440, 2.8947, - 0.2024, 0.3362, 0.4834, 0.6784, 0.9088, 1.0850, 1.2188, 1.4054, - 1.6102, 1.7767, 1.9679, 2.1436, 2.3445, 2.5467, 2.7429, 2.9320, - 0.1181, 0.2279, 0.4413, 0.6114, 0.7710, 0.9427, 1.1142, 1.2707, - 1.4892, 1.7416, 1.9526, 2.1466, 2.3629, 2.5445, 2.7293, 2.9205, - 0.1155, 0.2720, 0.4886, 0.6812, 0.8594, 1.0422, 1.2315, 1.4116, - 1.6137, 1.8020, 1.9758, 2.1743, 2.3602, 2.5568, 2.7472, 2.9374, - 0.1110, 0.3312, 0.4735, 0.5612, 0.7129, 0.8146, 1.0233, 1.3155, - 1.5765, 1.7746, 1.9574, 2.1416, 2.3220, 2.5384, 2.7334, 2.9318, - 0.1656, 0.3350, 0.4215, 0.5609, 0.6759, 0.8503, 1.1405, 1.4094, - 1.6057, 1.6860, 1.7639, 2.0031, 2.2680, 2.5076, 2.7263, 2.9368, - 0.1466, 0.3638, 0.4587, 0.5674, 0.7381, 0.8669, 0.9619, 1.1658, - 1.4667, 1.7440, 1.9335, 2.1018, 2.3022, 2.5281, 2.7359, 2.9261, - 0.1061, 0.2566, 0.4739, 0.6751, 0.8711, 1.0704, 1.2720, 1.4655, - 1.6605, 1.8494, 2.0290, 2.2197, 2.4008, 2.5912, 2.7772, 2.9513, - 0.1116, 0.2364, 0.3971, 0.6316, 0.8583, 1.0335, 1.1686, 1.3302, - 1.5612, 1.7877, 1.9829, 2.2052, 2.3596, 2.5460, 2.7341, 2.9290, - 0.2661, 0.4186, 0.5126, 0.6477, 0.8818, 1.1045, 1.2852, 1.4128, - 1.5851, 1.7593, 1.9399, 2.1757, 2.3684, 2.5136, 2.6927, 2.9064, - 0.1495, 0.2749, 0.4391, 0.6304, 0.8239, 1.0181, 1.1995, 1.3759, - 1.5669, 1.7722, 1.9671, 2.1635, 2.3586, 2.5528, 2.7445, 2.9311, - 0.0912, 0.1759, 0.3066, 0.5660, 0.8005, 0.9568, 1.1832, 1.4504, - 1.6259, 1.7948, 2.0113, 2.2002, 2.3654, 2.5583, 2.7929, 2.9735, - 0.1353, 0.2747, 0.4078, 0.5977, 0.7658, 0.9124, 1.1081, 1.3630, - 1.5875, 1.7847, 1.9323, 2.1181, 2.3321, 2.5046, 2.7183, 2.9225, - 0.1938, 0.4063, 0.4982, 0.6002, 0.7702, 0.9071, 1.1631, 1.3885, - 1.6043, 1.8118, 1.9306, 2.0893, 2.2724, 2.4609, 2.6283, 2.8802, - 0.1857, 0.3351, 0.4381, 0.6101, 0.7561, 0.8555, 1.0384, 1.3171, - 1.5667, 1.6904, 1.7552, 1.9689, 2.2597, 2.5260, 2.7272, 2.9337, - 0.1037, 0.2159, 0.4188, 0.6174, 0.8035, 1.0285, 1.2256, 1.4230, - 1.6400, 1.8322, 2.0144, 2.1988, 2.3810, 2.5682, 2.7613, 2.9438, - 0.1625, 0.2776, 0.4225, 0.6001, 0.7879, 0.9087, 1.0801, 1.2759, - 1.4899, 1.7448, 1.9911, 2.1770, 2.3723, 2.5777, 2.7971, 2.9444, - 0.2111, 0.3640, 0.5839, 0.7290, 0.8051, 1.0023, 1.2315, 1.4143, - 1.5878, 1.7755, 1.9804, 2.1498, 2.3312, 2.5350, 2.7613, 2.9472, - 0.1423, 0.2646, 0.4136, 0.6350, 0.8070, 0.9514, 1.1168, 1.3213, - 1.5776, 1.7721, 1.9404, 2.1545, 2.3385, 2.5137, 2.7396, 2.9553, - 0.1132, 0.2386, 0.4103, 0.5931, 0.7808, 0.9881, 1.1840, 1.3860, - 1.6021, 1.7990, 1.9922, 2.1885, 2.3852, 2.5717, 2.7640, 2.9510, - 0.1267, 0.2602, 0.3913, 0.5944, 0.7598, 0.9198, 1.0781, 1.2715, - 1.5299, 1.7573, 1.9308, 2.1346, 2.3267, 2.5419, 2.7466, 2.9320, - 0.2023, 0.3417, 0.4392, 0.6141, 0.7439, 0.8593, 1.1096, 1.3543, - 1.5185, 1.6553, 1.7862, 2.0341, 2.2718, 2.4834, 2.7103, 2.9466, - 0.1113, 0.2470, 0.3677, 0.5686, 0.7700, 0.9356, 1.0806, 1.2452, - 1.4830, 1.7344, 1.9268, 2.1404, 2.3371, 2.5169, 2.7329, 2.9012, - 0.1664, 0.3554, 0.5573, 0.7471, 0.9245, 1.0998, 1.2787, 1.4655, - 1.6654, 1.8346, 2.0179, 2.2159, 2.4096, 2.5946, 2.7790, 2.9530, - 0.1313, 0.2625, 0.4731, 0.6444, 0.8110, 0.9878, 1.1493, 1.3212, - 1.5719, 1.8138, 1.9861, 2.1943, 2.3714, 2.5578, 2.7346, 2.9296, - 0.1186, 0.3035, 0.5049, 0.6860, 0.8670, 0.9975, 1.1364, 1.3471, - 1.5695, 1.7412, 1.9346, 2.1506, 2.3413, 2.5531, 2.7794, 2.9627, - 0.1108, 0.2697, 0.4787, 0.6344, 0.7909, 0.9586, 1.1440, 1.3511, - 1.5686, 1.7601, 1.9246, 2.1241, 2.3293, 2.5390, 2.7315, 2.9333, - 0.0985, 0.2302, 0.3544, 0.5759, 0.7620, 0.9651, 1.1497, 1.3080, - 1.5500, 1.7845, 1.9518, 2.1734, 2.3565, 2.5665, 2.7605, 2.9102, - 0.1208, 0.2727, 0.4381, 0.5736, 0.7382, 0.8390, 1.0102, 1.2648, - 1.5100, 1.7440, 1.9619, 2.1430, 2.3307, 2.5159, 2.7264, 2.9211, - 0.1582, 0.2777, 0.4475, 0.6551, 0.8591, 1.0084, 1.1414, 1.3291, - 1.5902, 1.7826, 1.9543, 2.1659, 2.3233, 2.5044, 2.6935, 2.9199, - 0.1360, 0.2873, 0.4585, 0.6295, 0.7592, 0.9089, 1.0492, 1.2733, - 1.5391, 1.7768, 1.9372, 2.1329, 2.3168, 2.5015, 2.6857, 2.8837, - 0.0886, 0.1829, 0.3696, 0.6126, 0.8334, 1.0135, 1.2303, 1.4674, - 1.6743, 1.8564, 2.0530, 2.2370, 2.3960, 2.5787, 2.7756, 2.9377, - 0.2005, 0.3537, 0.4700, 0.6249, 0.7385, 0.9097, 1.1759, 1.3811, - 1.5314, 1.6705, 1.8546, 2.1229, 2.3292, 2.5251, 2.7951, 2.9646, - 0.1999, 0.3112, 0.4722, 0.7146, 0.8908, 1.0028, 1.1831, 1.3903, - 1.6125, 1.7514, 1.9083, 2.1248, 2.3271, 2.5339, 2.6945, 2.8918, - 0.1243, 0.2606, 0.4382, 0.5850, 0.7705, 0.9727, 1.1214, 1.3059, - 1.5218, 1.7406, 1.9137, 2.1353, 2.3354, 2.5299, 2.7287, 2.9068, - 0.1039, 0.2426, 0.4265, 0.6284, 0.8152, 0.9941, 1.2004, 1.4038, - 1.5912, 1.7763, 1.9650, 2.1598, 2.3474, 2.5488, 2.7419, 2.9322, - 0.1364, 0.2420, 0.3886, 0.5864, 0.7663, 0.8844, 1.0860, 1.3242, - 1.5518, 1.7893, 2.0004, 2.1562, 2.3619, 2.5516, 2.7687, 2.9181, - 0.1483, 0.2851, 0.4479, 0.6312, 0.7924, 0.9821, 1.1705, 1.3386, - 1.5375, 1.7226, 1.9053, 2.0991, 2.2898, 2.4953, 2.7000, 2.9146, - 0.2332, 0.4561, 0.5407, 0.6212, 0.7524, 0.8215, 0.9522, 1.1685, - 1.5216, 1.7132, 1.8291, 2.0647, 2.2811, 2.4857, 2.7071, 2.9281, - 0.1348, 0.3126, 0.5179, 0.7192, 0.9227, 1.1363, 1.3223, 1.4756, - 1.6509, 1.8191, 1.9991, 2.1976, 2.3877, 2.5768, 2.7590, 2.9386, - 0.1093, 0.2211, 0.4763, 0.6703, 0.8282, 0.9536, 1.1202, 1.3796, - 1.6043, 1.8031, 1.9832, 2.1604, 2.3578, 2.5856, 2.7650, 2.9291, - 0.1865, 0.3027, 0.4580, 0.6719, 0.8400, 1.0082, 1.1901, 1.3782, - 1.5448, 1.6885, 1.9477, 2.1381, 2.2797, 2.5113, 2.7465, 2.9414, - 0.1575, 0.3124, 0.4649, 0.6262, 0.8095, 0.9858, 1.1676, 1.3602, - 1.5646, 1.7582, 1.9550, 2.1671, 2.3628, 2.5734, 2.7670, 2.9519, - 0.1174, 0.2777, 0.4663, 0.6333, 0.8169, 1.0096, 1.1885, 1.3847, - 1.5803, 1.7571, 1.9380, 2.1398, 2.3414, 2.5407, 2.7360, 2.9375, - 0.1073, 0.2264, 0.4083, 0.5973, 0.7474, 0.9514, 1.1349, 1.3337, - 1.5433, 1.7348, 1.9380, 2.1436, 2.3441, 2.5438, 2.7457, 2.9383, - 0.1472, 0.2880, 0.4793, 0.6268, 0.8015, 1.0063, 1.1715, 1.3644, - 1.5525, 1.7410, 1.9258, 2.1227, 2.3214, 2.5149, 2.7148, 2.9196, - 0.1414, 0.2565, 0.4349, 0.6111, 0.7695, 0.9496, 1.1212, 1.3265, - 1.5218, 1.7209, 1.9015, 2.0887, 2.3158, 2.5077, 2.7233, 2.9421, - 0.1252, 0.2667, 0.4454, 0.6431, 0.8371, 1.0124, 1.2110, 1.4160, - 1.6240, 1.8242, 2.0047, 2.1974, 2.3902, 2.5778, 2.7637, 2.9481, - 0.1321, 0.2565, 0.3846, 0.5847, 0.7578, 0.9259, 1.0637, 1.2239, - 1.4690, 1.7346, 1.9750, 2.1882, 2.3712, 2.5509, 2.7280, 2.8885, - 0.1437, 0.2930, 0.4428, 0.6156, 0.8045, 0.9638, 1.1450, 1.3138, - 1.5144, 1.7355, 1.9469, 2.1534, 2.3414, 2.5452, 2.7353, 2.9334, - 0.1692, 0.2770, 0.3831, 0.6100, 0.7825, 0.9302, 1.0690, 1.2481, - 1.4615, 1.6799, 1.9165, 2.1739, 2.3435, 2.5349, 2.7520, 2.9163, - 0.1235, 0.2489, 0.4354, 0.6343, 0.8236, 1.0066, 1.1908, 1.3474, - 1.5656, 1.8275, 2.0620, 2.2548, 2.4135, 2.5913, 2.7639, 2.9334, - 0.1090, 0.1961, 0.3854, 0.5701, 0.7024, 0.8843, 1.1393, 1.3785, - 1.5940, 1.7797, 1.9442, 2.1740, 2.3853, 2.5773, 2.7727, 2.9406, - 0.1560, 0.3477, 0.5011, 0.6287, 0.7612, 0.9896, 1.1510, 1.3420, - 1.5435, 1.6816, 1.8731, 2.0651, 2.2613, 2.4999, 2.7027, 2.8971, - 0.1459, 0.2416, 0.3833, 0.5450, 0.7916, 0.9223, 1.0662, 1.1953, - 1.4029, 1.6616, 1.9320, 2.1459, 2.3386, 2.5081, 2.6799, 2.9195, - 0.1546, 0.3854, 0.6184, 0.8460, 1.0599, 1.2428, 1.3906, 1.5550, - 1.7388, 1.8945, 2.0757, 2.2386, 2.4014, 2.5705, 2.7574, 2.9400, - 0.1080, 0.2307, 0.4112, 0.6067, 0.7725, 0.9467, 1.1285, 1.3205, - 1.5348, 1.7609, 1.9937, 2.1878, 2.3583, 2.5515, 2.7199, 2.9049, - 0.1482, 0.3178, 0.4983, 0.6342, 0.7783, 0.9880, 1.2019, 1.3404, - 1.5223, 1.7296, 1.9211, 2.0943, 2.2928, 2.5008, 2.7136, 2.9224, - 0.1145, 0.2910, 0.4891, 0.6492, 0.8126, 0.9530, 1.1180, 1.3155, - 1.5054, 1.6893, 1.8899, 2.1188, 2.3389, 2.5512, 2.7313, 2.9224, - 0.0939, 0.1689, 0.3250, 0.5792, 0.7698, 0.9245, 1.1574, 1.3865, - 1.5959, 1.7977, 1.9821, 2.1528, 2.3326, 2.5540, 2.7553, 2.9179, - 0.1243, 0.2474, 0.3923, 0.6199, 0.7908, 0.9379, 1.1497, 1.3734, - 1.5582, 1.7420, 1.9539, 2.1385, 2.3240, 2.5277, 2.7311, 2.9178, - 0.1961, 0.3748, 0.5176, 0.6387, 0.8169, 1.0477, 1.2124, 1.3869, - 1.5604, 1.7225, 1.8770, 2.0837, 2.2960, 2.5103, 2.6945, 2.8862, - 0.1295, 0.2403, 0.4149, 0.6189, 0.7913, 0.9130, 1.0832, 1.2787, - 1.4860, 1.7112, 1.9502, 2.1348, 2.2776, 2.4982, 2.7431, 2.9522, - 0.0160, 0.0362, 0.0097, 0.0057, -0.0014, -0.0073, -0.0046, -0.0064, - -0.0121, 0.0019, 0.0149, -0.0440, -0.0479, -0.0382, -0.0480, -0.0182, - 0.0170, 0.0114, -0.0298, -0.0175, -0.0033, -0.0354, -0.0510, -0.0025, - 0.0307, 0.0351, 0.0338, 0.0420, 0.0138, -0.0175, -0.0102, 0.0053, - 0.0084, -0.0003, 0.0412, -0.0027, 0.0145, -0.0039, 0.0083, 0.0400, - 0.0001, -0.0262, 0.0055, -0.0082, 0.0348, 0.0433, 0.0137, -0.0024, - -0.0055, 0.0262, 0.0521, 0.0349, 0.0185, 0.0076, -0.0319, -0.0561, - -0.0460, -0.0253, -0.0097, 0.0163, 0.0184, -0.0037, -0.0480, -0.0371, - 0.0628, 0.0665, 0.0296, -0.0057, 0.0253, 0.0227, 0.0350, 0.0692, - 0.0545, 0.0218, 0.0094, -0.0449, -0.0372, 0.0005, 0.0258, 0.0118, - 0.0285, 0.0760, 0.0822, 0.0527, -0.0299, -0.0049, 0.0170, 0.0195, - 0.0136, 0.0286, 0.0289, 0.0139, 0.0054, 0.0152, 0.0244, 0.0028, - -0.0056, -0.0260, 0.0307, 0.0572, -0.0087, 0.0088, 0.0062, 0.0000, - 0.0125, 0.0000, -0.0292, 0.0820, 0.0872, 0.0646, 0.0346, 0.0076, - -0.0022, -0.0253, -0.0567, -0.0188, -0.0336, -0.0673, -0.0549, -0.0166, - -0.0259, -0.0140, 0.0040, -0.0029, -0.0430, -0.0531, -0.0253, -0.0019, - -0.0071, 0.0393, 0.0072, -0.0327, -0.0236, -0.0235, -0.0177, -0.0186, - -0.0280, -0.0201, -0.0077, 0.0383, 0.0418, 0.0321, 0.0294, 0.0169, - 0.0468, 0.0301, 0.0133, 0.0363, 0.0516, 0.0937, 0.1240, 0.1404, - 0.1325, 0.1178, 0.0999, 0.0251, -0.0037, -0.0495, -0.0703, -0.0219, - -0.0261, -0.0304, -0.0204, -0.0372, 0.0355, 0.0131, -0.0093, -0.0099, - -0.0069, -0.0034, -0.0065, -0.0208, -0.0231, -0.0117, -0.0211, -0.0243, - 0.0046, -0.0107, -0.0070, 0.0123, 0.0230, 0.0152, 0.0164, 0.0412, - 0.0619, 0.0858, 0.0862, -0.0056, 0.0125, 0.0182, 0.0347, 0.0388, - 0.0456, 0.0407, -0.0249, -0.0460, 0.0206, 0.0299, 0.0253, 0.0207, - 0.0177, 0.0238, 0.0253, 0.0030, 0.0042, 0.0020, -0.0081, -0.0136, - -0.0290, -0.0042, 0.0122, 0.0051, 0.0107, 0.0228, 0.0211, -0.0068, - -0.0436, -0.0299, -0.0078, -0.0779, -0.1157, -0.0679, 0.0172, 0.0150, - -0.0051, 0.0081, -0.0512, -0.0616, 0.0576, 0.0799, 0.0803, 0.0336, - 0.0001, -0.0298, -0.0747, -0.0115, -0.0101, -0.0170, -0.0050, 0.0174, - -0.0290, -0.0601, -0.0150, 0.0121, 0.0165, 0.0230, 0.0028, -0.0317, - -0.0165, 0.0356, 0.0451, 0.0120, 0.0321, 0.0084, -0.0058, 0.0122, - 0.1935, 0.1802, 0.2195, 0.2410, 0.2201, 0.1915, 0.1840, 0.1935, - 0.2213, 0.2079, 0.1858, 0.1974, 0.2239, 0.2173, 0.1840, 0.2120, - 0.4912, 0.4777, 0.4607, 0.4395, 0.4426, 0.4388, 0.4416, 0.4345, - 0.4239, 0.4331, 0.4522, 0.4423, 0.4475, 0.4387, 0.4525, 0.4446, -}; - static const float lsp44s[] = { 0.0927, 0.2291, 0.4059, 0.5779, 0.7288, 0.8821, 1.0377, 1.1915, 1.3433, 1.4931, 1.6475, 1.7989, 1.9381, 2.0858, 2.2321, 2.3765, @@ -14971,17 +14571,6 @@ static const uint16_t bark_tab_l22_1024[] = { 29, 36, 45, 60, 80, 113, 173, 302, }; -static const uint16_t bark_tab_s22_128[] = { - 1, 2, 1, 2, 3, 4, 6, 10, - 23, 76, -}; - -static const uint16_t bark_tab_m22_512[] = { - 3, 2, 3, 3, 3, 4, 3, 5, - 4, 6, 7, 8, 10, 14, 18, 25, - 36, 55, 95, 208, -}; - static const uint16_t bark_tab_l22s_1024[] = { 6, 7, 6, 6, 7, 7, 7, 7, 7, 8, 9, 8, 10, 10, 11, 12, @@ -15006,11 +14595,13 @@ static const uint16_t bark_tab_l44_2048[] = { 64, 79, 98, 123, 161, 220, 320, 512, }; +#define bark_tab_m22_512 bark_tab_m44_512 /* Both tables are identical */ static const uint16_t bark_tab_m44_512[] = { 3, 2, 3, 3, 3, 4, 3, 5, 4, 6, 7, 8, 10, 14, 18, 25, 36, 55, 95, 208, }; +#define bark_tab_s22_128 bark_tab_s44_128 /* Both tables are identical */ static const uint16_t bark_tab_s44_128[] = { 1, 2, 1, 2, 3, 4, 6, 10, 23, 76 }; @@ -15030,7 +14621,7 @@ const TwinVQModeTab ff_metasound_mode0806s = { { 2, bark_tab_m8s_256, 20, fcb8sm, 2, 5, cb0806sm0, cb0806sm1, 22 }, { 1, bark_tab_l8s_512, 30, fcb8sl, 3, 6, cb0806sl0, cb0806sl1, 24 } }, - 512, 12, lsp8s, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200 + 512, 12, lsp8, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200 }; const TwinVQModeTab ff_metasound_mode0808 = { @@ -15048,7 +14639,7 @@ const TwinVQModeTab ff_metasound_mode0808s = { { 2, bark_tab_m8s_256, 20, fcb8sm, 2, 5, cb0808sm0, cb0808sm1, 16 }, { 1, bark_tab_l8s_512, 30, fcb8sl, 3, 6, cb0808sl0, cb0808sl1, 17 } }, - 512, 12, lsp8s, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200 + 512, 12, lsp8, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200 }; const TwinVQModeTab ff_metasound_mode1110 = { @@ -15066,7 +14657,7 @@ const TwinVQModeTab ff_metasound_mode1110s = { { 2, bark_tab_m11s_256, 20, fcb11sm, 2, 5, cb1110sm0, cb1110sm1, 18 }, { 1, bark_tab_l11s_512, 30, fcb11sl, 3, 6, cb1110sl0, cb1110sl1, 20 } }, - 512, 16, lsp11s, 1, 6, 4, 3, shape11s, 9, 36, 30, 7, 200 + 512, 16, lsp11, 1, 6, 4, 3, shape11s, 9, 36, 30, 7, 200 }; const TwinVQModeTab ff_metasound_mode1616 = { @@ -15102,7 +14693,7 @@ const TwinVQModeTab ff_metasound_mode2224s = { { 2, bark_tab_m22s_512, 20, fcb22sm, 2, 6, cb2224sm0, cb2224sm1, 14 }, { 1, bark_tab_l22s_1024, 32, fcb22sl, 4, 6, cb2224sl0, cb2224sl1, 15 } }, - 1024, 16, lsp22s, 1, 6, 4, 3, shape22s, 9, 56, 36, 7, 200 + 1024, 16, lsp22, 1, 6, 4, 3, shape22s, 9, 56, 36, 7, 200 }; const TwinVQModeTab ff_metasound_mode4432 = { @@ -15114,15 +14705,6 @@ const TwinVQModeTab ff_metasound_mode4432 = { 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200, }; -const TwinVQModeTab ff_metasound_mode4432s = { - { - { 16, bark_tab_s44_128, 10, fcb44ss, 1, 6, cb4432s0, cb4432s1, 23 }, - { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4432m0, cb4432m1, 21 }, - { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4432l0, cb4432l1, 22 } - }, - 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200, -}; - const TwinVQModeTab ff_metasound_mode4440 = { { { 16, bark_tab_s44_128, 10, fcb44ss, 1, 6, cb4440ss0, cb4440ss1, 18 }, @@ -15132,15 +14714,6 @@ const TwinVQModeTab ff_metasound_mode4440 = { 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200 }; -const TwinVQModeTab ff_metasound_mode4440s = { - { - { 16, bark_tab_s44_128, 10, fcb44ss, 1, 6, cb4440ss0, cb4440ss1, 18 }, - { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4440sm0, cb4440sm1, 17 }, - { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4440sl0, cb4440sl1, 17 } - }, - 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200 -}; - const TwinVQModeTab ff_metasound_mode4448 = { { { 16, bark_tab_s44_128, 10, fcb44ss, 1, 6, cb4448ss0, cb4448ss1, 15 }, @@ -15149,12 +14722,3 @@ const TwinVQModeTab ff_metasound_mode4448 = { }, 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200 }; - -const TwinVQModeTab ff_metasound_mode4448s = { - { - { 16, bark_tab_s44_128, 10, fcb44ss, 1, 6, cb4448ss0, cb4448ss1, 15 }, - { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4448sm0, cb4448sm1, 14 }, - { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4448sl0, cb4448sl1, 14 } - }, - 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200 -}; diff --git a/libavcodec/metasound_data.h b/libavcodec/metasound_data.h index 5c334113cc..6c290157e0 100644 --- a/libavcodec/metasound_data.h +++ b/libavcodec/metasound_data.h @@ -40,10 +40,7 @@ extern const TwinVQModeTab ff_metasound_mode2224s; extern const TwinVQModeTab ff_metasound_mode2232; extern const TwinVQModeTab ff_metasound_mode2232s; extern const TwinVQModeTab ff_metasound_mode4432; -extern const TwinVQModeTab ff_metasound_mode4432s; extern const TwinVQModeTab ff_metasound_mode4440; -extern const TwinVQModeTab ff_metasound_mode4440s; extern const TwinVQModeTab ff_metasound_mode4448; -extern const TwinVQModeTab ff_metasound_mode4448s; #endif /* AVCODEC_METASOUND_DATA_H */ From patchwork Mon Jan 4 00:28:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24770 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 07B7B44907C for ; Mon, 4 Jan 2021 02:28:57 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CAB3A68A9C9; Mon, 4 Jan 2021 02:28:56 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3AB646804E0 for ; Mon, 4 Jan 2021 02:28:54 +0200 (EET) Received: by mail-wm1-f50.google.com with SMTP id q75so17567754wme.2 for ; Sun, 03 Jan 2021 16:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=6vNgdyQPP0FFFtEXZ1XvlXT5XixJrIuz010EPLm+UX8=; b=tzRs4C8jT1OfQapg6HM4SO84Ajin20maTB/gPWYjpbLjllAYur7MX0HWQ94MCBVNUf Pp+uSHorT54v+g/leewaNhbzg1WMEcEiTsFe5E7xPE7sfHJKM7pJSZxfnZvqIMLIECdi JmarHfQxj8z/xz6jUSfa6BHv7CGl0OL42EkqF/Rdl6xny2f6OcdxqwUdZis/Y1BVoENx tmDh5Qr4OKp9Vgl9Nvq16mc5aaSa7EB+iRBIScODN1mZK8GjCg/x+6UgjNTrVHtr7Tgf jvQ2RRNQkgEXKqLbY/CrDZtnvfHTpvxbTcxllVAXUvYl/lA/xbGikBFJ5XFt24ZWCToC /8vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=6vNgdyQPP0FFFtEXZ1XvlXT5XixJrIuz010EPLm+UX8=; b=paNCdKEeXPq19j0jWXL9mdikeFWmfAAvoeWX8FmcY0qoWX02cmppJlcEmwjNJ5Yy3e OnpJpmdhMzCAzqpmsvTw971YhbiDNRFN55Z+t7MBAgNWGsraLfc4qfqKti5EMoNJ/Xbt qUH/l47sfYhQuVc7L69YlIC4Qnt9LwbpjhtCDVPnf5jJQsw8inKAsV9DVWg5EMl9Lhfy h6MvcmAPhf/VSm+V3iMErhn35ZLdwvZGJ1J/ojznI+Qz9gmF1RDhhWHQMAaCwAof0SsN ZTkOVdrSZrJalv6Y/3hggHN9HV+9ROYMp9nXmga6+kgfpbGp1e99ZFk4vLYSWQTpZjNb UHKQ== X-Gm-Message-State: AOAM531wsMDBOcY0UMRBvdm7vkQIyGKyvaXbKnYRAdl9EDOemtk14EvG M31hLtknLw1a5bLoseYBqffN8jJmcgI= X-Google-Smtp-Source: ABdhPJwE4DaE5UGlWqqHEx5xOC0SQxlqwMuFsM96HyO+r2E3olQXZMdb4nqsdZW4zv1C8Ftmwkkimw== X-Received: by 2002:a1c:a9c4:: with SMTP id s187mr24621872wme.116.1609720131397; Sun, 03 Jan 2021 16:28:51 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:50 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:04 +0100 Message-Id: <20210104002816.2321974-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/16] avcodec/twinvq, metasound_data: Deduplicate lsp tables X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Saves about 24KB. Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 2 +- libavcodec/metasound_data.c | 41 +- libavcodec/metasound_data.h | 6 + libavcodec/twinvq_data.h | 790 ------------------------------------ libavcodec/twinvqdec.c | 17 +- 5 files changed, 39 insertions(+), 817 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index fea37ef3c9..143be8afec 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -666,7 +666,7 @@ OBJS-$(CONFIG_TSCC_DECODER) += tscc.o msrledec.o OBJS-$(CONFIG_TSCC2_DECODER) += tscc2.o OBJS-$(CONFIG_TTA_DECODER) += tta.o ttadata.o ttadsp.o OBJS-$(CONFIG_TTA_ENCODER) += ttaenc.o ttaencdsp.o ttadata.o -OBJS-$(CONFIG_TWINVQ_DECODER) += twinvqdec.o twinvq.o +OBJS-$(CONFIG_TWINVQ_DECODER) += twinvqdec.o twinvq.o metasound_data.o OBJS-$(CONFIG_TXD_DECODER) += txd.o OBJS-$(CONFIG_ULTI_DECODER) += ulti.o OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideodec.o utvideodsp.o diff --git a/libavcodec/metasound_data.c b/libavcodec/metasound_data.c index d027690e3d..22b2730dda 100644 --- a/libavcodec/metasound_data.c +++ b/libavcodec/metasound_data.c @@ -19,8 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "metasound_data.h" +#if CONFIG_METASOUND_DECODER static const int16_t cb0806sl0[] = { -417, -225, -84, 16, -106, -34, -246, -164, 112, 48, -47, 36, -65, -68, -172, -1655, @@ -12101,8 +12103,9 @@ static const int16_t fcb44sm[] = { -623, -588, 38, -58, 975, 1529, -986, -891, -1121, -619, 1967, -463, -7, 632, 768, 953, }; +#endif /* CONFIG_METASOUND_DECODER */ -static const float lsp8[] = { +const float ff_metasound_lsp8[] = { 0.2702, 0.5096, 0.6437, 0.7672, 0.9639, 1.0696, 1.2625, 1.5789, 1.9285, 2.2383, 2.5129, 2.8470, 0.1740, 0.3677, 0.6082, 0.8387, 1.1084, 1.3721, 1.6362, 1.8733, 2.0640, 2.3442, 2.6087, 2.8548, @@ -12168,7 +12171,7 @@ static const float lsp8[] = { 0.2217, 0.2632, 0.2706, 0.2624, 0.2162, 0.2453, 0.2460, 0.2531, }; -static const float lsp11[] = { +const float ff_metasound_lsp11[] = { 0.1103, 0.3862, 0.6863, 0.8447, 0.9231, 1.0261, 1.1248, 1.4057, 1.6621, 1.8010, 1.8692, 2.0704, 2.3490, 2.6060, 2.7539, 2.8977, 0.1273, 0.2407, 0.3812, 0.6004, 0.7767, 0.9383, 1.1344, 1.3351, @@ -12335,7 +12338,7 @@ static const float lsp11[] = { 0.1486, 0.1342, 0.1215, 0.1423, 0.1634, 0.1588, 0.1539, 0.1857, }; -static const float lsp16[] = { +const float ff_metasound_lsp16[] = { 0.1813, 0.3911, 0.6301, 0.8012, 1.0057, 1.2041, 1.4271, 1.6943, 1.9402, 2.1733, 2.3521, 2.4989, 2.5839, 2.6846, 2.7634, 2.8950, 0.1311, 0.3183, 0.4659, 0.5601, 0.6658, 0.7828, 1.0065, 1.2717, @@ -12514,7 +12517,7 @@ static const float lsp16[] = { -0.0429, -0.0615, -0.0893, -0.0618, -0.0384, -0.0134, -0.0232, -0.0238, }; -static const float lsp22[] = { +const float ff_metasound_lsp22[] = { 0.0664, 0.1875, 0.4300, 0.6730, 0.8793, 1.0640, 1.2563, 1.4433, 1.6394, 1.8176, 2.0029, 2.1921, 2.3796, 2.5671, 2.7595, 2.9536, 0.2128, 0.4052, 0.5311, 0.6404, 0.7875, 0.8775, 1.0974, 1.3261, @@ -12681,7 +12684,7 @@ static const float lsp22[] = { 0.4239, 0.4331, 0.4522, 0.4423, 0.4475, 0.4387, 0.4525, 0.4446, }; -static const float lsp44s[] = { +const float ff_metasound_lsp44[] = { 0.0927, 0.2291, 0.4059, 0.5779, 0.7288, 0.8821, 1.0377, 1.1915, 1.3433, 1.4931, 1.6475, 1.7989, 1.9381, 2.0858, 2.2321, 2.3765, 2.5187, 2.6530, 2.7895, 2.9354, 0.0944, 0.1974, 0.3046, 0.4714, @@ -12889,6 +12892,7 @@ static const float lsp44s[] = { 0.1897, 0.1772, 0.1651, 0.1247, 0.1041, 0.1231, 0.1809, 0.2234, }; +#if CONFIG_METASOUND_DECODER static const int16_t shape8[] = { 2765, 1262, 6624, 867, 688, 1884, 3245, 1248, -2160, 593, 182, -1004, -1067, 687, 1021, -920, @@ -14612,7 +14616,7 @@ const TwinVQModeTab ff_metasound_mode0806 = { { 2, bark_tab_m8_256, 20, fcb8m, 2, 5, cb0806sm0, cb0806sm1, 22 }, { 1, bark_tab_l8_512, 30, fcb8l, 3, 6, cb0806sl0, cb0806sl1, 24 } }, - 512, 12, lsp8, 1, 5, 3, 3, shape8, 8, 28, 20, 6, 200 + 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, shape8, 8, 28, 20, 6, 200 }; const TwinVQModeTab ff_metasound_mode0806s = { @@ -14621,7 +14625,7 @@ const TwinVQModeTab ff_metasound_mode0806s = { { 2, bark_tab_m8s_256, 20, fcb8sm, 2, 5, cb0806sm0, cb0806sm1, 22 }, { 1, bark_tab_l8s_512, 30, fcb8sl, 3, 6, cb0806sl0, cb0806sl1, 24 } }, - 512, 12, lsp8, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200 + 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200 }; const TwinVQModeTab ff_metasound_mode0808 = { @@ -14630,7 +14634,7 @@ const TwinVQModeTab ff_metasound_mode0808 = { { 2, bark_tab_m8_256, 20, fcb8m, 2, 5, cb0808m0, cb0808m1, 16 }, { 1, bark_tab_l8_512, 30, fcb8l, 3, 6, cb0808l0, cb0808l1, 17 } }, - 512, 12, lsp8, 1, 5, 3, 3, shape8, 8, 28, 20, 6, 200 + 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, shape8, 8, 28, 20, 6, 200 }; const TwinVQModeTab ff_metasound_mode0808s = { @@ -14639,7 +14643,7 @@ const TwinVQModeTab ff_metasound_mode0808s = { { 2, bark_tab_m8s_256, 20, fcb8sm, 2, 5, cb0808sm0, cb0808sm1, 16 }, { 1, bark_tab_l8s_512, 30, fcb8sl, 3, 6, cb0808sl0, cb0808sl1, 17 } }, - 512, 12, lsp8, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200 + 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200 }; const TwinVQModeTab ff_metasound_mode1110 = { @@ -14648,7 +14652,7 @@ const TwinVQModeTab ff_metasound_mode1110 = { { 2, bark_tab_m11_256, 16, fcb11m, 2, 5, cb1110m0, cb1110m1, 18 }, { 1, bark_tab_l11_512, 24, fcb11l, 3, 6, cb1110l0, cb1110l1, 19 } }, - 512, 16, lsp11, 1, 6, 4, 3, shape11, 9, 28, 20, 7, 200 + 512, 16, ff_metasound_lsp11, 1, 6, 4, 3, shape11, 9, 28, 20, 7, 200 }; const TwinVQModeTab ff_metasound_mode1110s = { @@ -14657,7 +14661,7 @@ const TwinVQModeTab ff_metasound_mode1110s = { { 2, bark_tab_m11s_256, 20, fcb11sm, 2, 5, cb1110sm0, cb1110sm1, 18 }, { 1, bark_tab_l11s_512, 30, fcb11sl, 3, 6, cb1110sl0, cb1110sl1, 20 } }, - 512, 16, lsp11, 1, 6, 4, 3, shape11s, 9, 36, 30, 7, 200 + 512, 16, ff_metasound_lsp11, 1, 6, 4, 3, shape11s, 9, 36, 30, 7, 200 }; const TwinVQModeTab ff_metasound_mode1616 = { @@ -14666,7 +14670,7 @@ const TwinVQModeTab ff_metasound_mode1616 = { { 2, bark_tab_m16_512, 24, fcb16m, 2, 5, cb1616m0, cb1616m1, 15 }, { 1, bark_tab_l16_1024, 30, fcb16l, 3, 6, cb1616l0, cb1616l1, 16 } }, - 1024, 16, lsp16, 1, 6, 4, 3, shape16, 9, 28, 30, 7, 200 + 1024, 16, ff_metasound_lsp16, 1, 6, 4, 3, shape16, 9, 28, 30, 7, 200 }; const TwinVQModeTab ff_metasound_mode1616s = { @@ -14675,7 +14679,7 @@ const TwinVQModeTab ff_metasound_mode1616s = { { 2, bark_tab_m16s_512, 20, fcb16sm, 2, 5, cb1616sm0, cb1616sm1, 15 }, { 1, bark_tab_l16s_1024, 30, fcb16sl, 3, 6, cb1616sl0, cb1616sl1, 16 } }, - 1024, 16, lsp16, 1, 6, 4, 3, shape16s, 9, 56, 60, 7, 200 + 1024, 16, ff_metasound_lsp16, 1, 6, 4, 3, shape16s, 9, 56, 60, 7, 200 }; const TwinVQModeTab ff_metasound_mode2224 = { @@ -14684,7 +14688,7 @@ const TwinVQModeTab ff_metasound_mode2224 = { { 2, bark_tab_m22_512, 20, fcb22m, 2, 6, cb2224m0, cb2224m1, 14 }, { 1, bark_tab_l22_1024, 32, fcb22l, 4, 6, cb2224l0, cb2224l1, 15 } }, - 1024, 16, lsp22, 1, 6, 4, 3, shape22, 9, 56, 36, 7, 200 + 1024, 16, ff_metasound_lsp22, 1, 6, 4, 3, shape22, 9, 56, 36, 7, 200 }; const TwinVQModeTab ff_metasound_mode2224s = { @@ -14693,7 +14697,7 @@ const TwinVQModeTab ff_metasound_mode2224s = { { 2, bark_tab_m22s_512, 20, fcb22sm, 2, 6, cb2224sm0, cb2224sm1, 14 }, { 1, bark_tab_l22s_1024, 32, fcb22sl, 4, 6, cb2224sl0, cb2224sl1, 15 } }, - 1024, 16, lsp22, 1, 6, 4, 3, shape22s, 9, 56, 36, 7, 200 + 1024, 16, ff_metasound_lsp22, 1, 6, 4, 3, shape22s, 9, 56, 36, 7, 200 }; const TwinVQModeTab ff_metasound_mode4432 = { @@ -14702,7 +14706,7 @@ const TwinVQModeTab ff_metasound_mode4432 = { { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4432m0, cb4432m1, 21 }, { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4432l0, cb4432l1, 22 } }, - 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200, + 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200, }; const TwinVQModeTab ff_metasound_mode4440 = { @@ -14711,7 +14715,7 @@ const TwinVQModeTab ff_metasound_mode4440 = { { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4440sm0, cb4440sm1, 17 }, { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4440sl0, cb4440sl1, 17 } }, - 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200 + 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200 }; const TwinVQModeTab ff_metasound_mode4448 = { @@ -14720,5 +14724,6 @@ const TwinVQModeTab ff_metasound_mode4448 = { { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4448sm0, cb4448sm1, 14 }, { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4448sl0, cb4448sl1, 14 } }, - 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200 + 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200 }; +#endif /* CONFIG_METASOUND_DECODER */ diff --git a/libavcodec/metasound_data.h b/libavcodec/metasound_data.h index 6c290157e0..24c77c3868 100644 --- a/libavcodec/metasound_data.h +++ b/libavcodec/metasound_data.h @@ -27,6 +27,12 @@ #include "twinvq.h" +extern const float ff_metasound_lsp8[]; +extern const float ff_metasound_lsp11[]; +extern const float ff_metasound_lsp16[]; +extern const float ff_metasound_lsp22[]; +extern const float ff_metasound_lsp44[]; + extern const TwinVQModeTab ff_metasound_mode0806; extern const TwinVQModeTab ff_metasound_mode0806s; extern const TwinVQModeTab ff_metasound_mode0808; diff --git a/libavcodec/twinvq_data.h b/libavcodec/twinvq_data.h index 375acc245a..1d9678ef12 100644 --- a/libavcodec/twinvq_data.h +++ b/libavcodec/twinvq_data.h @@ -135,7 +135,6 @@ static const uint16_t bark_tab_s44_128[] = { * without risking a segfault on malformed files. */ static const struct twinvq_data { - float lsp08[504]; int16_t fcb08l[640]; int16_t fcb08m[320]; int16_t fcb08s[320]; @@ -159,7 +158,6 @@ static const struct twinvq_data { int16_t fcb11m[320]; int16_t fcb11s[320]; int16_t shape11[1280]; - float lsp11[1312]; int16_t cb1110l0[1280]; int16_t cb1110l1[1280]; @@ -172,7 +170,6 @@ static const struct twinvq_data { int16_t fcb16m[320]; int16_t fcb16s[320]; int16_t shape16[1920]; - float lsp16[1400]; int16_t cb1616l0[1024]; int16_t cb1616l1[1024]; @@ -192,7 +189,6 @@ static const struct twinvq_data { int16_t fcb22m_1[640]; int16_t fcb22s_1[640]; int16_t shape22_1[1152]; - float lsp22_1[1312]; int16_t cb2224l0[960]; int16_t cb2224l1[960]; @@ -225,7 +221,6 @@ static const struct twinvq_data { int16_t fcb44m[640]; int16_t fcb44s[640]; int16_t shape44[1152]; - float lsp44[1640]; int16_t cb4448l0[896]; int16_t cb4448l1[896]; @@ -10036,584 +10031,6 @@ static const struct twinvq_data { -3976, -66, -594, 6181, -110, 292, 1129, -591 }, -.lsp08 = { - 0.2702, 0.5096, 0.6437, 0.7672, 0.9639, 1.0696, 1.2625, 1.5789, - 1.9285, 2.2383, 2.5129, 2.8470, 0.1740, 0.3677, 0.6082, 0.8387, - 1.1084, 1.3721, 1.6362, 1.8733, 2.0640, 2.3442, 2.6087, 2.8548, - 0.1536, 0.3279, 0.5143, 0.6859, 0.9763, 1.2744, 1.5605, 1.8566, - 2.1007, 2.3450, 2.6075, 2.8850, 0.2075, 0.4533, 0.7709, 1.0377, - 1.2953, 1.5132, 1.7826, 2.0351, 2.2590, 2.4996, 2.6795, 2.8748, - 0.1393, 0.2453, 0.3754, 0.5453, 0.8148, 1.1289, 1.4389, 1.7592, - 2.0353, 2.3215, 2.5934, 2.8588, 0.1250, 0.3627, 0.7613, 1.1380, - 1.4163, 1.5565, 1.6920, 1.8130, 1.8678, 2.0427, 2.4318, 2.8544, - 0.2256, 0.4223, 0.6452, 0.8599, 1.0673, 1.3118, 1.5486, 1.8366, - 2.0759, 2.3026, 2.5284, 2.8030, 0.2304, 0.4404, 0.6891, 0.8964, - 1.1510, 1.4202, 1.6483, 1.8580, 2.1181, 2.3686, 2.6078, 2.9128, - 0.2230, 0.3816, 0.5520, 0.6062, 0.7909, 1.0988, 1.4330, 1.7846, - 2.0713, 2.3457, 2.6048, 2.8708, 0.2447, 0.5800, 0.8249, 0.9905, - 1.1721, 1.3990, 1.6694, 1.9064, 2.1307, 2.4255, 2.6815, 2.9117, - 0.1974, 0.3812, 0.5802, 0.7759, 0.9280, 1.1547, 1.4170, 1.6369, - 1.8890, 2.2587, 2.5626, 2.8239, 0.1209, 0.2510, 0.4841, 0.8048, - 1.1197, 1.3563, 1.6073, 1.8926, 2.1350, 2.3669, 2.6291, 2.8985, - 0.2352, 0.4347, 0.6582, 0.8178, 0.9548, 1.1654, 1.4942, 1.8812, - 2.1703, 2.3779, 2.6412, 2.8871, 0.2091, 0.4084, 0.6730, 0.9151, - 1.1259, 1.3262, 1.5937, 1.8129, 2.0237, 2.3317, 2.5778, 2.8620, - 0.1167, 0.2406, 0.4520, 0.7298, 0.9848, 1.2448, 1.5137, 1.7874, - 2.0280, 2.3020, 2.5914, 2.8794, 0.3003, 0.4966, 0.6520, 0.8505, - 1.1600, 1.3981, 1.5805, 1.8346, 2.0757, 2.3102, 2.5760, 2.8499, - 0.2451, 0.4163, 0.5960, 0.7805, 0.9507, 1.2438, 1.5587, 1.8581, - 2.0735, 2.3198, 2.5704, 2.8220, 0.3112, 0.5517, 0.7032, 0.8528, - 1.1489, 1.4257, 1.6848, 1.9388, 2.1577, 2.4265, 2.6678, 2.9051, - 0.2249, 0.3897, 0.5559, 0.7473, 1.0158, 1.3581, 1.6914, 1.9930, - 2.1843, 2.3534, 2.5512, 2.8065, 0.2600, 0.4574, 0.7349, 0.9691, - 1.1696, 1.3848, 1.6335, 1.9021, 2.1174, 2.3481, 2.5902, 2.8390, - 0.2246, 0.3372, 0.4560, 0.5249, 0.7056, 1.0273, 1.3810, 1.7132, - 1.9819, 2.2574, 2.5410, 2.8491, 0.1419, 0.4834, 0.8835, 1.1453, - 1.2839, 1.4224, 1.5593, 1.7877, 2.1285, 2.4070, 2.6043, 2.8511, - 0.1886, 0.3677, 0.5617, 0.8099, 1.1277, 1.3841, 1.5804, 1.8136, - 2.0307, 2.2805, 2.5399, 2.8322, 0.2351, 0.4151, 0.6675, 0.8713, - 1.0464, 1.3292, 1.6586, 1.9281, 2.1355, 2.3495, 2.6222, 2.8782, - 0.2700, 0.4489, 0.6206, 0.7121, 0.7737, 0.9848, 1.3658, 1.7433, - 2.0139, 2.2243, 2.4806, 2.8175, 0.2479, 0.4425, 0.6490, 0.8745, - 1.1161, 1.3849, 1.6773, 1.9566, 2.1491, 2.3624, 2.5685, 2.8114, - 0.2035, 0.3701, 0.5567, 0.7953, 1.0082, 1.2758, 1.5373, 1.7822, - 2.0175, 2.2601, 2.4759, 2.7771, 0.1856, 0.3461, 0.5998, 0.9041, - 1.2383, 1.4612, 1.6667, 1.9305, 2.1617, 2.4107, 2.6477, 2.8656, - 0.2107, 0.3715, 0.5289, 0.6651, 0.8420, 1.1168, 1.4401, 1.7230, - 1.9901, 2.2687, 2.5452, 2.8655, 0.1218, 0.2999, 0.6348, 0.9482, - 1.2745, 1.5876, 1.9129, 2.2348, 2.4020, 2.4922, 2.6351, 2.8357, - 0.1617, 0.3483, 0.5869, 0.8163, 1.0366, 1.2344, 1.4609, 1.7029, - 1.9476, 2.2337, 2.5258, 2.8442, 0.2505, 0.4894, 0.7510, 0.9152, - 1.0845, 1.3657, 1.6528, 1.8346, 2.0160, 2.2811, 2.5338, 2.8136, - 0.0947, 0.1158, 0.0578, -0.0337, -0.0066, 0.0104, -0.0447, -0.0505, --0.0778, -0.0293, 0.0251, -0.0143, 0.0349, -0.0227, -0.0909, 0.0523, - 0.0325, -0.0410, -0.1045, -0.0899, -0.0009, 0.0075, -0.0575, -0.0855, --0.0129, 0.0575, 0.0597, 0.0391, 0.0371, -0.0184, -0.0083, 0.0287, - 0.0143, 0.0167, 0.0120, -0.0168, 0.0452, 0.0223, -0.0352, 0.0119, --0.0496, -0.0965, -0.0661, -0.0072, 0.1099, 0.0843, -0.0087, -0.0478, --0.0128, -0.0120, -0.0004, 0.0731, 0.1047, 0.0630, 0.0196, -0.0103, --0.0399, -0.0986, -0.0912, -0.0390, -0.0247, -0.0694, -0.0749, -0.0066, - 0.0223, 0.0634, 0.0343, -0.0134, 0.0727, 0.0241, 0.0066, 0.0437, - 0.0610, 0.0364, 0.0248, -0.0358, -0.0686, -0.0104, 0.0426, 0.0088, --0.0137, -0.0165, 0.0671, 0.0815, -0.0863, -0.0644, -0.0088, 0.0023, - 0.0482, 0.1174, 0.1270, 0.0594, 0.0165, 0.0949, 0.1098, 0.0137, - 0.4951, 0.4999, 0.4958, 0.4907, 0.4984, 0.4965, 0.4958, 0.4996, - 0.4987, 0.4958, 0.4986, 0.4977, 0.2841, 0.2186, 0.1474, 0.1687, - 0.2217, 0.2632, 0.2706, 0.2624, 0.2162, 0.2453, 0.2460, 0.2531 -}, - -.lsp11 = { - 0.1103, 0.3862, 0.6863, 0.8447, 0.9231, 1.0261, 1.1248, 1.4057, - 1.6621, 1.8010, 1.8692, 2.0704, 2.3490, 2.6060, 2.7539, 2.8977, - 0.1273, 0.2407, 0.3812, 0.6004, 0.7767, 0.9383, 1.1344, 1.3351, - 1.5233, 1.7262, 1.9466, 2.1739, 2.3495, 2.5162, 2.7164, 2.9202, - 0.2010, 0.3330, 0.4488, 0.6465, 0.8046, 0.9889, 1.1479, 1.2964, - 1.4770, 1.6606, 1.8789, 2.1155, 2.3287, 2.5199, 2.7101, 2.9119, - 0.1168, 0.2197, 0.3279, 0.4691, 0.6268, 0.8251, 1.0533, 1.2714, - 1.4712, 1.6762, 1.8831, 2.1114, 2.3230, 2.5297, 2.7365, 2.9270, - 0.1405, 0.3109, 0.4986, 0.6891, 0.8634, 1.0583, 1.2594, 1.4349, - 1.6232, 1.8116, 1.9905, 2.1935, 2.3799, 2.5656, 2.7661, 2.9486, - 0.1703, 0.3057, 0.4403, 0.5225, 0.5969, 0.8110, 1.0729, 1.3215, - 1.5407, 1.7381, 1.9477, 2.1680, 2.3586, 2.5612, 2.7630, 2.9410, - 0.1128, 0.2628, 0.4523, 0.6495, 0.8176, 0.9816, 1.1746, 1.3710, - 1.5568, 1.7518, 1.9497, 2.1452, 2.3346, 2.5389, 2.7362, 2.9264, - 0.1809, 0.3287, 0.5205, 0.7264, 0.9298, 1.1217, 1.2970, 1.4894, - 1.6874, 1.8493, 2.0576, 2.2382, 2.4097, 2.6041, 2.7796, 2.9389, - 0.2502, 0.4709, 0.6892, 0.8346, 0.9209, 1.0455, 1.2399, 1.4616, - 1.6463, 1.8380, 2.0475, 2.2397, 2.4665, 2.6550, 2.7701, 2.8895, - 0.1040, 0.2340, 0.3964, 0.5740, 0.7764, 0.9941, 1.2000, 1.4014, - 1.6024, 1.7974, 1.9939, 2.1959, 2.3783, 2.5663, 2.7613, 2.9484, - 0.1912, 0.3393, 0.4743, 0.6313, 0.8014, 0.9879, 1.1855, 1.3922, - 1.5678, 1.7289, 1.9271, 2.1165, 2.3089, 2.5414, 2.7448, 2.9269, - 0.0965, 0.2025, 0.3398, 0.4990, 0.6934, 0.9386, 1.1730, 1.3766, - 1.5783, 1.7783, 1.9790, 2.1831, 2.3670, 2.5578, 2.7641, 2.9516, - 0.2126, 0.3652, 0.5545, 0.7170, 0.8674, 1.0640, 1.2558, 1.4061, - 1.5904, 1.8095, 1.9760, 2.1505, 2.3549, 2.5575, 2.7023, 2.8877, - 0.1827, 0.3426, 0.4894, 0.6488, 0.7960, 0.9535, 1.1217, 1.2798, - 1.4566, 1.6453, 1.8044, 2.0042, 2.2379, 2.4611, 2.6697, 2.8966, - 0.2034, 0.3822, 0.5231, 0.6960, 0.9200, 1.0394, 1.1616, 1.3772, - 1.5493, 1.7330, 1.9646, 2.1233, 2.3334, 2.5361, 2.7087, 2.9470, - 0.1050, 0.2060, 0.3705, 0.5998, 0.8337, 1.0577, 1.2559, 1.4327, - 1.6334, 1.8165, 1.9853, 2.2058, 2.4063, 2.5818, 2.7625, 2.9458, - 0.1419, 0.4053, 0.6660, 0.8911, 1.0405, 1.1547, 1.2506, 1.3926, - 1.5669, 1.7527, 1.9694, 2.2054, 2.3889, 2.5743, 2.7586, 2.9174, - 0.1514, 0.2825, 0.4309, 0.5772, 0.7470, 0.9703, 1.1462, 1.3316, - 1.5321, 1.7259, 1.9282, 2.1266, 2.3106, 2.5064, 2.7067, 2.9094, - 0.1693, 0.3156, 0.4878, 0.6635, 0.8206, 0.9569, 1.1154, 1.3064, - 1.5109, 1.7184, 1.9179, 2.1036, 2.2763, 2.4820, 2.6949, 2.9105, - 0.1432, 0.2718, 0.4241, 0.5564, 0.6939, 0.9011, 1.1582, 1.3948, - 1.6181, 1.8024, 1.9814, 2.1740, 2.3459, 2.5456, 2.7491, 2.9307, - 0.2294, 0.3857, 0.5590, 0.7434, 0.9189, 1.0941, 1.2740, 1.4456, - 1.6178, 1.7994, 1.9689, 2.1644, 2.3525, 2.5385, 2.7468, 2.9405, - 0.1667, 0.3109, 0.4612, 0.6032, 0.7375, 0.8866, 1.0840, 1.3053, - 1.4982, 1.7044, 1.9146, 2.1117, 2.2942, 2.4983, 2.7084, 2.9132, - 0.1810, 0.3205, 0.4696, 0.6231, 0.7641, 0.9959, 1.2427, 1.4361, - 1.5889, 1.7544, 1.9083, 2.0733, 2.2457, 2.4461, 2.6793, 2.9098, - 0.1164, 0.3753, 0.6068, 0.7503, 1.0100, 1.2131, 1.3793, 1.5302, - 1.6300, 1.7950, 1.9057, 2.1031, 2.3830, 2.5745, 2.6949, 2.8779, - 0.1571, 0.4378, 0.6735, 0.8312, 0.8944, 0.9818, 1.1622, 1.4094, - 1.6423, 1.8066, 1.9258, 2.1838, 2.4363, 2.6279, 2.7358, 2.8790, - 0.1398, 0.2686, 0.4248, 0.6156, 0.7870, 1.0035, 1.2012, 1.3689, - 1.5363, 1.7398, 1.9604, 2.1619, 2.3345, 2.5097, 2.7271, 2.9368, - 0.1913, 0.3338, 0.4987, 0.6446, 0.7852, 1.0163, 1.1886, 1.3610, - 1.5379, 1.7230, 1.8880, 2.0862, 2.2960, 2.4928, 2.7122, 2.9151, - 0.0908, 0.1752, 0.2899, 0.5365, 0.7761, 1.0100, 1.2124, 1.4060, - 1.6019, 1.8010, 1.9774, 2.1905, 2.3733, 2.5623, 2.7660, 2.9565, - 0.1773, 0.3179, 0.4925, 0.6864, 0.8452, 0.9897, 1.1860, 1.3722, - 1.5515, 1.7658, 1.9802, 2.1819, 2.3620, 2.5442, 2.7250, 2.9220, - 0.1286, 0.2341, 0.3689, 0.5364, 0.7176, 0.9350, 1.1083, 1.2943, - 1.4974, 1.7059, 1.9047, 2.1145, 2.3242, 2.5361, 2.7453, 2.9329, - 0.2273, 0.3834, 0.5565, 0.7192, 0.8431, 0.9962, 1.1763, 1.3571, - 1.5774, 1.7419, 1.9202, 2.1131, 2.2919, 2.4898, 2.6895, 2.9180, - 0.1775, 0.3058, 0.4274, 0.6023, 0.8151, 1.0734, 1.3211, 1.5178, - 1.6706, 1.8154, 1.9686, 2.1537, 2.3461, 2.5276, 2.7181, 2.9121, - 0.1653, 0.4304, 0.6361, 0.7824, 0.9183, 1.0452, 1.2071, 1.4077, - 1.6206, 1.8299, 2.0089, 2.1948, 2.3900, 2.5982, 2.7844, 2.9487, - 0.1492, 0.2609, 0.3820, 0.5485, 0.7243, 0.9319, 1.1538, 1.3579, - 1.5266, 1.7002, 1.8873, 2.1016, 2.3175, 2.5221, 2.7241, 2.9243, - 0.2074, 0.3781, 0.5209, 0.6869, 0.8577, 0.9875, 1.1849, 1.3568, - 1.4907, 1.7335, 1.8902, 2.1224, 2.3099, 2.4918, 2.7023, 2.8765, - 0.1359, 0.2254, 0.3286, 0.4432, 0.6586, 0.8964, 1.1125, 1.3523, - 1.5626, 1.7579, 1.9846, 2.1905, 2.3548, 2.5542, 2.7663, 2.9346, - 0.1430, 0.2966, 0.4685, 0.6493, 0.8315, 1.0304, 1.2220, 1.4082, - 1.5995, 1.7888, 1.9774, 2.1737, 2.3607, 2.5577, 2.7558, 2.9405, - 0.1477, 0.2694, 0.4056, 0.5626, 0.7051, 0.8647, 1.0491, 1.2488, - 1.4814, 1.7072, 1.9150, 2.1147, 2.3038, 2.5144, 2.7184, 2.9202, - 0.1690, 0.3033, 0.4580, 0.6686, 0.8536, 1.0293, 1.2124, 1.3998, - 1.5718, 1.7607, 1.9580, 2.1245, 2.2971, 2.4762, 2.6896, 2.9177, - 0.1092, 0.2779, 0.4853, 0.6880, 0.9011, 1.0953, 1.2752, 1.4618, - 1.6623, 1.8484, 2.0264, 2.2152, 2.4017, 2.5835, 2.7671, 2.9436, - 0.1497, 0.3637, 0.6014, 0.8032, 0.9963, 1.1835, 1.3741, 1.5698, - 1.7382, 1.9094, 2.0710, 2.2392, 2.4082, 2.5926, 2.7762, 2.9536, - 0.1434, 0.2492, 0.3966, 0.5934, 0.8033, 1.0657, 1.2796, 1.4276, - 1.5745, 1.7833, 1.9288, 2.1247, 2.3543, 2.5412, 2.7049, 2.8872, - 0.1612, 0.2926, 0.4574, 0.6387, 0.8265, 1.0180, 1.1808, 1.3526, - 1.5564, 1.7536, 1.9187, 2.1192, 2.3149, 2.5006, 2.7101, 2.9217, - 0.0828, 0.1863, 0.3235, 0.5050, 0.7250, 0.9867, 1.2093, 1.3941, - 1.5980, 1.7932, 1.9809, 2.1894, 2.3918, 2.5773, 2.7540, 2.9329, - 0.2001, 0.3655, 0.5290, 0.6761, 0.8027, 0.9972, 1.2090, 1.4255, - 1.6085, 1.7825, 1.9804, 2.1681, 2.3457, 2.5325, 2.7319, 2.9196, - 0.1505, 0.2767, 0.4254, 0.6054, 0.7821, 0.9567, 1.1294, 1.3080, - 1.4984, 1.6954, 1.8666, 2.0736, 2.2875, 2.4969, 2.7072, 2.9163, - 0.1589, 0.4151, 0.5749, 0.6651, 0.8061, 1.0470, 1.2616, 1.3690, - 1.4985, 1.7808, 1.9825, 2.1068, 2.2751, 2.5448, 2.7133, 2.8689, - 0.0916, 0.1846, 0.3788, 0.6329, 0.8774, 1.0687, 1.2653, 1.4561, - 1.6573, 1.8449, 2.0402, 2.2254, 2.3968, 2.5861, 2.7792, 2.9508, - 0.2282, 0.4159, 0.5834, 0.6899, 0.8108, 1.0321, 1.2795, 1.5262, - 1.6936, 1.8469, 2.0922, 2.2607, 2.3795, 2.5301, 2.7386, 2.9530, - 0.1651, 0.3004, 0.4555, 0.6179, 0.7891, 0.9584, 1.1372, 1.3707, - 1.5951, 1.7880, 1.9434, 2.1465, 2.3311, 2.5081, 2.6977, 2.8970, - 0.1279, 0.3828, 0.6330, 0.8323, 0.9652, 1.1175, 1.2319, 1.3511, - 1.5115, 1.6392, 1.7835, 1.9558, 2.2008, 2.4635, 2.6910, 2.9058, - 0.1193, 0.2185, 0.3521, 0.5311, 0.7378, 0.9239, 1.1105, 1.3217, - 1.5362, 1.7504, 1.9536, 2.1627, 2.3560, 2.5506, 2.7548, 2.9453, - 0.1806, 0.3432, 0.4981, 0.6948, 0.8928, 1.0527, 1.2467, 1.4140, - 1.6326, 1.7950, 1.9935, 2.1969, 2.3512, 2.5682, 2.7445, 2.9277, - 0.1846, 0.3112, 0.4568, 0.5891, 0.7317, 0.8493, 1.0204, 1.2022, - 1.3688, 1.6020, 1.8428, 2.0710, 2.2725, 2.4879, 2.7057, 2.9160, - 0.0880, 0.2514, 0.5332, 0.7272, 0.8906, 1.1354, 1.3199, 1.4941, - 1.6010, 1.7151, 1.8712, 2.0643, 2.2755, 2.5375, 2.7054, 2.8891, - 0.1382, 0.2833, 0.4658, 0.6897, 0.9071, 1.0716, 1.2469, 1.4143, - 1.5910, 1.7947, 1.9805, 2.1581, 2.3338, 2.5215, 2.7292, 2.9211, - 0.1061, 0.3494, 0.6327, 0.8570, 0.9748, 1.0560, 1.1529, 1.3250, - 1.6032, 1.8340, 1.9711, 2.1157, 2.3011, 2.5464, 2.8078, 2.9803, - 0.1603, 0.2839, 0.4307, 0.5980, 0.7980, 1.0399, 1.1971, 1.3524, - 1.5715, 1.7838, 1.9468, 2.1498, 2.3627, 2.5514, 2.7327, 2.9148, - 0.1691, 0.3117, 0.4796, 0.6895, 0.8732, 1.0164, 1.1916, 1.3707, - 1.5384, 1.7202, 1.8857, 2.0672, 2.2487, 2.4593, 2.6789, 2.8940, - 0.0965, 0.1702, 0.3191, 0.5721, 0.8100, 1.0241, 1.2272, 1.4196, - 1.6093, 1.8057, 1.9884, 2.2037, 2.3925, 2.5805, 2.7578, 2.9366, - 0.1950, 0.3519, 0.5272, 0.6973, 0.8732, 1.0656, 1.2112, 1.3959, - 1.6116, 1.7821, 1.9445, 2.1592, 2.3348, 2.5142, 2.7440, 2.9297, - 0.1388, 0.2557, 0.4120, 0.5727, 0.7354, 0.9196, 1.0985, 1.2805, - 1.4643, 1.6535, 1.8340, 2.0546, 2.2758, 2.4778, 2.6921, 2.9122, - 0.1823, 0.3336, 0.4957, 0.6771, 0.8563, 1.0137, 1.2299, 1.3849, - 1.5718, 1.7667, 1.9193, 2.1326, 2.3135, 2.5268, 2.7133, 2.8998, - 0.0790, 0.1901, 0.4083, 0.6456, 0.8463, 1.0285, 1.2297, 1.4181, - 1.6159, 1.8056, 1.9971, 2.1912, 2.3816, 2.5746, 2.7692, 2.9497, - 0.0049, 0.0116, 0.0045, 0.0039, -0.0010, -0.0122, -0.0205, -0.0034, --0.0140, -0.0041, 0.0191, -0.0322, 0.0002, -0.0124, -0.0269, 0.0059, - 0.0586, 0.0339, -0.0389, -0.0319, -0.0079, -0.0205, -0.0363, -0.0211, - 0.0241, 0.0595, 0.0469, 0.0283, 0.0176, -0.0183, -0.0173, -0.0004, - 0.0024, 0.0145, 0.0534, 0.0197, -0.0065, -0.0067, 0.0133, 0.0358, --0.0104, -0.0386, -0.0109, -0.0078, 0.0275, 0.0565, 0.0251, -0.0027, --0.0053, 0.0171, 0.0088, 0.0495, 0.0141, 0.0039, -0.0445, -0.0426, --0.0184, -0.0280, -0.0223, 0.0039, -0.0171, -0.0606, -0.0786, -0.0430, - 0.0544, 0.0595, 0.0320, -0.0012, 0.0108, 0.0185, 0.0066, 0.0408, - 0.0552, -0.0073, -0.0247, -0.0480, -0.0288, 0.0186, 0.0212, -0.0013, - 0.0403, 0.0598, 0.0690, 0.0516, -0.0298, -0.0177, 0.0278, 0.0168, --0.0106, 0.0251, 0.0386, 0.0331, -0.0052, 0.0133, 0.0291, -0.0158, --0.0329, -0.0367, 0.0287, 0.0462, -0.0176, 0.0049, 0.0242, -0.0034, - 0.0135, 0.0086, -0.0149, 0.0241, 0.0504, 0.0246, -0.0273, -0.0369, --0.0108, -0.0449, -0.0625, -0.0414, -0.0292, -0.0571, -0.0440, -0.0088, - 0.0098, 0.0009, -0.0004, 0.0007, -0.0314, -0.0208, -0.0138, -0.0277, --0.0044, 0.0522, 0.0315, -0.0270, -0.0277, -0.0256, -0.0103, -0.0201, --0.0287, -0.0279, -0.0182, 0.0472, 0.0613, 0.0450, 0.0413, 0.0333, - 0.0444, 0.0223, 0.0061, 0.0316, 0.0321, 0.0501, 0.0460, 0.0250, - 0.0227, 0.0235, 0.0099, 0.0185, -0.0347, -0.0684, -0.0189, 0.0242, --0.0190, -0.0273, -0.0012, -0.0253, 0.0293, -0.0231, -0.0219, -0.0010, - 0.0153, 0.0128, -0.0166, -0.0435, -0.0417, -0.0121, -0.0351, -0.0390, - 0.0077, -0.0278, -0.0355, 0.0092, -0.0063, 0.0005, 0.0216, 0.0461, - 0.0538, 0.0451, 0.0298, -0.0130, 0.0058, 0.0206, 0.0471, 0.0499, - 0.0280, 0.0086, -0.0007, -0.0317, 0.0259, 0.0176, 0.0043, 0.0212, - 0.0138, 0.0106, 0.0220, -0.0025, 0.0050, 0.0122, -0.0051, -0.0086, --0.0472, -0.0005, 0.0193, 0.0032, 0.0246, 0.0222, 0.0090, -0.0320, --0.0713, -0.0526, -0.0151, -0.0440, -0.0648, -0.0466, -0.0092, 0.0115, --0.0129, 0.0053, -0.0344, -0.0385, 0.0392, 0.0599, 0.0414, 0.0165, --0.0098, -0.0320, -0.0261, -0.0055, -0.0139, -0.0110, 0.0084, 0.0172, --0.0492, -0.0537, -0.0320, -0.0036, 0.0265, 0.0385, 0.0064, -0.0280, --0.0230, 0.0134, 0.0241, 0.0106, 0.0387, 0.0105, 0.0068, 0.0260, - 0.4940, 0.4911, 0.4849, 0.4820, 0.4837, 0.4839, 0.4824, 0.4799, - 0.4812, 0.4782, 0.4788, 0.4711, 0.4706, 0.4671, 0.4601, 0.4578, - 0.2954, 0.2121, 0.1859, 0.1958, 0.1474, 0.1086, 0.1351, 0.1362, - 0.1486, 0.1342, 0.1215, 0.1423, 0.1634, 0.1588, 0.1539, 0.1857 -}, - -.lsp16 = { - 0.1813, 0.3911, 0.6301, 0.8012, 1.0057, 1.2041, 1.4271, 1.6943, - 1.9402, 2.1733, 2.3521, 2.4989, 2.5839, 2.6846, 2.7634, 2.8950, - 0.1311, 0.3183, 0.4659, 0.5601, 0.6658, 0.7828, 1.0065, 1.2717, - 1.5185, 1.7339, 1.9530, 2.2189, 2.3739, 2.4991, 2.6984, 2.9256, - 0.1627, 0.4519, 0.6323, 0.7012, 0.7848, 0.9801, 1.1810, 1.3222, - 1.5413, 1.8129, 1.9338, 2.0809, 2.3180, 2.5189, 2.7066, 2.9514, - 0.1475, 0.2447, 0.4240, 0.5669, 0.7872, 0.9838, 1.1823, 1.3814, - 1.5358, 1.6820, 1.8794, 2.1419, 2.4132, 2.6112, 2.7911, 2.9511, - 0.1224, 0.2876, 0.5013, 0.6985, 0.8902, 1.0901, 1.2835, 1.4768, - 1.6596, 1.8538, 2.0467, 2.2304, 2.4124, 2.5942, 2.7729, 2.9531, - 0.1741, 0.3034, 0.4677, 0.5879, 0.7258, 0.9648, 1.1417, 1.3220, - 1.5081, 1.7151, 1.9212, 2.1286, 2.3208, 2.4938, 2.6765, 2.8891, - 0.1657, 0.3174, 0.4907, 0.6559, 0.8295, 1.0254, 1.2071, 1.3880, - 1.5737, 1.7845, 1.9027, 2.1139, 2.3323, 2.5157, 2.7323, 2.9015, - 0.1592, 0.2758, 0.4417, 0.6315, 0.8257, 0.9873, 1.1277, 1.2830, - 1.4337, 1.6315, 1.8899, 2.1356, 2.3572, 2.5632, 2.7468, 2.9420, - 0.1524, 0.4325, 0.5931, 0.7036, 0.7696, 0.8923, 1.1739, 1.4773, - 1.6609, 1.7911, 1.9666, 2.1972, 2.3754, 2.5045, 2.6613, 2.8882, - 0.2130, 0.3013, 0.3721, 0.4257, 0.5079, 0.7015, 0.9815, 1.2554, - 1.4648, 1.6966, 1.9138, 2.1075, 2.3318, 2.5292, 2.7453, 2.9347, - 0.1142, 0.3748, 0.6205, 0.7642, 0.8121, 0.9022, 0.9843, 1.1558, - 1.4467, 1.7422, 1.9574, 2.1302, 2.3812, 2.5898, 2.7720, 2.9583, - 0.1255, 0.2339, 0.3570, 0.5323, 0.7458, 1.0003, 1.1729, 1.3567, - 1.5217, 1.6977, 1.8924, 2.0942, 2.3145, 2.5408, 2.7553, 2.9337, - 0.1316, 0.2289, 0.4327, 0.6663, 0.8509, 0.9994, 1.1697, 1.3804, - 1.5609, 1.6903, 1.8572, 2.1019, 2.3687, 2.5789, 2.7715, 2.9472, - 0.1502, 0.2546, 0.3883, 0.5333, 0.6976, 0.9163, 1.1071, 1.3364, - 1.5420, 1.7525, 1.8948, 2.0839, 2.2819, 2.4651, 2.6875, 2.8987, - 0.1593, 0.3014, 0.4573, 0.6354, 0.8157, 0.9805, 1.1783, 1.3747, - 1.5678, 1.7326, 1.9286, 2.1340, 2.3253, 2.5280, 2.7180, 2.9298, - 0.1811, 0.3167, 0.4655, 0.6507, 0.8198, 1.0075, 1.1892, 1.3743, - 1.5227, 1.7090, 1.8849, 2.0743, 2.2750, 2.4830, 2.6896, 2.8953, - 0.1846, 0.3577, 0.5315, 0.7290, 0.9176, 1.1016, 1.2654, 1.4525, - 1.6315, 1.8268, 2.0238, 2.1934, 2.3868, 2.5753, 2.7682, 2.9469, - 0.0876, 0.1439, 0.2048, 0.3654, 0.6281, 0.8853, 1.0907, 1.2992, - 1.5227, 1.7373, 1.9395, 2.1419, 2.3488, 2.5486, 2.7466, 2.9348, - 0.1391, 0.4170, 0.6561, 0.7953, 0.8734, 0.9986, 1.1870, 1.4520, - 1.6042, 1.7910, 2.0135, 2.1870, 2.3358, 2.5066, 2.7409, 2.9955, - 0.0804, 0.1355, 0.2599, 0.4998, 0.7408, 0.9474, 1.1276, 1.3428, - 1.5556, 1.7712, 1.9699, 2.1535, 2.3605, 2.5548, 2.7489, 2.9325, - 0.1304, 0.3087, 0.4979, 0.6584, 0.8414, 1.0329, 1.2244, 1.4189, - 1.6118, 1.8200, 1.9985, 2.1893, 2.3915, 2.5794, 2.7647, 2.9344, - 0.1895, 0.2849, 0.3705, 0.4126, 0.6265, 0.9207, 1.1774, 1.3762, - 1.5757, 1.7728, 1.9568, 2.1662, 2.3615, 2.5575, 2.7561, 2.9416, - 0.1800, 0.3078, 0.4805, 0.6796, 0.8503, 1.0046, 1.1703, 1.3269, - 1.4862, 1.6502, 1.8454, 2.0873, 2.3175, 2.5356, 2.7516, 2.9469, - 0.1950, 0.3233, 0.4568, 0.5940, 0.7589, 0.9978, 1.1701, 1.3383, - 1.5017, 1.6565, 1.8243, 2.0605, 2.2938, 2.5147, 2.7419, 2.9396, - 0.2531, 0.4391, 0.5790, 0.7170, 0.8998, 1.1430, 1.3577, 1.5326, - 1.6328, 1.7627, 1.9726, 2.1762, 2.3563, 2.5478, 2.7385, 2.9067, - 0.1805, 0.2788, 0.3591, 0.3881, 0.5441, 0.8055, 1.0766, 1.3165, - 1.5316, 1.7508, 1.9477, 2.1374, 2.3438, 2.5484, 2.7501, 2.9410, - 0.2044, 0.3671, 0.5396, 0.7042, 0.8582, 0.9831, 1.1261, 1.3194, - 1.4769, 1.6979, 1.8717, 2.0463, 2.2620, 2.4739, 2.7054, 2.9208, - 0.1048, 0.2175, 0.4206, 0.5923, 0.7483, 0.9400, 1.1356, 1.3799, - 1.5958, 1.7320, 1.8984, 2.1296, 2.3594, 2.5492, 2.7387, 2.9305, - 0.0842, 0.1729, 0.3951, 0.6447, 0.8688, 1.0605, 1.2472, 1.4330, - 1.6232, 1.8144, 2.0216, 2.1915, 2.3878, 2.5763, 2.7685, 2.9464, - 0.1461, 0.2593, 0.4105, 0.5677, 0.7328, 0.8919, 1.0484, 1.2302, - 1.4386, 1.6635, 1.8873, 2.1024, 2.3116, 2.5268, 2.7273, 2.9269, - 0.1503, 0.3108, 0.4756, 0.6731, 0.8600, 1.0233, 1.2115, 1.3971, - 1.5915, 1.7892, 1.9517, 2.1603, 2.3487, 2.5460, 2.7308, 2.8998, - 0.2163, 0.3669, 0.5125, 0.6709, 0.8143, 0.9930, 1.2095, 1.4205, - 1.6176, 1.7112, 1.8398, 2.0896, 2.3513, 2.5290, 2.6667, 2.8960, - 0.2133, 0.4382, 0.6287, 0.8702, 1.1088, 1.3749, 1.6062, 1.7446, - 1.8333, 1.9122, 1.9614, 2.0669, 2.1789, 2.3449, 2.6038, 2.8849, - 0.1598, 0.2719, 0.3877, 0.4815, 0.5926, 0.7795, 1.0449, 1.3045, - 1.5210, 1.7391, 1.9462, 2.1397, 2.3553, 2.5458, 2.7540, 2.9392, - 0.2918, 0.5607, 0.6801, 0.7404, 0.8285, 0.9431, 1.1579, 1.4080, - 1.6332, 1.8472, 1.9738, 2.0771, 2.2890, 2.5178, 2.7445, 2.9830, - 0.1664, 0.2842, 0.3965, 0.5463, 0.8162, 1.0346, 1.1849, 1.3446, - 1.5122, 1.7563, 1.9960, 2.2002, 2.3796, 2.5689, 2.7712, 2.9550, - 0.0911, 0.2397, 0.5052, 0.7868, 1.0299, 1.1311, 1.2244, 1.3333, - 1.4395, 1.6790, 1.9369, 2.1717, 2.3689, 2.5538, 2.7340, 2.9326, - 0.1647, 0.2931, 0.3836, 0.4978, 0.6255, 0.9243, 1.1339, 1.3001, - 1.5269, 1.8010, 1.9715, 2.1419, 2.3784, 2.5503, 2.6719, 2.8745, - 0.2440, 0.3802, 0.4756, 0.6613, 0.8627, 1.0292, 1.2291, 1.4060, - 1.5198, 1.7354, 1.9044, 2.1010, 2.3147, 2.4996, 2.7171, 2.9041, - 0.1590, 0.2876, 0.4572, 0.5996, 0.7713, 0.9490, 1.1205, 1.2815, - 1.4516, 1.6385, 1.8179, 2.0457, 2.2759, 2.4785, 2.6861, 2.9080, - 0.2297, 0.4309, 0.5712, 0.6717, 0.8138, 1.0463, 1.2492, 1.4560, - 1.6796, 1.8458, 1.9642, 2.1452, 2.3636, 2.5395, 2.7456, 2.9495, - 0.2975, 0.4678, 0.4996, 0.5809, 0.6279, 0.6884, 0.8606, 1.1386, - 1.4412, 1.6876, 1.8760, 2.0932, 2.3178, 2.5166, 2.7345, 2.9280, - 0.1278, 0.3737, 0.6004, 0.7069, 0.8147, 1.0180, 1.2581, 1.3812, - 1.4855, 1.7268, 1.9970, 2.1258, 2.2936, 2.5702, 2.7563, 2.8983, - 0.1314, 0.2508, 0.3999, 0.5680, 0.7424, 0.9367, 1.1286, 1.3175, - 1.5336, 1.7404, 1.9317, 2.1404, 2.3514, 2.5562, 2.7510, 2.9402, - 0.1043, 0.2367, 0.4293, 0.6376, 0.8160, 0.9836, 1.1779, 1.3850, - 1.5835, 1.7875, 1.9765, 2.1593, 2.3654, 2.5577, 2.7465, 2.9398, - 0.1529, 0.2515, 0.3454, 0.4374, 0.7011, 0.9015, 1.0744, 1.3532, - 1.5699, 1.7545, 2.0021, 2.1259, 2.2278, 2.4546, 2.7264, 2.9425, - 0.1429, 0.2808, 0.4395, 0.6334, 0.8069, 0.9705, 1.1520, 1.3250, - 1.5109, 1.7285, 1.9356, 2.1469, 2.3479, 2.5554, 2.7512, 2.9348, - 0.1625, 0.3022, 0.4756, 0.6315, 0.8032, 0.9924, 1.1596, 1.3204, - 1.4994, 1.6929, 1.8955, 2.1090, 2.3025, 2.5018, 2.6908, 2.8980, - 0.1692, 0.3427, 0.5228, 0.7756, 0.9688, 1.0950, 1.3056, 1.4360, - 1.5675, 1.8049, 1.9376, 2.1151, 2.3407, 2.5012, 2.7192, 2.9258, - 0.0474, 0.1251, 0.1939, 0.3841, 0.6501, 0.9231, 1.1153, 1.3240, - 1.5478, 1.7599, 1.9651, 2.1510, 2.3645, 2.5552, 2.7542, 2.9393, - 0.2196, 0.4656, 0.7492, 0.9922, 1.1678, 1.2489, 1.3112, 1.3657, - 1.4223, 1.5302, 1.7212, 1.9996, 2.2523, 2.4844, 2.7036, 2.9145, - 0.1128, 0.2368, 0.3704, 0.5476, 0.7723, 0.9968, 1.1930, 1.3992, - 1.6013, 1.7957, 1.9888, 2.1857, 2.3825, 2.5705, 2.7616, 2.9434, - 0.1341, 0.2768, 0.4510, 0.6359, 0.8332, 1.0335, 1.2004, 1.3952, - 1.5762, 1.7681, 1.9815, 2.1735, 2.3657, 2.5552, 2.7514, 2.9498, - 0.1247, 0.2559, 0.3516, 0.4726, 0.6861, 0.9483, 1.1852, 1.3858, - 1.5851, 1.7815, 1.9778, 2.1737, 2.3729, 2.5664, 2.7620, 2.9429, - 0.1988, 0.3320, 0.4777, 0.6737, 0.8425, 1.0265, 1.1694, 1.3655, - 1.5463, 1.7135, 1.9385, 2.1650, 2.3529, 2.5367, 2.7545, 2.9585, - 0.1376, 0.2620, 0.4273, 0.6169, 0.7755, 0.9441, 1.1169, 1.3157, - 1.5179, 1.7020, 1.8931, 2.1059, 2.3112, 2.5136, 2.7169, 2.9198, - 0.2112, 0.4385, 0.6091, 0.7618, 0.9553, 1.1543, 1.3445, 1.5396, - 1.7153, 1.9192, 2.1263, 2.3593, 2.5958, 2.8171, 2.9394, 3.0409, - 0.1347, 0.2099, 0.2646, 0.3453, 0.5266, 0.7869, 1.0513, 1.2795, - 1.4880, 1.7181, 1.9294, 2.1332, 2.3362, 2.5442, 2.7433, 2.9362, - 0.3141, 0.5935, 0.7517, 0.8313, 0.8568, 0.9570, 1.0250, 1.1275, - 1.3422, 1.6303, 1.8577, 2.0705, 2.2957, 2.5095, 2.7244, 2.9262, - 0.0962, 0.2116, 0.3961, 0.5641, 0.7122, 0.8883, 1.1023, 1.3481, - 1.5623, 1.7554, 1.9618, 2.1675, 2.3706, 2.5556, 2.7430, 2.9337, - 0.0898, 0.1510, 0.3060, 0.5820, 0.8221, 1.0388, 1.2261, 1.4289, - 1.6054, 1.8103, 1.9941, 2.1844, 2.3742, 2.5711, 2.7632, 2.9474, - 0.1326, 0.2316, 0.3761, 0.5177, 0.6782, 0.8761, 1.0952, 1.3175, - 1.5078, 1.7034, 1.9051, 2.1245, 2.3424, 2.5484, 2.7444, 2.9389, - 0.1740, 0.3293, 0.5174, 0.6824, 0.8394, 1.0372, 1.2046, 1.3723, - 1.5656, 1.7444, 1.9442, 2.1386, 2.3139, 2.4960, 2.7071, 2.9297, - 0.2304, 0.3775, 0.4865, 0.6182, 0.7842, 0.9208, 1.1151, 1.2843, - 1.4641, 1.6988, 1.9209, 2.1260, 2.3099, 2.5229, 2.7414, 2.9276, - 0.0094, 0.0261, -0.0037, 0.0041, -0.0092, -0.0044, -0.0232, -0.0073, --0.0047, -0.0021, 0.0250, -0.0580, -0.0140, -0.0342, -0.0586, 0.0020, - 0.0449, 0.0155, -0.0523, -0.0279, 0.0299, -0.0183, -0.0736, -0.0639, --0.0017, 0.0336, 0.0209, 0.0046, 0.0077, -0.0148, -0.0114, -0.0120, - 0.0115, -0.0050, 0.0445, 0.0048, 0.0188, -0.0137, -0.0080, 0.0239, --0.0184, -0.0524, -0.0195, -0.0126, 0.0284, 0.0632, 0.0141, -0.0093, --0.0096, 0.0196, 0.0230, 0.0379, 0.0308, 0.0237, -0.0224, -0.0600, --0.0755, -0.1074, -0.0988, -0.0606, -0.1038, -0.1552, -0.1480, -0.0672, - 0.0504, 0.0676, 0.0336, -0.0042, 0.0729, 0.1013, 0.0868, 0.0846, - 0.0954, 0.0515, -0.0066, -0.0851, -0.0485, 0.0294, 0.0395, 0.0087, - 0.0078, 0.0446, 0.0881, 0.0672, -0.0384, -0.0025, 0.0415, 0.0353, - 0.0080, 0.0052, 0.0190, 0.0182, 0.0069, 0.0168, 0.0374, 0.0037, --0.0292, -0.0429, 0.0302, 0.0681, -0.0233, -0.0238, -0.0003, -0.0043, - 0.0054, -0.0029, -0.0149, 0.0642, 0.0622, 0.0341, -0.0232, -0.0461, --0.0082, -0.0469, -0.0618, -0.0326, -0.0452, -0.0649, -0.0597, -0.0398, --0.0318, -0.0116, 0.0011, 0.0009, -0.0384, -0.0384, -0.0156, -0.0260, --0.0007, 0.0473, 0.0111, -0.0358, -0.0484, -0.0204, -0.0029, -0.0090, --0.0285, -0.0495, -0.0376, 0.0917, 0.1192, 0.1026, 0.0745, 0.0397, - 0.0463, 0.0253, 0.0025, 0.0465, 0.0100, 0.0488, 0.0416, 0.0223, - 0.0263, 0.0072, -0.0053, 0.0595, 0.0060, -0.0518, -0.0316, -0.0043, --0.0133, -0.0233, -0.0075, -0.0251, 0.0277, -0.0067, -0.0136, -0.0004, - 0.0235, 0.0112, -0.0182, -0.0324, -0.0210, -0.0035, -0.0395, -0.0384, - 0.0005, -0.0150, -0.0356, 0.0127, -0.0033, -0.0034, 0.0205, 0.0747, - 0.1138, 0.1015, 0.0995, -0.0161, -0.0045, 0.0129, 0.0472, 0.0575, - 0.0222, 0.0091, 0.0037, -0.0471, 0.0371, 0.0132, 0.0208, 0.0247, - 0.0117, 0.0164, 0.0225, 0.0124, -0.0023, 0.0088, -0.0046, 0.0047, --0.0393, 0.0018, 0.0148, 0.0020, 0.0044, 0.0165, 0.0229, -0.0208, --0.0477, -0.0310, -0.0164, -0.0390, -0.0764, -0.0525, -0.0094, 0.0075, --0.0102, -0.0045, -0.0504, -0.0709, 0.0822, 0.0710, 0.0426, 0.0014, --0.0371, -0.0400, -0.0157, -0.0155, -0.0173, -0.0138, -0.0015, 0.0134, --0.0418, -0.0682, -0.0256, 0.0050, 0.0360, 0.0354, 0.0074, -0.0396, --0.0235, 0.0284, 0.0494, 0.0153, 0.0448, 0.0025, -0.0061, 0.0252, - 0.1000, 0.2260, 0.2158, 0.2116, 0.2198, 0.2055, 0.2110, 0.1873, - 0.1907, 0.2071, 0.2164, 0.2009, 0.2059, 0.2124, 0.2141, 0.2093, - 0.0875, 0.0981, 0.1177, 0.1071, 0.1033, 0.1248, 0.1048, 0.1238, - 0.1166, 0.1008, 0.1062, 0.0992, 0.0994, 0.1067, 0.0999, 0.1187, - 0.0750, 0.0794, 0.0828, 0.0854, 0.0859, 0.0801, 0.0891, 0.0933, - 0.0969, 0.0920, 0.0915, 0.0862, 0.0868, 0.0891, 0.0842, 0.0824, - 0.0625, 0.0930, 0.0815, 0.0853, 0.0898, 0.0828, 0.0822, 0.0910, - 0.0873, 0.0906, 0.0856, 0.0840, 0.0774, 0.0785, 0.0684, 0.0711, - 0.3319, 0.4219, 0.4588, 0.4090, 0.4092, 0.4014, 0.3548, 0.3353, - 0.3708, 0.3352, 0.3720, 0.3538, 0.4084, 0.4289, 0.4060, 0.4210, - 0.0588, 0.0209, -0.0082, -0.0115, -0.0343, -0.0621, -0.0541, -0.0346, --0.0346, -0.0366, -0.0220, -0.0265, -0.0102, 0.0374, 0.0306, 0.0404, - 0.0306, 0.0090, -0.0054, 0.0333, 0.0047, 0.0238, 0.0141, 0.0165, - 0.0306, 0.0420, 0.0159, 0.0124, 0.0414, 0.0158, -0.0237, 0.0141, - 0.0765, 0.0057, -0.0260, -0.0426, -0.0395, -0.0126, -0.0579, -0.0417 -}, - -.lsp22_1 = { - 0.0664, 0.1875, 0.4300, 0.6730, 0.8793, 1.0640, 1.2563, 1.4433, - 1.6394, 1.8176, 2.0029, 2.1921, 2.3796, 2.5671, 2.7595, 2.9536, - 0.2128, 0.4052, 0.5311, 0.6404, 0.7875, 0.8775, 1.0974, 1.3261, - 1.5563, 1.6790, 1.8339, 2.1195, 2.3226, 2.4609, 2.6440, 2.8947, - 0.2024, 0.3362, 0.4834, 0.6784, 0.9088, 1.0850, 1.2188, 1.4054, - 1.6102, 1.7767, 1.9679, 2.1436, 2.3445, 2.5467, 2.7429, 2.9320, - 0.1181, 0.2279, 0.4413, 0.6114, 0.7710, 0.9427, 1.1142, 1.2707, - 1.4892, 1.7416, 1.9526, 2.1466, 2.3629, 2.5445, 2.7293, 2.9205, - 0.1155, 0.2720, 0.4886, 0.6812, 0.8594, 1.0422, 1.2315, 1.4116, - 1.6137, 1.8020, 1.9758, 2.1743, 2.3602, 2.5568, 2.7472, 2.9374, - 0.1110, 0.3312, 0.4735, 0.5612, 0.7129, 0.8146, 1.0233, 1.3155, - 1.5765, 1.7746, 1.9574, 2.1416, 2.3220, 2.5384, 2.7334, 2.9318, - 0.1656, 0.3350, 0.4215, 0.5609, 0.6759, 0.8503, 1.1405, 1.4094, - 1.6057, 1.6860, 1.7639, 2.0031, 2.2680, 2.5076, 2.7263, 2.9368, - 0.1466, 0.3638, 0.4587, 0.5674, 0.7381, 0.8669, 0.9619, 1.1658, - 1.4667, 1.7440, 1.9335, 2.1018, 2.3022, 2.5281, 2.7359, 2.9261, - 0.1061, 0.2566, 0.4739, 0.6751, 0.8711, 1.0704, 1.2720, 1.4655, - 1.6605, 1.8494, 2.0290, 2.2197, 2.4008, 2.5912, 2.7772, 2.9513, - 0.1116, 0.2364, 0.3971, 0.6316, 0.8583, 1.0335, 1.1686, 1.3302, - 1.5612, 1.7877, 1.9829, 2.2052, 2.3596, 2.5460, 2.7341, 2.9290, - 0.2661, 0.4186, 0.5126, 0.6477, 0.8818, 1.1045, 1.2852, 1.4128, - 1.5851, 1.7593, 1.9399, 2.1757, 2.3684, 2.5136, 2.6927, 2.9064, - 0.1495, 0.2749, 0.4391, 0.6304, 0.8239, 1.0181, 1.1995, 1.3759, - 1.5669, 1.7722, 1.9671, 2.1635, 2.3586, 2.5528, 2.7445, 2.9311, - 0.0912, 0.1759, 0.3066, 0.5660, 0.8005, 0.9568, 1.1832, 1.4504, - 1.6259, 1.7948, 2.0113, 2.2002, 2.3654, 2.5583, 2.7929, 2.9735, - 0.1353, 0.2747, 0.4078, 0.5977, 0.7658, 0.9124, 1.1081, 1.3630, - 1.5875, 1.7847, 1.9323, 2.1181, 2.3321, 2.5046, 2.7183, 2.9225, - 0.1938, 0.4063, 0.4982, 0.6002, 0.7702, 0.9071, 1.1631, 1.3885, - 1.6043, 1.8118, 1.9306, 2.0893, 2.2724, 2.4609, 2.6283, 2.8802, - 0.1857, 0.3351, 0.4381, 0.6101, 0.7561, 0.8555, 1.0384, 1.3171, - 1.5667, 1.6904, 1.7552, 1.9689, 2.2597, 2.5260, 2.7272, 2.9337, - 0.1037, 0.2159, 0.4188, 0.6174, 0.8035, 1.0285, 1.2256, 1.4230, - 1.6400, 1.8322, 2.0144, 2.1988, 2.3810, 2.5682, 2.7613, 2.9438, - 0.1625, 0.2776, 0.4225, 0.6001, 0.7879, 0.9087, 1.0801, 1.2759, - 1.4899, 1.7448, 1.9911, 2.1770, 2.3723, 2.5777, 2.7971, 2.9444, - 0.2111, 0.3640, 0.5839, 0.7290, 0.8051, 1.0023, 1.2315, 1.4143, - 1.5878, 1.7755, 1.9804, 2.1498, 2.3312, 2.5350, 2.7613, 2.9472, - 0.1423, 0.2646, 0.4136, 0.6350, 0.8070, 0.9514, 1.1168, 1.3213, - 1.5776, 1.7721, 1.9404, 2.1545, 2.3385, 2.5137, 2.7396, 2.9553, - 0.1132, 0.2386, 0.4103, 0.5931, 0.7808, 0.9881, 1.1840, 1.3860, - 1.6021, 1.7990, 1.9922, 2.1885, 2.3852, 2.5717, 2.7640, 2.9510, - 0.1267, 0.2602, 0.3913, 0.5944, 0.7598, 0.9198, 1.0781, 1.2715, - 1.5299, 1.7573, 1.9308, 2.1346, 2.3267, 2.5419, 2.7466, 2.9320, - 0.2023, 0.3417, 0.4392, 0.6141, 0.7439, 0.8593, 1.1096, 1.3543, - 1.5185, 1.6553, 1.7862, 2.0341, 2.2718, 2.4834, 2.7103, 2.9466, - 0.1113, 0.2470, 0.3677, 0.5686, 0.7700, 0.9356, 1.0806, 1.2452, - 1.4830, 1.7344, 1.9268, 2.1404, 2.3371, 2.5169, 2.7329, 2.9012, - 0.1664, 0.3554, 0.5573, 0.7471, 0.9245, 1.0998, 1.2787, 1.4655, - 1.6654, 1.8346, 2.0179, 2.2159, 2.4096, 2.5946, 2.7790, 2.9530, - 0.1313, 0.2625, 0.4731, 0.6444, 0.8110, 0.9878, 1.1493, 1.3212, - 1.5719, 1.8138, 1.9861, 2.1943, 2.3714, 2.5578, 2.7346, 2.9296, - 0.1186, 0.3035, 0.5049, 0.6860, 0.8670, 0.9975, 1.1364, 1.3471, - 1.5695, 1.7412, 1.9346, 2.1506, 2.3413, 2.5531, 2.7794, 2.9627, - 0.1108, 0.2697, 0.4787, 0.6344, 0.7909, 0.9586, 1.1440, 1.3511, - 1.5686, 1.7601, 1.9246, 2.1241, 2.3293, 2.5390, 2.7315, 2.9333, - 0.0985, 0.2302, 0.3544, 0.5759, 0.7620, 0.9651, 1.1497, 1.3080, - 1.5500, 1.7845, 1.9518, 2.1734, 2.3565, 2.5665, 2.7605, 2.9102, - 0.1208, 0.2727, 0.4381, 0.5736, 0.7382, 0.8390, 1.0102, 1.2648, - 1.5100, 1.7440, 1.9619, 2.1430, 2.3307, 2.5159, 2.7264, 2.9211, - 0.1582, 0.2777, 0.4475, 0.6551, 0.8591, 1.0084, 1.1414, 1.3291, - 1.5902, 1.7826, 1.9543, 2.1659, 2.3233, 2.5044, 2.6935, 2.9199, - 0.1360, 0.2873, 0.4585, 0.6295, 0.7592, 0.9089, 1.0492, 1.2733, - 1.5391, 1.7768, 1.9372, 2.1329, 2.3168, 2.5015, 2.6857, 2.8837, - 0.0886, 0.1829, 0.3696, 0.6126, 0.8334, 1.0135, 1.2303, 1.4674, - 1.6743, 1.8564, 2.0530, 2.2370, 2.3960, 2.5787, 2.7756, 2.9377, - 0.2005, 0.3537, 0.4700, 0.6249, 0.7385, 0.9097, 1.1759, 1.3811, - 1.5314, 1.6705, 1.8546, 2.1229, 2.3292, 2.5251, 2.7951, 2.9646, - 0.1999, 0.3112, 0.4722, 0.7146, 0.8908, 1.0028, 1.1831, 1.3903, - 1.6125, 1.7514, 1.9083, 2.1248, 2.3271, 2.5339, 2.6945, 2.8918, - 0.1243, 0.2606, 0.4382, 0.5850, 0.7705, 0.9727, 1.1214, 1.3059, - 1.5218, 1.7406, 1.9137, 2.1353, 2.3354, 2.5299, 2.7287, 2.9068, - 0.1039, 0.2426, 0.4265, 0.6284, 0.8152, 0.9941, 1.2004, 1.4038, - 1.5912, 1.7763, 1.9650, 2.1598, 2.3474, 2.5488, 2.7419, 2.9322, - 0.1364, 0.2420, 0.3886, 0.5864, 0.7663, 0.8844, 1.0860, 1.3242, - 1.5518, 1.7893, 2.0004, 2.1562, 2.3619, 2.5516, 2.7687, 2.9181, - 0.1483, 0.2851, 0.4479, 0.6312, 0.7924, 0.9821, 1.1705, 1.3386, - 1.5375, 1.7226, 1.9053, 2.0991, 2.2898, 2.4953, 2.7000, 2.9146, - 0.2332, 0.4561, 0.5407, 0.6212, 0.7524, 0.8215, 0.9522, 1.1685, - 1.5216, 1.7132, 1.8291, 2.0647, 2.2811, 2.4857, 2.7071, 2.9281, - 0.1348, 0.3126, 0.5179, 0.7192, 0.9227, 1.1363, 1.3223, 1.4756, - 1.6509, 1.8191, 1.9991, 2.1976, 2.3877, 2.5768, 2.7590, 2.9386, - 0.1093, 0.2211, 0.4763, 0.6703, 0.8282, 0.9536, 1.1202, 1.3796, - 1.6043, 1.8031, 1.9832, 2.1604, 2.3578, 2.5856, 2.7650, 2.9291, - 0.1865, 0.3027, 0.4580, 0.6719, 0.8400, 1.0082, 1.1901, 1.3782, - 1.5448, 1.6885, 1.9477, 2.1381, 2.2797, 2.5113, 2.7465, 2.9414, - 0.1575, 0.3124, 0.4649, 0.6262, 0.8095, 0.9858, 1.1676, 1.3602, - 1.5646, 1.7582, 1.9550, 2.1671, 2.3628, 2.5734, 2.7670, 2.9519, - 0.1174, 0.2777, 0.4663, 0.6333, 0.8169, 1.0096, 1.1885, 1.3847, - 1.5803, 1.7571, 1.9380, 2.1398, 2.3414, 2.5407, 2.7360, 2.9375, - 0.1073, 0.2264, 0.4083, 0.5973, 0.7474, 0.9514, 1.1349, 1.3337, - 1.5433, 1.7348, 1.9380, 2.1436, 2.3441, 2.5438, 2.7457, 2.9383, - 0.1472, 0.2880, 0.4793, 0.6268, 0.8015, 1.0063, 1.1715, 1.3644, - 1.5525, 1.7410, 1.9258, 2.1227, 2.3214, 2.5149, 2.7148, 2.9196, - 0.1414, 0.2565, 0.4349, 0.6111, 0.7695, 0.9496, 1.1212, 1.3265, - 1.5218, 1.7209, 1.9015, 2.0887, 2.3158, 2.5077, 2.7233, 2.9421, - 0.1252, 0.2667, 0.4454, 0.6431, 0.8371, 1.0124, 1.2110, 1.4160, - 1.6240, 1.8242, 2.0047, 2.1974, 2.3902, 2.5778, 2.7637, 2.9481, - 0.1321, 0.2565, 0.3846, 0.5847, 0.7578, 0.9259, 1.0637, 1.2239, - 1.4690, 1.7346, 1.9750, 2.1882, 2.3712, 2.5509, 2.7280, 2.8885, - 0.1437, 0.2930, 0.4428, 0.6156, 0.8045, 0.9638, 1.1450, 1.3138, - 1.5144, 1.7355, 1.9469, 2.1534, 2.3414, 2.5452, 2.7353, 2.9334, - 0.1692, 0.2770, 0.3831, 0.6100, 0.7825, 0.9302, 1.0690, 1.2481, - 1.4615, 1.6799, 1.9165, 2.1739, 2.3435, 2.5349, 2.7520, 2.9163, - 0.1235, 0.2489, 0.4354, 0.6343, 0.8236, 1.0066, 1.1908, 1.3474, - 1.5656, 1.8275, 2.0620, 2.2548, 2.4135, 2.5913, 2.7639, 2.9334, - 0.1090, 0.1961, 0.3854, 0.5701, 0.7024, 0.8843, 1.1393, 1.3785, - 1.5940, 1.7797, 1.9442, 2.1740, 2.3853, 2.5773, 2.7727, 2.9406, - 0.1560, 0.3477, 0.5011, 0.6287, 0.7612, 0.9896, 1.1510, 1.3420, - 1.5435, 1.6816, 1.8731, 2.0651, 2.2613, 2.4999, 2.7027, 2.8971, - 0.1459, 0.2416, 0.3833, 0.5450, 0.7916, 0.9223, 1.0662, 1.1953, - 1.4029, 1.6616, 1.9320, 2.1459, 2.3386, 2.5081, 2.6799, 2.9195, - 0.1546, 0.3854, 0.6184, 0.8460, 1.0599, 1.2428, 1.3906, 1.5550, - 1.7388, 1.8945, 2.0757, 2.2386, 2.4014, 2.5705, 2.7574, 2.9400, - 0.1080, 0.2307, 0.4112, 0.6067, 0.7725, 0.9467, 1.1285, 1.3205, - 1.5348, 1.7609, 1.9937, 2.1878, 2.3583, 2.5515, 2.7199, 2.9049, - 0.1482, 0.3178, 0.4983, 0.6342, 0.7783, 0.9880, 1.2019, 1.3404, - 1.5223, 1.7296, 1.9211, 2.0943, 2.2928, 2.5008, 2.7136, 2.9224, - 0.1145, 0.2910, 0.4891, 0.6492, 0.8126, 0.9530, 1.1180, 1.3155, - 1.5054, 1.6893, 1.8899, 2.1188, 2.3389, 2.5512, 2.7313, 2.9224, - 0.0939, 0.1689, 0.3250, 0.5792, 0.7698, 0.9245, 1.1574, 1.3865, - 1.5959, 1.7977, 1.9821, 2.1528, 2.3326, 2.5540, 2.7553, 2.9179, - 0.1243, 0.2474, 0.3923, 0.6199, 0.7908, 0.9379, 1.1497, 1.3734, - 1.5582, 1.7420, 1.9539, 2.1385, 2.3240, 2.5277, 2.7311, 2.9178, - 0.1961, 0.3748, 0.5176, 0.6387, 0.8169, 1.0477, 1.2124, 1.3869, - 1.5604, 1.7225, 1.8770, 2.0837, 2.2960, 2.5103, 2.6945, 2.8862, - 0.1295, 0.2403, 0.4149, 0.6189, 0.7913, 0.9130, 1.0832, 1.2787, - 1.4860, 1.7112, 1.9502, 2.1348, 2.2776, 2.4982, 2.7431, 2.9522, - 0.0160, 0.0362, 0.0097, 0.0057, -0.0014, -0.0073, -0.0046, -0.0064, --0.0121, 0.0019, 0.0149, -0.0440, -0.0479, -0.0382, -0.0480, -0.0182, - 0.0170, 0.0114, -0.0298, -0.0175, -0.0033, -0.0354, -0.0510, -0.0025, - 0.0307, 0.0351, 0.0338, 0.0420, 0.0138, -0.0175, -0.0102, 0.0053, - 0.0084, -0.0003, 0.0412, -0.0027, 0.0145, -0.0039, 0.0083, 0.0400, - 0.0001, -0.0262, 0.0055, -0.0082, 0.0348, 0.0433, 0.0137, -0.0024, --0.0055, 0.0262, 0.0521, 0.0349, 0.0185, 0.0076, -0.0319, -0.0561, --0.0460, -0.0253, -0.0097, 0.0163, 0.0184, -0.0037, -0.0480, -0.0371, - 0.0628, 0.0665, 0.0296, -0.0057, 0.0253, 0.0227, 0.0350, 0.0692, - 0.0545, 0.0218, 0.0094, -0.0449, -0.0372, 0.0005, 0.0258, 0.0118, - 0.0285, 0.0760, 0.0822, 0.0527, -0.0299, -0.0049, 0.0170, 0.0195, - 0.0136, 0.0286, 0.0289, 0.0139, 0.0054, 0.0152, 0.0244, 0.0028, --0.0056, -0.0260, 0.0307, 0.0572, -0.0087, 0.0088, 0.0062, 0.0000, - 0.0125, 0.0000, -0.0292, 0.0820, 0.0872, 0.0646, 0.0346, 0.0076, --0.0022, -0.0253, -0.0567, -0.0188, -0.0336, -0.0673, -0.0549, -0.0166, --0.0259, -0.0140, 0.0040, -0.0029, -0.0430, -0.0531, -0.0253, -0.0019, --0.0071, 0.0393, 0.0072, -0.0327, -0.0236, -0.0235, -0.0177, -0.0186, --0.0280, -0.0201, -0.0077, 0.0383, 0.0418, 0.0321, 0.0294, 0.0169, - 0.0468, 0.0301, 0.0133, 0.0363, 0.0516, 0.0937, 0.1240, 0.1404, - 0.1325, 0.1178, 0.0999, 0.0251, -0.0037, -0.0495, -0.0703, -0.0219, --0.0261, -0.0304, -0.0204, -0.0372, 0.0355, 0.0131, -0.0093, -0.0099, --0.0069, -0.0034, -0.0065, -0.0208, -0.0231, -0.0117, -0.0211, -0.0243, - 0.0046, -0.0107, -0.0070, 0.0123, 0.0230, 0.0152, 0.0164, 0.0412, - 0.0619, 0.0858, 0.0862, -0.0056, 0.0125, 0.0182, 0.0347, 0.0388, - 0.0456, 0.0407, -0.0249, -0.0460, 0.0206, 0.0299, 0.0253, 0.0207, - 0.0177, 0.0238, 0.0253, 0.0030, 0.0042, 0.0020, -0.0081, -0.0136, --0.0290, -0.0042, 0.0122, 0.0051, 0.0107, 0.0228, 0.0211, -0.0068, --0.0436, -0.0299, -0.0078, -0.0779, -0.1157, -0.0679, 0.0172, 0.0150, --0.0051, 0.0081, -0.0512, -0.0616, 0.0576, 0.0799, 0.0803, 0.0336, - 0.0001, -0.0298, -0.0747, -0.0115, -0.0101, -0.0170, -0.0050, 0.0174, --0.0290, -0.0601, -0.0150, 0.0121, 0.0165, 0.0230, 0.0028, -0.0317, --0.0165, 0.0356, 0.0451, 0.0120, 0.0321, 0.0084, -0.0058, 0.0122, - 0.1935, 0.1802, 0.2195, 0.2410, 0.2201, 0.1915, 0.1840, 0.1935, - 0.2213, 0.2079, 0.1858, 0.1974, 0.2239, 0.2173, 0.1840, 0.2120, - 0.4912, 0.4777, 0.4607, 0.4395, 0.4426, 0.4388, 0.4416, 0.4345, - 0.4239, 0.4331, 0.4522, 0.4423, 0.4475, 0.4387, 0.4525, 0.4446 -}, - .lsp22_2 = { 0.0712, 0.1830, 0.4167, 0.6669, 0.8738, 1.0696, 1.2555, 1.4426, 1.6427, 1.8138, 1.9966, 2.1925, 2.3872, 2.5748, 2.7713, 2.9597, @@ -10781,213 +10198,6 @@ static const struct twinvq_data { 0.4938, 0.4951, 0.4994, 0.4971, 0.4981, 0.4983, 0.4967, 0.4789 }, -.lsp44 = { - 0.0927, 0.2291, 0.4059, 0.5779, 0.7288, 0.8821, 1.0377, 1.1915, - 1.3433, 1.4931, 1.6475, 1.7989, 1.9381, 2.0858, 2.2321, 2.3765, - 2.5187, 2.6530, 2.7895, 2.9354, 0.0944, 0.1974, 0.3046, 0.4714, - 0.6116, 0.7829, 0.9027, 1.0375, 1.1869, 1.3488, 1.5036, 1.6781, - 1.8276, 1.9983, 2.1449, 2.3089, 2.4534, 2.6113, 2.7553, 2.9062, - 0.1168, 0.2843, 0.4907, 0.6706, 0.8100, 0.9417, 1.0753, 1.2014, - 1.3151, 1.4496, 1.5832, 1.7379, 1.8642, 2.0230, 2.1681, 2.3250, - 2.4676, 2.6242, 2.7602, 2.9066, 0.1353, 0.2335, 0.3370, 0.4380, - 0.5819, 0.7353, 0.8671, 1.0160, 1.1435, 1.2977, 1.4860, 1.6739, - 1.8412, 2.0028, 2.1537, 2.3124, 2.4741, 2.6272, 2.7862, 2.9536, - 0.1003, 0.2226, 0.3584, 0.4971, 0.6291, 0.7710, 0.9157, 1.0669, - 1.2143, 1.3624, 1.5104, 1.6681, 1.8164, 1.9823, 2.1394, 2.3082, - 2.4677, 2.6306, 2.7909, 2.9382, 0.1056, 0.2027, 0.2956, 0.4005, - 0.5215, 0.6708, 0.8545, 1.0557, 1.2344, 1.4023, 1.5676, 1.7278, - 1.8808, 2.0381, 2.1846, 2.3376, 2.4887, 2.6377, 2.7878, 2.9504, - 0.1015, 0.2462, 0.4122, 0.5783, 0.7233, 0.8833, 1.0377, 1.1903, - 1.3341, 1.4727, 1.6138, 1.7582, 1.8912, 2.0370, 2.1701, 2.3125, - 2.4500, 2.6006, 2.7507, 2.9166, 0.1787, 0.2418, 0.3265, 0.5379, - 0.6584, 0.7681, 0.9545, 1.1050, 1.2125, 1.3528, 1.4763, 1.6705, - 1.8136, 1.9594, 2.0936, 2.2724, 2.4394, 2.5919, 2.7037, 2.8747, - 0.0859, 0.1600, 0.2980, 0.4933, 0.6696, 0.8285, 0.9958, 1.1545, - 1.3107, 1.4591, 1.6127, 1.7652, 1.9143, 2.0680, 2.2171, 2.3643, - 2.5141, 2.6611, 2.8143, 2.9691, 0.0910, 0.2110, 0.3364, 0.4718, - 0.5856, 0.7298, 0.8910, 1.0514, 1.1988, 1.3572, 1.5178, 1.6861, - 1.8399, 2.0099, 2.1639, 2.3225, 2.4774, 2.6321, 2.7863, 2.9412, - 0.1904, 0.2874, 0.3681, 0.4981, 0.6248, 0.7880, 0.9121, 1.0750, - 1.2185, 1.3809, 1.5296, 1.7007, 1.8592, 2.0470, 2.1913, 2.3250, - 2.4519, 2.5984, 2.7408, 2.9023, 0.0917, 0.2067, 0.3246, 0.4961, - 0.6310, 0.8024, 0.9438, 1.1008, 1.2362, 1.3892, 1.5407, 1.7033, - 1.8427, 2.0061, 2.1498, 2.3117, 2.4550, 2.6053, 2.7462, 2.9029, - 0.0989, 0.2193, 0.3756, 0.5410, 0.6929, 0.8368, 0.9801, 1.1250, - 1.2677, 1.4184, 1.5677, 1.7292, 1.8770, 2.0311, 2.1803, 2.3306, - 2.4836, 2.6339, 2.7943, 2.9549, 0.0861, 0.1943, 0.3057, 0.4867, - 0.6194, 0.7592, 0.9184, 1.1052, 1.2486, 1.4064, 1.5609, 1.7273, - 1.8703, 2.0291, 2.1686, 2.3225, 2.4628, 2.6115, 2.7471, 2.9005, - 0.0932, 0.2110, 0.3737, 0.5479, 0.7120, 0.8570, 0.9975, 1.1364, - 1.2772, 1.4220, 1.5612, 1.7089, 1.8410, 1.9827, 2.1263, 2.2859, - 2.4459, 2.6172, 2.7788, 2.9395, 0.1193, 0.2341, 0.3523, 0.5029, - 0.6437, 0.7803, 0.9367, 1.1007, 1.2392, 1.3869, 1.5425, 1.7168, - 1.8709, 2.0248, 2.1584, 2.2949, 2.4308, 2.5823, 2.7235, 2.9034, - 0.0834, 0.1988, 0.3557, 0.5261, 0.6767, 0.8427, 1.0029, 1.1683, - 1.3138, 1.4527, 1.6046, 1.7583, 1.9011, 2.0517, 2.1928, 2.3397, - 2.4839, 2.6291, 2.7771, 2.9329, 0.0938, 0.1967, 0.3213, 0.4675, - 0.6068, 0.7664, 0.9418, 1.1120, 1.2535, 1.3932, 1.5243, 1.6801, - 1.8346, 1.9931, 2.1376, 2.3035, 2.4636, 2.6244, 2.7829, 2.9371, - 0.1017, 0.2552, 0.4327, 0.6017, 0.7467, 0.8797, 1.0097, 1.1442, - 1.2628, 1.4049, 1.5541, 1.7090, 1.8461, 1.9982, 2.1486, 2.3029, - 2.4513, 2.6075, 2.7594, 2.9209, 0.1031, 0.2295, 0.3747, 0.5122, - 0.6596, 0.7935, 0.9345, 1.1050, 1.2384, 1.3543, 1.4739, 1.6136, - 1.7447, 1.8914, 2.0434, 2.1916, 2.3557, 2.5396, 2.7419, 2.9401, - 0.1007, 0.2374, 0.3715, 0.5173, 0.6465, 0.8069, 0.9553, 1.1145, - 1.2594, 1.4143, 1.5617, 1.7166, 1.8457, 2.0012, 2.1462, 2.2864, - 2.4258, 2.5910, 2.7372, 2.9018, 0.0808, 0.1726, 0.2849, 0.4592, - 0.6118, 0.7853, 0.9588, 1.1256, 1.2751, 1.4392, 1.5898, 1.7514, - 1.8977, 2.0554, 2.1937, 2.3430, 2.4831, 2.6249, 2.7601, 2.9155, - 0.1669, 0.2574, 0.3694, 0.5569, 0.6773, 0.8061, 1.0160, 1.1667, - 1.2791, 1.4041, 1.5452, 1.7207, 1.8524, 2.0038, 2.1414, 2.3338, - 2.4747, 2.6157, 2.7303, 2.8848, 0.1598, 0.2521, 0.3416, 0.5149, - 0.6703, 0.7941, 0.9408, 1.1164, 1.2017, 1.3293, 1.4908, 1.6783, - 1.8438, 1.9927, 2.1149, 2.2698, 2.4420, 2.6193, 2.7583, 2.9103, - 0.0902, 0.1978, 0.3265, 0.4578, 0.5878, 0.7439, 0.9110, 1.0906, - 1.2556, 1.4125, 1.5688, 1.7295, 1.8829, 2.0472, 2.2058, 2.3537, - 2.5075, 2.6548, 2.8058, 2.9538, 0.0818, 0.1695, 0.2794, 0.4470, - 0.6069, 0.7641, 0.9313, 1.0946, 1.2411, 1.4072, 1.5640, 1.7186, - 1.8651, 2.0254, 2.1726, 2.3286, 2.4784, 2.6287, 2.7750, 2.9339, - 0.1980, 0.3134, 0.4099, 0.4975, 0.6491, 0.8376, 0.9441, 1.0298, - 1.1795, 1.3866, 1.5784, 1.7209, 1.8137, 1.9271, 2.0863, 2.2930, - 2.4696, 2.6184, 2.7587, 2.9251, 0.1338, 0.2341, 0.3566, 0.4797, - 0.6129, 0.7580, 0.9093, 1.0491, 1.1911, 1.3313, 1.4841, 1.6503, - 1.8035, 1.9685, 2.1128, 2.2694, 2.4093, 2.5728, 2.7206, 2.8994, - 0.0937, 0.2034, 0.3447, 0.5032, 0.6370, 0.7993, 0.9674, 1.1323, - 1.2830, 1.4199, 1.5492, 1.7010, 1.8513, 2.0087, 2.1550, 2.3115, - 2.4643, 2.6237, 2.7812, 2.9392, 0.1085, 0.2152, 0.3126, 0.4569, - 0.5718, 0.7213, 0.8837, 1.0604, 1.2053, 1.3755, 1.5397, 1.7001, - 1.8409, 2.0039, 2.1498, 2.3080, 2.4535, 2.6063, 2.7505, 2.9110, - 0.0562, 0.2066, 0.4034, 0.5490, 0.6682, 0.7924, 0.9495, 1.0800, - 1.1869, 1.3156, 1.4834, 1.6619, 1.8404, 2.0199, 2.1509, 2.2755, - 2.4072, 2.5580, 2.6993, 2.8913, 0.0939, 0.2303, 0.3742, 0.5260, - 0.6662, 0.8294, 0.9769, 1.1315, 1.2792, 1.4153, 1.5436, 1.6701, - 1.8215, 1.9920, 2.1310, 2.3005, 2.4534, 2.5786, 2.7204, 2.9068, - 0.1005, 0.2442, 0.3898, 0.5398, 0.6958, 0.8474, 1.0008, 1.1556, - 1.3020, 1.4456, 1.5954, 1.7470, 1.8922, 2.0500, 2.2019, 2.3492, - 2.4963, 2.6412, 2.7890, 2.9423, 0.1022, 0.2031, 0.3213, 0.4402, - 0.5637, 0.7117, 0.8673, 1.0242, 1.1727, 1.3206, 1.4846, 1.6465, - 1.8015, 1.9655, 2.1233, 2.2873, 2.4464, 2.6074, 2.7685, 2.9409, - 0.1985, 0.3497, 0.4622, 0.5982, 0.7489, 0.8752, 0.9925, 1.1679, - 1.3288, 1.4606, 1.5820, 1.7492, 1.8922, 2.0511, 2.1780, 2.3373, - 2.4760, 2.6233, 2.7466, 2.8978, 0.1284, 0.2433, 0.3630, 0.4852, - 0.6117, 0.7460, 0.8904, 1.0360, 1.1738, 1.3142, 1.4696, 1.6185, - 1.7719, 1.9318, 2.0961, 2.2697, 2.4408, 2.6046, 2.7681, 2.9451, - 0.1042, 0.2286, 0.3598, 0.5064, 0.6438, 0.7899, 0.9350, 1.0891, - 1.2323, 1.3807, 1.5225, 1.6747, 1.8153, 1.9669, 2.1145, 2.2832, - 2.4430, 2.6085, 2.7748, 2.9346, 0.0780, 0.1724, 0.2440, 0.3489, - 0.5280, 0.7426, 0.9272, 1.0914, 1.2562, 1.4188, 1.5804, 1.7376, - 1.8909, 2.0473, 2.1946, 2.3457, 2.4950, 2.6424, 2.7926, 2.9549, - 0.1103, 0.2608, 0.4087, 0.5538, 0.6923, 0.8418, 0.9940, 1.1507, - 1.2919, 1.4406, 1.5802, 1.7262, 1.8638, 2.0085, 2.1572, 2.2975, - 2.4329, 2.5866, 2.7380, 2.9107, 0.1297, 0.2532, 0.4003, 0.5329, - 0.6733, 0.7950, 0.9557, 1.0859, 1.2235, 1.3538, 1.5037, 1.6389, - 1.7964, 1.9285, 2.0898, 2.2541, 2.4231, 2.5711, 2.6875, 2.8947, - 0.0871, 0.1968, 0.3425, 0.4949, 0.6424, 0.7959, 0.9534, 1.1132, - 1.2656, 1.4229, 1.5785, 1.7271, 1.8729, 2.0355, 2.1998, 2.3562, - 2.5151, 2.6663, 2.8145, 2.9534, 0.1038, 0.2204, 0.3248, 0.4566, - 0.5947, 0.7443, 0.8811, 1.0379, 1.2031, 1.3772, 1.5430, 1.7092, - 1.8625, 2.0322, 2.1904, 2.3417, 2.4960, 2.6458, 2.7979, 2.9485, - 0.1329, 0.2763, 0.3943, 0.5147, 0.6512, 0.8071, 0.9410, 1.0879, - 1.2298, 1.3850, 1.5282, 1.6674, 1.8137, 1.9993, 2.1344, 2.2749, - 2.4257, 2.5863, 2.7410, 2.9184, 0.1052, 0.2142, 0.3584, 0.5033, - 0.6387, 0.7804, 0.9320, 1.0780, 1.2172, 1.3764, 1.5421, 1.6887, - 1.8246, 1.9833, 2.1245, 2.2797, 2.4237, 2.5779, 2.7257, 2.9097, - 0.1092, 0.2676, 0.4071, 0.5355, 0.6661, 0.8142, 0.9621, 1.1173, - 1.2628, 1.4185, 1.5696, 1.7220, 1.8595, 2.0178, 2.1720, 2.3221, - 2.4718, 2.6259, 2.7775, 2.9334, 0.0929, 0.2017, 0.3073, 0.4570, - 0.5775, 0.7635, 0.9299, 1.0832, 1.2334, 1.3935, 1.5420, 1.7112, - 1.8601, 2.0309, 2.1735, 2.3230, 2.4543, 2.6034, 2.7418, 2.8988, - 0.0775, 0.2005, 0.3490, 0.5200, 0.6747, 0.8383, 0.9885, 1.1738, - 1.3141, 1.4236, 1.5892, 1.7402, 1.8474, 2.0210, 2.1593, 2.2730, - 2.4235, 2.5604, 2.7128, 2.9005, 0.1104, 0.2292, 0.3353, 0.4732, - 0.6152, 0.7675, 0.9164, 1.0907, 1.2594, 1.4064, 1.5218, 1.6426, - 1.8018, 1.9937, 2.1362, 2.2961, 2.4523, 2.6083, 2.7613, 2.9202, - 0.0826, 0.2000, 0.3384, 0.5144, 0.6694, 0.8377, 0.9870, 1.1461, - 1.2950, 1.4495, 1.5872, 1.7387, 1.8793, 2.0329, 2.1723, 2.3114, - 2.4415, 2.5908, 2.7354, 2.9028, 0.1063, 0.2268, 0.3442, 0.4735, - 0.6116, 0.7507, 0.9028, 1.0768, 1.2426, 1.4052, 1.5566, 1.7015, - 1.8243, 1.9742, 2.1276, 2.2824, 2.4262, 2.5953, 2.7627, 2.9290, - 0.1150, 0.2814, 0.4543, 0.6095, 0.7373, 0.8592, 0.9908, 1.1108, - 1.2339, 1.3590, 1.4864, 1.6168, 1.7392, 1.8752, 2.0212, 2.1688, - 2.3128, 2.4869, 2.7019, 2.9239, 0.0948, 0.2074, 0.3433, 0.4943, - 0.6346, 0.7645, 0.8809, 1.0610, 1.2307, 1.3487, 1.4655, 1.6186, - 1.7534, 1.8859, 2.0486, 2.2200, 2.3835, 2.5581, 2.7565, 2.9502, - 0.1062, 0.2239, 0.3683, 0.5197, 0.6704, 0.8184, 0.9642, 1.1127, - 1.2556, 1.3976, 1.5405, 1.6940, 1.8375, 1.9888, 2.1377, 2.2980, - 2.4555, 2.6184, 2.7849, 2.9452, 0.0888, 0.2005, 0.2847, 0.4322, - 0.5763, 0.7577, 0.9262, 1.1095, 1.2719, 1.4331, 1.5843, 1.7452, - 1.8845, 2.0385, 2.1805, 2.3345, 2.4750, 2.6217, 2.7555, 2.9013, - 0.1713, 0.2617, 0.3868, 0.5859, 0.7073, 0.8535, 1.0593, 1.1778, - 1.3109, 1.4508, 1.5910, 1.7463, 1.8911, 2.0651, 2.2035, 2.3355, - 2.4947, 2.6440, 2.7424, 2.8943, 0.1346, 0.2549, 0.4089, 0.5488, - 0.6949, 0.8394, 0.9810, 1.1145, 1.2528, 1.4044, 1.5423, 1.6872, - 1.8274, 1.9726, 2.1403, 2.2809, 2.4128, 2.5564, 2.6887, 2.8895, - 0.0776, 0.1621, 0.2553, 0.4191, 0.5988, 0.7921, 0.9651, 1.1350, - 1.2930, 1.4475, 1.6011, 1.7585, 1.9068, 2.0638, 2.2102, 2.3594, - 2.5096, 2.6581, 2.8099, 2.9654, 0.0864, 0.1778, 0.2854, 0.4235, - 0.5568, 0.7220, 0.8963, 1.0609, 1.2217, 1.3830, 1.5422, 1.7018, - 1.8551, 2.0206, 2.1783, 2.3328, 2.4869, 2.6366, 2.7923, 2.9539, - 0.1144, 0.2576, 0.4186, 0.5594, 0.6875, 0.8221, 0.9598, 1.0944, - 1.2273, 1.3713, 1.5152, 1.6628, 1.8070, 1.9525, 2.0965, 2.2535, - 2.4132, 2.5725, 2.7250, 2.9150, 0.1079, 0.2221, 0.3334, 0.4845, - 0.6083, 0.7516, 0.9018, 1.0594, 1.2060, 1.3673, 1.5212, 1.6880, - 1.8208, 1.9831, 2.1269, 2.2909, 2.4366, 2.6027, 2.7339, 2.8924, - 0.0994, 0.2233, 0.3634, 0.5145, 0.6568, 0.8131, 0.9746, 1.1296, - 1.2666, 1.4116, 1.5748, 1.7264, 1.8649, 2.0217, 2.1716, 2.3293, - 2.4900, 2.6455, 2.7818, 2.9362, 0.1120, 0.2079, 0.3128, 0.4124, - 0.5291, 0.6816, 0.8478, 1.0150, 1.1772, 1.3456, 1.5208, 1.6882, - 1.8458, 2.0078, 2.1627, 2.3198, 2.4733, 2.6251, 2.7796, 2.9489, - 0.0853, 0.2030, 0.3669, 0.5326, 0.6678, 0.8086, 0.9526, 1.1142, - 1.2551, 1.4158, 1.5694, 1.7073, 1.8431, 1.9686, 2.1153, 2.2376, - 2.3686, 2.5591, 2.7320, 2.9104, 0.0905, 0.2166, 0.3539, 0.5201, - 0.6700, 0.8346, 0.9883, 1.1457, 1.2714, 1.3845, 1.5172, 1.6688, - 1.8008, 1.9535, 2.1019, 2.2708, 2.4135, 2.5974, 2.7486, 2.9033, - 0.0084, 0.0374, 0.0164, -0.0153, 0.0288, 0.0107, -0.0255, -0.0242, - 0.0000, -0.0055, -0.0081, -0.0075, -0.0022, -0.0052, -0.0069, -0.0017, - 0.0003, 0.0091, 0.0028, -0.0027, 0.0085, 0.0043, -0.0235, -0.0411, - 0.0202, 0.0359, 0.0376, 0.0321, 0.0306, -0.0358, -0.0276, -0.0090, - 0.0032, 0.0048, 0.0309, 0.0332, 0.0284, 0.0237, 0.0051, -0.0101, --0.0233, -0.0428, -0.0585, -0.0387, 0.0039, 0.0081, 0.0029, -0.0017, --0.0006, -0.0068, 0.0044, 0.0182, 0.0376, 0.0387, -0.0334, -0.0269, --0.0182, -0.0069, -0.0026, 0.0035, -0.0049, -0.0212, -0.0408, -0.0245, - 0.0186, 0.0189, 0.0153, 0.0120, 0.0157, 0.0055, -0.0046, 0.0179, - 0.0284, -0.0032, -0.0261, -0.0205, -0.0039, 0.0174, 0.0299, 0.0207, - 0.0012, -0.0056, 0.0010, 0.0141, -0.0119, 0.0190, 0.0315, 0.0033, --0.0128, 0.0300, 0.0328, 0.0308, 0.0353, 0.0266, 0.0066, -0.0328, --0.0273, 0.0054, 0.0145, 0.0175, 0.0015, -0.0171, 0.0062, -0.0164, - 0.0045, -0.0071, 0.0025, 0.0278, 0.0283, 0.0117, -0.0026, -0.0285, --0.0408, -0.0366, -0.0059, -0.0208, -0.0354, -0.0334, -0.0263, -0.0064, - 0.0072, -0.0006, -0.0235, -0.0037, -0.0307, -0.0294, -0.0163, -0.0197, --0.0235, 0.0192, 0.0013, -0.0219, -0.0123, -0.0004, -0.0081, -0.0096, --0.0123, -0.0101, 0.0021, 0.0151, 0.0106, 0.0151, 0.0292, 0.0033, - 0.0283, 0.0124, 0.0058, -0.0017, -0.0038, 0.0152, 0.0141, 0.0132, - 0.0178, 0.0157, 0.0073, 0.0176, 0.0141, 0.0097, -0.0092, -0.0163, --0.0230, -0.0134, -0.0099, -0.0147, 0.0040, -0.0183, -0.0175, -0.0080, --0.0083, -0.0290, -0.0417, -0.0398, -0.0269, -0.0199, -0.0143, -0.0053, --0.0099, -0.0054, -0.0199, -0.0219, -0.0170, 0.0107, 0.0194, 0.0035, - 0.0437, 0.0406, 0.0215, 0.0120, 0.0053, -0.0028, 0.0238, 0.0337, - 0.0217, 0.0011, 0.0227, 0.0244, 0.0327, 0.0378, 0.0437, 0.0356, --0.0033, 0.0113, 0.0407, 0.0334, -0.0125, -0.0003, -0.0141, -0.0273, --0.0137, -0.0079, -0.0145, -0.0071, 0.0114, 0.0181, 0.0150, 0.0085, --0.0077, -0.0038, -0.0219, -0.0263, -0.0187, -0.0233, 0.0133, 0.0265, --0.0156, -0.0091, -0.0110, -0.0016, 0.0143, 0.0177, 0.0240, 0.0082, --0.0143, -0.0257, -0.0014, 0.0002, 0.0082, 0.0180, 0.0325, 0.0340, --0.0153, -0.0389, -0.0240, 0.0082, 0.0140, 0.0046, -0.0138, -0.0378, --0.0366, 0.0297, 0.0252, 0.0078, 0.0063, 0.0006, 0.0044, 0.0074, - 0.0094, 0.0113, 0.0105, 0.0137, 0.0438, 0.0262, -0.0078, -0.0185, --0.0215, -0.0407, -0.0435, -0.0208, -0.0004, -0.0144, -0.0205, -0.0248, --0.0159, -0.0069, -0.0153, 0.0132, 0.0355, 0.0298, 0.0120, 0.0072, - 0.0236, 0.0526, 0.0479, 0.0233, -0.0133, -0.0283, -0.0468, -0.0549, --0.0370, 0.0032, 0.0056, 0.0023, 0.0050, 0.0024, 0.0279, 0.0116, --0.0045, -0.0012, 0.0107, 0.0190, 0.0253, 0.0191, 0.0043, 0.0193, --0.0348, -0.0246, 0.0123, 0.0210, 0.0135, -0.0096, -0.0109, -0.0076, --0.0156, -0.0290, 0.0160, 0.0194, 0.0219, 0.0259, 0.0250, 0.0195, - 0.4948, 0.4961, 0.4940, 0.4878, 0.4849, 0.4727, 0.4571, 0.4551, - 0.4534, 0.4468, 0.4412, 0.4354, 0.4298, 0.4272, 0.4498, 0.4506, - 0.4560, 0.4592, 0.4758, 0.4941, 0.2476, 0.1771, 0.1974, 0.1881, - 0.1667, 0.1826, 0.2067, 0.2031, 0.1734, 0.1534, 0.1415, 0.1761, - 0.1897, 0.1772, 0.1651, 0.1247, 0.1041, 0.1231, 0.1809, 0.2234 - }, }; static const uint8_t tab7[][35] = { diff --git a/libavcodec/twinvqdec.c b/libavcodec/twinvqdec.c index b13f8a04cc..0c1782ecbf 100644 --- a/libavcodec/twinvqdec.c +++ b/libavcodec/twinvqdec.c @@ -27,6 +27,7 @@ #include "get_bits.h" #include "internal.h" #include "twinvq.h" +#include "metasound_data.h" #include "twinvq_data.h" static const TwinVQModeTab mode_08_08 = { @@ -35,7 +36,7 @@ static const TwinVQModeTab mode_08_08 = { { 2, bark_tab_m08_256, 20, tab.fcb08m, 2, 5, tab.cb0808m0, tab.cb0808m1, 16 }, { 1, bark_tab_l08_512, 30, tab.fcb08l, 3, 6, tab.cb0808l0, tab.cb0808l1, 17 } }, - 512, 12, tab.lsp08, 1, 5, 3, 3, tab.shape08, 8, 28, 20, 6, 40 + 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, tab.shape08, 8, 28, 20, 6, 40 }; static const TwinVQModeTab mode_11_08 = { @@ -44,7 +45,7 @@ static const TwinVQModeTab mode_11_08 = { { 2, bark_tab_m11_256, 20, tab.fcb11m, 2, 5, tab.cb1108m0, tab.cb1108m1, 24 }, { 1, bark_tab_l11_512, 30, tab.fcb11l, 3, 6, tab.cb1108l0, tab.cb1108l1, 27 } }, - 512, 16, tab.lsp11, 1, 6, 4, 3, tab.shape11, 9, 36, 30, 7, 90 + 512, 16, ff_metasound_lsp11, 1, 6, 4, 3, tab.shape11, 9, 36, 30, 7, 90 }; static const TwinVQModeTab mode_11_10 = { @@ -53,7 +54,7 @@ static const TwinVQModeTab mode_11_10 = { { 2, bark_tab_m11_256, 20, tab.fcb11m, 2, 5, tab.cb1110m0, tab.cb1110m1, 18 }, { 1, bark_tab_l11_512, 30, tab.fcb11l, 3, 6, tab.cb1110l0, tab.cb1110l1, 20 } }, - 512, 16, tab.lsp11, 1, 6, 4, 3, tab.shape11, 9, 36, 30, 7, 90 + 512, 16, ff_metasound_lsp11, 1, 6, 4, 3, tab.shape11, 9, 36, 30, 7, 90 }; static const TwinVQModeTab mode_16_16 = { @@ -62,7 +63,7 @@ static const TwinVQModeTab mode_16_16 = { { 2, bark_tab_m16_512, 20, tab.fcb16m, 2, 5, tab.cb1616m0, tab.cb1616m1, 15 }, { 1, bark_tab_l16_1024, 30, tab.fcb16l, 3, 6, tab.cb1616l0, tab.cb1616l1, 16 } }, - 1024, 16, tab.lsp16, 1, 6, 4, 3, tab.shape16, 9, 56, 60, 7, 180 + 1024, 16, ff_metasound_lsp16, 1, 6, 4, 3, tab.shape16, 9, 56, 60, 7, 180 }; static const TwinVQModeTab mode_22_20 = { @@ -71,7 +72,7 @@ static const TwinVQModeTab mode_22_20 = { { 2, bark_tab_m22_512, 20, tab.fcb22m_1, 2, 6, tab.cb2220m0, tab.cb2220m1, 17 }, { 1, bark_tab_l22_1024, 32, tab.fcb22l_1, 4, 6, tab.cb2220l0, tab.cb2220l1, 18 } }, - 1024, 16, tab.lsp22_1, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144 + 1024, 16, ff_metasound_lsp22, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144 }; static const TwinVQModeTab mode_22_24 = { @@ -80,7 +81,7 @@ static const TwinVQModeTab mode_22_24 = { { 2, bark_tab_m22_512, 20, tab.fcb22m_1, 2, 6, tab.cb2224m0, tab.cb2224m1, 14 }, { 1, bark_tab_l22_1024, 32, tab.fcb22l_1, 4, 6, tab.cb2224l0, tab.cb2224l1, 15 } }, - 1024, 16, tab.lsp22_1, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144 + 1024, 16, ff_metasound_lsp22, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144 }; static const TwinVQModeTab mode_22_32 = { @@ -98,7 +99,7 @@ static const TwinVQModeTab mode_44_40 = { { 4, bark_tab_m44_512, 20, tab.fcb44m, 2, 6, tab.cb4440m0, tab.cb4440m1, 17 }, { 1, bark_tab_l44_2048, 40, tab.fcb44l, 4, 6, tab.cb4440l0, tab.cb4440l1, 17 } }, - 2048, 20, tab.lsp44, 1, 6, 4, 4, tab.shape44, 9, 84, 54, 7, 432 + 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, tab.shape44, 9, 84, 54, 7, 432 }; static const TwinVQModeTab mode_44_48 = { @@ -107,7 +108,7 @@ static const TwinVQModeTab mode_44_48 = { { 4, bark_tab_m44_512, 20, tab.fcb44m, 2, 6, tab.cb4448m0, tab.cb4448m1, 14 }, { 1, bark_tab_l44_2048, 40, tab.fcb44l, 4, 6, tab.cb4448l0, tab.cb4448l1, 14 } }, - 2048, 20, tab.lsp44, 1, 6, 4, 4, tab.shape44, 9, 84, 54, 7, 432 + 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, tab.shape44, 9, 84, 54, 7, 432 }; /** From patchwork Mon Jan 4 00:28:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24768 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 93A6D44907C for ; Mon, 4 Jan 2021 02:28:54 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7DE8B68A987; Mon, 4 Jan 2021 02:28:54 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0FF7768A882 for ; Mon, 4 Jan 2021 02:28:52 +0200 (EET) Received: by mail-wm1-f45.google.com with SMTP id 3so17542200wmg.4 for ; Sun, 03 Jan 2021 16:28:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=Re3KGmP0ED56X7PH6UrWixnj3+ZZW1C6jUM0QJqUwkM=; b=QCXl854HXZMgGqLUo7sYYhJaUVb0aR2Rgx/Nm8DKeOI+GhKZQafUWwAlyRQh8M9CBa ctjc2J3LUqpRk6LB6FsPphURA7DLMHBKvUDN7GZZV0oJcNsZjy5/rtOooLrzBOYS1l1N zHZoDJSSPwfPpAz3K+kUAtBIvoHfhJCG5vuciZJeRR0vhr95dFv73injseP4QJImCijS ByxHxO/biGHMMPNBeKG2hq1mVxOO5S06PQBqbYwiIQBCg6TohXSD501+kxI/N3fZ+A32 N4Rd+9JiBJbeTZjvghyODsuugaR99wfpsqLFX5IkWaafXhvpPfNaYFYEx7K/anIwNuZN 3Adg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=Re3KGmP0ED56X7PH6UrWixnj3+ZZW1C6jUM0QJqUwkM=; b=iPF7kSbp54WqaE0R8bWtEZ1xgPfFL/YFEwsPeGVGAvxvGPjtL7laMWtMA8jNgY2S2d N1M29NxTGF1FOWIliX2endP/z0Hb062Cud/EZyzML49gxVrAHCyyq9mi/xUcfUahvsmF wMCMY+4Rq/2v7XEeMoskIyE4M6x2Vq6eN1gh7i8T28MeXEgdaWcUxkiB51JbWm/JuTPn sxOiVmRLRWtm14pgcSd/10xte325MOCP5rE8RKISvfWXT3K3mpsXsCuG5QHeoaUCiIBs uSOznsD7NPn+WCxhpwiy+QXY0vbCrsfdnhMXSH2+GReTFIgvG+TSJbkbAun7PGIw2ePU Zqlg== X-Gm-Message-State: AOAM531b8Lv1x+ixm+CjCkXqypoDE9v+RNslryk3+yCM8xrrLVRkCisB ZKjlZnu4QrXLMbD6Y0uvb4cejOllmkc= X-Google-Smtp-Source: ABdhPJyJxtlWukV70QR0fri6M5B3JkEuqiHiEhLANg6p6Cu2Tcvd7URe8okQzOgjVFk3uvDBt3+i+g== X-Received: by 2002:a1c:9a57:: with SMTP id c84mr24021185wme.183.1609720132220; Sun, 03 Jan 2021 16:28:52 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:51 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:05 +0100 Message-Id: <20210104002816.2321974-5-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/16] avcodec/vp3data: Deduplicate coeff_tables X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavcodec/vp3data.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h index 1fbeac731b..272af4e3a0 100644 --- a/libavcodec/vp3data.h +++ b/libavcodec/vp3data.h @@ -179,8 +179,7 @@ static const int16_t coeff_table_token_15[2] = { 5, -5 }; static const int16_t coeff_table_token_16[2] = { 6, -6 }; static const int16_t coeff_table_token_23_24_25_26_27_28_29[2] = { 1, -1 }; -static const int16_t coeff_table_token_30[4] = { 2, 3, -2, -3 }; -static const int16_t coeff_table_token_31[4] = { 2, 3, -2, -3 }; +static const int16_t coeff_table_token_30_31[4] = { 2, 3, -2, -3 }; static const int16_t coeff_table_token_17[4] = { 7, 8, -7, -8 @@ -377,8 +376,8 @@ static const int16_t *const coeff_tables[32] = { coeff_table_token_23_24_25_26_27_28_29, coeff_table_token_23_24_25_26_27_28_29, coeff_table_token_23_24_25_26_27_28_29, - coeff_table_token_30, - coeff_table_token_31 + coeff_table_token_30_31, + coeff_table_token_30_31 }; static const uint8_t vp3_bias[5 * 16][32][2] = { From patchwork Mon Jan 4 00:28:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24769 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C127044907C for ; Mon, 4 Jan 2021 02:28:55 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A92D668A9BE; Mon, 4 Jan 2021 02:28:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D62066804E0 for ; Mon, 4 Jan 2021 02:28:53 +0200 (EET) Received: by mail-wr1-f53.google.com with SMTP id t30so30385790wrb.0 for ; Sun, 03 Jan 2021 16:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=Vh4XlLv6N6EWZQ0mZmZuytddri0IUcu6yaiGVqoTOXM=; b=AuPRTpmgFTjBKF8AbuvLmeCz89AzT8ALjkBFAd0/NVTYM1Yc5gJ4AZCa8J4ZFunhCL Pnib1ZTtgVl6/bdeZKs7h0Eg4JPnGNx3/UTmRcnvcRGwptHxjRSQpz489f+U33Ij+afu UCqFH3IuFUqPOuMd6UlWbCU/eW3UX/+o9RngHMcbrrRyEFX9sVraScGCQbD26efucLQ5 +YfKv037dr2BJLcH38s1ni23gYDb9S6G0HRQfWc2w72Fdgy/RD4OZ7u7LuIw4qUgcWGo EFqSgCRNMYbX7KEh8m9BVwsaSnixbOjNrQj28c+YCjPuNhhphoZq1TmKSQBYO6ETj2Bx g3dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=Vh4XlLv6N6EWZQ0mZmZuytddri0IUcu6yaiGVqoTOXM=; b=Te5zok4hPcfgehx2/fi1KGeJs77DFASeiyDMNYBloNIoQ0znZMfzEUm0T/Z2i4fpVN BUruziRbx8QEd0GtgnRy/OOc1OFQtJX//3cwBofy+L4hmYMBQl9d64u47L9oyw1lfDRH MlzPP8+Xb2rvJBGaIRMh6dC4dYkaKJZn1Eps00sy+PzxBbvhEXKWa8itZgiJoXz6Vaa+ mlGWwxdHH3q1zm6ITpLCp7++rz6KTQik2jk50p1ncwv3fkJwi3l0viFvLK4bn9+iErqO 0U39tBGQ8Hk8KWQO9yY3NrMAnd2jFwuGnxlzOKWtpUuQizpIGBcSYYGVuzfeJKolIpbl jJXw== X-Gm-Message-State: AOAM532ooyyVNkpo617LMSAbl+jPmUcy9VQqlrlT6W6rv5qKmXwTL0FG 4s+TDbjGNF7iAVIBGLxJlsJ2j76U3hY= X-Google-Smtp-Source: ABdhPJw6JX7BFY8uHDl9MFl9FOT4zT4vdFQZTpZxMqt1jcEOp25mMa8rrmoLzk+LO+KctdLRZ3oZ7g== X-Received: by 2002:a5d:660c:: with SMTP id n12mr78931830wru.291.1609720133146; Sun, 03 Jan 2021 16:28:53 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:52 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:06 +0100 Message-Id: <20210104002816.2321974-6-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/16] avfilter/vf_qp: Deduplicate variable names arrays X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This also avoids relocations. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_qp.c b/libavfilter/vf_qp.c index af46fe0ece..e2d60fdbb5 100644 --- a/libavfilter/vf_qp.c +++ b/libavfilter/vf_qp.c @@ -38,6 +38,8 @@ typedef struct QPContext { int evaluate_per_mb; } QPContext; +static const char *const var_names[] = { "known", "qp", "x", "y", "w", "h", NULL }; + #define OFFSET(x) offsetof(QPContext, x) #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM @@ -55,7 +57,6 @@ static int config_input(AVFilterLink *inlink) int i; int ret; AVExpr *e = NULL; - static const char *const var_names[] = { "known", "qp", "x", "y", "w", "h", NULL }; if (!s->qp_expr_str) return 0; @@ -144,7 +145,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) AVVideoBlockParams *b = av_video_enc_params_block(par_out, block_idx); int qp = sd_in ? in_qp_global + BLOCK_QP_DELTA(block_idx) : NAN; double var_values[] = { !!sd_in, qp, x, y, s->qstride, s->h, 0}; - static const char *const var_names[] = { "known", "qp", "x", "y", "w", "h", NULL }; double temp_val; ret = av_expr_parse_and_eval(&temp_val, s->qp_expr_str, From patchwork Mon Jan 4 00:28:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24771 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 2B40844907C for ; Mon, 4 Jan 2021 02:28:58 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 17E5E68A9D5; Mon, 4 Jan 2021 02:28:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B2EF068A990 for ; Mon, 4 Jan 2021 02:28:54 +0200 (EET) Received: by mail-wm1-f48.google.com with SMTP id c133so16828008wme.4 for ; Sun, 03 Jan 2021 16:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=WEXw+YzM7OPpLDzktcHxjf1K199JsJCFY1OKZAeZjLI=; b=teXkGdcqYDTNJcIYLPB8uh24jaWBHVH7MFgbOuWXXu3cKoaehhP2sqwH42aREwtyoR h6TsecX65HGJsmrvM//+EhbvXnwD1ZHhpoDOJHr1nFOTd6hW6qOODQm1OQf1rWf2HfYV YY7z/Zids+s0DSkwioOmQczwojGlYeJ4eoz5A9gxP9QE47L7Vo9B14II8YdJkuQOxEOt rqB+szmaxpV69yw2GTXECJqcanyh6t10X3ip+Vvil76zaeDA0ygbt/+MowxT8ZTi+vTd tdja7PPFczu9xZ3QTtIbAzD4/avKjwt/33ZrDNjuyiQa32vBg7Kg/J+0jBUH91PmUP3N i93g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=WEXw+YzM7OPpLDzktcHxjf1K199JsJCFY1OKZAeZjLI=; b=l1t2Jebr9oWPvEMNV4P8FJ4BNxsrXcajf95EHgg+0Ja6DcyA7zGrp+AfNsQLfqk+aP 0sVFIhI/smCeOpSBBTvPIEPoEslQi2BppcbICS4xzXd9/5CnnWlIOKLCxi9eaFx+MXet 00oNBWivq/SflxNphfrOYu+XCg94tINHHL/7c9JlO+S18L+KZBT1+iFToc1mTjHMTmQR D7qQcQvEyO1nLniuRWQail/a2KKljTvmJT+p81VtyHDWdJoWz3HK74zsgXkbFi51R/iH 5RYQLl3lFisTYNfEqmycSX8tI7giUbQLxV74rLOb5uydhBA9CFtPDVAf3GS/uJruLHWO KoFQ== X-Gm-Message-State: AOAM533KfG5acNR3p4LJsLjYdXQ6MS4SKX6khGKTcyZXI0jN8SgbSP5l nkYepbERQ0T6n8UKMDrwU0CKT0bABQM= X-Google-Smtp-Source: ABdhPJxFpWrEJjr0ARaJY91NAwpbH+K6y0DBKEZfis8z+N5EJ2T3WQ/sXUyQmxX588qPtJDIast92w== X-Received: by 2002:a1c:7dd8:: with SMTP id y207mr25138951wmc.181.1609720134040; Sun, 03 Jan 2021 16:28:54 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:53 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:07 +0100 Message-Id: <20210104002816.2321974-7-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/16] avformat/mxf: Deduplicate random_index_pack_key X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- There is also another key that is duplicated: header_open_partition_key and mxf_jp2k_rsiz. But they seem to mean something different which makes me wonder if one of these keys is incorrect; I have therefore refrained from deduplicating them. libavformat/mxf.c | 2 ++ libavformat/mxf.h | 1 + libavformat/mxfdec.c | 3 +-- libavformat/mxfenc.c | 3 +-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/mxf.c b/libavformat/mxf.c index 88f69ebcfb..1901b24c68 100644 --- a/libavformat/mxf.c +++ b/libavformat/mxf.c @@ -24,6 +24,8 @@ const uint8_t ff_mxf_mastering_display_prefix[13] = { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0x0e,0x04,0x20,0x04,0x01,0x01 }; +const uint8_t ff_mxf_random_index_pack_key[16] = { 0x06,0x0e,0x2b,0x34,0x02,0x05,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x11,0x01,0x00 }; + /* be careful to update references to this array if reordering */ /* local tags are dynamic and must not clash with others in mxfenc.c */ const MXFLocalTagPair ff_mxf_mastering_display_local_tags[4] = { diff --git a/libavformat/mxf.h b/libavformat/mxf.h index 7fa10bcca1..5219abc767 100644 --- a/libavformat/mxf.h +++ b/libavformat/mxf.h @@ -84,6 +84,7 @@ typedef struct MXFLocalTagPair { } MXFLocalTagPair; extern const uint8_t ff_mxf_mastering_display_prefix[13]; +extern const uint8_t ff_mxf_random_index_pack_key[16]; extern const MXFLocalTagPair ff_mxf_mastering_display_local_tags[4]; #define FF_MXF_MASTERING_CHROMA_DEN 50000 diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index b563f2abe1..784f43d6d1 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -328,7 +328,6 @@ static const uint8_t mxf_apple_coll_prefix[] = { 0x06,0x0e,0x2b,0x static const uint8_t mxf_crypto_source_container_ul[] = { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0x09,0x06,0x01,0x01,0x02,0x02,0x00,0x00,0x00 }; static const uint8_t mxf_encrypted_triplet_key[] = { 0x06,0x0e,0x2b,0x34,0x02,0x04,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x7e,0x01,0x00 }; static const uint8_t mxf_encrypted_essence_container[] = { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x0b,0x01,0x00 }; -static const uint8_t mxf_random_index_pack_key[] = { 0x06,0x0e,0x2b,0x34,0x02,0x05,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x11,0x01,0x00 }; static const uint8_t mxf_sony_mpeg4_extradata[] = { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0e,0x06,0x06,0x02,0x02,0x01,0x00,0x00 }; static const uint8_t mxf_avid_project_name[] = { 0xa5,0xfb,0x7b,0x25,0xf6,0x15,0x94,0xb9,0x62,0xfc,0x37,0x17,0x49,0x2d,0x42,0xbf }; static const uint8_t mxf_jp2k_rsiz[] = { 0x06,0x0e,0x2b,0x34,0x02,0x05,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }; @@ -3264,7 +3263,7 @@ static void mxf_read_random_index_pack(AVFormatContext *s) goto end; avio_seek(s->pb, file_size - length, SEEK_SET); if (klv_read_packet(&klv, s->pb) < 0 || - !IS_KLV_KEY(klv.key, mxf_random_index_pack_key)) + !IS_KLV_KEY(klv.key, ff_mxf_random_index_pack_key)) goto end; if (klv.next_klv != file_size || klv.length <= 4 || (klv.length - 4) % 12) { av_log(s, AV_LOG_WARNING, "Invalid RIP KLV length\n"); diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index d8678c9d25..6c5331ad62 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -271,7 +271,6 @@ static const uint8_t opatom_ul[] = { 0x06,0x0E,0x2B,0x34,0x04, static const uint8_t footer_partition_key[] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x04,0x04,0x00 }; // ClosedComplete static const uint8_t primer_pack_key[] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x05,0x01,0x00 }; static const uint8_t index_table_segment_key[] = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x10,0x01,0x00 }; -static const uint8_t random_index_pack_key[] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x11,0x01,0x00 }; static const uint8_t header_open_partition_key[] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }; // OpenIncomplete static const uint8_t header_closed_partition_key[] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x02,0x04,0x00 }; // ClosedComplete static const uint8_t klv_fill_key[] = { 0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x01,0x02,0x10,0x01,0x00,0x00,0x00 }; @@ -2956,7 +2955,7 @@ static void mxf_write_random_index_pack(AVFormatContext *s) uint64_t pos = avio_tell(pb); int i; - avio_write(pb, random_index_pack_key, 16); + avio_write(pb, ff_mxf_random_index_pack_key, 16); klv_encode_ber_length(pb, 28 + 12LL*mxf->body_partitions_count); if (mxf->edit_unit_byte_count && s->oformat != &ff_mxf_opatom_muxer) From patchwork Mon Jan 4 00:28:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24773 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id F2FA444907C for ; Mon, 4 Jan 2021 02:28:59 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DA7A368AA54; Mon, 4 Jan 2021 02:28:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E47C68A94D for ; Mon, 4 Jan 2021 02:28:55 +0200 (EET) Received: by mail-wr1-f44.google.com with SMTP id r7so30340956wrc.5 for ; Sun, 03 Jan 2021 16:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=orehP7IRQ8JsSgiWSe3ShVMdNBDlJUbDYFDhkOP0bm4=; b=ejYsGjL0K810naWP6P+vHq+VP1m/YcvHj7H8635r5L4ux+DGU7F2EAOQ0vpAQGvij8 3eTsHP98F64x5VGgRh8k+4umJRjaBy3LMG0B3XtJ5Ilagc2+/AN4IkgAfUSSWdtVl7sE 1su5QA8x0ObBvCuBW3VahJESca1dNcyBs50prK0GS+X6Hx3bzeygOHC27ZPKAw97F4oU XzVvWoCqQAnGvpHTxqyTQO68llN0Tng9lx1A8n+x5AjpOiD1pMYqLBflWdmMKsoCIVzj +BU0EZ6myq88hOsakmw2wV0O+bELBW4lKbdQL7vosFewmYD70pKpVo3ZYL04LNJdVbT8 KxUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=orehP7IRQ8JsSgiWSe3ShVMdNBDlJUbDYFDhkOP0bm4=; b=kFbA5uiApcJDxG5gYA3p7HRKyFwq5UWF55UcgsY4vTHrflKfzGGsD7y+cO6ZvIf4+C 4rY38KHthMsytxM/Mpdo4U1R/BMvMODFjcEnXDkll3om5l4sLdnOqW3OD4ksXKIQq11e p2rF+ltc0c9JyrS9QkDlmz2QIpQlGddmKzkdgzOIdm8o9zY9Qy8luOtQS228maMg0sdl O7SveviIkC0OR9uMwiDFeQ16HlCfNJoYGKjufr8t8Z/ODD1WDGxqPWSDRaVIkqF2W8lQ VT5O7/5eQme01jX0rNjVNa5tECFXUN927a4AU/t8XbowxIyKKjfxZ+FX3Zb3fO7e3SDq O1EA== X-Gm-Message-State: AOAM533Xf4sQiN4Gh+gdLM9sd6SoU4XiRPuwx6mKj0pwuwVr1qKvUmof yidQKd+2XX9jVwPIa/WFZJVhkSE/4KM= X-Google-Smtp-Source: ABdhPJwEnbzk8cWMdpkvBOazGLzF0nUw5lyIwN2fO0RjW9Cuu2JchQ74x42asCtfDd/u0INZBFlK+w== X-Received: by 2002:a5d:498a:: with SMTP id r10mr76953163wrq.238.1609720135081; Sun, 03 Jan 2021 16:28:55 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:54 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:08 +0100 Message-Id: <20210104002816.2321974-8-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/16] avcodec/wavpack: Deduplicate exp and log tables X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 4 +-- libavcodec/wavpack.h | 45 ++++-------------------------- libavcodec/wavpackdata.c | 60 ++++++++++++++++++++++++++++++++++++++++ libavcodec/wavpackenc.c | 4 +-- 4 files changed, 69 insertions(+), 44 deletions(-) create mode 100644 libavcodec/wavpackdata.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 143be8afec..35318f4f4d 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -723,8 +723,8 @@ OBJS-$(CONFIG_VP9_QSV_ENCODER) += qsvenc_vp9.o OBJS-$(CONFIG_VPLAYER_DECODER) += textdec.o ass.o OBJS-$(CONFIG_VP9_V4L2M2M_DECODER) += v4l2_m2m_dec.o OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o -OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o dsd.o -OBJS-$(CONFIG_WAVPACK_ENCODER) += wavpackenc.o +OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o wavpackdata.o dsd.o +OBJS-$(CONFIG_WAVPACK_ENCODER) += wavpackdata.o wavpackenc.o OBJS-$(CONFIG_WCMV_DECODER) += wcmv.o OBJS-$(CONFIG_WEBP_DECODER) += webp.o OBJS-$(CONFIG_WEBVTT_DECODER) += webvttdec.o ass.o diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h index 43aaac815f..7e7dfce2b7 100644 --- a/libavcodec/wavpack.h +++ b/libavcodec/wavpack.h @@ -124,43 +124,8 @@ static const int wv_rates[16] = { }; // exponent table copied from WavPack source -static const uint8_t wp_exp2_table[256] = { - 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a, 0x0b, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0e, 0x0f, 0x10, 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x15, 0x16, 0x16, - 0x17, 0x18, 0x19, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1d, 0x1e, 0x1f, 0x20, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x24, 0x25, 0x26, 0x27, 0x28, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3a, 0x3b, 0x3c, 0x3d, - 0x3e, 0x3f, 0x40, 0x41, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, - 0x5b, 0x5c, 0x5d, 0x5e, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x87, 0x88, 0x89, 0x8a, - 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, - 0x9c, 0x9d, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, - 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, - 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, - 0xd6, 0xd7, 0xd8, 0xd9, 0xdb, 0xdc, 0xdd, 0xde, 0xe0, 0xe1, 0xe2, 0xe4, 0xe5, 0xe6, 0xe8, 0xe9, - 0xea, 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xff -}; - -static const uint8_t wp_log2_table [] = { - 0x00, 0x01, 0x03, 0x04, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0d, 0x0e, 0x10, 0x11, 0x12, 0x14, 0x15, - 0x16, 0x18, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, 0x20, 0x21, 0x22, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a, - 0x2c, 0x2d, 0x2e, 0x2f, 0x31, 0x32, 0x33, 0x34, 0x36, 0x37, 0x38, 0x39, 0x3b, 0x3c, 0x3d, 0x3e, - 0x3f, 0x41, 0x42, 0x43, 0x44, 0x45, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4d, 0x4e, 0x4f, 0x50, 0x51, - 0x52, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, - 0x64, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x74, 0x75, - 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, - 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, - 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb2, - 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc0, - 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcb, 0xcc, 0xcd, 0xce, - 0xcf, 0xd0, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xd9, 0xda, 0xdb, - 0xdc, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe4, 0xe5, 0xe6, 0xe7, 0xe7, - 0xe8, 0xe9, 0xea, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xee, 0xef, 0xf0, 0xf1, 0xf1, 0xf2, 0xf3, 0xf4, - 0xf4, 0xf5, 0xf6, 0xf7, 0xf7, 0xf8, 0xf9, 0xf9, 0xfa, 0xfb, 0xfc, 0xfc, 0xfd, 0xfe, 0xff, 0xff -}; +extern const uint8_t ff_wp_exp2_table[256]; +extern const uint8_t ff_wp_log2_table[256]; static av_always_inline int wp_exp2(int16_t val) { @@ -171,7 +136,7 @@ static av_always_inline int wp_exp2(int16_t val) neg = 1; } - res = wp_exp2_table[val & 0xFF] | 0x100; + res = ff_wp_exp2_table[val & 0xFF] | 0x100; val >>= 8; if (val > 31U) return INT_MIN; @@ -190,9 +155,9 @@ static av_always_inline int wp_log2(uint32_t val) val += val >> 9; bits = av_log2(val) + 1; if (bits < 9) - return (bits << 8) + wp_log2_table[(val << (9 - bits)) & 0xFF]; + return (bits << 8) + ff_wp_log2_table[(val << (9 - bits)) & 0xFF]; else - return (bits << 8) + wp_log2_table[(val >> (bits - 9)) & 0xFF]; + return (bits << 8) + ff_wp_log2_table[(val >> (bits - 9)) & 0xFF]; } #endif /* AVCODEC_WAVPACK_H */ diff --git a/libavcodec/wavpackdata.c b/libavcodec/wavpackdata.c new file mode 100644 index 0000000000..1c777afc19 --- /dev/null +++ b/libavcodec/wavpackdata.c @@ -0,0 +1,60 @@ +/* + * WavPack decoder/encoder common data + * Copyright (c) 2006,2011 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "wavpack.h" + +const uint8_t ff_wp_exp2_table[256] = { + 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a, 0x0b, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0e, 0x0f, 0x10, 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x15, 0x16, 0x16, + 0x17, 0x18, 0x19, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1d, 0x1e, 0x1f, 0x20, 0x20, 0x21, 0x22, 0x23, + 0x24, 0x24, 0x25, 0x26, 0x27, 0x28, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3a, 0x3b, 0x3c, 0x3d, + 0x3e, 0x3f, 0x40, 0x41, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x48, 0x49, 0x4a, 0x4b, + 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, + 0x5b, 0x5c, 0x5d, 0x5e, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x87, 0x88, 0x89, 0x8a, + 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, + 0x9c, 0x9d, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, + 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, + 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, + 0xd6, 0xd7, 0xd8, 0xd9, 0xdb, 0xdc, 0xdd, 0xde, 0xe0, 0xe1, 0xe2, 0xe4, 0xe5, 0xe6, 0xe8, 0xe9, + 0xea, 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xff +}; + +const uint8_t ff_wp_log2_table[256] = { + 0x00, 0x01, 0x03, 0x04, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0d, 0x0e, 0x10, 0x11, 0x12, 0x14, 0x15, + 0x16, 0x18, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, 0x20, 0x21, 0x22, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a, + 0x2c, 0x2d, 0x2e, 0x2f, 0x31, 0x32, 0x33, 0x34, 0x36, 0x37, 0x38, 0x39, 0x3b, 0x3c, 0x3d, 0x3e, + 0x3f, 0x41, 0x42, 0x43, 0x44, 0x45, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4d, 0x4e, 0x4f, 0x50, 0x51, + 0x52, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, + 0x64, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, + 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, + 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb2, + 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc0, + 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcb, 0xcc, 0xcd, 0xce, + 0xcf, 0xd0, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xd9, 0xda, 0xdb, + 0xdc, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe4, 0xe5, 0xe6, 0xe7, 0xe7, + 0xe8, 0xe9, 0xea, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xee, 0xef, 0xf0, 0xf1, 0xf1, 0xf2, 0xf3, 0xf4, + 0xf4, 0xf5, 0xf6, 0xf7, 0xf7, 0xf8, 0xf9, 0xf9, 0xfa, 0xfb, 0xfc, 0xfc, 0xfd, 0xfe, 0xff, 0xff +}; diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c index 0c85fbe374..0a798438bc 100644 --- a/libavcodec/wavpackenc.c +++ b/libavcodec/wavpackenc.c @@ -644,9 +644,9 @@ static uint32_t log2sample(uint32_t v, int limit, uint32_t *result) uint32_t dbits = count_bits(v); if ((v += v >> 9) < (1 << 8)) { - *result += (dbits << 8) + wp_log2_table[(v << (9 - dbits)) & 0xff]; + *result += (dbits << 8) + ff_wp_log2_table[(v << (9 - dbits)) & 0xff]; } else { - *result += dbits = (dbits << 8) + wp_log2_table[(v >> (dbits - 9)) & 0xff]; + *result += dbits = (dbits << 8) + ff_wp_log2_table[(v >> (dbits - 9)) & 0xff]; if (limit && dbits >= limit) return 1; From patchwork Mon Jan 4 00:28:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24783 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:d110:0:0:0:0:0 with SMTP id i16csp5032044ybg; Sun, 3 Jan 2021 16:30:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjIsOOAulro1q0UCrdxtLf+EtxxXZ6RWlBCRJqyjgKhJ/+O0rAGZe8rCXlCglrQ30k0w/h X-Received: by 2002:adf:9e47:: with SMTP id v7mr40891820wre.185.1609720204661; Sun, 03 Jan 2021 16:30:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609720204; cv=none; d=google.com; s=arc-20160816; b=uAk7NES9Y2j6qwei/l0MWxSyILJoi44M7aPwF7kvj4vME2OgcMw/U+7ryg+vtZvxhB HhJzqL+TPr1bTSE03BkNobgyDWKVvmdJ8a/IZD8YN+nlSit0UC5zrA6TDDIWk3gqQ5Rt P0RMDo2k1nOZ6BeLJAoIl5eEbcPFA7zLTNGrDIvkOYjeN44a5LOELe9L7V1mzg913vkx NZ0B3R6+MdS8HIwClaDqT8vxLPATP/fEzwYLbmuJzl7p/2vwr6hDffocsLRjGX14W0LP bc7x0UKXbQxL3FAS5MUD5pHaPBza9LJAjSlaVKizgxsS/DLZ2s74hy5iVqxMAzaJIDxz iWDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=JshNkLzPVI8m1GO+q2ONVcMIjVl6l4yv9tgjaKEQvMk=; b=Je2qElOyFs5Rqe+6nsmSHb5GvRoJmaI+/+TAxaifo92GjfKdNQXfjsgWvQSjhn0JGZ ebGKJ8UOxMybDcTt14Nd86vz76DlAoOi3Mowh8vNWZZai1s1qc+b0LHJzvui/4VCR1Wm Kfs71TVrJLqVVWfH9J7WeIiOuM8p6je7YT0jw9RnnO0PjnlGK1Fe5ypvGU16Fd14wlxU n9wx+n7YzJ1roHE4iigkYx3zV5lX2szA4dEP4cV/4slVjf5aT6HQm/g/Jlz/tGK9bhUK IDw3yb54/FvtzcOZIyovUBRlxPICS4fm4z5zOvInPpXg/hVJq+8b4FzHULekih3niOVO oegg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=PV4d0R2H; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i27si53466199wrb.115.2021.01.03.16.30.04; Sun, 03 Jan 2021 16:30:04 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=PV4d0R2H; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A086B68AA83; Mon, 4 Jan 2021 02:29:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8AD5068A957 for ; Mon, 4 Jan 2021 02:28:56 +0200 (EET) Received: by mail-wm1-f45.google.com with SMTP id r4so17534821wmh.5 for ; Sun, 03 Jan 2021 16:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=uh+wmULDNOKRAkFJlo4onBkmaqEiVyqiNnY0qb4pHIM=; b=PV4d0R2H/0KIinS4CRWg5sl8mlGDajr4/V+uVk9K9mzBa6SiKFsAbhhQ1yQYYdiHue 4FjqjVkRmfhkSjfxdMIe75cY1MHpzpF+xLH7eOdeTA7IyFSb9agko6AN+Gs2aUmGsgl6 9qL3GXHEDOe+vezqcQp+MOyiebG1Kyyn/l4ou8Py2QmGafBqqil/YUfVrTpQDHfYbV8K 9k/6d1Bcac2DGo6ib+N3B63dg+sTlgfKQ2yz2kX0vswLn7h/FUa6I7mGkQ+0Rkbr+JYU LiYT62CUhjEs6g0tDCXFivfb8WH1z3bj1FHRn6Tdb9ZlmdpEDQeksjeVQe/gQP3nc4A6 KLjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=uh+wmULDNOKRAkFJlo4onBkmaqEiVyqiNnY0qb4pHIM=; b=Rv/u5l+FThpyK+/B2Zyd5Nk/flI4M3BXBdMqX5YgcQiCwf41mAx1p9dp0YZPuZ2Czu HJ8w+AfNhKjSkYD3dqC0CRGl9rS373JhsXIeJEVJFxZR63PHZUZ9bwhq8+8w3EDcq7Zt m2zIWGBLxeHPtuc/JpHg9WXCjOotvKQLeFU8GjrRi4gFZlUi3WCbkzLNHMIbtI6Yh7th 6NgoFyFjc8woB8tHGOispC2R9/fEShMUux0BDBuw73mSbxS/BGLbcHbqeQB6owPW7i4s IfipOMQU/7bFcuxk9ShcxMQZ4tfWiWsDNS5lz2OTkbKHFnRKn988/7fxi4iWtOxVZSdE AlRw== X-Gm-Message-State: AOAM530+VADTFYCYewX9BN7Kc7ESVRo5jRuo+R98tcTBZa7h4Ote/49J Sisc98ktzA4XaypSf/gMCOo09lZ3XHY= X-Received: by 2002:a1c:dd07:: with SMTP id u7mr24840927wmg.51.1609720135900; Sun, 03 Jan 2021 16:28:55 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:55 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:09 +0100 Message-Id: <20210104002816.2321974-9-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/16] avformat/hashenc: Deduplicate (stream)hash options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 4ou8Vq9I240w Content-Length: 2582 Also saves relocations. Signed-off-by: Andreas Rheinhardt --- libavformat/hashenc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/libavformat/hashenc.c b/libavformat/hashenc.c index 5523dfd1cd..1e9faf372a 100644 --- a/libavformat/hashenc.c +++ b/libavformat/hashenc.c @@ -42,8 +42,8 @@ struct HashContext { #define FORMAT_VERSION_OPT \ { "format_version", "file format version", OFFSET(format_version), AV_OPT_TYPE_INT, {.i64 = 2}, 1, 2, ENC } -#if CONFIG_HASH_MUXER -static const AVOption hash_options[] = { +#if CONFIG_HASH_MUXER || CONFIG_STREAMHASH_MUXER +static const AVOption hash_streamhash_options[] = { HASH_OPT("sha256"), { NULL }, }; @@ -57,13 +57,6 @@ static const AVOption framehash_options[] = { }; #endif -#if CONFIG_STREAMHASH_MUXER -static const AVOption streamhash_options[] = { - HASH_OPT("sha256"), - { NULL }, -}; -#endif - #if CONFIG_MD5_MUXER static const AVOption md5_options[] = { HASH_OPT("md5"), @@ -174,7 +167,7 @@ static void hash_free(struct AVFormatContext *s) static const AVClass hashenc_class = { .class_name = "hash muxer", .item_name = av_default_item_name, - .option = hash_options, + .option = hash_streamhash_options, .version = LIBAVUTIL_VERSION_INT, }; @@ -222,7 +215,7 @@ AVOutputFormat ff_md5_muxer = { static const AVClass streamhashenc_class = { .class_name = "stream hash muxer", .item_name = av_default_item_name, - .option = streamhash_options, + .option = hash_streamhash_options, .version = LIBAVUTIL_VERSION_INT, }; From patchwork Mon Jan 4 00:28:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24775 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C7D8844907C for ; Mon, 4 Jan 2021 02:29:03 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AC1F068AA7B; Mon, 4 Jan 2021 02:29:03 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 90ABB68A9D5 for ; Mon, 4 Jan 2021 02:28:57 +0200 (EET) Received: by mail-wm1-f54.google.com with SMTP id 3so17542627wmg.4 for ; Sun, 03 Jan 2021 16:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=sMEtFssiEiStgO6u+E9xxnW241dDc/A3P4iiFhMbPMs=; b=t9rk8AuaFjsV0aUUKMIQPg0kQGRSARkUl4Xn4w5uGd2V/FUYblLkuyzZIIkeK+dstC TIdcxAaoAC0Rh7QmAxz6ftSjixhbLogfM+nLINc/Tdwyde1QkBO/aXt5kRekxbwGaOpf /6DEK8EBxaTvi/lLkmVP2bgPpHbJorNugavcOvoHXboFG1lBTFpyDIPc/103/Jv3m2+o EzvBI6LC4bY0hXuMZ7zalPA893tdyVo8zl7yiHJ0MU7nZfkkoTXEYUCDq6VTcP+EjPUb WMjyceyNr9ARJ1/X8CnCvfsYwKKLmqZKNNqYBaGfBonfqaVUaLy4o/IokYwIfaWpTFJ+ 0eGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=sMEtFssiEiStgO6u+E9xxnW241dDc/A3P4iiFhMbPMs=; b=W7tYa+TsLLfMtHI8Q63i/mkkDXIac3XddQaO/xo2BmfYfZfKn04/Enh2jpb8TEz3/g g8mSCZZkDYI3gECF635+qkTmTpd8SUMPMc8sD4k6KWuPrxULHRkkgYd4y4jqDTTfSEAv S26SXGv8J5Vf70FXVsWvXoupnGFDjTrK3K8ucZHE+3IiIOZq9rRtY7PDAGlskPdST2qW Wdcx6mSWcHL4p/H30YzRfyy/T+I0PHt84Rr6gAr7ugz1BhEyMfuRDX2vMM3ferhEqmIZ AIGMZ5llYqHThDbQD/FxnYmKBYn03YwY72gye2MAVoSF7Wzn+5dqfIE9HdqbQuB2mW27 hgTw== X-Gm-Message-State: AOAM531H1skUgwgiiU4ni4ChI+J97/BGGjOuNsydr0Re28OiYiQKBoS4 lCS/oBYMXjwk0V6rS+OtwyCB/qtn97Q= X-Google-Smtp-Source: ABdhPJz4Nu+n2jRrLsEHA7EFzcCATNhYPsPCVR8aOGc+WYNtEkSA4UyBVwH8+JNx8q5qci43+qO2jg== X-Received: by 2002:a05:600c:21d1:: with SMTP id x17mr24520411wmj.160.1609720136773; Sun, 03 Jan 2021 16:28:56 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:56 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:10 +0100 Message-Id: <20210104002816.2321974-10-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/16] avfilter/vf_convolution: Deduplicate filter options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- I wonder whether one should add an AVFILTER_DEFINE_CLASS2 macro that allows a custom options name. libavfilter/vf_convolution.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c index 3674f5b590..0514c235a9 100644 --- a/libavfilter/vf_convolution.c +++ b/libavfilter/vf_convolution.c @@ -796,15 +796,18 @@ AVFilter ff_vf_convolution = { #endif /* CONFIG_CONVOLUTION_FILTER */ -#if CONFIG_PREWITT_FILTER +#if CONFIG_PREWITT_FILTER || CONFIG_ROBERTS_FILTER || CONFIG_SOBEL_FILTER -static const AVOption prewitt_options[] = { +static const AVOption prewitt_roberts_sobel_options[] = { { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, FLAGS}, { "scale", "set scale", OFFSET(scale), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, 0.0, 65535, FLAGS}, { "delta", "set delta", OFFSET(delta), AV_OPT_TYPE_FLOAT, {.dbl=0}, -65535, 65535, FLAGS}, { NULL } }; +#if CONFIG_PREWITT_FILTER + +#define prewitt_options prewitt_roberts_sobel_options AVFILTER_DEFINE_CLASS(prewitt); AVFilter ff_vf_prewitt = { @@ -824,13 +827,7 @@ AVFilter ff_vf_prewitt = { #if CONFIG_SOBEL_FILTER -static const AVOption sobel_options[] = { - { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, FLAGS}, - { "scale", "set scale", OFFSET(scale), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, 0.0, 65535, FLAGS}, - { "delta", "set delta", OFFSET(delta), AV_OPT_TYPE_FLOAT, {.dbl=0}, -65535, 65535, FLAGS}, - { NULL } -}; - +#define sobel_options prewitt_roberts_sobel_options AVFILTER_DEFINE_CLASS(sobel); AVFilter ff_vf_sobel = { @@ -850,13 +847,7 @@ AVFilter ff_vf_sobel = { #if CONFIG_ROBERTS_FILTER -static const AVOption roberts_options[] = { - { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, FLAGS}, - { "scale", "set scale", OFFSET(scale), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, 0.0, 65535, FLAGS}, - { "delta", "set delta", OFFSET(delta), AV_OPT_TYPE_FLOAT, {.dbl=0}, -65535, 65535, FLAGS}, - { NULL } -}; - +#define roberts_options prewitt_roberts_sobel_options AVFILTER_DEFINE_CLASS(roberts); AVFilter ff_vf_roberts = { @@ -873,3 +864,4 @@ AVFilter ff_vf_roberts = { }; #endif /* CONFIG_ROBERTS_FILTER */ +#endif /* CONFIG_PREWITT_FILTER || CONFIG_ROBERTS_FILTER || CONFIG_SOBEL_FILTER */ From patchwork Mon Jan 4 00:28:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24776 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0AF9E44907C for ; Mon, 4 Jan 2021 02:29:05 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E7F3D68AA98; Mon, 4 Jan 2021 02:29:04 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 73F6468A943 for ; Mon, 4 Jan 2021 02:28:58 +0200 (EET) Received: by mail-wm1-f41.google.com with SMTP id q75so17568237wme.2 for ; Sun, 03 Jan 2021 16:28:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=4fRTdEvow8ONQwpYan4B65Bvb4AFcs9SG9SXDjqYF8g=; b=G9E5H5PYPyLDtTpTucxDiCWY13WrUXyXZFapgQ18FlE6PgXuEPxMSJG/ZQnSWaB7MS Yjc9EPXS2ySzXPt8bQD8gM1Un88vMooia9G/WhaIj+MVlU6bHav/W3YpQbukm4qO4eeV FzW0gbxm6ndEqrfLMputrzTzDfG+GrbQ9yPM0ZboSrA/0DYsWQ+fMrQq6h2GJnUCDaBp SwnIt8CLeB2RUY3qgqFFcxyxCUjc5eWXor8xW1KsDFk1x6nNL6XOBiima8CWsa/+jusD 0YhYfaB6cQSzQLkRTxBMfTEcZOHwXYd4pXNu+fyiPZXODNXJk30z+JbwPZg1VpEPFrrX pIWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=4fRTdEvow8ONQwpYan4B65Bvb4AFcs9SG9SXDjqYF8g=; b=laOZEVHsONRpPmLPSexBBMqY8ng5XQPYc0dC2t+/Hn4lDLa7CLl0zJIbRmlA8DXiBD q3+xsOf7f67LzhSL4ZBu7Jxgf8tcEFP6b9vMOrSzpdXAz01NgYaKqSm4S0MVtHy9pk1q 9AYBedfow3VSLHebVvYr9mIAFaK0qVyFHri+fRPK84OdWrmNAIL2h+mfX8B5uGy8Vrr1 ifK+z0Wtq5Q7+PHCpMB8xUomrn9vz4glT06hNVjsTu2Zqb+X7DOMHs8FqxMOO9DkAKyh CmtvnNIF9uqurKXn2I9yfVHdJIxEwja1BZVv1QQ5UIJViuC7a92rRZlXcEk4hzFcphic mO+A== X-Gm-Message-State: AOAM530jXTLVbj2gHvf12TGCE1laCeoiEay9cZnz8uvMjSv/NRpoJpkX 0zsnZ1/wQccVQKzA28GM9522se2nrhw= X-Google-Smtp-Source: ABdhPJxQ+cb8YeR5mqw7x3GNqBk/LqBc8OrZ6NAZFvFNBVN5wlPrBY2qbgAJTW26RPUcEBapVyTrdA== X-Received: by 2002:a7b:ce0f:: with SMTP id m15mr24296515wmc.56.1609720137649; Sun, 03 Jan 2021 16:28:57 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:57 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:11 +0100 Message-Id: <20210104002816.2321974-11-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 11/16] avfilter/vf_neighbor: Deduplicate options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_neighbor.c | 42 ++++++++++++--------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/libavfilter/vf_neighbor.c b/libavfilter/vf_neighbor.c index 17a9b88265..9cd9001320 100644 --- a/libavfilter/vf_neighbor.c +++ b/libavfilter/vf_neighbor.c @@ -371,60 +371,44 @@ AVFilter ff_vf_##name_ = { \ .process_command = ff_filter_process_command, \ } -#if CONFIG_EROSION_FILTER - -static const AVOption erosion_options[] = { +/* The following options are shared between all filters here; + * the de/inflate filters only use the threshold* options. */ +#define DEINFLATE_OPTIONS_OFFSET (CONFIG_EROSION_FILTER || CONFIG_DILATION_FILTER) +static const AVOption options[] = { +#if CONFIG_EROSION_FILTER || CONFIG_DILATION_FILTER + { "coordinates", "set coordinates", OFFSET(coordinates), AV_OPT_TYPE_INT, {.i64=255}, 0, 255, FLAGS }, +#endif { "threshold0", "set threshold for 1st plane", OFFSET(threshold[0]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, { "threshold1", "set threshold for 2nd plane", OFFSET(threshold[1]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, { "threshold2", "set threshold for 3rd plane", OFFSET(threshold[2]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, { "threshold3", "set threshold for 4th plane", OFFSET(threshold[3]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "coordinates", "set coordinates", OFFSET(coordinates), AV_OPT_TYPE_INT, {.i64=255}, 0, 255, FLAGS }, { NULL } }; +#if CONFIG_EROSION_FILTER + +#define erosion_options options DEFINE_NEIGHBOR_FILTER(erosion, "Apply erosion effect."); #endif /* CONFIG_EROSION_FILTER */ #if CONFIG_DILATION_FILTER -static const AVOption dilation_options[] = { - { "threshold0", "set threshold for 1st plane", OFFSET(threshold[0]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold1", "set threshold for 2nd plane", OFFSET(threshold[1]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold2", "set threshold for 3rd plane", OFFSET(threshold[2]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold3", "set threshold for 4th plane", OFFSET(threshold[3]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "coordinates", "set coordinates", OFFSET(coordinates), AV_OPT_TYPE_INT, {.i64=255}, 0, 255, FLAGS }, - { NULL } -}; - +#define dilation_options options DEFINE_NEIGHBOR_FILTER(dilation, "Apply dilation effect."); #endif /* CONFIG_DILATION_FILTER */ #if CONFIG_DEFLATE_FILTER -static const AVOption deflate_options[] = { - { "threshold0", "set threshold for 1st plane", OFFSET(threshold[0]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold1", "set threshold for 2nd plane", OFFSET(threshold[1]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold2", "set threshold for 3rd plane", OFFSET(threshold[2]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold3", "set threshold for 4th plane", OFFSET(threshold[3]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { NULL } -}; - +#define deflate_options &options[DEINFLATE_OPTIONS_OFFSET] DEFINE_NEIGHBOR_FILTER(deflate, "Apply deflate effect."); #endif /* CONFIG_DEFLATE_FILTER */ #if CONFIG_INFLATE_FILTER -static const AVOption inflate_options[] = { - { "threshold0", "set threshold for 1st plane", OFFSET(threshold[0]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold1", "set threshold for 2nd plane", OFFSET(threshold[1]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold2", "set threshold for 3rd plane", OFFSET(threshold[2]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { "threshold3", "set threshold for 4th plane", OFFSET(threshold[3]), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, FLAGS }, - { NULL } -}; - +#define inflate_options &options[DEINFLATE_OPTIONS_OFFSET] DEFINE_NEIGHBOR_FILTER(inflate, "Apply inflate effect."); #endif /* CONFIG_INFLATE_FILTER */ From patchwork Mon Jan 4 00:28:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24777 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 6742844907C for ; Mon, 4 Jan 2021 02:29:06 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4C13968AA6E; Mon, 4 Jan 2021 02:29:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4313268AA62 for ; Mon, 4 Jan 2021 02:28:59 +0200 (EET) Received: by mail-wm1-f53.google.com with SMTP id a6so16828010wmc.2 for ; Sun, 03 Jan 2021 16:28:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=IKY3yRxJf8NPykDAdtgvrFVesJ0F/fxlp6uIYhs9CEg=; b=FEaR7/6xFMoexbPTU/jf5b05NIhGTkSuZLEB765yl8aXZrWJgno4Ekvona7ik5ouJI zaHW+OhRrVw/aRrffhLqod3dUCGs3sADSPz4jjy3q+QYZXmMZRMRKQn8RqqkuMP7VUvj pbJBWofhHZjJ5I4VUZNeqTPG6vHZYGLYXD1K9+1QYBT3EDsOEKovEtpdwX6tko5LOLXW 3ewm5u6VB7OhnVL+FeiVxj2HHmzllDm1YYblJmTpG+AWK/SxgS5d9w/6tOeRDvQ3AXqD 6O9t+6IpJpXnT5jYbJMbiAHyuaU0B1ggCMtdriQkLz25r8S6CyPAL3BjGy5LDcrlf8of JZVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=IKY3yRxJf8NPykDAdtgvrFVesJ0F/fxlp6uIYhs9CEg=; b=FSTcWbb62a/kizgPvFTwbTB+E7CImNOJzpFiLi8hhV09w8Oc5aMS+HQiWmIrB9kUbN 9x2C2KoZ+b8OFlV+nAqq1ahNExEkQ6hKgEZ/5ikxvrrC0NiyQ4X8UX2ofFbMbYJJej/+ MwGvhqlWheCzK7lCmzzLWb/YUwMbm1wKQ88lA9WXxA4iqY/dN2433O6UCtJwWqoioaNI cNZLl1+ogvAUrS0n74u/urzsY+rzmqhJGkC1aufTOT6/ZYzEUauM5IQyEU9xoOWYY7YP 3XgfjNy66hiGPjPX0TvTRgKkFat+g1hMZAfRwO0bIbf8qSf0QWCNBBi1K1VenHAjwaul kaaQ== X-Gm-Message-State: AOAM533gph9Rd0YVLh4H+F+pL7WF8hv4+ty7iidhWEH+jSs5C7AmiUfC ZvTGYwK0URJBiE1I3RF8jjrI6qqV3Oo= X-Google-Smtp-Source: ABdhPJxUIXVoIjYpUgbiEwbCi7ANsYcQq/cZfmuxHjDd/ZxkzrhwV/Y3O5PuF1zA69UQd+AEaJOHuw== X-Received: by 2002:a7b:c8da:: with SMTP id f26mr25449168wml.155.1609720138490; Sun, 03 Jan 2021 16:28:58 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:58 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:12 +0100 Message-Id: <20210104002816.2321974-12-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 12/16] avfilter/af_asupercut: Deduplicate options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavfilter/af_asupercut.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libavfilter/af_asupercut.c b/libavfilter/af_asupercut.c index 89f4cf0ed0..d5c9a75d5d 100644 --- a/libavfilter/af_asupercut.c +++ b/libavfilter/af_asupercut.c @@ -405,7 +405,7 @@ AVFilter ff_af_asubcut = { AVFILTER_FLAG_SLICE_THREADS, }; -static const AVOption asuperpass_options[] = { +static const AVOption asuperpass_asuperstop_options[] = { { "centerf","set center frequency", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 999999, FLAGS }, { "order", "set filter order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=4}, 4, 20, FLAGS }, { "qfactor","set Q-factor", OFFSET(qfactor),AV_OPT_TYPE_DOUBLE, {.dbl=1.},0.01, 100., FLAGS }, @@ -413,6 +413,7 @@ static const AVOption asuperpass_options[] = { { NULL } }; +#define asuperpass_options asuperpass_asuperstop_options AVFILTER_DEFINE_CLASS(asuperpass); AVFilter ff_af_asuperpass = { @@ -429,14 +430,7 @@ AVFilter ff_af_asuperpass = { AVFILTER_FLAG_SLICE_THREADS, }; -static const AVOption asuperstop_options[] = { - { "centerf","set center frequency", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 999999, FLAGS }, - { "order", "set filter order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=4}, 4, 20, FLAGS }, - { "qfactor","set Q-factor", OFFSET(qfactor),AV_OPT_TYPE_DOUBLE, {.dbl=1.},0.01, 100., FLAGS }, - { "level", "set input level", OFFSET(level), AV_OPT_TYPE_DOUBLE, {.dbl=1.}, 0., 2., FLAGS }, - { NULL } -}; - +#define asuperstop_options asuperpass_asuperstop_options AVFILTER_DEFINE_CLASS(asuperstop); AVFilter ff_af_asuperstop = { From patchwork Mon Jan 4 00:28:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24778 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 5BD7A44907C for ; Mon, 4 Jan 2021 02:29:07 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4933968AA89; Mon, 4 Jan 2021 02:29:07 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 25EE768AA2A for ; Mon, 4 Jan 2021 02:29:00 +0200 (EET) Received: by mail-wm1-f53.google.com with SMTP id a6so16828127wmc.2 for ; Sun, 03 Jan 2021 16:29:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=zI7h0U5jIzaZXx3cuuypUFyWD7k6o5XEDRn6f6c9awg=; b=WLbBzJRsSzBQnbcYZHJabV/v3WWVOV5+VEQF7aVtaTR0g0uMcjY3yiw8/VuJaTV8+7 tKolhW5qSaRZL5zy/5WkKkQTm2G3ZwWRX6IPc06NU1C/cK+goTMOvT/cVuXc3EMyqfB/ 6gKGTPopVBnpRizslGUt8JHtv6Asqc5vRdOykX4G6G2Ek8a0nqRf4zO3pql9h0AK8EBg YGbqX67XjUeQNiWmhGGETFo3Y3xW1Bqsg4KCC0NSst4paZ/n0XsESBQuLDFZMrUoV9e3 Hk19/roQSegm3FR/fpgnaEhk6p8/AxeUF6OeyIC+M8NPM1kQ25scgwjd7i0WwAIyo44r IZbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=zI7h0U5jIzaZXx3cuuypUFyWD7k6o5XEDRn6f6c9awg=; b=lG8vD3CNMuAsiKwF1xugqOOfF43/27tD7z8jquoSLHkeBYb0X0FXDZ4SVhVn8gnN3D b0CZqtaPuaANM0qHcInNXBvwb/IVnoFALsPD06YAxZ5OvxbHR1KpIxQi93lIDVmM7kgz Wls6ytmx9C9RmjAW/ulmHKRUKmFhDCdTViceWYebUpD6WWS0Sn8L7A5YbY6R5PRMAuxb eN7exnXQ5f2UgQyYg6UiGLwOEAFOFRtICHeTnk+gcAlgDxEU3Tes9ixZ9AdF6Pdu0gXm LxdGxRjRJkNxlYvH9oUhnjVyMTTK6UT/CPtRgEv/W0i8Lc3KmWRgmV1WJaE3acpjmJAs WpJA== X-Gm-Message-State: AOAM53205I3rejsf5jlCEiu8J7VKXeELNbR+xyoXzNCnusbgjmUNg1I7 Dwoe52bJ4aWjfUy3URBjB+YfwNnV+UQ= X-Google-Smtp-Source: ABdhPJz3QUJjibGDKCKy7mTsLydHGgvQoiO8qFzZBoRbMFeIdDsFvUnny6C8ADchn+DrKciW79E/hg== X-Received: by 2002:a1c:4e0a:: with SMTP id g10mr24674636wmh.51.1609720139342; Sun, 03 Jan 2021 16:28:59 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:58 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:13 +0100 Message-Id: <20210104002816.2321974-13-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 13/16] avfilter/vf_blend: Deduplicate options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_blend.c | 109 +++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 58 deletions(-) diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c index d59bed823f..ffcc0e9997 100644 --- a/libavfilter/vf_blend.c +++ b/libavfilter/vf_blend.c @@ -60,63 +60,60 @@ typedef struct ThreadData { FilterParams *param; } ThreadData; -#define COMMON_OPTIONS \ - { "c0_mode", "set component #0 blend mode", OFFSET(params[0].mode), AV_OPT_TYPE_INT, {.i64=0}, 0, BLEND_NB-1, FLAGS, "mode"},\ - { "c1_mode", "set component #1 blend mode", OFFSET(params[1].mode), AV_OPT_TYPE_INT, {.i64=0}, 0, BLEND_NB-1, FLAGS, "mode"},\ - { "c2_mode", "set component #2 blend mode", OFFSET(params[2].mode), AV_OPT_TYPE_INT, {.i64=0}, 0, BLEND_NB-1, FLAGS, "mode"},\ - { "c3_mode", "set component #3 blend mode", OFFSET(params[3].mode), AV_OPT_TYPE_INT, {.i64=0}, 0, BLEND_NB-1, FLAGS, "mode"},\ - { "all_mode", "set blend mode for all components", OFFSET(all_mode), AV_OPT_TYPE_INT, {.i64=-1},-1, BLEND_NB-1, FLAGS, "mode"},\ - { "addition", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_ADDITION}, 0, 0, FLAGS, "mode" },\ - { "addition128","", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GRAINMERGE}, 0, 0, FLAGS, "mode" },\ - { "grainmerge", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GRAINMERGE}, 0, 0, FLAGS, "mode" },\ - { "and", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_AND}, 0, 0, FLAGS, "mode" },\ - { "average", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_AVERAGE}, 0, 0, FLAGS, "mode" },\ - { "burn", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_BURN}, 0, 0, FLAGS, "mode" },\ - { "darken", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_DARKEN}, 0, 0, FLAGS, "mode" },\ - { "difference", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_DIFFERENCE}, 0, 0, FLAGS, "mode" },\ - { "difference128", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GRAINEXTRACT}, 0, 0, FLAGS, "mode" },\ - { "grainextract", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GRAINEXTRACT}, 0, 0, FLAGS, "mode" },\ - { "divide", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_DIVIDE}, 0, 0, FLAGS, "mode" },\ - { "dodge", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_DODGE}, 0, 0, FLAGS, "mode" },\ - { "exclusion", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_EXCLUSION}, 0, 0, FLAGS, "mode" },\ - { "extremity", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_EXTREMITY}, 0, 0, FLAGS, "mode" },\ - { "freeze", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_FREEZE}, 0, 0, FLAGS, "mode" },\ - { "glow", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GLOW}, 0, 0, FLAGS, "mode" },\ - { "hardlight", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_HARDLIGHT}, 0, 0, FLAGS, "mode" },\ - { "hardmix", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_HARDMIX}, 0, 0, FLAGS, "mode" },\ - { "heat", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_HEAT}, 0, 0, FLAGS, "mode" },\ - { "lighten", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_LIGHTEN}, 0, 0, FLAGS, "mode" },\ - { "linearlight","", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_LINEARLIGHT},0, 0, FLAGS, "mode" },\ - { "multiply", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_MULTIPLY}, 0, 0, FLAGS, "mode" },\ - { "multiply128","", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_MULTIPLY128},0, 0, FLAGS, "mode" },\ - { "negation", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_NEGATION}, 0, 0, FLAGS, "mode" },\ - { "normal", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_NORMAL}, 0, 0, FLAGS, "mode" },\ - { "or", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_OR}, 0, 0, FLAGS, "mode" },\ - { "overlay", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_OVERLAY}, 0, 0, FLAGS, "mode" },\ - { "phoenix", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_PHOENIX}, 0, 0, FLAGS, "mode" },\ - { "pinlight", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_PINLIGHT}, 0, 0, FLAGS, "mode" },\ - { "reflect", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_REFLECT}, 0, 0, FLAGS, "mode" },\ - { "screen", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_SCREEN}, 0, 0, FLAGS, "mode" },\ - { "softlight", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_SOFTLIGHT}, 0, 0, FLAGS, "mode" },\ - { "subtract", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_SUBTRACT}, 0, 0, FLAGS, "mode" },\ - { "vividlight", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_VIVIDLIGHT}, 0, 0, FLAGS, "mode" },\ - { "xor", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_XOR}, 0, 0, FLAGS, "mode" },\ - { "c0_expr", "set color component #0 expression", OFFSET(params[0].expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },\ - { "c1_expr", "set color component #1 expression", OFFSET(params[1].expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },\ - { "c2_expr", "set color component #2 expression", OFFSET(params[2].expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },\ - { "c3_expr", "set color component #3 expression", OFFSET(params[3].expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },\ - { "all_expr", "set expression for all color components", OFFSET(all_expr), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },\ - { "c0_opacity", "set color component #0 opacity", OFFSET(params[0].opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS },\ - { "c1_opacity", "set color component #1 opacity", OFFSET(params[1].opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS },\ - { "c2_opacity", "set color component #2 opacity", OFFSET(params[2].opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS },\ - { "c3_opacity", "set color component #3 opacity", OFFSET(params[3].opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS },\ - { "all_opacity", "set opacity for all color components", OFFSET(all_opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS} - #define OFFSET(x) offsetof(BlendContext, x) #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM static const AVOption blend_options[] = { - COMMON_OPTIONS, + { "c0_mode", "set component #0 blend mode", OFFSET(params[0].mode), AV_OPT_TYPE_INT, {.i64=0}, 0, BLEND_NB-1, FLAGS, "mode" }, + { "c1_mode", "set component #1 blend mode", OFFSET(params[1].mode), AV_OPT_TYPE_INT, {.i64=0}, 0, BLEND_NB-1, FLAGS, "mode" }, + { "c2_mode", "set component #2 blend mode", OFFSET(params[2].mode), AV_OPT_TYPE_INT, {.i64=0}, 0, BLEND_NB-1, FLAGS, "mode" }, + { "c3_mode", "set component #3 blend mode", OFFSET(params[3].mode), AV_OPT_TYPE_INT, {.i64=0}, 0, BLEND_NB-1, FLAGS, "mode" }, + { "all_mode", "set blend mode for all components", OFFSET(all_mode), AV_OPT_TYPE_INT, {.i64=-1},-1, BLEND_NB-1, FLAGS, "mode" }, + { "addition", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_ADDITION}, 0, 0, FLAGS, "mode" }, + { "addition128","", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GRAINMERGE}, 0, 0, FLAGS, "mode" }, + { "grainmerge", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GRAINMERGE}, 0, 0, FLAGS, "mode" }, + { "and", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_AND}, 0, 0, FLAGS, "mode" }, + { "average", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_AVERAGE}, 0, 0, FLAGS, "mode" }, + { "burn", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_BURN}, 0, 0, FLAGS, "mode" }, + { "darken", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_DARKEN}, 0, 0, FLAGS, "mode" }, + { "difference", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_DIFFERENCE}, 0, 0, FLAGS, "mode" }, + { "difference128", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GRAINEXTRACT}, 0, 0, FLAGS, "mode" }, + { "grainextract", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GRAINEXTRACT}, 0, 0, FLAGS, "mode" }, + { "divide", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_DIVIDE}, 0, 0, FLAGS, "mode" }, + { "dodge", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_DODGE}, 0, 0, FLAGS, "mode" }, + { "exclusion", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_EXCLUSION}, 0, 0, FLAGS, "mode" }, + { "extremity", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_EXTREMITY}, 0, 0, FLAGS, "mode" }, + { "freeze", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_FREEZE}, 0, 0, FLAGS, "mode" }, + { "glow", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_GLOW}, 0, 0, FLAGS, "mode" }, + { "hardlight", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_HARDLIGHT}, 0, 0, FLAGS, "mode" }, + { "hardmix", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_HARDMIX}, 0, 0, FLAGS, "mode" }, + { "heat", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_HEAT}, 0, 0, FLAGS, "mode" }, + { "lighten", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_LIGHTEN}, 0, 0, FLAGS, "mode" }, + { "linearlight","", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_LINEARLIGHT},0, 0, FLAGS, "mode" }, + { "multiply", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_MULTIPLY}, 0, 0, FLAGS, "mode" }, + { "multiply128","", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_MULTIPLY128},0, 0, FLAGS, "mode" }, + { "negation", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_NEGATION}, 0, 0, FLAGS, "mode" }, + { "normal", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_NORMAL}, 0, 0, FLAGS, "mode" }, + { "or", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_OR}, 0, 0, FLAGS, "mode" }, + { "overlay", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_OVERLAY}, 0, 0, FLAGS, "mode" }, + { "phoenix", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_PHOENIX}, 0, 0, FLAGS, "mode" }, + { "pinlight", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_PINLIGHT}, 0, 0, FLAGS, "mode" }, + { "reflect", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_REFLECT}, 0, 0, FLAGS, "mode" }, + { "screen", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_SCREEN}, 0, 0, FLAGS, "mode" }, + { "softlight", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_SOFTLIGHT}, 0, 0, FLAGS, "mode" }, + { "subtract", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_SUBTRACT}, 0, 0, FLAGS, "mode" }, + { "vividlight", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_VIVIDLIGHT}, 0, 0, FLAGS, "mode" }, + { "xor", "", 0, AV_OPT_TYPE_CONST, {.i64=BLEND_XOR}, 0, 0, FLAGS, "mode" }, + { "c0_expr", "set color component #0 expression", OFFSET(params[0].expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, + { "c1_expr", "set color component #1 expression", OFFSET(params[1].expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, + { "c2_expr", "set color component #2 expression", OFFSET(params[2].expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, + { "c3_expr", "set color component #3 expression", OFFSET(params[3].expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, + { "all_expr", "set expression for all color components", OFFSET(all_expr), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, + { "c0_opacity", "set color component #0 opacity", OFFSET(params[0].opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS }, + { "c1_opacity", "set color component #1 opacity", OFFSET(params[1].opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS }, + { "c2_opacity", "set color component #2 opacity", OFFSET(params[2].opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS }, + { "c3_opacity", "set color component #3 opacity", OFFSET(params[3].opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS }, + { "all_opacity", "set opacity for all color components", OFFSET(all_opacity), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS }, { NULL } }; @@ -925,11 +922,7 @@ static int tblend_filter_frame(AVFilterLink *inlink, AVFrame *frame) return 0; } -static const AVOption tblend_options[] = { - COMMON_OPTIONS, - { NULL } -}; - +#define tblend_options blend_options AVFILTER_DEFINE_CLASS(tblend); static const AVFilterPad tblend_inputs[] = { From patchwork Mon Jan 4 00:28:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24779 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 33F5744907C for ; Mon, 4 Jan 2021 02:29:08 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1314C68AA9C; Mon, 4 Jan 2021 02:29:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 17F7C68AA15 for ; Mon, 4 Jan 2021 02:29:00 +0200 (EET) Received: by mail-wm1-f44.google.com with SMTP id n16so6957774wmc.0 for ; Sun, 03 Jan 2021 16:29:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=AKu9df69oGG7GFwmry7/+WhU1u2IPgWA/DV8Rd90Kh8=; b=osjSFCA05dVsoilz+ZEEy5YAVgT7Ad8LYFO63GxU5q+7L5axACtOFafPutLQwzI8AG xPGabp+zSxGandUJpMiRB9PsedgNVNzIBe78o0yEpn3hhqPAdrHqkJAey0i7kxo282Kv VY9gIvuN4rwrH4Cxa0Mf8PcR+lPj9cd4Lj/UMrRjiuGdXVTpURvQ1CsMEoPWVU6Gbybl EvH5cKbQq3+Un7jZ4xmzyh/ppZyYnw4UUwlSLer6xxsnXNcdsv/nCEY/ZDytqpDfSQYX ISoDO1+z98+MPtXFF5RAb2dzqrRFh4+Yvl3QkwY6xgEJfJ5uUXb3qLCRhv1BMJxDq2Lo h/0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=AKu9df69oGG7GFwmry7/+WhU1u2IPgWA/DV8Rd90Kh8=; b=mSiMvjzgB2+jZEqsMWbsmkZzua3bDfWIB94iZIajhl0UuNEGVcK+WanmN03CB+ZPzP XEAt7dNSrSr1L9VztDzgScVXbYY6ahI/vJ79r72X+J1rgUJ20eli+YxFHN9Q1PfPsjdE EOlxZq0a8SRLiaxW8mLdPDu34kfiHRcyI0fFnNEpanULL2ZtLfuJ6g+E85RRXwlMuqtG PNI34xxeH32hF4DpZ1Kt8M47ke66HHvtbSsPbm/7sa4cLsIYy+/2hpjn6yi6QMhPJUHw b89yl98Cd399li6ukYhqm/Bqjifn6XDIP0nEeg2o0GYJz6fHFMjOKbOjFU/TXwgwQPSf +1Ng== X-Gm-Message-State: AOAM531RcvMElO/t3ZHNJIcP6hlpL0NKSRodrbKAU2pJuApHZ42bryo+ MgDj5cfk81HQ6GCIDdSPc8NjA+gpGKo= X-Google-Smtp-Source: ABdhPJxXo5JhtNtnQT/QpZYdOXc9RvXHuCIKn6xIYhqElK1SXtFzXYHAIDqlJuWKR/GFoCDIqed1ng== X-Received: by 2002:a7b:c7d3:: with SMTP id z19mr24933408wmk.31.1609720140179; Sun, 03 Jan 2021 16:29:00 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.28.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:28:59 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:14 +0100 Message-Id: <20210104002816.2321974-14-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 14/16] avfilter/af_biquads: Deduplicate options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavfilter/af_biquads.c | 106 ++++++++------------------------------- 1 file changed, 20 insertions(+), 86 deletions(-) diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 92e711bc4f..4774dfc5b6 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -931,8 +931,8 @@ static const AVOption equalizer_options[] = { DEFINE_BIQUAD_FILTER(equalizer, "Apply two-pole peaking equalization (EQ) filter."); #endif /* CONFIG_EQUALIZER_FILTER */ -#if CONFIG_BASS_FILTER -static const AVOption bass_options[] = { +#if CONFIG_BASS_FILTER || CONFIG_LOWSHELF_FILTER +static const AVOption bass_lowshelf_options[] = { {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS}, {"f", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS}, {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"}, @@ -970,10 +970,18 @@ static const AVOption bass_options[] = { {NULL} }; +#if CONFIG_BASS_FILTER +#define bass_options bass_lowshelf_options DEFINE_BIQUAD_FILTER(bass, "Boost or cut lower frequencies."); #endif /* CONFIG_BASS_FILTER */ -#if CONFIG_TREBLE_FILTER -static const AVOption treble_options[] = { + +#if CONFIG_LOWSHELF_FILTER +#define lowshelf_options bass_lowshelf_options +DEFINE_BIQUAD_FILTER(lowshelf, "Apply a low shelf filter."); +#endif /* CONFIG_LOWSHELF_FILTER */ +#endif /* CONFIG_BASS_FILTER || CONFIG LOWSHELF_FILTER */ +#if CONFIG_TREBLE_FILTER || CONFIG_HIGHSHELF_FILTER +static const AVOption treble_highshelf_options[] = { {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS}, {"f", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS}, {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"}, @@ -1011,8 +1019,16 @@ static const AVOption treble_options[] = { {NULL} }; +#if CONFIG_TREBLE_FILTER +#define treble_options treble_highshelf_options DEFINE_BIQUAD_FILTER(treble, "Boost or cut upper frequencies."); #endif /* CONFIG_TREBLE_FILTER */ + +#if CONFIG_HIGHSHELF_FILTER +#define highshelf_options treble_highshelf_options +DEFINE_BIQUAD_FILTER(highshelf, "Apply a high shelf filter."); +#endif /* CONFIG_HIGHSHELF_FILTER */ +#endif /* CONFIG_TREBLE_FILTER || CONFIG_HIGHSHELF_FILTER */ #if CONFIG_BANDPASS_FILTER static const AVOption bandpass_options[] = { {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS}, @@ -1205,88 +1221,6 @@ static const AVOption allpass_options[] = { DEFINE_BIQUAD_FILTER(allpass, "Apply a two-pole all-pass filter."); #endif /* CONFIG_ALLPASS_FILTER */ -#if CONFIG_LOWSHELF_FILTER -static const AVOption lowshelf_options[] = { - {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS}, - {"f", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS}, - {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"}, - {"t", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"}, - {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HERTZ}, 0, 0, FLAGS, "width_type"}, - {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"}, - {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"}, - {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"}, - {"k", "kHz", 0, AV_OPT_TYPE_CONST, {.i64=KHERTZ}, 0, 0, FLAGS, "width_type"}, - {"width", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS}, - {"w", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS}, - {"gain", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS}, - {"g", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS}, - {"poles", "set number of poles", OFFSET(poles), AV_OPT_TYPE_INT, {.i64=2}, 1, 2, AF}, - {"p", "set number of poles", OFFSET(poles), AV_OPT_TYPE_INT, {.i64=2}, 1, 2, AF}, - {"mix", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS}, - {"m", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS}, - {"channels", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS}, - {"c", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS}, - {"normalize", "normalize coefficients", OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, - {"n", "normalize coefficients", OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, - {"transform", "set transform type", OFFSET(transform_type), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_TTYPE-1, AF, "transform_type"}, - {"a", "set transform type", OFFSET(transform_type), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_TTYPE-1, AF, "transform_type"}, - {"di", "direct form I", 0, AV_OPT_TYPE_CONST, {.i64=DI}, 0, 0, AF, "transform_type"}, - {"dii", "direct form II", 0, AV_OPT_TYPE_CONST, {.i64=DII}, 0, 0, AF, "transform_type"}, - {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"}, - {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"}, - {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"}, - {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"}, - {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"}, - {"s16", "signed 16-bit", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "precision"}, - {"s32", "signed 32-bit", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "precision"}, - {"f32", "floating-point single", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, AF, "precision"}, - {"f64", "floating-point double", 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, AF, "precision"}, - {NULL} -}; - -DEFINE_BIQUAD_FILTER(lowshelf, "Apply a low shelf filter."); -#endif /* CONFIG_LOWSHELF_FILTER */ -#if CONFIG_HIGHSHELF_FILTER -static const AVOption highshelf_options[] = { - {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS}, - {"f", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS}, - {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"}, - {"t", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"}, - {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HERTZ}, 0, 0, FLAGS, "width_type"}, - {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"}, - {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"}, - {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"}, - {"k", "kHz", 0, AV_OPT_TYPE_CONST, {.i64=KHERTZ}, 0, 0, FLAGS, "width_type"}, - {"width", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS}, - {"w", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS}, - {"gain", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS}, - {"g", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS}, - {"poles", "set number of poles", OFFSET(poles), AV_OPT_TYPE_INT, {.i64=2}, 1, 2, AF}, - {"p", "set number of poles", OFFSET(poles), AV_OPT_TYPE_INT, {.i64=2}, 1, 2, AF}, - {"mix", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS}, - {"m", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS}, - {"channels", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS}, - {"c", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS}, - {"normalize", "normalize coefficients", OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, - {"n", "normalize coefficients", OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, - {"transform", "set transform type", OFFSET(transform_type), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_TTYPE-1, AF, "transform_type"}, - {"a", "set transform type", OFFSET(transform_type), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_TTYPE-1, AF, "transform_type"}, - {"di", "direct form I", 0, AV_OPT_TYPE_CONST, {.i64=DI}, 0, 0, AF, "transform_type"}, - {"dii", "direct form II", 0, AV_OPT_TYPE_CONST, {.i64=DII}, 0, 0, AF, "transform_type"}, - {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"}, - {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"}, - {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"}, - {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"}, - {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"}, - {"s16", "signed 16-bit", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "precision"}, - {"s32", "signed 32-bit", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "precision"}, - {"f32", "floating-point single", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, AF, "precision"}, - {"f64", "floating-point double", 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, AF, "precision"}, - {NULL} -}; - -DEFINE_BIQUAD_FILTER(highshelf, "Apply a high shelf filter."); -#endif /* CONFIG_HIGHSHELF_FILTER */ #if CONFIG_BIQUAD_FILTER static const AVOption biquad_options[] = { {"a0", NULL, OFFSET(oa0), AV_OPT_TYPE_DOUBLE, {.dbl=1}, INT32_MIN, INT32_MAX, FLAGS}, From patchwork Mon Jan 4 00:28:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24780 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 1953644907C for ; Mon, 4 Jan 2021 02:29:09 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 08EB768AAE8; Mon, 4 Jan 2021 02:29:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E488068A94D for ; Mon, 4 Jan 2021 02:29:01 +0200 (EET) Received: by mail-wr1-f50.google.com with SMTP id r3so30386997wrt.2 for ; Sun, 03 Jan 2021 16:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=trQMtG8rXB8SJG4PpXwQYIFHJ94hj9eRBNTvwIBlt08=; b=c4abMnF2ydDogHhOBptbBv+q8FSXWhe/+d8pj0heQvAZv3fiGIn1E8cMsZCqncpXrS TpF3GfNSJqZVMVkPvsRYMm6Ee4jiBUff1vuOrSp7gnxy23zUT1zfgEfzRHtUHJatkki4 yvtsmt6jvAKsUH2V9wvDZDijoFAG2SSV4fLa+5lKr0iC4FBri3oYVEqTFiKnpE6AOHLd 7Ah5WlB8A/Qfkaidv4m+uZOdIYagItCJGROtB+nWBpzVz+Idaf8/uXms9FtZJamQQZaa HJypI0tkf+5BhewvvpMSYreY/c1oumkJv+ebjGyfF9Oyk4ukId0pdM4uWipVqv1VCl8T KwcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=trQMtG8rXB8SJG4PpXwQYIFHJ94hj9eRBNTvwIBlt08=; b=c7AWFwOSkq+vuHryG9gp+GrFT5M2LQ5fdh6NgJKFRvypPFgHK2ffQbLaWk1Ypjv8kG ScdkelCkmrVEaz1h7f8YGYciJQO9qC7p9Jg2u7d4JObaSDJp+uV9nqWstaFS6bVrqlsu PJ3uUp3IIWQNuwfoQUOi+1S1YmUD7HPRmYrpKOg8iyadTKL2UHpODZo0hn/ZazVtAP1l jUsppPG7mpM/d9LtCzFKWhEfBTZXaVDTc7uAMyoQGuDSl2lbvSdwxRIYZKvmCanUPmPS vMpdj/hf43s6wK7esa0pzKdef9SrdCIk1Dt0EgKWUrQVIxfBz8jaeV8AL44s89UYer2P T+/Q== X-Gm-Message-State: AOAM532gjx0cKml2og7RbJ26EEyq7/lK6P0jQQqdE3xQsBOJBnBgH2L0 irkjPnas33qUkWQMYlB8S+yD8nURQSQ= X-Google-Smtp-Source: ABdhPJyZLa/X98jqdDJzFgVHZJcupT9FsDwlH/zQoNbFle7+QLHas60kwgBXU2JV7OXYVVAO82S5rg== X-Received: by 2002:adf:83a6:: with SMTP id 35mr55782770wre.274.1609720141165; Sun, 03 Jan 2021 16:29:01 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.29.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:29:00 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:15 +0100 Message-Id: <20210104002816.2321974-15-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 15/16] avfilter/af_biquads: Don't redundantly set AVClass X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" It is already set generically in ff_filter_alloc(). Signed-off-by: Andreas Rheinhardt --- libavfilter/af_biquads.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 4774dfc5b6..4a09f8204a 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -873,7 +873,6 @@ AVFILTER_DEFINE_CLASS(name_); \ static av_cold int name_##_init(AVFilterContext *ctx) \ { \ BiquadsContext *s = ctx->priv; \ - s->class = &name_##_class; \ s->filter_type = name_; \ return 0; \ } \ From patchwork Mon Jan 4 00:28:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24781 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D830844907C for ; Mon, 4 Jan 2021 02:29:09 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BFEE768AAFB; Mon, 4 Jan 2021 02:29:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B3B8468AA2B for ; Mon, 4 Jan 2021 02:29:02 +0200 (EET) Received: by mail-wm1-f53.google.com with SMTP id c124so16816968wma.5 for ; Sun, 03 Jan 2021 16:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=X74S/RmbXQJK6HHAH2RLHjvrzZqnoa/j73wRgD4fDfM=; b=MO5aNaDb3KBXFqP3Ip3CV0T56XmEwBngh7Xl87VufCaQJ6huKXwxP/ihR8nsHjV0vV gy8kZ6blEdCeoMM9nw8M+WwhPimkW1ZxuuBfsQdzcE39e4v1dJ6e6XF+11mkBasFTbYL L/P6ovgK+RVZ0AduiDmhMZx7S6yN451R6f+UwHSKYu6R/bKPGM6fUF2koas/0vjOa6Ko x7RlfodkXAdJZoo70BF7EsoKs3n6BdwKSELYcHWvjryykpHuFLyeRDY2MJkNyPweFp2V 9Jj5vcpmAzwgMx1yAy+9RBAvQun5GWAh9oJOvuM8bQujW+LK80/rUg4o+Bf7NEtluQcy wnbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=X74S/RmbXQJK6HHAH2RLHjvrzZqnoa/j73wRgD4fDfM=; b=AvJOA2UTI5G29iZK8bNP+0rUDhRudHz0jvXwxIsbS1R53BSKgmDMle7DrxLBrVQ8IJ MVOgvPnKRfa2vLj0AsAjm/5qyDBtLLFKyO0SAgdmqi8AFWBsKhJEGTzv+f8rqEhcAmVm yE9C19MCquf2eS69EiGwC/sOADQyXve9jruSH/U83fBHZwyMVmAv7Uzbj3rvFjZ8asIS KVZDj/nUjyGc/UTSTUaE1T3TJJD/Qq42Ukfo1KmfCm/oYRn178UxzZILqDl0xRd9EBqG q4oY3NagjXezcYOUQtm7xpmqYta1pOiaDw47cIQ/aQiQX/2Fc7dVzCmrBqvQPnyKeryr +ecg== X-Gm-Message-State: AOAM531IPqNDj2LC8YVcLsei+hwKPOwMGF/RdLKev8DmJxSI96mM4TPI hEC9svl+LQ7b3zDG7J0dX3O7mXC/Llk= X-Google-Smtp-Source: ABdhPJzPDMjD7FJDdSoc+rARu+gNxnNz5TTqLLeZqTztma/d4+3SYkiBwHh2auJ4qxBKpa2jVhdTAg== X-Received: by 2002:a1c:64c4:: with SMTP id y187mr25135511wmb.165.1609720142101; Sun, 03 Jan 2021 16:29:02 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u26sm30032046wmm.24.2021.01.03.16.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 16:29:01 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Jan 2021 01:28:16 +0100 Message-Id: <20210104002816.2321974-16-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> References: <20210104002816.2321974-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 16/16] avfilter/vsrc_testsrc: Deduplicate options X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavfilter/vsrc_testsrc.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index cf9fa4b2b2..7001f9ba16 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -99,6 +99,9 @@ typedef struct TestSourceContext { #define COMMON_OPTIONS SIZE_OPTIONS COMMON_OPTIONS_NOSIZE +#define NOSIZE_OPTIONS_OFFSET 2 +/* Filters using COMMON_OPTIONS_NOSIZE also use the following options + * via &options[NOSIZE_OPTIONS_OFFSET]. So don't break it. */ static const AVOption options[] = { COMMON_OPTIONS { NULL } @@ -1653,11 +1656,7 @@ AVFilter ff_vsrc_smptehdbars = { #if CONFIG_ALLYUV_FILTER -static const AVOption allyuv_options[] = { - COMMON_OPTIONS_NOSIZE - { NULL } -}; - +#define allyuv_options &options[NOSIZE_OPTIONS_OFFSET] AVFILTER_DEFINE_CLASS(allyuv); static void allyuv_fill_picture(AVFilterContext *ctx, AVFrame *frame) @@ -1734,11 +1733,7 @@ AVFilter ff_vsrc_allyuv = { #if CONFIG_ALLRGB_FILTER -static const AVOption allrgb_options[] = { - COMMON_OPTIONS_NOSIZE - { NULL } -}; - +#define allrgb_options &options[NOSIZE_OPTIONS_OFFSET] AVFILTER_DEFINE_CLASS(allrgb); static void allrgb_fill_picture(AVFilterContext *ctx, AVFrame *frame)