From patchwork Tue Oct 10 01:26:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44216 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp1767792pzb; Mon, 9 Oct 2023 18:25:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFW89R290dkORIZP26BC/fv2TpTOPA53HBgBVJ2PqVuWSdnSf2Os3lz3sL5LwiRx8PJ1pGI X-Received: by 2002:a17:906:30cd:b0:9ad:e20f:142f with SMTP id b13-20020a17090630cd00b009ade20f142fmr14403479ejb.22.1696901115711; Mon, 09 Oct 2023 18:25:15 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id uz10-20020a170907118a00b00992c30f5887si4855357ejb.474.2023.10.09.18.25.15; Mon, 09 Oct 2023 18:25:15 -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="H7/zyRkD"; 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 3436D68C77A; Tue, 10 Oct 2023 04:25:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04olkn2049.outbound.protection.outlook.com [40.92.74.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BE63A68C7F3 for ; Tue, 10 Oct 2023 04:25:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Je34v2agS3uu2mNDUXdzCUNJqljppi+PmETk8zLQglQEaVt6P4sPJbO56TwQyuvd11+GHnHF4pCb50fXvpLyjiyBdL1iPiKdtZH2I/WssmPC3S9XMSih9cA2ZTAu2liIr0AcVdfneb3o+ALcEkxYaNQBcfuUV239YCOkB8sPBJIaCfuAEF8Mt2+RqUusr4oj/ABMUbrLiOtc1Bgs2hTgvmnmbSXnfghRcqoY211t4HgwY/xNu9PSW1HGpM97wDy7+zQ3no03X754oDaSSOfWe0YVRFVRKhQkTCx4evFA5Vp1j9h1ZOweJEAnr/QslQvga1oCBNR8sa+GYWU7X0P3Uw== 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=S0EebqVNzMgQJmtv3tVW2Z84xjQiFZaLvjnu+7U/ZsY=; b=Ctyy+v8X1umLm73bSlarDb69bqdHXqzFqbGYj0rfdbLkgfLr2bH/QII3MQfxJj/bozv/VkkaZWBRMIvzqjyCdiSKMy7M881LFMoR8Nwd8MmdsvLAWqIUGWXOQFGUiDIZjPIV+poX6Tx0EY8ujP46myTjLVR2dqkZt+L5uITZZc/iWYaee3D8OREvDBaeXJl5eWmyfb5OCAZWl9lSlNk+HiASxtlWeBSCsNpf64wLg1tNh7xjxyceW2z3lJ5yft4fWpoCIPS6HVmQPoVu2QimdltLqqQ9v4BgMqjNxaTtd90B7HySR8m6llDAudFUNU5Y1X5TZdR4w4nbG/NxZplNXg== 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=S0EebqVNzMgQJmtv3tVW2Z84xjQiFZaLvjnu+7U/ZsY=; b=H7/zyRkDhJlphNchGRWwS4fFpyxGiAfINOLxYXtqKVpoh+W4g0VBBIJRTVuvoY/hFjgFV04Zao5OPRfzOkjR5jJ2Fsc2Jx6jIuZjzA42JS70t9sRYJHsIgAGcd2gjum42kKxd3tF445VImiwhihuCBto5VQNXCmtpfy0F+6HkC7BPmqV+qCtmvjU95y/IkkP+FwvY0GSz0/wnZFlrL8+XfXxwoYZ33wsTAIMbVdXSczzyEkh4Qhf7rrUGJaSoPjW6blb6dnp/3byZJjRLonmxah6TSR5m8D6dwvKtzoNFUkSpQ9u4uUZLevfHtjO1jIblxUneJLMGD/7y/l0BUJDXQ== Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) by PR3P250MB0193.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:178::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Tue, 10 Oct 2023 01:25:01 +0000 Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b]) by DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b%4]) with mapi id 15.20.6863.032; Tue, 10 Oct 2023 01:25:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Oct 2023 03:26:08 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [bhWL+BiiHIUQ0F0xfrU18UspPhdD2fnRGP7UzbD3WWw=] X-ClientProxiedBy: FR2P281CA0016.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::26) To DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) X-Microsoft-Original-Message-ID: <20231010012610.472071-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0P250MB0747:EE_|PR3P250MB0193:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b57d831-d951-4e0a-d2d8-08dbc92fb8c1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VdzoQ+mbZT8vX6R9t5478G0F81s1tES5s1YOE5yTC8ZoYG4gbKnyA8mbRHVEOOB3a7ld+hrVHGvMw4FShI+KfH6RA/tpzeOlzxXG69AUhW1EY2SRP+6ft3+p+Nf5B0lGUmU5hnXV7nE0ZuPv+7SZRdIZo0BQ0ZunmoHYhFAy1zZ9C4Pnbsxqx0avtAlO+rPK/vwYgtkU3IF6/3t7NKd/MeAldtkebza4oCHK1nPkveS7GNaLg721W9bTrT2hW04IBNsete4Xjkf+rKAEFDTbuprtM8ytpUT3R1ErMlhVFM5EUHR9bm8HFCl/6Dcci30UVNsZtQ0NpKeV8HSRR/gwOBUiknWs1wDMJqsAhRtHon3vdpVJzsdcEXcqi3CW2WFOLhswW5ba25wBysl8q0uWsT/A6fuuKx842ZPPS/PX86mPX9w7imYg9v2rWqCt01z/iAdTWAjsHqA9jKONxM8WQSKf4bzzdcS28UZVvlLoGjk4D2//EDcV3yfE5kXldCzY8/NpJjTggB5RaNHH/FVYURGlWKyMws4K6EeMq22OOiGsvOOhxGI5n+4kCV2VCyUCythAxSc3AT69UvBekedaQ2cdKgIYDOyN/FZsVWmPmo0QDx3NLYEiqiUJaksaAoBg X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vsPrxPGMHLEfbt9U6HnEK6F1v6BW05tb2sGFpU1A955RR89J17NA4TBJ6hP6HKGlmvD2ZkFAFWZq/FDuYBm+yJvT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M4rjZi0dPe+0pifm4/KAE4DYJ5+HJayFNv4cMP0/5Dspp2Isbg8cj96m0I5c6JIyCK08DCbTn6mw3m651aB7OWZbMSjgthMUpVEIt7gQwJT/Fx/PcmitNtt X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b57d831-d951-4e0a-d2d8-08dbc92fb8c1 X-MS-Exchange-CrossTenant-AuthSource: DU0P250MB0747.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 01:25:01.5989 (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: PR3P250MB0193 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/h264idct_template: Don't include h264dec.h X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: 8gxa2/zFC+TX It is only needed for scan8 which is in h264_parse.h. Signed-off-by: Andreas Rheinhardt --- libavcodec/h264idct_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264idct_template.c b/libavcodec/h264idct_template.c index ec0b428c27..db19b5f9fb 100644 --- a/libavcodec/h264idct_template.c +++ b/libavcodec/h264idct_template.c @@ -27,7 +27,7 @@ #include "bit_depth_template.c" #include "libavutil/common.h" -#include "h264dec.h" +#include "h264_parse.h" #include "h264idct.h" void FUNCC(ff_h264_idct_add)(uint8_t *_dst, int16_t *_block, int stride) From patchwork Tue Oct 10 01:27:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44217 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp1772675pzb; Mon, 9 Oct 2023 18:41:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxA7bM5y62ElhRHF+8dTkMeiYGR2IHlqMI7+rUv38QT0MF3l6buBcJf519mo1sPDA0POz0 X-Received: by 2002:a17:906:cc0d:b0:9a5:874a:9745 with SMTP id ml13-20020a170906cc0d00b009a5874a9745mr14645591ejb.26.1696902080414; Mon, 09 Oct 2023 18:41:20 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v16-20020a1709063bd000b00992a9b11cf2si4831702ejf.787.2023.10.09.18.41.19; Mon, 09 Oct 2023 18:41:20 -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=LpnOhuhW; 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 8C28F68C9C5; Tue, 10 Oct 2023 04:41:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2088.outbound.protection.outlook.com [40.92.89.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A0FF68C79A for ; Tue, 10 Oct 2023 04:41:09 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W6DSOzE0sN8+RYGq51IK7yyKF58uEKQQjGhRWcATQ0voSI9yN8oml5rQO9+iG+GCxWA9U0ODRxqmM/4NqLp5qmVudGBpfWctvkcGOBQczQoTRTBMwpPS62VFQyab2Mpz7bOlFRkHCRVC1mYoBj+URVLvhdJXEIKjNHqfbFCWQ8HbUZ6fue/8dbNiJ6yns7F3AMNN7mzlb0DOLnidnoFZIa4W7Tvhn+zAE68DM+g8cuwQVLsHyIQhGwPM78U9sRiepp4DpdQ3xT2cup6WymV99s/ordhbO59WaKGoF49f1njAfR9TeBpCX66KRZ/XO3OBEytFf1nzvasz/YboPFwQBw== 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=BiWLDZhuk2B+jzHL0LnF1QvuI0PIlMxoCRWiree0gyA=; b=XuIM6aq/6R3xkeWJZOc+mJe9xSmDLTaBqs8AfnJ5Z2qCv36MLUUjJr23f8Ma5TRjVY2SkodvFhnLHvXiHI4gXFivbVv7Ld3xcDRRwuXsKLr030MUPNs0GgAuCWfgCCZ0o+AecsUW8bxyMKEbst/xTa4xUcvpC192nfUJWW4Iyxythrqt5mVRVjYBleHeqPpbQo+FZEglQ/fF/xviQ5ubuYSqJF34x18u/enAKN30cE5961uoaOpPhkz6kKZLHTMic/1zJcepVYR+rbp84UzZoqnruzByeXoItll5UT+qG+w18XqqUlcFr6JcEFd3cQkXDi09nbPfKQE6o9P1j7MIQQ== 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=BiWLDZhuk2B+jzHL0LnF1QvuI0PIlMxoCRWiree0gyA=; b=LpnOhuhWtuuI4WMhveujH33gDWHYpuAKgsTcX/6kyhSsjP46LaBw5RYgrxzsNkOWCWpn3NnBvZ4qoZPf4QYNMDaUX7ckiyfG9ntS/CpN6ciikglsGSR4PlXMC1QvCLZUpbEQ9zMQAOPGUapd4AJt00Wn7rGBQBObX27GIAYTrO6/urzqWBTPmA5YUVo+kpV96eSDC4hRlzN3GD8uwhQHgVPLyHi+HfCJrX1Ep1amqu0pUp4r/LuC5tgL+L3+yZHfztztv1h3SPqUNL1/SOTeplTVNi6eMHUSUOkrv/1szNosvoeTV7Xz++5y1WPidRAzHYaljt5Poo5Ka1exb1icrA== Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) by PR3P250MB0193.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:178::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Tue, 10 Oct 2023 01:26:12 +0000 Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b]) by DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b%4]) with mapi id 15.20.6863.032; Tue, 10 Oct 2023 01:26:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Oct 2023 03:27:19 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [GCPO4oRde8JtegZ21NF5hrAQGgHghj+0VQAWOU3CZOs=] X-ClientProxiedBy: FR2P281CA0144.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:98::18) To DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) X-Microsoft-Original-Message-ID: <20231010012720.482970-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0P250MB0747:EE_|PR3P250MB0193:EE_ X-MS-Office365-Filtering-Correlation-Id: 06e78071-f32f-4cfb-afe1-08dbc92fe2ed X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0G7+5MS0Bxs9SUvxjYoOOFxPNcCsk3VsfjNbGUkxraYlAiXQX8ngh9d0VyOuNDRIjPN3cj2gnpNT85uGm561jFezIPTtgMe5nlBSXICMooFVX+c6NIgGIk6CF6jsiJRcUpN/ZIPPsX72mCbbZwiYES1NlQfrq4YbKA/D3LUCLbkrj19OJT0DXtpYo8z7aUpJOjTVHwHo2T9bMtaz4Cyh+3HqUWpM8jNG4oG6TCR6ZO2P7n+8VWpfc1IOBX7yNYkEJornXCiQR0wMv/UTK/ulQqtRepBcZ+212ncX46EFvNQ+B+DUCHCDCOnARoLnmp0V8hQpGO39KQg9bApDwMf2f9tyqiP4r7uIvVaEfiQVpncrQfDBpxpnR3ixL4LsE8OvenzN14IKNQHgTA9gtw/LchN8xuA8ixI0GEZ9tjasctse0fmFYtio5nh90PLrZYMd0NftLyuLRCn6cNme3gaj0Jd0ch14r8yed1Z5u5BK1Z5Oq7cbaJRVdAEyevY2iOXRHBoMRoKVBxLJ7w94LQCnbxanEFoOzOgumn1COEElZpI6WDXIey1nyHzRegOCb3Z/R8yWToZ8GN3IBIPzYcAXMDFkAteaSm8qga4x47qruh17ctuRp4Z3ud+Ioc+ql3+q X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BFpMxbXLYpdSROUboQKhxC+kWV8HZQEzzKPrMU6GMoa+nMdgB66ER8JUWV0h+dxD36dR9/DgMbSfB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WOq7fqbCWquxSIJ+pUlckM4XJor3n1fY5FxDA9Y3Gk1ApoeIK646fU9o8Af4UGv/mkEqTr2KiEwRfIk61roDx5/KmuAvwnpQsrV78xJ1JLtSKRv444D X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06e78071-f32f-4cfb-afe1-08dbc92fe2ed X-MS-Exchange-CrossTenant-AuthSource: DU0P250MB0747.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 01:26:12.1688 (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: PR3P250MB0193 Subject: [FFmpeg-devel] [PATCH 2/3] avcodec/error_resilience: Constify ThreadFrame* X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: bkDQkA9j6oJJ Forgotten in 0eb399ac3953da16f880a1e455bb009a45f76d49. While just at it, also use a forward declaration. Signed-off-by: Andreas Rheinhardt --- libavcodec/error_resilience.h | 3 +-- libavcodec/h264dec.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/error_resilience.h b/libavcodec/error_resilience.h index b03f8ec896..1346639c3c 100644 --- a/libavcodec/error_resilience.h +++ b/libavcodec/error_resilience.h @@ -24,7 +24,6 @@ #include "avcodec.h" #include "me_cmp.h" -#include "threadframe.h" ///< current MB is the first after a resync marker #define VP_START 1 @@ -40,7 +39,7 @@ typedef struct ERPicture { AVFrame *f; - ThreadFrame *tf; + const struct ThreadFrame *tf; // it is the caller's responsibility to allocate these buffers int16_t (*motion_val[2])[2]; diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index b4ea0ed880..0009b539e7 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -43,6 +43,7 @@ #include "h264qpel.h" #include "h274.h" #include "mpegutils.h" +#include "threadframe.h" #include "videodsp.h" #define H264_MAX_PICTURE_COUNT 36 From patchwork Tue Oct 10 01:27:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44218 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp1772872pzb; Mon, 9 Oct 2023 18:42:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxrKtua2yV9HVuaLdapOjV14DFy5gPfF9FkV+rZ4vTJTl8CEG2ofoRH89QSZuH25Ke76Nd X-Received: by 2002:a17:907:7850:b0:9ae:75dc:4589 with SMTP id lb16-20020a170907785000b009ae75dc4589mr16898337ejc.64.1696902121492; Mon, 09 Oct 2023 18:42:01 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g5-20020a170906394500b00992e9af8186si4973683eje.13.2023.10.09.18.42.00; Mon, 09 Oct 2023 18:42:01 -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=HtMRxoek; 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 AE2B468CA69; Tue, 10 Oct 2023 04:41:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01olkn2029.outbound.protection.outlook.com [40.92.66.29]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B52AF68C79A for ; Tue, 10 Oct 2023 04:41:56 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UmqxkzabTxHjf3lnj/hEf5xpFIjtmBcO7VNrJsPLjo2Hu1fFn8gFlAsF1THncJEqxmxlgRd5e5Ex5/8kNbnqnIk71zSZW2efeege2O/9OTUhlupugONkKCqsAgwIyVJ4Fy1jwisDGCFzamUwWWCLx5ed1e36H1CEHe5jKrqV3mKuf7aJjRMlz4mZp0x5kRob8cMD7BwOjUFKBAUCdwGLEJ1SfQT43kc1kvThMKoZFFtDmPv+g7RyemHxFGWhj+BwEmJnZHiaVvYohgFdWfJxhXQUXQ1Y/B4iDzqcblLOtNl0BOfKEAZxU1LjfKZDQgBcVVV7fgTCkMHL4/mpgGhp/g== 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=ZD/uSzAaONPxDVbRPBA+tF+W3u9mSmQQSrJadG12fis=; b=f95egDmilVw3sPQe9oaoTqdjvgW451DfeRCZPxkHXR9GN0HeK5hsgsoigIVDuQvNbDSGfirNqKd/hudJ43niZ/cnE6cnZwsmOgczesgA92ONthHA/vBZGGF5fhpK6JUqdGmdHabjFb9WLxqSezTrY7wGDOp0unalPDXHKu0XLtCv3K7X9Lz8U/DAlO1IrXd5scsDR7+b0bGe1225+fBmc10BjlooOAaUp3sO4FHegBNIPZjKpUxsy1LEHRUr1RytIIWogHFGtV/HmShjY0wZsIVZhEWtwpSjUMEoM7e5JumuBs5Gh5T0G6xTbe8eimE2tEimw4SzXpRi8P1fWACCsQ== 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=ZD/uSzAaONPxDVbRPBA+tF+W3u9mSmQQSrJadG12fis=; b=HtMRxoekW4cocQXSw0Q2ZTOa/c5NtH/dO3unsrktsrOYKb6D6GQcVvwj8Uccy8BUuNaEyyuNTNrqinGw/kXwm5Ar9nFjbW5NdsTJcz3J5ALcGAbm58NoZymrFw66AsbHjOBci/u3Gw1B4NCaRoM0NKWUw0kLxgyN3O1XHxGQjkNc9wOQAYvdIorcz/WU/D5bf8VVhy1MXqufjD4ezlK4A3pPVrFrD5wMet/Fonn5C0peUWo1az4kd+kwv7X/BvBm2PR4uQz8UBbWjWe7M7lLY0W0HWBl9L9JgZm98Qtp2v7SdlUA1U/Gqifie5FKQcKT4vGDDm1EOlmGqOvgKXLtJA== Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) by PR3P250MB0193.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:178::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Tue, 10 Oct 2023 01:26:14 +0000 Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b]) by DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b%4]) with mapi id 15.20.6863.032; Tue, 10 Oct 2023 01:26:14 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Oct 2023 03:27:20 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [6sB93/NKnvf0HCLz9b4EpvmBl7d2xLJKiIfvzUuPVuc=] X-ClientProxiedBy: FR2P281CA0144.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:98::18) To DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) X-Microsoft-Original-Message-ID: <20231010012720.482970-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0P250MB0747:EE_|PR3P250MB0193:EE_ X-MS-Office365-Filtering-Correlation-Id: f6eb7649-d3ac-4ee9-9fe6-08dbc92fe480 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eau017L9sjNdOmNtDOO741TAFRQWkgbzs7B0xOboKKZQDgNhNB+wuj1t9OE4SHad3ZxSbw2Zvnt3a7JQAl6XSPD+7wKPw7ML4hatfT8D2+YKVI3kVVNFkEqXVGjn/XCgmEX6W5pwdkx5QzJr771W4ylWENvw0DW9yKB14zB9ZT8e+NPZcV5vRy9rMZVhN/L4QXeFtqmtC9R/FsJZYT8a6xpIiXN/KygxxLt18grHzQEUHUTpfjc8GXRUlt/TIvLioVdo8PSvCSHCPsFEwOtGreUCwe/i11zzymMJEBn7hBQ02HKRQ2Tm82zkbCPsCw3/Xj6vj0ezgE1Fdxe032m4eXTXZG9TsS9z6U6KO5o2uo1C/zTQmMFp6EUgU/735xAHl8dac9r4K4d97HGicX06JIy94MI9hRmHK+BZnENs0I+2Aj0K/rttVzxUCYZ8amNlj3ODF2Gq+fYg716ZHisORHo2JX5k7zYTQSxpIqMJ1HHC3bZFKj7H2DO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Z1LDsCWLJzC3ANlhuVcIrFrFePQlzrCT42u36YjxykOapqUOadFanu95VD4+QrS//6MHZrIpGLcK0iS0rKM0YSycMKIwbDYDzdfYAt9zxOwov4GwmMZpxGJajivqLBWu+RnUb+U27vM69e3YiZrYS+xw2/A3Zz3dgtPvRigT34mzCJxWWg80+Cx0M2LgcZt5OMFPZeDgkNDi8ucF3V4r8ll9mOnRDKUDOicJe4euOLY+BIuJb2hsd5F5mcGuiZroVNDhErvU/G7OpG9h4tRjohpZNx1e4cVw6dQ5Dp91YPC1sxvK4HZOBqognbmr5Slt2emwTz02WgVU54EWTrIuK7yYfA6gr2j2mAPrNyXe8sL6M8t8Xeo1lk5oK4LWteKSD5y4vghm8FjXA2JX0Rny X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6eb7649-d3ac-4ee9-9fe6-08dbc92fe480 X-MS-Exchange-CrossTenant-AuthSource: DU0P250MB0747.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 01:26:14.7340 (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: PR3P250MB0193 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/h264dec: Constify H.264 decoder X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: cc0jmBViDHWX Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_cavlc.c | 2 +- libavcodec/h264_direct.c | 6 +++--- libavcodec/h264_picture.c | 6 +++--- libavcodec/h264_refs.c | 7 ++++--- libavcodec/h264_slice.c | 23 +++++++++++------------ libavcodec/h264dec.c | 4 ++-- libavcodec/h264dec.h | 6 +++--- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index a06b775422..de223611c6 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -282,7 +282,7 @@ static int8_t cavlc_level_tab[7][1<non_zero_count_cache[index8 - 1]; diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index 014491e29b..587274aa6d 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -34,7 +34,7 @@ #include -static int get_scale_factor(H264SliceContext *sl, +static int get_scale_factor(const H264SliceContext *sl, int poc, int poc1, int i) { int poc0 = sl->ref_list[0][i].poc; @@ -83,7 +83,7 @@ static void fill_colmap(const H264Context *h, H264SliceContext *sl, int map[2][16 + 32], int list, int field, int colfield, int mbafi) { - H264Picture *const ref1 = sl->ref_list[1][0].parent; + const H264Picture *const ref1 = sl->ref_list[1][0].parent; int j, old_ref, rfield; int start = mbafi ? 16 : 0; int end = mbafi ? 16 + 2 * sl->ref_count[0] : sl->ref_count[0]; @@ -150,7 +150,7 @@ void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext * if (h->picture_structure == PICT_FRAME) { int cur_poc = h->cur_pic_ptr->poc; - int *col_poc = sl->ref_list[1][0].parent->field_poc; + const int *col_poc = sl->ref_list[1][0].parent->field_poc; if (col_poc[0] == INT_MAX && col_poc[1] == INT_MAX) { av_log(h->avctx, AV_LOG_ERROR, "co located POCs unavailable\n"); sl->col_parity = 1; diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c index 9353e4b445..c3726059f7 100644 --- a/libavcodec/h264_picture.c +++ b/libavcodec/h264_picture.c @@ -94,7 +94,7 @@ static void h264_copy_picture_params(H264Picture *dst, const H264Picture *src) dst->needs_fg = src->needs_fg; } -int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src) +int ff_h264_ref_picture(H264Context *h, H264Picture *dst, const H264Picture *src) { int ret, i; @@ -194,7 +194,7 @@ fail: return ret; } -void ff_h264_set_erpic(ERPicture *dst, H264Picture *src) +void ff_h264_set_erpic(ERPicture *dst, const H264Picture *src) { #if CONFIG_ERROR_RESILIENCE int i; @@ -240,7 +240,7 @@ int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup) av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode picture\n"); } else if (!in_setup && cur->needs_fg && (!FIELD_PICTURE(h) || !h->first_field)) { - AVFrameSideData *sd = av_frame_get_side_data(cur->f, AV_FRAME_DATA_FILM_GRAIN_PARAMS); + const AVFrameSideData *sd = av_frame_get_side_data(cur->f, AV_FRAME_DATA_FILM_GRAIN_PARAMS); err = AVERROR_INVALIDDATA; if (sd) // a decoding error may have happened before the side data could be allocated diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 1b24c493df..55f7255f01 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -48,7 +48,7 @@ static void pic_as_field(H264Ref *pic, const int parity) pic->poc = pic->parent->field_poc[parity == PICT_BOTTOM_FIELD]; } -static void ref_from_h264pic(H264Ref *dst, H264Picture *src) +static void ref_from_h264pic(H264Ref *dst, const H264Picture *src) { memcpy(dst->data, src->f->data, sizeof(dst->data)); memcpy(dst->linesize, src->f->linesize, sizeof(dst->linesize)); @@ -58,7 +58,8 @@ static void ref_from_h264pic(H264Ref *dst, H264Picture *src) dst->parent = src; } -static int split_field_copy(H264Ref *dest, H264Picture *src, int parity, int id_add) +static int split_field_copy(H264Ref *dest, const H264Picture *src, + int parity, int id_add) { int match = !!(src->reference & parity); @@ -275,7 +276,7 @@ static void h264_fill_mbaff_ref_list(H264SliceContext *sl) int list, i, j; for (list = 0; list < sl->list_count; list++) { for (i = 0; i < sl->ref_count[list]; i++) { - H264Ref *frame = &sl->ref_list[list][i]; + const H264Ref *frame = &sl->ref_list[list][i]; H264Ref *field = &sl->ref_list[list][16 + 2 * i]; field[0] = *frame; diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 27428dea33..1311ea0437 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -266,7 +266,7 @@ fail: return (ret < 0) ? ret : AVERROR(ENOMEM); } -static int find_unused_picture(H264Context *h) +static int find_unused_picture(const H264Context *h) { int i; @@ -285,9 +285,8 @@ static int find_unused_picture(H264Context *h) (pic) < (old_ctx)->DPB + H264_MAX_PICTURE_COUNT) ? \ &(new_ctx)->DPB[(pic) - (old_ctx)->DPB] : NULL) -static void copy_picture_range(H264Picture **to, H264Picture **from, int count, - H264Context *new_base, - H264Context *old_base) +static void copy_picture_range(H264Picture **to, H264Picture *const *from, int count, + H264Context *new_base, const H264Context *old_base) { int i; @@ -583,8 +582,8 @@ FF_ENABLE_DEPRECATION_WARNINGS } static av_always_inline void backup_mb_border(const H264Context *h, H264SliceContext *sl, - uint8_t *src_y, - uint8_t *src_cb, uint8_t *src_cr, + const uint8_t *src_y, + const uint8_t *src_cb, const uint8_t *src_cr, int linesize, int uvlinesize, int simple) { @@ -1185,7 +1184,7 @@ static int h264_export_frame_props(H264Context *h) } if (sps->pic_struct_present_flag && h->sei.picture_timing.present) { - H264SEIPictureTiming *pt = &h->sei.picture_timing; + const H264SEIPictureTiming *pt = &h->sei.picture_timing; switch (pt->pic_struct) { case H264_SEI_PIC_STRUCT_FRAME: break; @@ -1983,7 +1982,7 @@ static int h264_slice_init(H264Context *h, H264SliceContext *sl, if (j < sl->list_count && i < sl->ref_count[j] && sl->ref_list[j][i].parent->f->buf[0]) { int k; - AVBuffer *buf = sl->ref_list[j][i].parent->f->buf[0]->buffer; + const AVBuffer *buf = sl->ref_list[j][i].parent->f->buf[0]->buffer; for (k = 0; k < h->short_ref_count; k++) if (h->short_ref[k]->f->buf[0]->buffer == buf) { id_list[i] = k; @@ -2178,9 +2177,9 @@ int ff_h264_get_slice_type(const H264SliceContext *sl) static av_always_inline void fill_filter_caches_inter(const H264Context *h, H264SliceContext *sl, int mb_type, int top_xy, - int left_xy[LEFT_MBS], + const int left_xy[LEFT_MBS], int top_type, - int left_type[LEFT_MBS], + const int left_type[LEFT_MBS], int mb_xy, int list) { int b_stride = h->b_stride; @@ -2237,7 +2236,7 @@ static av_always_inline void fill_filter_caches_inter(const H264Context *h, } { - int8_t *ref = &h->cur_pic.ref_index[list][4 * mb_xy]; + const int8_t *ref = &h->cur_pic.ref_index[list][4 * mb_xy]; const int *ref2frm = &h->ref2frm[sl->slice_num & (MAX_SLICES - 1)][list][(MB_MBAFF(sl) ? 20 : 2)]; uint32_t ref01 = (pack16to32(ref2frm[ref[0]], ref2frm[ref[1]]) & 0x00FF00FF) * 0x0101; uint32_t ref23 = (pack16to32(ref2frm[ref[2]], ref2frm[ref[3]]) & 0x00FF00FF) * 0x0101; @@ -2264,7 +2263,7 @@ static int fill_filter_caches(const H264Context *h, H264SliceContext *sl, int mb const int mb_xy = sl->mb_xy; int top_xy, left_xy[LEFT_MBS]; int top_type, left_type[LEFT_MBS]; - uint8_t *nnz; + const uint8_t *nnz; uint8_t *nnz_cache; top_xy = mb_xy - (h->mb_stride << MB_FIELD(sl)); diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 796f80be8d..105bd9f631 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -66,7 +66,7 @@ static void h264_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, int (*mv)[2][4][2], int mb_x, int mb_y, int mb_intra, int mb_skipped) { - H264Context *h = opaque; + const H264Context *h = opaque; H264SliceContext *sl = &h->slice_ctx[0]; sl->mb_x = mb_x; @@ -832,7 +832,7 @@ static int get_consumed_bytes(int pos, int buf_size) return pos; } -static int h264_export_enc_params(AVFrame *f, H264Picture *p) +static int h264_export_enc_params(AVFrame *f, const H264Picture *p) { AVVideoEncParams *par; unsigned int nb_mb = p->mb_height * p->mb_width; diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 0009b539e7..14e9038275 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -165,7 +165,7 @@ typedef struct H264Ref { int poc; int pic_id; - H264Picture *parent; + const H264Picture *parent; } H264Ref; typedef struct H264SliceContext { @@ -653,7 +653,7 @@ static av_always_inline int get_chroma_qp(const PPS *pps, int t, int qscale) int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup); -int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src); +int ff_h264_ref_picture(H264Context *h, H264Picture *dst, const H264Picture *src); int ff_h264_replace_picture(H264Context *h, H264Picture *dst, const H264Picture *src); void ff_h264_unref_picture(H264Context *h, H264Picture *pic); @@ -678,6 +678,6 @@ void ff_h264_flush_change(H264Context *h); void ff_h264_free_tables(H264Context *h); -void ff_h264_set_erpic(ERPicture *dst, H264Picture *src); +void ff_h264_set_erpic(ERPicture *dst, const H264Picture *src); #endif /* AVCODEC_H264DEC_H */