From patchwork Wed Nov 1 08:35:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44463 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6da5:b0:15d:8365:d4b8 with SMTP id gl37csp288311pzb; Wed, 1 Nov 2023 01:34:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxOhPhPJOLGvn/9rF2GWBAD14klmyaD0Yups1xzc4HM9Eh/Gvu+KsMRc0MOSf5KLfz1trj X-Received: by 2002:a17:906:4e92:b0:9c5:64f2:eaba with SMTP id v18-20020a1709064e9200b009c564f2eabamr977973eju.53.1698827679647; Wed, 01 Nov 2023 01:34:39 -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 u16-20020a170906109000b00992f8116abdsi1314136eju.480.2023.11.01.01.34.29; Wed, 01 Nov 2023 01:34:39 -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=Tt5a4Zv0; 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 25BC868CD65; Wed, 1 Nov 2023 10:34:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2027.outbound.protection.outlook.com [40.92.89.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2924B68CD49 for ; Wed, 1 Nov 2023 10:34:15 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfvFOy5WBQlGSnInPdtZgzOMsONMJNY4D8Ib15vXXRfWfnGiyYtJ4Oj0QgoMYU353ZycUaLZdb6qM8EuO4urMYi9mcwSAXlOxo2GEigV4jV78B7RmOYm8L78SEKxoSU295uaKJ7P6UYjzjtus7Y76s7MUyKdv91KmjEselhr1ATTouuqrQGzobt3ynPxxkNDHUuAvnW9YQuKJQKOpcB7OvlKxwV8Qc8YoGHST6rCCWdUHe46RZVqQg10Ruh69U7px2gc0tGvReJEpb6Lw9sCLbQVzZzR7yv+FxyvU365c5YlU1MuAamNs/94p+Wnpu2pCSgi2NsuE/pOiTseLTazpA== 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=qD7QqskOdWtki6KyoKqr4en5rZfMIASYM7+04HAOly0=; b=VNUwwV2ut8+PMH+LQe20spRcHH1rd08CFZqKepvD3E9FRUYLNVqAfzwyhXYGftaae+8WmZ90wOG5vkGP5xeMmtiJqIotcJRXy24zQnThZdlN0qdmF/XnBMgY5xPCPdxlSpEbhTD474KWRpRH1c0b5sR8SAnr5H71MBGimFfiyRypS1hwZdhweE+gJYKYssKYkK4CLVweboHLaSGTlIb4U7GKvq71GQPs/TGrVItvYIBn0bb61xpLR6NjRAAcjw4N7uTglFxK8RQtNLPaDT15T3JkEohvuQT1vhMZAGLZYWuqJyuQNaMea4RcuaxaOtF8gSS1maeOjRBVyCYjyJak7A== 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=qD7QqskOdWtki6KyoKqr4en5rZfMIASYM7+04HAOly0=; b=Tt5a4Zv0dUk2Dj514wOmlX4DZRwRil2PjmO/8t8su4jId498LuYoFlT/GiIi3ucTj7LkwHUcuneKIB2qCCngFA5HB0afPLZ4SSA6YXKvrdkdbW9WY5D+esNxDIpAKVrOtbYkPHuGVzPvG4Ob+e7X2zEBiJGN4RLE4fua77OTz7WU8iGBmUslCezhHWD2F1PMR+ekIgA/LXqIAm8L4sYOTrfo/AS2CAjL2vDfJvFyUIH7LOVVizki+zW2hxSYKnk7aGxCS/KrIvF55cRavxYLoULEuTZFhHYC3l9QoENfwQAN9Tb8af1n1ugg9ckZfgyW1BE9PfNylEd9NsOVvu3G7A== 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:09 +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:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 1 Nov 2023 09:35:05 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [ZX8YUTOFKexFar8HkXzRSHXw2WPVvomTfjRMMYaxoGo=] 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-3-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: fd0c4437-a4d6-459a-032d-08dbdab550b0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oH7mFiUoRvNMpusVv2Jb4n/8ruf0PBOO2n6XgL6gayBwQMFSSCeCHWIArKG+ypF9i6OIvBbmF+rsrP9aGCnqFmqIi7SMKbmU+EwuJpuglD+OiCv3spXYE7BYKxY8C1/LUBS29OYXFDx0+wmdgrfz/IBLOBN3+U245qpx4YE5ZiSOmdGknWJVqd2n5of5JCsSHcll8ee51LYV3KrFh1/erzqpMoJP4N0EW9ZsAy3ZR6AAEhQbjdy/jsB0hI6fVErMbbgGOdEhfR1IXIw5iDRqSprc0fDSq3gr1PhtYtCIEPlEZFxo6qsuKOHEa38/cht7BlLrVvZOUVTX9enAY21WhNoT0EhtHyRs0K5lOWF3msHf7AkBpWqELsx9gJoQt/K6OHa3MS9Wt1hXwvqhyQgjobgqBzZzsnfVqsgBM0SyBgMXkfJ4tVpW6SWm34OesxDWIl7/M02be3Og5MMFfd6kp1IB1OnGLfecT1WnEZYPewexTpS8SoT47aq//SfTbEfm/IOAxHP1jncq6I7wi67UjJRsN2LBufh6sjycGlnonRPqdDlvJlqa9Al/2kgQX3TvJjTKvqygQc/0uN2YtuVqiXY35tH7CGQWCSmV4BAI+yelbI9hMVX4ChJkG2WCD22B X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fFbMXUTk2o4SKUlsOivF8GW/G3tx8HVKJqUB+RXiIbxyVj8K5bLmLhH6pmWrlYonI4wvqchDPF51yjZ97mt7HZ964WhKDmFDva3KaxICbR5Q/YsHh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YPuiPw9RNpydlZ0xMOTfGqzC2vddHWYKa7PGIgouMm5/5po62yjS/hydpiuA0Qp1hYYK9NG+IEDrfdFDUHGZQlcbOk X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd0c4437-a4d6-459a-032d-08dbdab550b0 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:08.3220 (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 04/11] avfilter/vf_aspect: 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: pRqPbbYsnws8 Also avoid using the avfilter-prefix for static objects. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_aspect.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index b453de70c5..129ae19d6d 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -127,6 +127,14 @@ static int get_aspect_ratio(AVFilterLink *inlink, AVRational *aspect_ratio) return 0; } +static const AVFilterPad aspect_inputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .filter_frame = filter_frame, + }, +}; + #if CONFIG_SETDAR_FILTER static int setdar_config_props(AVFilterLink *outlink) @@ -171,14 +179,6 @@ static const AVOption setdar_options[] = { AVFILTER_DEFINE_CLASS(setdar); -static const AVFilterPad avfilter_vf_setdar_inputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .filter_frame = filter_frame, - }, -}; - static const AVFilterPad avfilter_vf_setdar_outputs[] = { { .name = "default", @@ -193,7 +193,7 @@ const AVFilter ff_vf_setdar = { .priv_size = sizeof(AspectContext), .priv_class = &setdar_class, .flags = AVFILTER_FLAG_METADATA_ONLY, - FILTER_INPUTS(avfilter_vf_setdar_inputs), + FILTER_INPUTS(aspect_inputs), FILTER_OUTPUTS(avfilter_vf_setdar_outputs), }; @@ -234,14 +234,6 @@ static const AVOption setsar_options[] = { AVFILTER_DEFINE_CLASS(setsar); -static const AVFilterPad avfilter_vf_setsar_inputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .filter_frame = filter_frame, - }, -}; - static const AVFilterPad avfilter_vf_setsar_outputs[] = { { .name = "default", @@ -256,7 +248,7 @@ const AVFilter ff_vf_setsar = { .priv_size = sizeof(AspectContext), .priv_class = &setsar_class, .flags = AVFILTER_FLAG_METADATA_ONLY, - FILTER_INPUTS(avfilter_vf_setsar_inputs), + FILTER_INPUTS(aspect_inputs), FILTER_OUTPUTS(avfilter_vf_setsar_outputs), };