From patchwork Sat Sep 11 23:42:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30194 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:dc8a:0:0:0:0:0 with SMTP id y132csp2721513ybe; Sat, 11 Sep 2021 16:44:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEVyoO9XSt6zyx9hIMxT1U7TT/V5OyaE5w9GqKERKS48nkNgvD/3nIhr7OagjV6yyGalCz X-Received: by 2002:a17:906:fb13:: with SMTP id lz19mr4855823ejb.516.1631403849012; Sat, 11 Sep 2021 16:44:09 -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 cx20si3069832edb.163.2021.09.11.16.44.08; Sat, 11 Sep 2021 16:44:09 -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=HCVE+FYp; 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 B59B268A9DA; Sun, 12 Sep 2021 02:43:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068087.outbound.protection.outlook.com [40.92.68.87]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9506168A8A3 for ; Sun, 12 Sep 2021 02:43:04 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Eczvgv6Hdb5yaGt/0E+5FCE7wZNbkHSi47prnulBsi10J6b/ICIyqPwO02SuNcFiTmM7676ZKPU3+gvGQrI6msW/f+pt8R45qzRMC74PK8cdTptJdcL6WzU//aXXQDa4H2bgCdyTOtOi7WLww8+JtxYmsu689x6rUrS7nLnkZe+D5eLYCgC4SbJYw8JBi6u/HBusrCAzqSHs8AA3EZfp2uRU9OkudQHniaKdX9QL46fXJR1qyG3U3zK3boo1N3p5T/23A74JoK39rJlLd+NRAGRuOZR4gyAuRXHB/PCfjIAKvMs1kF5ZBDutc46IyKsWhinaTQX8o9iGV/83oLp7YA== 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; bh=8cvQx/meb+742PHxnEJ9m9SecQkPwGNEMstbOFMXBOI=; b=ZpirLjjQE2WkqwWscbE0ltcgbNot/7YtH4Rvf3u6bxkGTCRG1R8wB0uZbq+pC9G1Amco1tOTnoOCcMvSlzj6xsu00HZhFm3tXaUPVGUZSw9mosMDHS29axUAipiQjQFQyHKvafZAuwAhftETmn565o3wnC3VTx3DaFB5c0mjw6VTukGCeKLhiwWj+U2LlBqbz3n4A+R6E2SdU94KlLd7lqX/+XcTeJrk+TObVDr7WGNP+uvxPtlkMmYeYqicM9mSFfWCpX9UAb5ZfQ8iLm2TAGSbotmj6Z6q+cpHDzbDwBqKqaZiZbMTmU/7t7MvPF+NWhVY/OQ4bENTDjhMUltS4w== 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=8cvQx/meb+742PHxnEJ9m9SecQkPwGNEMstbOFMXBOI=; b=HCVE+FYpuRqWBPRIkVIEL1qbCmcA/29nTjZjkxxvPGbAn/YvDauoHRALj511I1Mc+Pyx4z9q2fomeHBe2UMU4kNx/S6rIz4M4o0O7uSJ9TZJg+FptMzlDpgs9vHA7NPdC4P92gVZiDCkYou76MvQ1ONarIJ76Sc281FGR9kiTAcPoT+iKuqmMZpwYci80LuUFvttBQt5c4zyqX2r9GBy9bL5RprzAL76BA3Se03t7X4DUBSDIwDz296IurGMKRnX56ZkWTI7GaYZsIHIyzJMM3WT52llQSgyT5R3BAQYlXklvkf1x5EDtOCLhSFkN1831TJlS4zWvt8BI9FTq8MMfQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR0302MB3399.eurprd03.prod.outlook.com (2603:10a6:209:20::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Sat, 11 Sep 2021 23:43:02 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%4]) with mapi id 15.20.4500.018; Sat, 11 Sep 2021 23:43:02 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 12 Sep 2021 01:42:25 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [pCLDLKlas0+Sesk26XR5p61UFINRFFPs] X-ClientProxiedBy: PR0P264CA0107.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::23) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210911234244.2306938-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0107.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Sat, 11 Sep 2021 23:43:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 705adf57-6092-4ce5-7d20-08d9757de4b0 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UK2WvWpU8a7bwaWAHGhJ/PKUkpgh/HvA3nvY8oIMeTaAF2gtIHpVe4n3wqL20aGVpWfz8saWbBPUoAnzENokReGyevP6mxERCP3fJOG46QllUm7QMBqmiL2Mmb6dY2/iEsY+JKJtuu/BVx0NG4tU8fD8b3VY1qjNw6KeCl3YEEpVb3gi8mork57VFzK0ZXRjdvXHKoJijtKp65EONbdbw3LQhnxBCeXjSEoK8U6/XJZgCDCjTjftFV1btfdJJgLhA7Kt6ZVC/njz8p7KvqK8jsfQTDCV26sBN2BHdYCZ/QwELBgkZSknDh4uKejcAvmZgIScS4Td4no3a+R4Bq3O73XeBu5XL69iYCB5pQpe7kshqN8eif09DIwakITHca0HVrkLKuAKxaWU63OKf8kBZ2cXbu8w/Ivn0VLABPAZAHbVmpjpK33SVUSI/twFaToHmdEQxhn2e6YTU1UZYxOeQe6Ar/J3P7QMaZSGuQfHo4wQ+K3628MiLj59QGn117FyiBze4ABnv4o0mwj5iX6fxjDV7y83afxLEa0PvJCnMZnLuTTb4SSsfS/V8M3vAclsllnhNIJ3A0/l5M2j3lmY63e2adPk8HpwcXDFoSplrJhfb6TX/u4QsCnb0pb6xVG2evs1n+cWU0tr6T6I3z8/vHCyqKktizXt7BJjIeLR7T9+ylF5xq+yHSrGG32ycGuJiTj8J85b5QE2A== X-MS-TrafficTypeDiagnostic: AM6PR0302MB3399: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YQxiX6alNYfHDRbFmTrGz3156SBUCKd7uFFKhGjEUeIq1JhE/r+WfRiNvHEoAHHe6ZRRdaLcxqQp0XfxaGMEFWNJ8fRzJaq7u+wvq8q9NQH2+/NrMyGDDiTzSIYBdk6Wwd2y3fcjD3ITz4QODvhJGUhN0gteDmNlxiSSPdiyVRviLqYYnygk0X705zw8SEmxqio6YRTyo5uhWpxoIhmrPngfXXx7TV0lcCaHDYd7V0adVETJ2yv6qIgKPIZU/JiUCZSR9lH5v9LvPuyXUDq3gEukWQkor9ZrL+aWTnqI1QgEc98ICKt/STKsxAU6Mva889yFWkq39mu0c27DsCac8Yphau8NIIh97fQO+39Mi/CeqlyrPfpGC6nS21uFUZ6SxQxhc+DVyKV+Ok3nqDngXpOmwFKH3lGjiAm/3hKX6rf9ElE3cKbZv+7COTCb7S+N X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8+V1IrOxOLzYBzNY2ZhepM44bR4s8mCN84+ywQ/GzPmVVDSihLcZt8IZLLOdC3M1EO/H75KW5xgfxke5Bu9XroaJAWZhpua/N+ej99/5mz6X8fJg0msBrB0sKsygQSc6FrfO0B7klD7BAD1Dvwv8bw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 705adf57-6092-4ce5-7d20-08d9757de4b0 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2021 23:43:01.9790 (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: AM6PR0302MB3399 Subject: [FFmpeg-devel] [PATCH 19/38] avfilter/vf_format: Deduplicate AVClasses 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: FkPtzIRSBNsI Content-Length: 1836 Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_format.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index b34675b8e0..0a5c739db6 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -140,10 +140,9 @@ static const AVOption options[] = { { NULL } }; -#if CONFIG_FORMAT_FILTER +AVFILTER_DEFINE_CLASS_EXT(format, "(no)format", options); -#define format_options options -AVFILTER_DEFINE_CLASS(format); +#if CONFIG_FORMAT_FILTER static const AVFilterPad avfilter_vf_format_inputs[] = { { @@ -179,9 +178,6 @@ const AVFilter ff_vf_format = { #if CONFIG_NOFORMAT_FILTER -#define noformat_options options -AVFILTER_DEFINE_CLASS(noformat); - static const AVFilterPad avfilter_vf_noformat_inputs[] = { { .name = "default", @@ -200,6 +196,7 @@ static const AVFilterPad avfilter_vf_noformat_outputs[] = { const AVFilter ff_vf_noformat = { .name = "noformat", .description = NULL_IF_CONFIG_SMALL("Force libavfilter not to use any of the specified pixel formats for the input to the next filter."), + .priv_class = &format_class, .init = init, .uninit = uninit, @@ -207,7 +204,6 @@ const AVFilter ff_vf_noformat = { .query_formats = query_formats, .priv_size = sizeof(FormatContext), - .priv_class = &noformat_class, FILTER_INPUTS(avfilter_vf_noformat_inputs), FILTER_OUTPUTS(avfilter_vf_noformat_outputs),