Message ID | GV1P250MB07372727AE8F8913A7620FE78FC3A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Commit | f6c5d04b6d0f3e470897dd98b75940451f348d16 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp2210060pzh; Tue, 26 Sep 2023 15:20:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVx06mfx+fiNBnvzuP2EtijLwb+UHo3Z/xY/ioBvqBIMfylWZrZToXwl6JRIHdg7gNCXCe X-Received: by 2002:a2e:b810:0:b0:2bf:b0d3:20f9 with SMTP id u16-20020a2eb810000000b002bfb0d320f9mr222156ljo.5.1695766845071; Tue, 26 Sep 2023 15:20:45 -0700 (PDT) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id lv3-20020a170906bc8300b0099cb1e742e7si10817784ejb.224.2023.09.26.15.20.44; Tue, 26 Sep 2023 15:20:45 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=cTvKKTwk; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 697D468CAB9; Wed, 27 Sep 2023 01:18:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2082.outbound.protection.outlook.com [40.92.90.82]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 627DF68CB0D for <ffmpeg-devel@ffmpeg.org>; Wed, 27 Sep 2023 01:18:50 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XN7vSd+gQTPVg7O1kpXeWe1wAOKa/PFKB/htjNnQMPPILjMCBDn7Lj7AW+foLIhVFlsYsklcZN9z2kFOLLAIkmvMabzBTokcdCX1EGDWPIB3O98NLoj89C8epjRdDvPPoaphtJbmCoHHod9c99zvJZUEm6+fDcQIu0OprJwnfZItj8gTX5TPMFYKQqGW1afJNKH7BsU7XeEVqa1WhEp57Y1X1UPy/r45pmaRxA0L5lp077k9fPyZt4BW7lKdQCcQBZ2Zl216xqC2cO9N1SC8WhLePIJzO/bpkYG0Au1LMmsnr2P4MlQ/ICcISAfFg8JnRrf25BgmLuDtFUZRFbNhPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3+sZey2ehgfI76zqK2qKV3zEIU9uIMh2IXUw1ZNVA2k=; b=J+ZWwBFAcUXSZmF5rLYpy67eCdtGGBtJ/fZmCBWvAUa0L1qM8py9EEGOZPSzWZoflAJnf4l+DDa8QOtMOilpgBvUK5fk41tQkkFdq9i9gqq23tNgKWTcORGxUzI7myoZzKB0tG1Dy/2Zhl8R4a7ZS2uGiOdQC3aI4fYCHoHuCwjF4oqb4Oi6UZjUf/F+PqEAPLDlzvbbeGEcNEPygFh7hMz86swBccF4ApBmNhFQR1vz1iBLgCSX+2AI56d58NsSmESBbLCgQ4WVdhq9VIQVmNvd18AKT4tFtPhxT1ToBBGSrNziQFEgSAl18fs3eI7t3HPa6Zziq9HrkGU9rfiHIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3+sZey2ehgfI76zqK2qKV3zEIU9uIMh2IXUw1ZNVA2k=; b=cTvKKTwkFXA8t06Kf+Lj+QTJdGEO71eRRFu7D3RzWezoROVHkj9Crz7bcAg6J6A8daMPa25474xIot+sgRLHizprz/niYqZb+27UZT0D7bBAML7Dzpz1g7bGvXo4VpLKoVEqI0CWj3XyVFid6j/tDL2A5bIbPZfBCQVLOnYOSJSM6P1IJj8S52BOu2E9BwE+WUvNX0yjjJCnyFuKXTlwmSQU8LtACxp959nj0Nvv6O4ESEWslvDGEzHPPPCi4ZotIy6ylR2vf3yS8pITbnaKSGHDd/LStrqQYJDw5kTo2b0mUavuNOXKfvbQnz1trUvnZc30+7PBGHbe4LAOFpMACQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU2P250MB0189.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:275::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Tue, 26 Sep 2023 22:18:49 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::9d42:7b4f:71ef:c76a]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::9d42:7b4f:71ef:c76a%3]) with mapi id 15.20.6813.027; Tue, 26 Sep 2023 22:18:49 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Sep 2023 00:17:01 +0200 Message-ID: <GV1P250MB07372727AE8F8913A7620FE78FC3A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.34.1 In-Reply-To: <GV1P250MB073754E215A199E7219CC13A8FC3A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> References: <GV1P250MB073754E215A199E7219CC13A8FC3A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> X-TMN: [tuwA5lJ+cyi7FuB0cqhX4j+78NzUcQuh] X-ClientProxiedBy: FR3P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20230926221732.3711507-29-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DU2P250MB0189:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b967a11-5e11-49be-6fa3-08dbbede8ea8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8cDFrH4hAmZYD160MwQy2pznctkWRuDb7Bbr9BKLizTiagPXQcQ2aMkZH9ae9J0r80lU7fsx1maI8/3VuZu3sm5pVFU63zP5BZYz6p+IOqQQwalguDmL1m/YbCi8ggJGKTn63N8aRhRdBqIE6bHvqyv/k+ix0nFMvaJ/67bXfuvRvu13XPEbVZsxGQtBZq0CodjdQaptYjidWLdTOEmhzujhEMP6qEAjyhFbHYbFGfClSTOsqY1t/lq85Q3NwORqtVVOw2WXNxdP6tX9cTmw28pEbKEH+BjoTF+e0HKRJCAR+YQI4mUKFVnPy2Eykh/MX6UdJs8m2+hbfvBjm8FLCyCeNeZXKwOAXbGQRJ9BafafN9PrOT+WYj6KXRfLp6qhmlCCL2JWYR06x7t9o3+Nf1yOltLFW1QW3ITcsEhJZzceptW6pLnfPvfLASjPYMyxv6ZsPVcf5KKLZdkvHE51CoQyB4Abg37j6AtaFJ6S5u16u+oqpitRCYne2bpkdmn850nnKSkesodVavXTdiHF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MtAmakgbZ3Lyy+KrlArbjR25GJbczvXHofR3bY4oZK6IHZWNSHqgLRCT8equIF0SfwhJBx3s9gqj7VkzHMmrrEErbupTrQmxdhUkYw9vcCt6na6ya4Z9iONudyREIZd36pFv0VMfPR+9hcikRHCI9HOZ5yNO1sEIz/BXhIyrhVqiLD95pAJhEuWaeP9OSC28Mbc0ZM7L3RSOKBqDeoBVxApvIE0J9b0eTlhsIkB+X2wK30Y/bq9uolj3BMX+3Dc1F4ZoalHl8Y7cRUSPMX/ybTtAzY868hSgH986ui11Hf4n9qTVyb1zsYvrGuPpMxedddza8LnasaDWJg28MPWn3ENHztsHCcigJZlj0IPb47lTqS3sjuFwLOsCtIGi1Iaq X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b967a11-5e11-49be-6fa3-08dbbede8ea8 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2023 22:18:49.0760 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2P250MB0189 Subject: [FFmpeg-devel] [PATCH 30/61] avcodec/mimic: Avoid unnecessary VLC structure X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: lFV2bRLkmdHY |
Series |
[FFmpeg-devel,01/61] avcodec/vlc: Add functions to init static VLCElem[] without VLC
|
expand
|
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index a846a07a40..62029e9dd5 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -67,7 +67,7 @@ typedef struct MimicContext { int next_prev_index; } MimicContext; -static VLC block_vlc; +static VLCElem block_vlc[4368]; static const uint8_t huffsyms[] = { 0x10, 0x20, 0x30, 0x00, 0x11, 0x40, 0x50, 0x12, 0x13, 0x21, 0x31, 0x60, @@ -120,8 +120,9 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) static av_cold void mimic_init_static(void) { - VLC_INIT_STATIC_FROM_LENGTHS(&block_vlc, MIMIC_VLC_BITS, FF_ARRAY_ELEMS(huffbits), - huffbits, 1, huffsyms, 1, 1, 0, 0, 4368); + VLC_INIT_STATIC_TABLE_FROM_LENGTHS(block_vlc, MIMIC_VLC_BITS, + FF_ARRAY_ELEMS(huffbits), + huffbits, 1, huffsyms, 1, 1, 0, 0); } static av_cold int mimic_decode_init(AVCodecContext *avctx) @@ -226,7 +227,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale) int value; int coeff; - vlc = get_vlc2(&ctx->gb, block_vlc.table, MIMIC_VLC_BITS, 3); + vlc = get_vlc2(&ctx->gb, block_vlc, MIMIC_VLC_BITS, 3); if (!vlc) /* end-of-block code */ return 0; if (vlc == -1)
Everything besides VLC.table is basically write-only and even VLC.table can be removed by accessing the underlying table directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/mimic.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)