From patchwork Wed Nov 1 08:35:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44467 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6da5:b0:15d:8365:d4b8 with SMTP id gl37csp288657pzb; Wed, 1 Nov 2023 01:35:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgz59DycKBFHCie6SiaeQThtfyjZFS2O8mNM5zvoJElO6yaXBD0KOCVuUKyEX3M+pa9Ra0 X-Received: by 2002:a17:907:31ce:b0:9ba:2a5:75c5 with SMTP id xf14-20020a17090731ce00b009ba02a575c5mr1243104ejb.75.1698827734682; Wed, 01 Nov 2023 01:35:34 -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 ww3-20020a170907084300b009b92b17f406si1385941ejb.75.2023.11.01.01.35.34; Wed, 01 Nov 2023 01:35:34 -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=GRf+s8BB; 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 5769B68CE00; Wed, 1 Nov 2023 10:34:29 +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 B921B68CDB0 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=HCNCTam2vDgwcAJ0/BWqTEJ3LOqlJaGfhGSjvHRXk5HsFO8LwOLCoWLW1JLKJQZGf9KWBlydKjfPzCftj5nYbEUhGGaEUjlS5kzjr3vtUCdCagamidoic+j9XvEApay3dBn5FyZb87D3jMesLT3jylJLxYRJqQAd4NaEk59ovdOvJZicDAzFY5otb1+gTh3mNBsk4kHbsEUy4PZRZQ45wWRaPVl+ZFepcB2WIUj6UVF1T+4HhH6d5lFmB2xFqzN3+Lw9hNY1Cv47ySar+1mreeUr7cI2TmAlttSo4WWEFPjS0vQiVq4W5hVoWlmbkuhUsLHSFbqoIxF9ljBrp+DipA== 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=UwZuqRWCeiI/Vy69aKgt8JAQ3GFlmlK1gkDWUQtOvHU=; b=iZO1brKo9xGXri/lKtp/9qfWn5MHRpiLMIWj/kTKzMVlfJHRr4qlKbawe0kS0WEKbwcu6EAmml/4fGOl0hUacZMYeAoVzPS1nfkHISQpTy/x67dg6N0TLn3bjt7zb/l7kNtiEEx7PpJ6rtiy9lhX4nHUhEAbZbINfwNimTwtBszjLwMvfFSX4gt/PyPl5aDp7slKgJrzgYTrEisq5+SGSsqHHmwbgWFYnysLISq4PTuNYTbsNR7wXWEL5a/2ddqRGMHZ8rHiFp1jTXsVZw/osIeRbUitSWcNXrxA8tln7yhXqfZCK+afbg969ouiWGdaDed0mrz/c3ZfxB9SPAD/wQ== 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=UwZuqRWCeiI/Vy69aKgt8JAQ3GFlmlK1gkDWUQtOvHU=; b=GRf+s8BBFeI2l2ESasOOAosm1nFkG2/+SnArexRMz280ydy1x7zBk7ZQdUKOykJrxx0QQVM0efYBvLoHaQRXyFlCR1VBcQ+OuZzLkfdLQ/ai3PV1dXsovLZhJAYf9dqNs2QajHd+9vfmxLl1Otj+EhvIllZINmAzOrQwu2bjDRohMR9tLzDfNkJkrpD6lFXl/vGMax5a8Hmh+helE/pJ8GV22JRujFSwZIiNNxpjwclEN0X32njDsCsX0DwAQdYhrn9ls4VkCwsJY6l89IGk6ZD7bn/CtEpwLxC8OpFyXVBHYek+Hzxpyj9P+n8CDrrUy1ngmZMd9mM9Uyi8uaIYNA== 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:25 +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:25 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 1 Nov 2023 09:35:12 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [THvNHr+GKR6cP1kPJJfg/UgykyNsX+BOenJDXMntQS4=] 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-10-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: 8742ea7f-19e7-4d4c-646e-08dbdab55a96 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s3cWiGKE67asjfVu0tANvxe5NCiR+mtZxCvIpebrA+93UlDOkJCpYjESAHwqV8ChAfu6sUQAGWnKt9tcWSVjzgyK/Wg0xOIF5nyuH8tQkXZte24So6IRq0H0zkdf19h6tuGf2eAxPUYM7mVaHG43GsCQ+NuV5kBWisYMd+FDTJ2LQ5+Dp7AFfn9PyJqx/bnHtpS+LuD1o2bjuKxRSBZkoJwh5bR77fdd3CNqztWu40PmZAzFfwLmsJMLeFUDaNOGzxRvo8x1llyqyAA3+//TXPEd6xYFCfqebOHRRyxjGJsNJq9S6Y1mUF7Zrg4qYw05SHuoehcjkri9LccDcdjXe9LJnZ7L2ZR5eKZATVOaj23j12wMYuvxU7ZGCWOGJbO5LiqndTW6Rz+QJdqrSD+Mr7vbYcRnXaoc6B53dsHecT+AF5EVi9ZOgFoxu0XrE8jK6DocgcpnAqbglRVJIICXA1nw6nwiBYEMvX4T7D2HBALvTgEGP83nIlkLMql6d2FC/+X+9RDwAzzDEB/vDHo+YQbf80BrqMQWxaIN63wA7al5Iho9wObP17WdBiBYmNOIfjRQSq0tXoKjBSZkYSIpeobp4ECJZRUPQg9ptLJXnVYax0A6K5xBd6XnqiIlZGtk X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zGOWVXm1vTP26Cs+JYmWjuJTfRQ5tT5jPF+hk1/V3wkcK+FdmkUdXqqUQ/7IBxy4br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FgXjphcxGYcpb+R4PXTcO0J3K/2g8aYt9+EWVDfSt9Xx4l8sv0DCaGgJ4MQzRIURWol1nm+TWIpUz1Ym04NNs8vMn5Z/3VGJvSwSZGcw1OxTl1G7XfJWoz6a7ZgWDoIi+7vLd1po X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8742ea7f-19e7-4d4c-646e-08dbdab55a96 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:24.9167 (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 11/11] avfilter/vf_format: Deduplicate inputs 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: QaD3BTU0ZDmU Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_format.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index 04c265f59f..1189bd61c2 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -144,9 +144,7 @@ static const AVOption options[] = { AVFILTER_DEFINE_CLASS_EXT(format, "(no)format", options); -#if CONFIG_FORMAT_FILTER - -static const AVFilterPad avfilter_vf_format_inputs[] = { +static const AVFilterPad inputs[] = { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, @@ -154,6 +152,7 @@ static const AVFilterPad avfilter_vf_format_inputs[] = { }, }; +#if CONFIG_FORMAT_FILTER const AVFilter ff_vf_format = { .name = "format", .description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."), @@ -166,7 +165,7 @@ const AVFilter ff_vf_format = { .flags = AVFILTER_FLAG_METADATA_ONLY, - FILTER_INPUTS(avfilter_vf_format_inputs), + FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC(query_formats), @@ -174,15 +173,6 @@ const AVFilter ff_vf_format = { #endif /* CONFIG_FORMAT_FILTER */ #if CONFIG_NOFORMAT_FILTER - -static const AVFilterPad avfilter_vf_noformat_inputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .get_buffer.video = ff_null_get_video_buffer, - }, -}; - 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."), @@ -195,7 +185,7 @@ const AVFilter ff_vf_noformat = { .flags = AVFILTER_FLAG_METADATA_ONLY, - FILTER_INPUTS(avfilter_vf_noformat_inputs), + FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC(query_formats),