From patchwork Wed Nov 1 08:35:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44458 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6da5:b0:15d:8365:d4b8 with SMTP id gl37csp288711pzb; Wed, 1 Nov 2023 01:35:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxY3Zh/RKB/UV4DvvYJ/EUmukdGKHjIucCh8d3KtDb4Ou3Oi7YI7BdPkJ9v8EL5Nwr/E3x X-Received: by 2002:ac2:596d:0:b0:4f9:5519:78b8 with SMTP id h13-20020ac2596d000000b004f9551978b8mr9433991lfp.63.1698827745227; Wed, 01 Nov 2023 01:35:45 -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 gy5-20020a0564025bc500b0054361a4138fsi536048edb.236.2023.11.01.01.35.25; Wed, 01 Nov 2023 01:35: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=DlyVPonI; 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 4CA9968CDFA; Wed, 1 Nov 2023 10:34:28 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2070.outbound.protection.outlook.com [40.92.59.70]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A22A368CDAD for ; Wed, 1 Nov 2023 10:34:25 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MikoRmSICRJ7TlvqYcdj+y+hjq/TKpN7H6eROHV43ApQ7nlNPgGSnTiCOsmiLx67lYkNKjQzSA7UQkjV0A1q4yRzIGKuVIZghzPPlyOAjTHKqqX9uS9ctl3CVgn96y99SWwnDLZqvO56xwjC8N7QZdM+xVhT9iyicC2oQNk7ABgnKz+9qAV6jfr4SBjfbQlqw3DWeR0I19hgn4kgTMBxnKV5R2XG5yFrvOiZh1tM7KbDMNu6fDAAbkJNJVhxrTbimdB9iQ7uHAG3AuuiJNAW+hCUp07yjKCZ+ZC7Na73bD3UjiY+qQHpD8vyDS3cg9vGueyohu1EkgjaWZWA7ZFVng== 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=fRp8AslysxHi+eh58GtXQWbnpyFbSsJFkQ4FkW5ljXo=; b=a3ebWkk35zSUJIs/KpgGRW9o5/9OjOwroeZ3dLNYHQmZNoziM+mZI1E5I+27FLxyRhvYvCZYNM59aUhhvyz9AYzrD17eTO3WOMhUrw8qU7em66QtL3flpkq/LPm9mmP8QGHslLtfLxYJni/FTqQHCbIeVz3WGLx4f9hJV9ap/oLLAr40Hks9AV21hcH8lxG8149tvwYLE3FusAF08qTztTSMTXrZeNRFlkL4AgULiehIzMayxnurGn8zmkQgUQHitiDO4N9J/G4nNkUgupbqY/QC3dplSj2+Oq++lxt8n2QO3bduSg5f19PBBsqcyDS8YFGVs842TWfd2m7+LB+OjA== 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=fRp8AslysxHi+eh58GtXQWbnpyFbSsJFkQ4FkW5ljXo=; b=DlyVPonIzlxWreG5H9Y28kbRbHdT2JhZCGEXE9h/kUkEfD79VD/tKM1PD5U1ZHd3cIIVh8tNM9GaHMFnb95ib1nDs7RBTSTZs4iP6QJhBgx/s1losowMcNpSKHVJD/HSL21fk7Dd6uwNXo2qnintMDY5oAC1dQ8qgGjBOwAT5UyNlr1wVSIJWW1BiKGyrZbJdDzN+1PRmm9A6dCzSLvGO8eUOLmiGW1hxdUaJIJ+YM4jA/sdY8/9eGBROadAFSjQJ/sxiCARXPqhlwyHLVjd23Bb9dwPJQeaZ+Euqipz1btB+3jZzm2tveM0F7t5+cCcx/1cw+DAWTFgfEqUlh1hcg== Received: from GV1SPRMB0033.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8b::7) by AM8P250MB0215.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:326::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19; Wed, 1 Nov 2023 08:34:23 +0000 Received: from GV1SPRMB0033.EURP250.PROD.OUTLOOK.COM ([fe80::54a8:bde1:da41:a768]) by GV1SPRMB0033.EURP250.PROD.OUTLOOK.COM ([fe80::54a8:bde1:da41:a768%3]) with mapi id 15.20.6933.029; Wed, 1 Nov 2023 08:34:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 1 Nov 2023 09:35:11 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [/ZPlynE2mtfplQ68cTF7Zvu/uLB/kM4AeKLPfCKk2lg=] X-ClientProxiedBy: ZR0P278CA0193.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::23) To GV1SPRMB0033.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8b::7) X-Microsoft-Original-Message-ID: <20231101083512.3398680-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1SPRMB0033:EE_|AM8P250MB0215:EE_ X-MS-Office365-Filtering-Correlation-Id: 742cbb32-b9a3-4bb9-3557-08dbdab559c2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hah99vEYDpG116cEmHy1yW58ECjGOEUmHbMa0W1eOAmTk4PZT+CqsLntptk+QKH+Ca1qxOnn/CEqKGHzukXuHnt0wjzpjDeHdAjKqGwoZjS+IGe0kgP5/c/Sd5KGVqm0vb3UzoLIDCWMiKDpy9pyD0K3FRfh1EAtpMZWTIOdyxSD0aV3JzhhY61O9qABg7muWbLpdHbPldsMio5DXUpOPmD6/sxULyfb5TTzZkaVoE6TEYW4tUgegKvr5ahBRTBeAoVW3wdAjYGrJCGI5+ro+xlfGAiVzZeTuSqS5wN3qM8pkrAhjly9K5umrREHYWbnMQx8BRYjUVOUdnH49pu1PDpf7BhRv9/UPT9wOkrt5SYB1e26NKBrHRtqvMUN6kqK6hujGqb79wHVY5cb8XNKjtsOULGRVJrsMhSijCRPOQg//2JqfNA1eQm9pgepJmVQx4Dxm8KXLpnuSZEKU4yEC6vfOyzWh6zk48qpRKvhg6dJar1jWxZDsb24M9RzpeluJawpHqgZmdVIzr7PWGkkiuikXPniKSPmgQw0aDU0vbqD3yi4SG+sJa+0XOOogZHGI0nIqj14JiHU8BY3yt0EYiD/fTktBCoJEV8mLbhL/apK+xPT175vZLoQzvjcHn13 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bzPqAJJJSeru0IbqeoiIe7GFJUpmH74v/beiGFbVAWhOIyEttIQX0+7ks9hdUaR0Y8X9E1qsGezwZ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Dc3K0j0DFDtJzfgPFI6rky5lxg7T+AO9tIRIyS6ZCIqfDTuOsnxjMIzEqI7yG1jJHj+UR2LNUmtHlcKKcrArbO+T5CRfLSesMayZ1 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 742cbb32-b9a3-4bb9-3557-08dbdab559c2 X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0033.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2023 08:34:23.5050 (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: AM8P250MB0215 Subject: [FFmpeg-devel] [PATCH 10/11] avfilter/vsrc_testsrc: Deduplicate outputs 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: Oq1L8oi2+xXe Signed-off-by: Andreas Rheinhardt --- libavfilter/vsrc_testsrc.c | 64 ++++++++++---------------------------- 1 file changed, 16 insertions(+), 48 deletions(-) diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 9081b55f1c..da17e950d8 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -160,6 +160,14 @@ static int config_props(AVFilterLink *outlink) return 0; } +static const AVFilterPad outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_props, + }, +}; + static int activate(AVFilterContext *ctx) { AVFilterLink *outlink = ctx->outputs[0]; @@ -465,14 +473,6 @@ static av_cold int nullsrc_init(AVFilterContext *ctx) return init(ctx); } -static const AVFilterPad nullsrc_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_props, - }, -}; - const AVFilter ff_vsrc_nullsrc = { .name = "nullsrc", .description = NULL_IF_CONFIG_SMALL("Null video source, return unprocessed video frames."), @@ -482,7 +482,7 @@ const AVFilter ff_vsrc_nullsrc = { .activate = activate, .priv_size = sizeof(TestSourceContext), .inputs = NULL, - FILTER_OUTPUTS(nullsrc_outputs), + FILTER_OUTPUTS(outputs), }; #endif /* CONFIG_NULLSRC_FILTER */ @@ -688,14 +688,6 @@ static av_cold int test_init(AVFilterContext *ctx) return init(ctx); } -static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_props, - }, -}; - const AVFilter ff_vsrc_testsrc = { .name = "testsrc", .description = NULL_IF_CONFIG_SMALL("Generate test pattern."), @@ -705,7 +697,7 @@ const AVFilter ff_vsrc_testsrc = { .uninit = uninit, .activate = activate, .inputs = NULL, - FILTER_OUTPUTS(avfilter_vsrc_testsrc_outputs), + FILTER_OUTPUTS(outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_RGB24), }; @@ -1424,14 +1416,6 @@ static const enum AVPixelFormat smptebars_pix_fmts[] = { AV_PIX_FMT_NONE, }; -static const AVFilterPad smptebars_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_props, - }, -}; - AVFILTER_DEFINE_CLASS_EXT(palbars, "pal(75|100)bars", options); #if CONFIG_PAL75BARS_FILTER @@ -1474,7 +1458,7 @@ const AVFilter ff_vsrc_pal75bars = { .uninit = uninit, .activate = activate, .inputs = NULL, - FILTER_OUTPUTS(smptebars_outputs), + FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(smptebars_pix_fmts), }; @@ -1518,7 +1502,7 @@ const AVFilter ff_vsrc_pal100bars = { .uninit = uninit, .activate = activate, .inputs = NULL, - FILTER_OUTPUTS(smptebars_outputs), + FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(smptebars_pix_fmts), }; @@ -1585,7 +1569,7 @@ const AVFilter ff_vsrc_smptebars = { .uninit = uninit, .activate = activate, .inputs = NULL, - FILTER_OUTPUTS(smptebars_outputs), + FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(smptebars_pix_fmts), }; @@ -1688,7 +1672,7 @@ const AVFilter ff_vsrc_smptehdbars = { .uninit = uninit, .activate = activate, .inputs = NULL, - FILTER_OUTPUTS(smptebars_outputs), + FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(smptebars_pix_fmts), }; @@ -1735,14 +1719,6 @@ static av_cold int allyuv_init(AVFilterContext *ctx) return init(ctx); } -static const AVFilterPad avfilter_vsrc_allyuv_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_props, - }, -}; - const AVFilter ff_vsrc_allyuv = { .name = "allyuv", .description = NULL_IF_CONFIG_SMALL("Generate all yuv colors."), @@ -1752,7 +1728,7 @@ const AVFilter ff_vsrc_allyuv = { .uninit = uninit, .activate = activate, .inputs = NULL, - FILTER_OUTPUTS(avfilter_vsrc_allyuv_outputs), + FILTER_OUTPUTS(outputs), FILTER_PIXFMTS(AV_PIX_FMT_YUV444P, AV_PIX_FMT_GBRP), }; @@ -1885,14 +1861,6 @@ static av_cold int colorspectrum_init(AVFilterContext *ctx) return init(ctx); } -static const AVFilterPad avfilter_vsrc_colorspectrum_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_props, - }, -}; - const AVFilter ff_vsrc_colorspectrum = { .name = "colorspectrum", .description = NULL_IF_CONFIG_SMALL("Generate colors spectrum."), @@ -1902,7 +1870,7 @@ const AVFilter ff_vsrc_colorspectrum = { .uninit = uninit, .activate = activate, .inputs = NULL, - FILTER_OUTPUTS(avfilter_vsrc_colorspectrum_outputs), + FILTER_OUTPUTS(outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_GBRPF32), };