From patchwork Sun Aug 15 09:29:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29523 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1091140iov; Sun, 15 Aug 2021 02:29:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWAZ+poXopBfZ6qqakft3FCIEIJfeFUFwZL5oSSPfXRO1MOP+kclmCbJI6KK842sr92u4+ X-Received: by 2002:a50:fc8e:: with SMTP id f14mr9346348edq.349.1629019799122; Sun, 15 Aug 2021 02:29:59 -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 dr8si9001878ejc.133.2021.08.15.02.29.58; Sun, 15 Aug 2021 02:29:59 -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="fK/UPJbL"; 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 134316802B7; Sun, 15 Aug 2021 12:29:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2105.outbound.protection.outlook.com [40.92.90.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2C14B6802B7 for ; Sun, 15 Aug 2021 12:29:49 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WFvtAuLb/XK207MDQbcAwY+jUC5DuLjm0nudVN0WOikuO2Ud3pOZiaPYTOPZQOq7cgyWhVPXdA9XVFDDXkJeNGCyBogjcLXez+2Rum/5Xc8MNytNDLM5MCdP97JipYEISJam9vw71Lpi0tJcQ7X5VyX/t3XQA0b4EWcDUhl7qNxZG1kmca04nbdh2u9j6hZA1625oW+TGKucY7mjEDP/0OS/t7yii5XosVnaMNt5IXCpPw/R+/IL+6KWPbG4T1oGFudEguE3yLsBsU19eZW0aA2CI4dzQsUnzWH0oVgPaQXtOc8Ue50/t45qul/0IEpWO3mHw49uV6cffrbOt3eZ4Q== 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-SenderADCheck; bh=kk4HEFs/CbVvnGPb9ubISrCtX4x6WQDTABEkcBnndDs=; b=ICFSxAzR9vweZGE53wgRoyP9ojdj3ttAVSpSMt0ohRyn9Efzrs86CbJlmd6++KPrV9gpC5xNhl5EDAKBWzU4tv5EatRWvpvVb05s0hLbOu6IKeodZWiiN9bg1h6jG+xK12hJVaEBCibVMYlL+2EBp7mkTblg4lPqu/vtrSCn2/1MUT7y1iDZfttRLw+nBNslThEo7sGZ/LXjivlhpPasIY6JWDgREe+o48AiE5XmkfVCKiQUFlGz+pV9X1Cp24e9DOJQMwqb1SrrGdwe9C0QkA8HVQuur6c32jGUpJopkNi7g+bRoO3RSGMcWUeP9fcU56Gd21YeFDc6mLpkxfJV4Q== 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=kk4HEFs/CbVvnGPb9ubISrCtX4x6WQDTABEkcBnndDs=; b=fK/UPJbLBmlxpxc2ZtAbZRRVjdEROp5XV7u+yLgPhuifO891Vri/zNM5eLOpd0G2zSKZOxpVJRR5QfhRZG7z/t4sgeelIn3omlHg6ehHgKQv6IEKducIv5uvu9Xq2KEqQ6IsMVD1SJ98LcckO8FjhqX8Bw7V0n/CAPhFSaL3KEGFMAgoTfkLMHjSVM+plxjWEoYLrcdXobjXVE7Z5eKLRUNgvUGkeI26wsUWE/aa9vuhj1IwISgALT2PfR+KoJGZeEiJaDIXF2RqHPhddBRdl9aF584rDHd6sB8PncHJjOyQezEXu+VvPpDjYO5xbZg6l/ZNRLV2W2jDXw1arv6z5w== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4295.eurprd03.prod.outlook.com (2603:10a6:20b:a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.13; Sun, 15 Aug 2021 09:29:47 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:29:47 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:29:30 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [fEmJPFgrbrbDJsCRjX6j7j7JblvhfYrj] X-ClientProxiedBy: AM0PR02CA0085.eurprd02.prod.outlook.com (2603:10a6:208:154::26) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815092939.2116125-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR02CA0085.eurprd02.prod.outlook.com (2603:10a6:208:154::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.13 via Frontend Transport; Sun, 15 Aug 2021 09:29:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95f90255-e361-4da2-4fde-08d95fcf396b X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVjun0oR/i13HcFhFL6IneNPVtyd3QNMvukaWlyxVRjtg2l89J8JpgE5uA//qVwZM1CGtvSc+pfQ/xLRjMQDnD6iMxuxntv+raTFIAdtNLLZb4S+yivRddhdiqEz89PEuvRUwWZCigjXdXuJJwpaUb0LzKaik+8TvCf4YPWVQAJPBd74L/b2OnelBQgGWi07NVkiIok8xLBaP1fHuuBEKFfffLMqLpJ4e224uw9D6fbo5FbTuOH9O8u0Lz9BsO4/r/HwcwvXQfQ0yfcnjvxU6WfkO3LCBqaSIubkuhiSFtJ8V9Unv7icJY6uHR4V6h6+XFIz8fJcg2iFoslvxfd0ryKPJfItzPt9z80o5m/e45wNJ6ChLp5QHaCXjsIs+Dp84lEWYCBC9n+WzBISsdAzg4RjGoMm+woychqltZVuduzUu/mcEuW1lVAG1D8dmsZl1xYlmIKPpUoXezPvxwapdvybkWYlcSL5wKdoKtWt336krieL6QgoSV+4AxijGRDEgkhnZ7L50j5fwSrzxAezoxrykoqBbDrsY+a4C5QVokIxT2mZIMqwUfIK6jU+bwZ7NREqBDqxaFm8gRgrEjkgCtNOyDdn2LaygIorEuRTIoSvo9ZWxNvvJamgp7Tma7fV5G57vM63fNZenuDZym0LfwKRVGInEmZFIWfUYiVOfWXdCDiyrP9BV2QKCEIka28gFqRwuei6kJEdYCFyh2PFhoaNQus8LQq+W0= X-MS-TrafficTypeDiagnostic: AM6PR03MB4295: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vfx7I0Z3BRvDeqnGh3w8xsa9VaUoRVWEmfYoLicVugpeeLkxhiWkm7B1LbkpbFTO17DE8hLcQuNA+iKVpSlJf/GI4T2iTTkkeDuTTTAfVq59QtBHWrb1vjAt6v51AlIN/Qqh+sTYidKOzvXY44fiasDSloGxGAtUXPTSelX/DzvQgsNQEL8zAba1slVF3MuRhLrl7yBTQfTQHEhKffHlv+mesRq2swCzlvB/Q50jxhXh9/Esz5wU0giNBLrGy408v0hW+dGk+uY3VKgEvcbwOJjhATct60D/RI8S3oxFOEyUfUx93GGpKfpqKbwn9Cg6y/YfTUoHQgvsZR72a01Q8lT/YT+eUUHm974e9ETiXnVut5JXVN4AZAATVOo2kTU9SUObNnfwdMEJAGCsV88lYyb4DIwkVIaP1dfBmpaN4ppevG3GWdr5BfzaJ0MEsgRm X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NDj0ICBsENdXi6PPFkcOGbu4sf3O7LQ7k7JY9KkHwmqbk7ZxoqeuAxMKF0om0VOS8y3PPd5BLyMUw3X1N1Va3x+GF358bO9NnaRaceifqSHM0vssgxhi4D1rcBia7zOoU8M0l2B4Oho4hEHCWwJiwA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95f90255-e361-4da2-4fde-08d95fcf396b X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:29:47.8805 (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: AM6PR03MB4295 Subject: [FFmpeg-devel] [PATCH 01/10] fftools/cmdutils: Use avfilter_pad_count() for AVFilter's number of pads 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: 5zXguRgm47qa Besides being nicer code this also has the advantage of not making assumptions about the internal implementation: While it is documented that the AVFilter.inputs and AVFilter.outputs arrays are terminated by a zeroed sentinel, one is not allowed to infer that one can just check avfilter_pad_get_name(padarray, i) to see whether one has reached the sentinel: It could be that the pointer to the string is contained in a different structure than AVFilterPad that needs to be accessed first: return pad->struct->string. It could be that for small strings an internal buffer in AVFilterPad is used (to avoid a relocation) whereas for longer strings an external string is used; this is useful to avoid relocations: return pad->string_ptr ? pad->string_ptr : pad->interal_string Or it could be that the name has a default value: return pad->name ? pad->name : "default" (This actually made sense for us because the name of most of our AVFilterPads is just "default"; doing so would save lots of relocations.) The only thing one is allowed to infer from the existence of the sentinel is that one is allowed to use avfilter_pad_count() to get the number of pads. Therefore it is used. Signed-off-by: Andreas Rheinhardt --- Unchanged since last time. fftools/cmdutils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 6d0bcd6085..96d38803df 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1707,12 +1707,14 @@ int show_filters(void *optctx, const char *opt, const char *arg) while ((filter = av_filter_iterate(&opaque))) { descr_cur = descr; for (i = 0; i < 2; i++) { + unsigned nb_pads; if (i) { *(descr_cur++) = '-'; *(descr_cur++) = '>'; } pad = i ? filter->outputs : filter->inputs; - for (j = 0; pad && avfilter_pad_get_name(pad, j); j++) { + nb_pads = avfilter_pad_count(pad); + for (j = 0; j < nb_pads; j++) { if (descr_cur >= descr + sizeof(descr) - 4) break; *(descr_cur++) = get_media_type_char(avfilter_pad_get_type(pad, j)); From patchwork Sun Aug 15 09:55:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29527 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1104401iov; Sun, 15 Aug 2021 02:57:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEX2IjeyGuAiwjmuijWP3IYXw+ZhU3HO6N8z7u+BUeFizkRo+SDI8TZFAZx4BBHmzCe2gd X-Received: by 2002:a05:6402:1385:: with SMTP id b5mr13449033edv.276.1629021439208; Sun, 15 Aug 2021 02:57:19 -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 v10si7284869ejy.710.2021.08.15.02.57.18; Sun, 15 Aug 2021 02:57:19 -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=kKLw+Vw3; 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 9CF34689F8C; Sun, 15 Aug 2021 12:56:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067021.outbound.protection.outlook.com [40.92.67.21]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D2A96689B43 for ; Sun, 15 Aug 2021 12:56:16 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ebk9YgKhnC4NYd6Le64nryRdKZEsF+tWz5Cz4DKt2jNOId3EJpWgaCdjQP0THApgxzx35Q+3uMy0Ybo8cW7bme/8KTrKdhudQBGeyg/qBnw85cbycIKMTQ0NVRG/ZLJUUZb6IJY6PpnNk6TzjzzYxmkJtAijBGx/9HyOwi+sm/3ja9vOf5ULToNzsJAgngaDOvC2wMwqjHygDnCOU4I1SnhWhPK9mYh6qZ/QJekchRkhxcIGexTjpCHiAJ1amBp7k4lSGqVJzqlDv574x6gLPfak34MrrcN9Mb5WbZVOzuR+FlLCnD1NUwVYYZFI5fe6+RwZv+LOHg/uC36hpXSwvg== 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-SenderADCheck; bh=1sF3U2XdvM/1vtwZOFbJe1QavYI6GQLvmMyhCfrwRbw=; b=RwolSmeY9vOn1KkQ3a2MI+9YT3ZW3YY05B5CoFiv6y8VcnirDzjDppJ13NJWvXRe3tPX59MjDMBjHPA3r6UG5k0nuBCFklijNioxBEb8uYjVpvw3AL24wIRJ9ePhKA86/pypOUuVqjzG2glf4LfpEKRtkO94qKFQx/sk04ufWHUmtk43N+6bIgOl8HRyL1SsugMwKN+BFPK/a5ukCyhoxep3WUJ/F+x7BSEEHkSvRpbmOkupCx9CRh94y5nQMYLvcEVocAcP8I000mNKNQTNgb+CgS1Nyj257mZ9X6IAhTw71Kz+cwo1IzM4LbylZ23wELGdtq7Gd7VHAsoxi/XwaQ== 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=1sF3U2XdvM/1vtwZOFbJe1QavYI6GQLvmMyhCfrwRbw=; b=kKLw+Vw30rftd1pd/z8vAnSpFHfeVNNEiXFs/N87AWFPew3ym5BzFxH9RiQmAespa46hQqLwIan//L5Ak6E8GD9F20VA842p6SImunnz0mx2jiFWHLMWQw8zp00jus86OAF+FLTozvgn7Exzz1W8WPUVVfr3glKVmOsBPwQtumkVfdZ+cES5TI9nsh3P9VQQoY3xKVlnW9R8znTZnb0U2eLm1S1IsAbIG5XkVJcEJAUyD91gQZ7zR/hDC8I80tbJp4+gUSSz1QUo0kaDcjc6PcM+iAZqdzrfjZzvYKrR5IAES0j3r3Ni967CnoOob6RO4oZoCal4U7Zl1fgiQNDa5g== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7158.eurprd03.prod.outlook.com (2603:10a6:20b:2e9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Sun, 15 Aug 2021 09:55:50 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:55:50 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:30 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [ch2Qyry76GRQvFv7x5tChRmjltDQ7uVb] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:55:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fa72677f-1a68-4ed6-0d96-08d95fd2dc6c X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVjun0oR/i13HcFhFL6IneNFMAGFCE2UUyRqeIT5ok5rIhYHyV/GiVmQXwrobXA9t5AaSoIAiTh0hFBmmDEQVL5226WdaPzEgNL+FzjzaJ/cetHFwajymBIj0nkg+DFgg8F9zyO49gIzq9luDl7eZwoRMVk0eULODQLMWcb/fMOzxhDMXQOmz7GF2AQt6XYwXJ3JupgNToP1mOEFLoeBSfKLZID2eN0CaYem/enlNH5DpiB2ByCNePyjVOo/MxpUd41+uOPxJQf/IW7wB4cmRyI0EmNBoOfE17OkYsHEpyBYh4fkVOKfcJFaTSchm/5iFrU95LglvE8V7sQi8oug6CAEO+BCWwFd0ur4xxnwiGg8IPV9XTDB5zJmmJjgjfjVT4CYRMq8bRy3fQtzJVSwmrMSKymjpcdvAYk+a/j9uLlt3Bo0niTyjZz8EoDITIMPDw+qRmDT++X85v+CKgzeGfAuFdJ/obMFx8CZgaFskDjRLyDHuzvAhBgP/HQS/KUthe6HzHfmdZ5dJ2ZjjJDq9I9duY/plAvn6osSy0IvqeXzcV3lHjYbdj3A7Q4yLEMx2IE5GtjUy1NbTK5OLVItqPPyK1e6tGZXjIBZW+s8de6YvI2afpnUVR+AjiSBguiM3u0PQ103Mnjb8jYBg6NSebNg2TmQHMOg8I5hi1hu0VVQbrrB8h8M1gBaHKNJGJgSK9kLtY67qUk6DxMwSM3f8EHUEF3BSE5ssQ= X-MS-TrafficTypeDiagnostic: AS8PR03MB7158: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Dj/H4kBIBREcAbFLj9aOVy0wZye+BSQWlggW+Ket7B381rzBtMG3I4W2d72gF23RXF6bZsB1vEmQZu94YDC81VACrrto9JRAVLN3upo02v1IJJsJpNucuF0sKX6g34d2ap843FeguBcOefT9Unn9rTJ+92RFVbC2g8H93jj+q5oSxYCeIZlaanwAsniXYve/JrdJLbGlKUhm6v1a3eutZISxqqMSM0Co0TTP+7dxVjYWnnyjYRUCIZlkDmv4qBLG9f2Jb3Bp3vlEJOlcMABQqaxpbaPJOIysJs8SqmwUdPSzsYsTAFRVte+yf2JuGtwrzPa091ulzVaN/Z4DW5iUU+rJhS9GgYVBcCClgjKAQzpaQmCGi44OOs17F+a6N4OhVcfFhkNWDdh1V2dd6Ccr+6DBkhCkJwXSQgSCG5NJRYTYrUnS1qHSt7k3FtN3TlUo X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LFXNmhLM2gxBMN8jTlwfpB0hspMErKnrmrWepICHdKuV/4VZGSbpkeeOhujqmZCCy7a5GIgj5zMxhtna8f9wgY/yhazn3aTdcySAwYFW2t1MLo/jynBICOknAn8huqbjWKylVRiT2uWHip2wFUBJ1g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa72677f-1a68-4ed6-0d96-08d95fd2dc6c X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:55:50.6208 (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: AS8PR03MB7158 Subject: [FFmpeg-devel] [PATCH 02/10] avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilter 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: raCdMVJE9pB4 Up until now, an AVFilter's lists of input and output AVFilterPads were terminated by a sentinel and the only way to get the length of these lists was by using avfilter_pad_count(). This has two drawbacks: first, sizeof(AVFilterPad) is not negligible (i.e. 64B on 64bit systems); second, getting the size involves a function call instead of just reading the data. This commit therefore changes this. The sentinels are removed and new private fields nb_inputs and nb_outputs are added to AVFilter that contain the number of elements of the respective AVFilterPad array. Given that AVFilter.(in|out)puts are the only arrays of zero-terminated AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads are not zero-terminated and they already have a size field) the argument to avfilter_pad_count() is always one of these lists, so it just has to find the filter the list belongs to and read said number. This is slower than before, but a replacement function that just reads the internal numbers that users are expected to switch to will be added soon; and furthermore, avfilter_pad_count() is probably never called in hot loops anyway. This saves about 49KiB from the binary; notice that these sentinels are not in .bss despite being zeroed: they are in .data.rel.ro due to the non-sentinels. Signed-off-by: Andreas Rheinhardt --- Now using the macro as suggested; furthermore, the commit message has been updated in light of the fact that these fields are private. libavfilter/aeval.c | 9 +++----- libavfilter/af_acontrast.c | 6 ++--- libavfilter/af_acopy.c | 6 ++--- libavfilter/af_acrossover.c | 3 +-- libavfilter/af_acrusher.c | 6 ++--- libavfilter/af_adeclick.c | 10 ++++---- libavfilter/af_adelay.c | 6 ++--- libavfilter/af_adenorm.c | 6 ++--- libavfilter/af_aderivative.c | 10 ++++---- libavfilter/af_aecho.c | 6 ++--- libavfilter/af_aemphasis.c | 6 ++--- libavfilter/af_aexciter.c | 6 ++--- libavfilter/af_afade.c | 12 ++++------ libavfilter/af_afftdn.c | 6 ++--- libavfilter/af_afftfilt.c | 6 ++--- libavfilter/af_aformat.c | 6 ++--- libavfilter/af_afreqshift.c | 10 ++++---- libavfilter/af_afwtdn.c | 6 ++--- libavfilter/af_agate.c | 12 ++++------ libavfilter/af_aiir.c | 3 +-- libavfilter/af_alimiter.c | 6 ++--- libavfilter/af_amerge.c | 3 +-- libavfilter/af_amix.c | 3 +-- libavfilter/af_amultiply.c | 6 ++--- libavfilter/af_anequalizer.c | 3 +-- libavfilter/af_anlmdn.c | 6 ++--- libavfilter/af_anlms.c | 6 ++--- libavfilter/af_anull.c | 6 ++--- libavfilter/af_apad.c | 6 ++--- libavfilter/af_aphaser.c | 6 ++--- libavfilter/af_apulsator.c | 6 ++--- libavfilter/af_aresample.c | 6 ++--- libavfilter/af_arnndn.c | 6 ++--- libavfilter/af_asetnsamples.c | 6 ++--- libavfilter/af_asetrate.c | 6 ++--- libavfilter/af_ashowinfo.c | 6 ++--- libavfilter/af_asoftclip.c | 6 ++--- libavfilter/af_asr.c | 6 ++--- libavfilter/af_astats.c | 6 ++--- libavfilter/af_asubboost.c | 6 ++--- libavfilter/af_asupercut.c | 18 +++++++-------- libavfilter/af_atempo.c | 6 ++--- libavfilter/af_axcorrelate.c | 6 ++--- libavfilter/af_biquads.c | 6 ++--- libavfilter/af_bs2b.c | 6 ++--- libavfilter/af_channelmap.c | 6 ++--- libavfilter/af_channelsplit.c | 3 +-- libavfilter/af_chorus.c | 6 ++--- libavfilter/af_compand.c | 6 ++--- libavfilter/af_compensationdelay.c | 6 ++--- libavfilter/af_crossfeed.c | 6 ++--- libavfilter/af_crystalizer.c | 6 ++--- libavfilter/af_dcshift.c | 6 ++--- libavfilter/af_deesser.c | 6 ++--- libavfilter/af_drmeter.c | 6 ++--- libavfilter/af_dynaudnorm.c | 6 ++--- libavfilter/af_earwax.c | 6 ++--- libavfilter/af_extrastereo.c | 6 ++--- libavfilter/af_firequalizer.c | 6 ++--- libavfilter/af_flanger.c | 6 ++--- libavfilter/af_haas.c | 6 ++--- libavfilter/af_hdcd.c | 6 ++--- libavfilter/af_headphone.c | 3 +-- libavfilter/af_join.c | 3 +-- libavfilter/af_ladspa.c | 3 +-- libavfilter/af_loudnorm.c | 6 ++--- libavfilter/af_lv2.c | 3 +-- libavfilter/af_mcompand.c | 6 ++--- libavfilter/af_pan.c | 6 ++--- libavfilter/af_replaygain.c | 6 ++--- libavfilter/af_rubberband.c | 6 ++--- libavfilter/af_sidechaincompress.c | 12 ++++------ libavfilter/af_silencedetect.c | 6 ++--- libavfilter/af_silenceremove.c | 6 ++--- libavfilter/af_sofalizer.c | 6 ++--- libavfilter/af_speechnorm.c | 6 ++--- libavfilter/af_stereotools.c | 6 ++--- libavfilter/af_stereowiden.c | 6 ++--- libavfilter/af_superequalizer.c | 6 ++--- libavfilter/af_surround.c | 6 ++--- libavfilter/af_tremolo.c | 6 ++--- libavfilter/af_vibrato.c | 6 ++--- libavfilter/af_volume.c | 6 ++--- libavfilter/af_volumedetect.c | 6 ++--- libavfilter/asink_anullsink.c | 3 +-- libavfilter/asrc_afirsrc.c | 3 +-- libavfilter/asrc_anoisesrc.c | 3 +-- libavfilter/asrc_anullsrc.c | 3 +-- libavfilter/asrc_flite.c | 3 +-- libavfilter/asrc_hilbert.c | 3 +-- libavfilter/asrc_sinc.c | 3 +-- libavfilter/asrc_sine.c | 3 +-- libavfilter/avf_abitscope.c | 6 ++--- libavfilter/avf_ahistogram.c | 6 ++--- libavfilter/avf_aphasemeter.c | 3 +-- libavfilter/avf_avectorscope.c | 6 ++--- libavfilter/avf_showcqt.c | 6 ++--- libavfilter/avf_showfreqs.c | 6 ++--- libavfilter/avf_showspatial.c | 6 ++--- libavfilter/avf_showspectrum.c | 12 ++++------ libavfilter/avf_showvolume.c | 6 ++--- libavfilter/avf_showwaves.c | 12 ++++------ libavfilter/avfilter.c | 18 ++++++++++----- libavfilter/avfilter.h | 18 +++++++++++---- libavfilter/buffersink.c | 6 ++--- libavfilter/buffersrc.c | 6 ++--- libavfilter/f_bench.c | 12 ++++------ libavfilter/f_cue.c | 12 ++++------ libavfilter/f_drawgraph.c | 12 ++++------ libavfilter/f_ebur128.c | 3 +-- libavfilter/f_graphmonitor.c | 12 ++++------ libavfilter/f_interleave.c | 6 ++--- libavfilter/f_loop.c | 12 ++++------ libavfilter/f_metadata.c | 12 ++++------ libavfilter/f_perms.c | 12 ++++------ libavfilter/f_realtime.c | 12 ++++------ libavfilter/f_reverse.c | 12 ++++------ libavfilter/f_select.c | 6 ++--- libavfilter/f_sendcmd.c | 12 ++++------ libavfilter/f_sidedata.c | 12 ++++------ libavfilter/f_zmq.c | 12 ++++------ libavfilter/fifo.c | 12 ++++------ libavfilter/internal.h | 6 +++++ libavfilter/setpts.c | 12 ++++------ libavfilter/settb.c | 12 ++++------ libavfilter/split.c | 6 ++--- libavfilter/trim.c | 12 ++++------ libavfilter/vaf_spectrumsynth.c | 6 ++--- libavfilter/vf_addroi.c | 6 ++--- libavfilter/vf_alphamerge.c | 6 ++--- libavfilter/vf_amplify.c | 6 ++--- libavfilter/vf_aspect.c | 12 ++++------ libavfilter/vf_atadenoise.c | 6 ++--- libavfilter/vf_avgblur.c | 6 ++--- libavfilter/vf_avgblur_opencl.c | 10 ++++---- libavfilter/vf_avgblur_vulkan.c | 6 ++--- libavfilter/vf_bbox.c | 6 ++--- libavfilter/vf_bilateral.c | 6 ++--- libavfilter/vf_bitplanenoise.c | 6 ++--- libavfilter/vf_blackdetect.c | 6 ++--- libavfilter/vf_blackframe.c | 6 ++--- libavfilter/vf_blend.c | 12 ++++------ libavfilter/vf_bm3d.c | 3 +-- libavfilter/vf_boxblur.c | 6 ++--- libavfilter/vf_bwdif.c | 6 ++--- libavfilter/vf_cas.c | 6 ++--- libavfilter/vf_chromaber_vulkan.c | 6 ++--- libavfilter/vf_chromakey.c | 12 ++++------ libavfilter/vf_chromanr.c | 6 ++--- libavfilter/vf_chromashift.c | 10 ++++---- libavfilter/vf_ciescope.c | 6 ++--- libavfilter/vf_codecview.c | 6 ++--- libavfilter/vf_colorbalance.c | 6 ++--- libavfilter/vf_colorchannelmixer.c | 6 ++--- libavfilter/vf_colorconstancy.c | 6 ++--- libavfilter/vf_colorcontrast.c | 6 ++--- libavfilter/vf_colorcorrect.c | 6 ++--- libavfilter/vf_colorize.c | 6 ++--- libavfilter/vf_colorkey.c | 10 ++++---- libavfilter/vf_colorkey_opencl.c | 6 ++--- libavfilter/vf_colorlevels.c | 6 ++--- libavfilter/vf_colormatrix.c | 6 ++--- libavfilter/vf_colorspace.c | 6 ++--- libavfilter/vf_colortemperature.c | 6 ++--- libavfilter/vf_convolution.c | 22 ++++++++---------- libavfilter/vf_convolution_opencl.c | 18 +++++++-------- libavfilter/vf_convolve.c | 10 ++++---- libavfilter/vf_copy.c | 6 ++--- libavfilter/vf_coreimage.m | 9 +++----- libavfilter/vf_cover_rect.c | 6 ++--- libavfilter/vf_crop.c | 6 ++--- libavfilter/vf_cropdetect.c | 6 ++--- libavfilter/vf_curves.c | 6 ++--- libavfilter/vf_datascope.c | 18 +++++---------- libavfilter/vf_dblur.c | 6 ++--- libavfilter/vf_dctdnoiz.c | 6 ++--- libavfilter/vf_deband.c | 6 ++--- libavfilter/vf_deblock.c | 6 ++--- libavfilter/vf_decimate.c | 3 +-- libavfilter/vf_dedot.c | 6 ++--- libavfilter/vf_deflicker.c | 6 ++--- libavfilter/vf_deinterlace_qsv.c | 6 ++--- libavfilter/vf_deinterlace_vaapi.c | 6 ++--- libavfilter/vf_dejudder.c | 6 ++--- libavfilter/vf_delogo.c | 6 ++--- libavfilter/vf_derain.c | 6 ++--- libavfilter/vf_deshake.c | 6 ++--- libavfilter/vf_deshake_opencl.c | 6 ++--- libavfilter/vf_despill.c | 6 ++--- libavfilter/vf_detelecine.c | 6 ++--- libavfilter/vf_displace.c | 6 ++--- libavfilter/vf_dnn_classify.c | 6 ++--- libavfilter/vf_dnn_detect.c | 6 ++--- libavfilter/vf_dnn_processing.c | 6 ++--- libavfilter/vf_drawbox.c | 12 ++++------ libavfilter/vf_drawtext.c | 6 ++--- libavfilter/vf_edgedetect.c | 6 ++--- libavfilter/vf_elbg.c | 6 ++--- libavfilter/vf_entropy.c | 6 ++--- libavfilter/vf_epx.c | 6 ++--- libavfilter/vf_eq.c | 6 ++--- libavfilter/vf_estdif.c | 6 ++--- libavfilter/vf_exposure.c | 6 ++--- libavfilter/vf_extractplanes.c | 5 ++-- libavfilter/vf_fade.c | 6 ++--- libavfilter/vf_fftdnoiz.c | 6 ++--- libavfilter/vf_fftfilt.c | 6 ++--- libavfilter/vf_field.c | 6 ++--- libavfilter/vf_fieldhint.c | 6 ++--- libavfilter/vf_fieldmatch.c | 3 +-- libavfilter/vf_fieldorder.c | 6 ++--- libavfilter/vf_fillborders.c | 6 ++--- libavfilter/vf_find_rect.c | 6 ++--- libavfilter/vf_floodfill.c | 6 ++--- libavfilter/vf_format.c | 12 ++++------ libavfilter/vf_fps.c | 6 ++--- libavfilter/vf_framepack.c | 6 ++--- libavfilter/vf_framerate.c | 6 ++--- libavfilter/vf_framestep.c | 6 ++--- libavfilter/vf_freezedetect.c | 6 ++--- libavfilter/vf_freezeframes.c | 6 ++--- libavfilter/vf_frei0r.c | 9 +++----- libavfilter/vf_fspp.c | 6 ++--- libavfilter/vf_gblur.c | 6 ++--- libavfilter/vf_geq.c | 6 ++--- libavfilter/vf_gradfun.c | 6 ++--- libavfilter/vf_guided.c | 3 +-- libavfilter/vf_hflip.c | 6 ++--- libavfilter/vf_histeq.c | 6 ++--- libavfilter/vf_histogram.c | 10 ++++---- libavfilter/vf_hqdn3d.c | 6 ++--- libavfilter/vf_hqx.c | 6 ++--- libavfilter/vf_hue.c | 6 ++--- libavfilter/vf_hwdownload.c | 6 ++--- libavfilter/vf_hwmap.c | 6 ++--- libavfilter/vf_hwupload.c | 6 ++--- libavfilter/vf_hwupload_cuda.c | 6 ++--- libavfilter/vf_hysteresis.c | 6 ++--- libavfilter/vf_identity.c | 10 ++++---- libavfilter/vf_idet.c | 6 ++--- libavfilter/vf_il.c | 6 ++--- libavfilter/vf_kerndeint.c | 6 ++--- libavfilter/vf_lagfun.c | 6 ++--- libavfilter/vf_lenscorrection.c | 6 ++--- libavfilter/vf_lensfun.c | 6 ++--- libavfilter/vf_libopencv.c | 6 ++--- libavfilter/vf_libvmaf.c | 6 ++--- libavfilter/vf_limiter.c | 6 ++--- libavfilter/vf_lumakey.c | 6 ++--- libavfilter/vf_lut.c | 6 ++--- libavfilter/vf_lut2.c | 12 ++++------ libavfilter/vf_lut3d.c | 18 +++++---------- libavfilter/vf_maskedclamp.c | 6 ++--- libavfilter/vf_maskedmerge.c | 6 ++--- libavfilter/vf_maskedminmax.c | 10 ++++---- libavfilter/vf_maskedthreshold.c | 6 ++--- libavfilter/vf_maskfun.c | 6 ++--- libavfilter/vf_mcdeint.c | 6 ++--- libavfilter/vf_median.c | 6 ++--- libavfilter/vf_mergeplanes.c | 3 +-- libavfilter/vf_mestimate.c | 6 ++--- libavfilter/vf_midequalizer.c | 6 ++--- libavfilter/vf_minterpolate.c | 6 ++--- libavfilter/vf_misc_vaapi.c | 10 ++++---- libavfilter/vf_mix.c | 8 +++---- libavfilter/vf_monochrome.c | 6 ++--- libavfilter/vf_mpdecimate.c | 6 ++--- libavfilter/vf_neighbor.c | 6 ++--- libavfilter/vf_neighbor_opencl.c | 10 ++++---- libavfilter/vf_nlmeans.c | 6 ++--- libavfilter/vf_nlmeans_opencl.c | 6 ++--- libavfilter/vf_nnedi.c | 6 ++--- libavfilter/vf_noise.c | 6 ++--- libavfilter/vf_normalize.c | 6 ++--- libavfilter/vf_null.c | 6 ++--- libavfilter/vf_ocr.c | 6 ++--- libavfilter/vf_overlay.c | 6 ++--- libavfilter/vf_overlay_cuda.c | 6 ++--- libavfilter/vf_overlay_opencl.c | 6 ++--- libavfilter/vf_overlay_qsv.c | 6 ++--- libavfilter/vf_overlay_vulkan.c | 6 ++--- libavfilter/vf_owdenoise.c | 6 ++--- libavfilter/vf_pad.c | 6 ++--- libavfilter/vf_pad_opencl.c | 6 ++--- libavfilter/vf_palettegen.c | 6 ++--- libavfilter/vf_paletteuse.c | 6 ++--- libavfilter/vf_perspective.c | 6 ++--- libavfilter/vf_phase.c | 6 ++--- libavfilter/vf_photosensitivity.c | 6 ++--- libavfilter/vf_pixdesctest.c | 6 ++--- libavfilter/vf_pp.c | 6 ++--- libavfilter/vf_pp7.c | 6 ++--- libavfilter/vf_premultiply.c | 5 ++-- libavfilter/vf_procamp_vaapi.c | 6 ++--- libavfilter/vf_program_opencl.c | 6 ++--- libavfilter/vf_pseudocolor.c | 6 ++--- libavfilter/vf_psnr.c | 6 ++--- libavfilter/vf_pullup.c | 6 ++--- libavfilter/vf_qp.c | 6 ++--- libavfilter/vf_random.c | 6 ++--- libavfilter/vf_readeia608.c | 6 ++--- libavfilter/vf_readvitc.c | 6 ++--- libavfilter/vf_remap.c | 6 ++--- libavfilter/vf_removegrain.c | 6 ++--- libavfilter/vf_removelogo.c | 6 ++--- libavfilter/vf_repeatfields.c | 6 ++--- libavfilter/vf_rotate.c | 6 ++--- libavfilter/vf_sab.c | 6 ++--- libavfilter/vf_scale.c | 12 ++++------ libavfilter/vf_scale_cuda.c | 6 ++--- libavfilter/vf_scale_npp.c | 6 ++--- libavfilter/vf_scale_qsv.c | 6 ++--- libavfilter/vf_scale_vaapi.c | 6 ++--- libavfilter/vf_scale_vulkan.c | 6 ++--- libavfilter/vf_scdet.c | 6 ++--- libavfilter/vf_scroll.c | 6 ++--- libavfilter/vf_selectivecolor.c | 6 ++--- libavfilter/vf_separatefields.c | 6 ++--- libavfilter/vf_setparams.c | 14 +++++------ libavfilter/vf_shear.c | 6 ++--- libavfilter/vf_showinfo.c | 6 ++--- libavfilter/vf_showpalette.c | 6 ++--- libavfilter/vf_shuffleframes.c | 6 ++--- libavfilter/vf_shufflepixels.c | 6 ++--- libavfilter/vf_shuffleplanes.c | 6 ++--- libavfilter/vf_signalstats.c | 6 ++--- libavfilter/vf_signature.c | 3 +-- libavfilter/vf_smartblur.c | 6 ++--- libavfilter/vf_spp.c | 6 ++--- libavfilter/vf_sr.c | 6 ++--- libavfilter/vf_ssim.c | 6 ++--- libavfilter/vf_stack.c | 7 +++--- libavfilter/vf_stereo3d.c | 6 ++--- libavfilter/vf_subtitles.c | 10 ++++---- libavfilter/vf_super2xsai.c | 6 ++--- libavfilter/vf_swaprect.c | 6 ++--- libavfilter/vf_swapuv.c | 6 ++--- libavfilter/vf_telecine.c | 6 ++--- libavfilter/vf_threshold.c | 6 ++--- libavfilter/vf_thumbnail.c | 6 ++--- libavfilter/vf_thumbnail_cuda.c | 6 ++--- libavfilter/vf_tile.c | 6 ++--- libavfilter/vf_tinterlace.c | 10 ++++---- libavfilter/vf_tmidequalizer.c | 6 ++--- libavfilter/vf_tonemap.c | 6 ++--- libavfilter/vf_tonemap_opencl.c | 6 ++--- libavfilter/vf_tonemap_vaapi.c | 6 ++--- libavfilter/vf_tpad.c | 6 ++--- libavfilter/vf_transpose.c | 6 ++--- libavfilter/vf_transpose_npp.c | 6 ++--- libavfilter/vf_transpose_opencl.c | 6 ++--- libavfilter/vf_transpose_vaapi.c | 6 ++--- libavfilter/vf_unsharp.c | 6 ++--- libavfilter/vf_unsharp_opencl.c | 6 ++--- libavfilter/vf_untile.c | 6 ++--- libavfilter/vf_uspp.c | 6 ++--- libavfilter/vf_v360.c | 6 ++--- libavfilter/vf_vaguedenoiser.c | 6 ++--- libavfilter/vf_vectorscope.c | 6 ++--- libavfilter/vf_vflip.c | 6 ++--- libavfilter/vf_vfrdet.c | 6 ++--- libavfilter/vf_vibrance.c | 6 ++--- libavfilter/vf_vidstabdetect.c | 6 ++--- libavfilter/vf_vidstabtransform.c | 6 ++--- libavfilter/vf_vif.c | 6 ++--- libavfilter/vf_vignette.c | 6 ++--- libavfilter/vf_vmafmotion.c | 6 ++--- libavfilter/vf_vpp_qsv.c | 6 ++--- libavfilter/vf_w3fdif.c | 6 ++--- libavfilter/vf_waveform.c | 6 ++--- libavfilter/vf_weave.c | 10 ++++---- libavfilter/vf_xbr.c | 6 ++--- libavfilter/vf_xfade.c | 6 ++--- libavfilter/vf_xfade_opencl.c | 6 ++--- libavfilter/vf_xmedian.c | 9 +++----- libavfilter/vf_yadif.c | 6 ++--- libavfilter/vf_yadif_cuda.c | 6 ++--- libavfilter/vf_yaepblur.c | 6 ++--- libavfilter/vf_zoompan.c | 6 ++--- libavfilter/vf_zscale.c | 6 ++--- libavfilter/vsink_nullsink.c | 3 +-- libavfilter/vsrc_cellauto.c | 3 +-- libavfilter/vsrc_gradients.c | 3 +-- libavfilter/vsrc_life.c | 3 +-- libavfilter/vsrc_mandelbrot.c | 3 +-- libavfilter/vsrc_mptestsrc.c | 3 +-- libavfilter/vsrc_sierpinski.c | 3 +-- libavfilter/vsrc_testsrc.c | 36 +++++++++++------------------ 388 files changed, 904 insertions(+), 1692 deletions(-) diff --git a/libavfilter/aeval.c b/libavfilter/aeval.c index 7c891c5ad0..7cb05d206a 100644 --- a/libavfilter/aeval.c +++ b/libavfilter/aeval.c @@ -307,7 +307,6 @@ static const AVFilterPad aevalsrc_outputs[] = { .config_props = config_props, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_asrc_aevalsrc = { @@ -318,7 +317,7 @@ const AVFilter ff_asrc_aevalsrc = { .uninit = uninit, .priv_size = sizeof(EvalContext), .inputs = NULL, - .outputs = aevalsrc_outputs, + FILTER_OUTPUTS(aevalsrc_outputs), .priv_class = &aevalsrc_class, }; @@ -445,7 +444,6 @@ static const AVFilterPad aeval_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad aeval_outputs[] = { @@ -454,7 +452,6 @@ static const AVFilterPad aeval_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = aeval_config_output, }, - { NULL } }; const AVFilter ff_af_aeval = { @@ -464,8 +461,8 @@ const AVFilter ff_af_aeval = { .init = init, .uninit = uninit, .priv_size = sizeof(EvalContext), - .inputs = aeval_inputs, - .outputs = aeval_outputs, + FILTER_INPUTS(aeval_inputs), + FILTER_OUTPUTS(aeval_outputs), .priv_class = &aeval_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/af_acontrast.c b/libavfilter/af_acontrast.c index d4128e7495..b5a5381fba 100644 --- a/libavfilter/af_acontrast.c +++ b/libavfilter/af_acontrast.c @@ -187,7 +187,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -195,7 +194,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_acontrast = { @@ -204,6 +202,6 @@ const AVFilter ff_af_acontrast = { .query_formats = query_formats, .priv_size = sizeof(AudioContrastContext), .priv_class = &acontrast_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/af_acopy.c b/libavfilter/af_acopy.c index 29551996d9..32455d9186 100644 --- a/libavfilter/af_acopy.c +++ b/libavfilter/af_acopy.c @@ -51,7 +51,6 @@ static const AVFilterPad acopy_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad acopy_outputs[] = { @@ -59,12 +58,11 @@ static const AVFilterPad acopy_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_acopy = { .name = "acopy", .description = NULL_IF_CONFIG_SMALL("Copy the input audio unchanged to the output."), - .inputs = acopy_inputs, - .outputs = acopy_outputs, + FILTER_INPUTS(acopy_inputs), + FILTER_OUTPUTS(acopy_outputs), }; diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c index 4d3eae2d62..4c3c836ed4 100644 --- a/libavfilter/af_acrossover.c +++ b/libavfilter/af_acrossover.c @@ -555,7 +555,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; const AVFilter ff_af_acrossover = { @@ -566,7 +565,7 @@ const AVFilter ff_af_acrossover = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, + FILTER_INPUTS(inputs), .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/af_acrusher.c b/libavfilter/af_acrusher.c index 447d049062..6130c9f2ec 100644 --- a/libavfilter/af_acrusher.c +++ b/libavfilter/af_acrusher.c @@ -342,7 +342,6 @@ static const AVFilterPad avfilter_af_acrusher_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_af_acrusher_outputs[] = { @@ -350,7 +349,6 @@ static const AVFilterPad avfilter_af_acrusher_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_acrusher = { @@ -360,7 +358,7 @@ const AVFilter ff_af_acrusher = { .priv_class = &acrusher_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_af_acrusher_inputs, - .outputs = avfilter_af_acrusher_outputs, + FILTER_INPUTS(avfilter_af_acrusher_inputs), + FILTER_OUTPUTS(avfilter_af_acrusher_outputs), .process_command = process_command, }; diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c index e1ecbc4c9b..a3a047d17b 100644 --- a/libavfilter/af_adeclick.c +++ b/libavfilter/af_adeclick.c @@ -741,7 +741,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -749,7 +748,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_adeclick = { @@ -761,8 +759,8 @@ const AVFilter ff_af_adeclick = { .init = init, .activate = activate, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; @@ -797,7 +795,7 @@ const AVFilter ff_af_adeclip = { .init = init, .activate = activate, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_adelay.c b/libavfilter/af_adelay.c index 7640cca357..f9b4acd600 100644 --- a/libavfilter/af_adelay.c +++ b/libavfilter/af_adelay.c @@ -326,7 +326,6 @@ static const AVFilterPad adelay_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad adelay_outputs[] = { @@ -334,7 +333,6 @@ static const AVFilterPad adelay_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_adelay = { @@ -345,7 +343,7 @@ const AVFilter ff_af_adelay = { .priv_class = &adelay_class, .activate = activate, .uninit = uninit, - .inputs = adelay_inputs, - .outputs = adelay_outputs, + FILTER_INPUTS(adelay_inputs), + FILTER_OUTPUTS(adelay_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_adenorm.c b/libavfilter/af_adenorm.c index b5679b0f20..75e9bd4b74 100644 --- a/libavfilter/af_adenorm.c +++ b/libavfilter/af_adenorm.c @@ -279,7 +279,6 @@ static const AVFilterPad adenorm_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad adenorm_outputs[] = { @@ -288,7 +287,6 @@ static const AVFilterPad adenorm_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; #define OFFSET(x) offsetof(ADenormContext, x) @@ -311,8 +309,8 @@ const AVFilter ff_af_adenorm = { .description = NULL_IF_CONFIG_SMALL("Remedy denormals by adding extremely low-level noise."), .query_formats = query_formats, .priv_size = sizeof(ADenormContext), - .inputs = adenorm_inputs, - .outputs = adenorm_outputs, + FILTER_INPUTS(adenorm_inputs), + FILTER_OUTPUTS(adenorm_outputs), .priv_class = &adenorm_class, .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | diff --git a/libavfilter/af_aderivative.c b/libavfilter/af_aderivative.c index 0933bb22a9..e4b6267a1a 100644 --- a/libavfilter/af_aderivative.c +++ b/libavfilter/af_aderivative.c @@ -163,7 +163,6 @@ static const AVFilterPad aderivative_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad aderivative_outputs[] = { @@ -171,7 +170,6 @@ static const AVFilterPad aderivative_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_aderivative = { @@ -180,8 +178,8 @@ const AVFilter ff_af_aderivative = { .query_formats = query_formats, .priv_size = sizeof(ADerivativeContext), .uninit = uninit, - .inputs = aderivative_inputs, - .outputs = aderivative_outputs, + FILTER_INPUTS(aderivative_inputs), + FILTER_OUTPUTS(aderivative_outputs), }; const AVFilter ff_af_aintegral = { @@ -190,6 +188,6 @@ const AVFilter ff_af_aintegral = { .query_formats = query_formats, .priv_size = sizeof(ADerivativeContext), .uninit = uninit, - .inputs = aderivative_inputs, - .outputs = aderivative_outputs, + FILTER_INPUTS(aderivative_inputs), + FILTER_OUTPUTS(aderivative_outputs), }; diff --git a/libavfilter/af_aecho.c b/libavfilter/af_aecho.c index bc040536b0..d533bb610b 100644 --- a/libavfilter/af_aecho.c +++ b/libavfilter/af_aecho.c @@ -351,7 +351,6 @@ static const AVFilterPad aecho_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad aecho_outputs[] = { @@ -360,7 +359,6 @@ static const AVFilterPad aecho_outputs[] = { .config_props = config_output, .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_aecho = { @@ -372,6 +370,6 @@ const AVFilter ff_af_aecho = { .init = init, .activate = activate, .uninit = uninit, - .inputs = aecho_inputs, - .outputs = aecho_outputs, + FILTER_INPUTS(aecho_inputs), + FILTER_OUTPUTS(aecho_outputs), }; diff --git a/libavfilter/af_aemphasis.c b/libavfilter/af_aemphasis.c index 621e0fe7cf..43e4bfc477 100644 --- a/libavfilter/af_aemphasis.c +++ b/libavfilter/af_aemphasis.c @@ -376,7 +376,6 @@ static const AVFilterPad avfilter_af_aemphasis_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_af_aemphasis_outputs[] = { @@ -384,7 +383,6 @@ static const AVFilterPad avfilter_af_aemphasis_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_aemphasis = { @@ -394,8 +392,8 @@ const AVFilter ff_af_aemphasis = { .priv_class = &aemphasis_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_af_aemphasis_inputs, - .outputs = avfilter_af_aemphasis_outputs, + FILTER_INPUTS(avfilter_af_aemphasis_inputs), + FILTER_OUTPUTS(avfilter_af_aemphasis_outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/af_aexciter.c b/libavfilter/af_aexciter.c index 6ebf2828df..f9ece59d93 100644 --- a/libavfilter/af_aexciter.c +++ b/libavfilter/af_aexciter.c @@ -279,7 +279,6 @@ static const AVFilterPad avfilter_af_aexciter_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_af_aexciter_outputs[] = { @@ -287,7 +286,6 @@ static const AVFilterPad avfilter_af_aexciter_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_aexciter = { @@ -297,8 +295,8 @@ const AVFilter ff_af_aexciter = { .priv_class = &aexciter_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_af_aexciter_inputs, - .outputs = avfilter_af_aexciter_outputs, + FILTER_INPUTS(avfilter_af_aexciter_inputs), + FILTER_OUTPUTS(avfilter_af_aexciter_outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index f39c0e45b6..a55d5d72c3 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -340,7 +340,6 @@ static const AVFilterPad avfilter_af_afade_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_af_afade_outputs[] = { @@ -349,7 +348,6 @@ static const AVFilterPad avfilter_af_afade_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_afade = { @@ -358,8 +356,8 @@ const AVFilter ff_af_afade = { .query_formats = query_formats, .priv_size = sizeof(AudioFadeContext), .init = init, - .inputs = avfilter_af_afade_inputs, - .outputs = avfilter_af_afade_outputs, + FILTER_INPUTS(avfilter_af_afade_inputs), + FILTER_OUTPUTS(avfilter_af_afade_outputs), .priv_class = &afade_class, .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, @@ -628,7 +626,6 @@ static const AVFilterPad avfilter_af_acrossfade_inputs[] = { .name = "crossfade1", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad avfilter_af_acrossfade_outputs[] = { @@ -637,7 +634,6 @@ static const AVFilterPad avfilter_af_acrossfade_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = acrossfade_config_output, }, - { NULL } }; const AVFilter ff_af_acrossfade = { @@ -647,8 +643,8 @@ const AVFilter ff_af_acrossfade = { .priv_size = sizeof(AudioFadeContext), .activate = activate, .priv_class = &acrossfade_class, - .inputs = avfilter_af_acrossfade_inputs, - .outputs = avfilter_af_acrossfade_outputs, + FILTER_INPUTS(avfilter_af_acrossfade_inputs), + FILTER_OUTPUTS(avfilter_af_acrossfade_outputs), }; #endif /* CONFIG_ACROSSFADE_FILTER */ diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c index 6ac2a30e70..bbfa40b0d4 100644 --- a/libavfilter/af_afftdn.c +++ b/libavfilter/af_afftdn.c @@ -1400,7 +1400,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1408,7 +1407,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_afftdn = { @@ -1419,8 +1417,8 @@ const AVFilter ff_af_afftdn = { .priv_class = &afftdn_class, .activate = activate, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c index 314585c419..de54c13135 100644 --- a/libavfilter/af_afftfilt.c +++ b/libavfilter/af_afftfilt.c @@ -466,7 +466,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -474,7 +473,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_afftfilt = { @@ -482,8 +480,8 @@ const AVFilter ff_af_afftfilt = { .description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to samples in frequency domain."), .priv_size = sizeof(AFFTFiltContext), .priv_class = &afftfilt_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .activate = activate, .query_formats = query_formats, .uninit = uninit, diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c index e9cc4738fd..1cab148d95 100644 --- a/libavfilter/af_aformat.c +++ b/libavfilter/af_aformat.c @@ -146,7 +146,6 @@ static const AVFilterPad avfilter_af_aformat_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad avfilter_af_aformat_outputs[] = { @@ -154,7 +153,6 @@ static const AVFilterPad avfilter_af_aformat_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO }, - { NULL } }; const AVFilter ff_af_aformat = { @@ -165,6 +163,6 @@ const AVFilter ff_af_aformat = { .query_formats = query_formats, .priv_size = sizeof(AFormatContext), .priv_class = &aformat_class, - .inputs = avfilter_af_aformat_inputs, - .outputs = avfilter_af_aformat_outputs, + FILTER_INPUTS(avfilter_af_aformat_inputs), + FILTER_OUTPUTS(avfilter_af_aformat_outputs), }; diff --git a/libavfilter/af_afreqshift.c b/libavfilter/af_afreqshift.c index caacdbccae..1bb34f92dd 100644 --- a/libavfilter/af_afreqshift.c +++ b/libavfilter/af_afreqshift.c @@ -367,7 +367,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -375,7 +374,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_afreqshift = { @@ -385,8 +383,8 @@ const AVFilter ff_af_afreqshift = { .priv_size = sizeof(AFreqShift), .priv_class = &afreqshift_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = ff_filter_process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, @@ -407,8 +405,8 @@ const AVFilter ff_af_aphaseshift = { .priv_size = sizeof(AFreqShift), .priv_class = &aphaseshift_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = ff_filter_process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/af_afwtdn.c b/libavfilter/af_afwtdn.c index 8d67d6458e..26ec1eba7e 100644 --- a/libavfilter/af_afwtdn.c +++ b/libavfilter/af_afwtdn.c @@ -1311,7 +1311,6 @@ static const AVFilterPad inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1320,7 +1319,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_afwtdn = { @@ -1331,8 +1329,8 @@ const AVFilter ff_af_afwtdn = { .priv_class = &afwtdn_class, .activate = activate, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c index eb77dfbcc5..0dc28ac080 100644 --- a/libavfilter/af_agate.c +++ b/libavfilter/af_agate.c @@ -240,7 +240,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = agate_config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -248,7 +247,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_agate = { @@ -257,8 +255,8 @@ const AVFilter ff_af_agate = { .query_formats = query_formats, .priv_size = sizeof(AudioGateContext), .priv_class = &agate_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = ff_filter_process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; @@ -413,7 +411,6 @@ static const AVFilterPad sidechaingate_inputs[] = { .name = "sidechain", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad sidechaingate_outputs[] = { @@ -422,7 +419,6 @@ static const AVFilterPad sidechaingate_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = scconfig_output, }, - { NULL } }; const AVFilter ff_af_sidechaingate = { @@ -433,8 +429,8 @@ const AVFilter ff_af_sidechaingate = { .query_formats = scquery_formats, .activate = activate, .uninit = uninit, - .inputs = sidechaingate_inputs, - .outputs = sidechaingate_outputs, + FILTER_INPUTS(sidechaingate_inputs), + FILTER_OUTPUTS(sidechaingate_outputs), .process_command = ff_filter_process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c index a396ec7885..702785cbfd 100644 --- a/libavfilter/af_aiir.c +++ b/libavfilter/af_aiir.c @@ -1518,7 +1518,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; #define OFFSET(x) offsetof(AudioIIRContext, x) @@ -1574,7 +1573,7 @@ const AVFilter ff_af_aiir = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, + FILTER_INPUTS(inputs), .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_alimiter.c b/libavfilter/af_alimiter.c index 8ff64c8a7b..9172f305f0 100644 --- a/libavfilter/af_alimiter.c +++ b/libavfilter/af_alimiter.c @@ -337,7 +337,6 @@ static const AVFilterPad alimiter_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad alimiter_outputs[] = { @@ -345,7 +344,6 @@ static const AVFilterPad alimiter_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_alimiter = { @@ -356,6 +354,6 @@ const AVFilter ff_af_alimiter = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = alimiter_inputs, - .outputs = alimiter_outputs, + FILTER_INPUTS(alimiter_inputs), + FILTER_OUTPUTS(alimiter_outputs), }; diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index 7749495970..4747120474 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -342,7 +342,6 @@ static const AVFilterPad amerge_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_amerge = { @@ -355,7 +354,7 @@ const AVFilter ff_af_amerge = { .query_formats = query_formats, .activate = activate, .inputs = NULL, - .outputs = amerge_outputs, + FILTER_OUTPUTS(amerge_outputs), .priv_class = &amerge_class, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 003c1717cd..7465b7be7d 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -634,7 +634,6 @@ static const AVFilterPad avfilter_af_amix_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_amix = { @@ -647,7 +646,7 @@ const AVFilter ff_af_amix = { .activate = activate, .query_formats = query_formats, .inputs = NULL, - .outputs = avfilter_af_amix_outputs, + FILTER_OUTPUTS(avfilter_af_amix_outputs), .process_command = process_command, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_amultiply.c b/libavfilter/af_amultiply.c index f6814a802d..7c44cadb2b 100644 --- a/libavfilter/af_amultiply.c +++ b/libavfilter/af_amultiply.c @@ -179,7 +179,6 @@ static const AVFilterPad inputs[] = { .name = "multiply1", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -188,7 +187,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_amultiply = { @@ -199,6 +197,6 @@ const AVFilter ff_af_amultiply = { .uninit = uninit, .activate = activate, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c index faa0e2a230..cd8ac38a8a 100644 --- a/libavfilter/af_anequalizer.c +++ b/libavfilter/af_anequalizer.c @@ -761,7 +761,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .needs_writable = 1, }, - { NULL } }; const AVFilter ff_af_anequalizer = { @@ -772,7 +771,7 @@ const AVFilter ff_af_anequalizer = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, + FILTER_INPUTS(inputs), .outputs = NULL, .process_command = process_command, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | diff --git a/libavfilter/af_anlmdn.c b/libavfilter/af_anlmdn.c index 58cbf8fab1..3c232da3de 100644 --- a/libavfilter/af_anlmdn.c +++ b/libavfilter/af_anlmdn.c @@ -388,7 +388,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -398,7 +397,6 @@ static const AVFilterPad outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_af_anlmdn = { @@ -408,8 +406,8 @@ const AVFilter ff_af_anlmdn = { .priv_size = sizeof(AudioNLMeansContext), .priv_class = &anlmdn_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/af_anlms.c b/libavfilter/af_anlms.c index cc25ff6586..607066d770 100644 --- a/libavfilter/af_anlms.c +++ b/libavfilter/af_anlms.c @@ -288,7 +288,6 @@ static const AVFilterPad inputs[] = { .name = "desired", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -297,7 +296,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_anlms = { @@ -309,8 +307,8 @@ const AVFilter ff_af_anlms = { .uninit = uninit, .activate = activate, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_anull.c b/libavfilter/af_anull.c index 74f915778f..065d37e17e 100644 --- a/libavfilter/af_anull.c +++ b/libavfilter/af_anull.c @@ -32,7 +32,6 @@ static const AVFilterPad avfilter_af_anull_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad avfilter_af_anull_outputs[] = { @@ -40,12 +39,11 @@ static const AVFilterPad avfilter_af_anull_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_anull = { .name = "anull", .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), - .inputs = avfilter_af_anull_inputs, - .outputs = avfilter_af_anull_outputs, + FILTER_INPUTS(avfilter_af_anull_inputs), + FILTER_OUTPUTS(avfilter_af_anull_outputs), }; diff --git a/libavfilter/af_apad.c b/libavfilter/af_apad.c index 8628c0c2e2..27259a87a3 100644 --- a/libavfilter/af_apad.c +++ b/libavfilter/af_apad.c @@ -155,7 +155,6 @@ static const AVFilterPad apad_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad apad_outputs[] = { @@ -165,7 +164,6 @@ static const AVFilterPad apad_outputs[] = { .config_props = config_output, .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_apad = { @@ -173,8 +171,8 @@ const AVFilter ff_af_apad = { .description = NULL_IF_CONFIG_SMALL("Pad audio with silence."), .init = init, .priv_size = sizeof(APadContext), - .inputs = apad_inputs, - .outputs = apad_outputs, + FILTER_INPUTS(apad_inputs), + FILTER_OUTPUTS(apad_outputs), .priv_class = &apad_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_aphaser.c b/libavfilter/af_aphaser.c index 5f3244246f..3a365140db 100644 --- a/libavfilter/af_aphaser.c +++ b/libavfilter/af_aphaser.c @@ -265,7 +265,6 @@ static const AVFilterPad aphaser_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad aphaser_outputs[] = { @@ -274,7 +273,6 @@ static const AVFilterPad aphaser_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_aphaser = { @@ -284,7 +282,7 @@ const AVFilter ff_af_aphaser = { .priv_size = sizeof(AudioPhaserContext), .init = init, .uninit = uninit, - .inputs = aphaser_inputs, - .outputs = aphaser_outputs, + FILTER_INPUTS(aphaser_inputs), + FILTER_OUTPUTS(aphaser_outputs), .priv_class = &aphaser_class, }; diff --git a/libavfilter/af_apulsator.c b/libavfilter/af_apulsator.c index cef49d891f..b9a194eb9d 100644 --- a/libavfilter/af_apulsator.c +++ b/libavfilter/af_apulsator.c @@ -235,7 +235,6 @@ static const AVFilterPad inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -243,7 +242,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_apulsator = { @@ -252,6 +250,6 @@ const AVFilter ff_af_apulsator = { .priv_size = sizeof(AudioPulsatorContext), .priv_class = &apulsator_class, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index 1127ad2718..e46369b98d 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -329,7 +329,6 @@ static const AVFilterPad aresample_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad aresample_outputs[] = { @@ -339,7 +338,6 @@ static const AVFilterPad aresample_outputs[] = { .request_frame = request_frame, .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_aresample = { @@ -350,6 +348,6 @@ const AVFilter ff_af_aresample = { .query_formats = query_formats, .priv_size = sizeof(AResampleContext), .priv_class = &aresample_class, - .inputs = aresample_inputs, - .outputs = aresample_outputs, + FILTER_INPUTS(aresample_inputs), + FILTER_OUTPUTS(aresample_outputs), }; diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c index 9bb1df437d..8fe86616ab 100644 --- a/libavfilter/af_arnndn.c +++ b/libavfilter/af_arnndn.c @@ -1584,7 +1584,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1592,7 +1591,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; #define OFFSET(x) offsetof(AudioRNNContext, x) @@ -1616,8 +1614,8 @@ const AVFilter ff_af_arnndn = { .activate = activate, .init = init, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c index 9987eff8a2..71788f2a76 100644 --- a/libavfilter/af_asetnsamples.c +++ b/libavfilter/af_asetnsamples.c @@ -106,7 +106,6 @@ static const AVFilterPad asetnsamples_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad asetnsamples_outputs[] = { @@ -114,7 +113,6 @@ static const AVFilterPad asetnsamples_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_asetnsamples = { @@ -122,7 +120,7 @@ const AVFilter ff_af_asetnsamples = { .description = NULL_IF_CONFIG_SMALL("Set the number of samples for each output audio frames."), .priv_size = sizeof(ASNSContext), .priv_class = &asetnsamples_class, - .inputs = asetnsamples_inputs, - .outputs = asetnsamples_outputs, + FILTER_INPUTS(asetnsamples_inputs), + FILTER_OUTPUTS(asetnsamples_outputs), .activate = activate, }; diff --git a/libavfilter/af_asetrate.c b/libavfilter/af_asetrate.c index f89185d936..920baedad2 100644 --- a/libavfilter/af_asetrate.c +++ b/libavfilter/af_asetrate.c @@ -94,7 +94,6 @@ static const AVFilterPad asetrate_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad asetrate_outputs[] = { @@ -103,7 +102,6 @@ static const AVFilterPad asetrate_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_af_asetrate = { @@ -112,7 +110,7 @@ const AVFilter ff_af_asetrate = { "altering the data."), .query_formats = query_formats, .priv_size = sizeof(ASetRateContext), - .inputs = asetrate_inputs, - .outputs = asetrate_outputs, + FILTER_INPUTS(asetrate_inputs), + FILTER_OUTPUTS(asetrate_outputs), .priv_class = &asetrate_class, }; diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c index 72d795f8ee..b6623fa69d 100644 --- a/libavfilter/af_ashowinfo.c +++ b/libavfilter/af_ashowinfo.c @@ -243,7 +243,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -251,7 +250,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_ashowinfo = { @@ -259,6 +257,6 @@ const AVFilter ff_af_ashowinfo = { .description = NULL_IF_CONFIG_SMALL("Show textual information for each audio frame."), .priv_size = sizeof(AShowInfoContext), .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/af_asoftclip.c b/libavfilter/af_asoftclip.c index a82c523bd4..aa012f6e40 100644 --- a/libavfilter/af_asoftclip.c +++ b/libavfilter/af_asoftclip.c @@ -451,7 +451,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -459,7 +458,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_asoftclip = { @@ -468,8 +466,8 @@ const AVFilter ff_af_asoftclip = { .query_formats = query_formats, .priv_size = sizeof(ASoftClipContext), .priv_class = &asoftclip_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .uninit = uninit, .process_command = ff_filter_process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | diff --git a/libavfilter/af_asr.c b/libavfilter/af_asr.c index 8dbe67fa5b..c7dc3b2db6 100644 --- a/libavfilter/af_asr.c +++ b/libavfilter/af_asr.c @@ -156,7 +156,6 @@ static const AVFilterPad asr_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad asr_outputs[] = { @@ -164,7 +163,6 @@ static const AVFilterPad asr_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_asr = { @@ -175,6 +173,6 @@ const AVFilter ff_af_asr = { .init = asr_init, .uninit = asr_uninit, .query_formats = query_formats, - .inputs = asr_inputs, - .outputs = asr_outputs, + FILTER_INPUTS(asr_inputs), + FILTER_OUTPUTS(asr_outputs), }; diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c index 0e6650cacb..b1efecb1a4 100644 --- a/libavfilter/af_astats.c +++ b/libavfilter/af_astats.c @@ -814,7 +814,6 @@ static const AVFilterPad astats_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad astats_outputs[] = { @@ -823,7 +822,6 @@ static const AVFilterPad astats_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_astats = { @@ -833,7 +831,7 @@ const AVFilter ff_af_astats = { .priv_size = sizeof(AudioStatsContext), .priv_class = &astats_class, .uninit = uninit, - .inputs = astats_inputs, - .outputs = astats_outputs, + FILTER_INPUTS(astats_inputs), + FILTER_OUTPUTS(astats_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_asubboost.c b/libavfilter/af_asubboost.c index 02d88c4c85..55f4b87c84 100644 --- a/libavfilter/af_asubboost.c +++ b/libavfilter/af_asubboost.c @@ -221,7 +221,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -229,7 +228,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_asubboost = { @@ -239,8 +237,8 @@ const AVFilter ff_af_asubboost = { .priv_size = sizeof(ASubBoostContext), .priv_class = &asubboost_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/af_asupercut.c b/libavfilter/af_asupercut.c index 439cab6d6d..af6abec021 100644 --- a/libavfilter/af_asupercut.c +++ b/libavfilter/af_asupercut.c @@ -345,7 +345,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -353,7 +352,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_asupercut = { @@ -363,8 +361,8 @@ const AVFilter ff_af_asupercut = { .priv_size = sizeof(ASuperCutContext), .priv_class = &asupercut_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, @@ -386,8 +384,8 @@ const AVFilter ff_af_asubcut = { .priv_size = sizeof(ASuperCutContext), .priv_class = &asubcut_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, @@ -411,8 +409,8 @@ const AVFilter ff_af_asuperpass = { .priv_size = sizeof(ASuperCutContext), .priv_class = &asuperpass_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, @@ -428,8 +426,8 @@ const AVFilter ff_af_asuperstop = { .priv_size = sizeof(ASuperCutContext), .priv_class = &asuperstop_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c index 56f216d832..16fa59701a 100644 --- a/libavfilter/af_atempo.c +++ b/libavfilter/af_atempo.c @@ -1173,7 +1173,6 @@ static const AVFilterPad atempo_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad atempo_outputs[] = { @@ -1182,7 +1181,6 @@ static const AVFilterPad atempo_outputs[] = { .request_frame = request_frame, .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_atempo = { @@ -1194,6 +1192,6 @@ const AVFilter ff_af_atempo = { .process_command = process_command, .priv_size = sizeof(ATempoContext), .priv_class = &atempo_class, - .inputs = atempo_inputs, - .outputs = atempo_outputs, + FILTER_INPUTS(atempo_inputs), + FILTER_OUTPUTS(atempo_outputs), }; diff --git a/libavfilter/af_axcorrelate.c b/libavfilter/af_axcorrelate.c index ffb90fce7f..18fc3004b1 100644 --- a/libavfilter/af_axcorrelate.c +++ b/libavfilter/af_axcorrelate.c @@ -326,7 +326,6 @@ static const AVFilterPad inputs[] = { .name = "axcorrelate1", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -335,7 +334,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM @@ -359,6 +357,6 @@ const AVFilter ff_af_axcorrelate = { .query_formats = query_formats, .activate = activate, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 253383fc6f..ca0de55a0d 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -838,7 +838,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -847,7 +846,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; #define OFFSET(x) offsetof(BiquadsContext, x) @@ -870,8 +868,8 @@ const AVFilter ff_af_##name_ = { \ .init = name_##_init, \ .uninit = uninit, \ .query_formats = query_formats, \ - .inputs = inputs, \ - .outputs = outputs, \ + FILTER_INPUTS(inputs), \ + FILTER_OUTPUTS(outputs), \ .priv_class = &name_##_class, \ .process_command = process_command, \ .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, \ diff --git a/libavfilter/af_bs2b.c b/libavfilter/af_bs2b.c index beb1d0f341..55b4d2ac6f 100644 --- a/libavfilter/af_bs2b.c +++ b/libavfilter/af_bs2b.c @@ -192,7 +192,6 @@ static const AVFilterPad bs2b_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad bs2b_outputs[] = { @@ -201,7 +200,6 @@ static const AVFilterPad bs2b_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_bs2b = { @@ -212,6 +210,6 @@ const AVFilter ff_af_bs2b = { .priv_class = &bs2b_class, .init = init, .uninit = uninit, - .inputs = bs2b_inputs, - .outputs = bs2b_outputs, + FILTER_INPUTS(bs2b_inputs), + FILTER_OUTPUTS(bs2b_outputs), }; diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index f77bba363c..4797b45918 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -387,7 +387,6 @@ static const AVFilterPad avfilter_af_channelmap_inputs[] = { .config_props = channelmap_config_input, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad avfilter_af_channelmap_outputs[] = { @@ -395,7 +394,6 @@ static const AVFilterPad avfilter_af_channelmap_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO }, - { NULL } }; const AVFilter ff_af_channelmap = { @@ -405,6 +403,6 @@ const AVFilter ff_af_channelmap = { .query_formats = channelmap_query_formats, .priv_size = sizeof(ChannelMapContext), .priv_class = &channelmap_class, - .inputs = avfilter_af_channelmap_inputs, - .outputs = avfilter_af_channelmap_outputs, + FILTER_INPUTS(avfilter_af_channelmap_inputs), + FILTER_OUTPUTS(avfilter_af_channelmap_outputs), }; diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c index d6f1438b86..07ab793fed 100644 --- a/libavfilter/af_channelsplit.c +++ b/libavfilter/af_channelsplit.c @@ -165,7 +165,6 @@ static const AVFilterPad avfilter_af_channelsplit_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; const AVFilter ff_af_channelsplit = { @@ -175,7 +174,7 @@ const AVFilter ff_af_channelsplit = { .priv_class = &channelsplit_class, .init = init, .query_formats = query_formats, - .inputs = avfilter_af_channelsplit_inputs, + FILTER_INPUTS(avfilter_af_channelsplit_inputs), .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; diff --git a/libavfilter/af_chorus.c b/libavfilter/af_chorus.c index 000f1d2d07..9c9090e4cc 100644 --- a/libavfilter/af_chorus.c +++ b/libavfilter/af_chorus.c @@ -343,7 +343,6 @@ static const AVFilterPad chorus_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad chorus_outputs[] = { @@ -353,7 +352,6 @@ static const AVFilterPad chorus_outputs[] = { .request_frame = request_frame, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_chorus = { @@ -364,6 +362,6 @@ const AVFilter ff_af_chorus = { .priv_class = &chorus_class, .init = init, .uninit = uninit, - .inputs = chorus_inputs, - .outputs = chorus_outputs, + FILTER_INPUTS(chorus_inputs), + FILTER_OUTPUTS(chorus_outputs), }; diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c index 37c1884537..1df28d5590 100644 --- a/libavfilter/af_compand.c +++ b/libavfilter/af_compand.c @@ -558,7 +558,6 @@ static const AVFilterPad compand_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad compand_outputs[] = { @@ -568,7 +567,6 @@ static const AVFilterPad compand_outputs[] = { .config_props = config_output, .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; @@ -581,6 +579,6 @@ const AVFilter ff_af_compand = { .priv_class = &compand_class, .init = init, .uninit = uninit, - .inputs = compand_inputs, - .outputs = compand_outputs, + FILTER_INPUTS(compand_inputs), + FILTER_OUTPUTS(compand_outputs), }; diff --git a/libavfilter/af_compensationdelay.c b/libavfilter/af_compensationdelay.c index 3b91145cd0..1620750760 100644 --- a/libavfilter/af_compensationdelay.c +++ b/libavfilter/af_compensationdelay.c @@ -162,7 +162,6 @@ static const AVFilterPad compensationdelay_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad compensationdelay_outputs[] = { @@ -170,7 +169,6 @@ static const AVFilterPad compensationdelay_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_compensationdelay = { @@ -180,6 +178,6 @@ const AVFilter ff_af_compensationdelay = { .priv_size = sizeof(CompensationDelayContext), .priv_class = &compensationdelay_class, .uninit = uninit, - .inputs = compensationdelay_inputs, - .outputs = compensationdelay_outputs, + FILTER_INPUTS(compensationdelay_inputs), + FILTER_OUTPUTS(compensationdelay_outputs), }; diff --git a/libavfilter/af_crossfeed.c b/libavfilter/af_crossfeed.c index 1d0f8a8149..bbab8f423c 100644 --- a/libavfilter/af_crossfeed.c +++ b/libavfilter/af_crossfeed.c @@ -164,7 +164,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -172,7 +171,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_crossfeed = { @@ -181,8 +179,8 @@ const AVFilter ff_af_crossfeed = { .query_formats = query_formats, .priv_size = sizeof(CrossfeedContext), .priv_class = &crossfeed_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = process_command, }; diff --git a/libavfilter/af_crystalizer.c b/libavfilter/af_crystalizer.c index 27d3579b7c..025a8158c3 100644 --- a/libavfilter/af_crystalizer.c +++ b/libavfilter/af_crystalizer.c @@ -433,7 +433,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -441,7 +440,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_crystalizer = { @@ -451,8 +449,8 @@ const AVFilter ff_af_crystalizer = { .priv_size = sizeof(CrystalizerContext), .priv_class = &crystalizer_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/af_dcshift.c b/libavfilter/af_dcshift.c index a722928b18..d2751df441 100644 --- a/libavfilter/af_dcshift.c +++ b/libavfilter/af_dcshift.c @@ -136,7 +136,6 @@ static const AVFilterPad dcshift_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad dcshift_outputs[] = { @@ -144,7 +143,6 @@ static const AVFilterPad dcshift_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_dcshift = { @@ -154,7 +152,7 @@ const AVFilter ff_af_dcshift = { .priv_size = sizeof(DCShiftContext), .priv_class = &dcshift_class, .init = init, - .inputs = dcshift_inputs, - .outputs = dcshift_outputs, + FILTER_INPUTS(dcshift_inputs), + FILTER_OUTPUTS(dcshift_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/af_deesser.c b/libavfilter/af_deesser.c index c1471123c5..defea49e41 100644 --- a/libavfilter/af_deesser.c +++ b/libavfilter/af_deesser.c @@ -208,7 +208,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -216,7 +215,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_deesser = { @@ -226,7 +224,7 @@ const AVFilter ff_af_deesser = { .priv_size = sizeof(DeesserContext), .priv_class = &deesser_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_drmeter.c b/libavfilter/af_drmeter.c index 722881dbc9..338fce3fc9 100644 --- a/libavfilter/af_drmeter.c +++ b/libavfilter/af_drmeter.c @@ -201,7 +201,6 @@ static const AVFilterPad drmeter_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad drmeter_outputs[] = { @@ -210,7 +209,6 @@ static const AVFilterPad drmeter_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_drmeter = { @@ -220,6 +218,6 @@ const AVFilter ff_af_drmeter = { .priv_size = sizeof(DRMeterContext), .priv_class = &drmeter_class, .uninit = uninit, - .inputs = drmeter_inputs, - .outputs = drmeter_outputs, + FILTER_INPUTS(drmeter_inputs), + FILTER_OUTPUTS(drmeter_outputs), }; diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c index a6dbadbdd8..130555d1f0 100644 --- a/libavfilter/af_dynaudnorm.c +++ b/libavfilter/af_dynaudnorm.c @@ -844,7 +844,6 @@ static const AVFilterPad avfilter_af_dynaudnorm_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_af_dynaudnorm_outputs[] = { @@ -852,7 +851,6 @@ static const AVFilterPad avfilter_af_dynaudnorm_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_dynaudnorm = { @@ -863,8 +861,8 @@ const AVFilter ff_af_dynaudnorm = { .init = init, .uninit = uninit, .activate = activate, - .inputs = avfilter_af_dynaudnorm_inputs, - .outputs = avfilter_af_dynaudnorm_outputs, + FILTER_INPUTS(avfilter_af_dynaudnorm_inputs), + FILTER_OUTPUTS(avfilter_af_dynaudnorm_outputs), .priv_class = &dynaudnorm_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = process_command, diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c index ddb85705ee..2d219181d4 100644 --- a/libavfilter/af_earwax.c +++ b/libavfilter/af_earwax.c @@ -220,7 +220,6 @@ static const AVFilterPad earwax_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad earwax_outputs[] = { @@ -228,7 +227,6 @@ static const AVFilterPad earwax_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_earwax = { @@ -237,6 +235,6 @@ const AVFilter ff_af_earwax = { .query_formats = query_formats, .priv_size = sizeof(EarwaxContext), .uninit = uninit, - .inputs = earwax_inputs, - .outputs = earwax_outputs, + FILTER_INPUTS(earwax_inputs), + FILTER_OUTPUTS(earwax_outputs), }; diff --git a/libavfilter/af_extrastereo.c b/libavfilter/af_extrastereo.c index 6d4f307384..0fcf840a4a 100644 --- a/libavfilter/af_extrastereo.c +++ b/libavfilter/af_extrastereo.c @@ -108,7 +108,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -116,7 +115,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_extrastereo = { @@ -125,8 +123,8 @@ const AVFilter ff_af_extrastereo = { .query_formats = query_formats, .priv_size = sizeof(ExtraStereoContext), .priv_class = &extrastereo_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_firequalizer.c b/libavfilter/af_firequalizer.c index 7e18db5517..4fb0a42b9c 100644 --- a/libavfilter/af_firequalizer.c +++ b/libavfilter/af_firequalizer.c @@ -944,7 +944,6 @@ static const AVFilterPad firequalizer_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad firequalizer_outputs[] = { @@ -953,7 +952,6 @@ static const AVFilterPad firequalizer_outputs[] = { .request_frame = request_frame, .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_firequalizer = { @@ -963,7 +961,7 @@ const AVFilter ff_af_firequalizer = { .query_formats = query_formats, .process_command = process_command, .priv_size = sizeof(FIREqualizerContext), - .inputs = firequalizer_inputs, - .outputs = firequalizer_outputs, + FILTER_INPUTS(firequalizer_inputs), + FILTER_OUTPUTS(firequalizer_outputs), .priv_class = &firequalizer_class, }; diff --git a/libavfilter/af_flanger.c b/libavfilter/af_flanger.c index 38b1bb562f..b0d765365c 100644 --- a/libavfilter/af_flanger.c +++ b/libavfilter/af_flanger.c @@ -209,7 +209,6 @@ static const AVFilterPad flanger_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad flanger_outputs[] = { @@ -217,7 +216,6 @@ static const AVFilterPad flanger_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_flanger = { @@ -228,6 +226,6 @@ const AVFilter ff_af_flanger = { .priv_class = &flanger_class, .init = init, .uninit = uninit, - .inputs = flanger_inputs, - .outputs = flanger_outputs, + FILTER_INPUTS(flanger_inputs), + FILTER_OUTPUTS(flanger_outputs), }; diff --git a/libavfilter/af_haas.c b/libavfilter/af_haas.c index b180d4c5b0..e162e4b7f0 100644 --- a/libavfilter/af_haas.c +++ b/libavfilter/af_haas.c @@ -204,7 +204,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -212,7 +211,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_haas = { @@ -222,6 +220,6 @@ const AVFilter ff_af_haas = { .priv_size = sizeof(HaasContext), .priv_class = &haas_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c index 3d180bbbda..94a9c701a5 100644 --- a/libavfilter/af_hdcd.c +++ b/libavfilter/af_hdcd.c @@ -1761,7 +1761,6 @@ static const AVFilterPad avfilter_af_hdcd_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_af_hdcd_outputs[] = { @@ -1769,7 +1768,6 @@ static const AVFilterPad avfilter_af_hdcd_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_hdcd = { @@ -1780,6 +1778,6 @@ const AVFilter ff_af_hdcd = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_af_hdcd_inputs, - .outputs = avfilter_af_hdcd_outputs, + FILTER_INPUTS(avfilter_af_hdcd_inputs), + FILTER_OUTPUTS(avfilter_af_hdcd_outputs), }; diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index 182f51c347..fb706e8cca 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -759,7 +759,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_headphone = { @@ -772,6 +771,6 @@ const AVFilter ff_af_headphone = { .query_formats = query_formats, .activate = activate, .inputs = NULL, - .outputs = outputs, + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index 10bd3c1c01..8fe022c1a7 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -536,7 +536,6 @@ static const AVFilterPad avfilter_af_join_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = join_config_output, }, - { NULL } }; const AVFilter ff_af_join = { @@ -550,6 +549,6 @@ const AVFilter ff_af_join = { .activate = activate, .query_formats = join_query_formats, .inputs = NULL, - .outputs = avfilter_af_join_outputs, + FILTER_OUTPUTS(avfilter_af_join_outputs), .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c index 0c2bd5a54e..b30bf0d237 100644 --- a/libavfilter/af_ladspa.c +++ b/libavfilter/af_ladspa.c @@ -774,7 +774,6 @@ static const AVFilterPad ladspa_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_af_ladspa = { @@ -787,6 +786,6 @@ const AVFilter ff_af_ladspa = { .query_formats = query_formats, .process_command = process_command, .inputs = 0, - .outputs = ladspa_outputs, + FILTER_OUTPUTS(ladspa_outputs), .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_loudnorm.c b/libavfilter/af_loudnorm.c index f10429867f..7807ed927a 100644 --- a/libavfilter/af_loudnorm.c +++ b/libavfilter/af_loudnorm.c @@ -896,7 +896,6 @@ static const AVFilterPad avfilter_af_loudnorm_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_af_loudnorm_outputs[] = { @@ -905,7 +904,6 @@ static const AVFilterPad avfilter_af_loudnorm_outputs[] = { .request_frame = request_frame, .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_loudnorm = { @@ -916,6 +914,6 @@ const AVFilter ff_af_loudnorm = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = avfilter_af_loudnorm_inputs, - .outputs = avfilter_af_loudnorm_outputs, + FILTER_INPUTS(avfilter_af_loudnorm_inputs), + FILTER_OUTPUTS(avfilter_af_loudnorm_outputs), }; diff --git a/libavfilter/af_lv2.c b/libavfilter/af_lv2.c index 83ff5e7861..737938ead8 100644 --- a/libavfilter/af_lv2.c +++ b/libavfilter/af_lv2.c @@ -574,7 +574,6 @@ static const AVFilterPad lv2_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_af_lv2 = { @@ -586,6 +585,6 @@ const AVFilter ff_af_lv2 = { .uninit = uninit, .query_formats = query_formats, .inputs = 0, - .outputs = lv2_outputs, + FILTER_OUTPUTS(lv2_outputs), .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_mcompand.c b/libavfilter/af_mcompand.c index 9bce9ae7a1..0ae84221b6 100644 --- a/libavfilter/af_mcompand.c +++ b/libavfilter/af_mcompand.c @@ -638,7 +638,6 @@ static const AVFilterPad mcompand_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad mcompand_outputs[] = { @@ -648,7 +647,6 @@ static const AVFilterPad mcompand_outputs[] = { .request_frame = request_frame, .config_props = config_output, }, - { NULL } }; @@ -660,6 +658,6 @@ const AVFilter ff_af_mcompand = { .priv_size = sizeof(MCompandContext), .priv_class = &mcompand_class, .uninit = uninit, - .inputs = mcompand_inputs, - .outputs = mcompand_outputs, + FILTER_INPUTS(mcompand_inputs), + FILTER_OUTPUTS(mcompand_outputs), }; diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c index b699faf75b..d17e45438d 100644 --- a/libavfilter/af_pan.c +++ b/libavfilter/af_pan.c @@ -435,7 +435,6 @@ static const AVFilterPad pan_inputs[] = { .config_props = config_props, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad pan_outputs[] = { @@ -443,7 +442,6 @@ static const AVFilterPad pan_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_pan = { @@ -454,6 +452,6 @@ const AVFilter ff_af_pan = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = pan_inputs, - .outputs = pan_outputs, + FILTER_INPUTS(pan_inputs), + FILTER_OUTPUTS(pan_outputs), }; diff --git a/libavfilter/af_replaygain.c b/libavfilter/af_replaygain.c index fd642297f8..7db7fe4178 100644 --- a/libavfilter/af_replaygain.c +++ b/libavfilter/af_replaygain.c @@ -592,7 +592,6 @@ static const AVFilterPad replaygain_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad replaygain_outputs[] = { @@ -600,7 +599,6 @@ static const AVFilterPad replaygain_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_replaygain = { @@ -609,6 +607,6 @@ const AVFilter ff_af_replaygain = { .query_formats = query_formats, .uninit = uninit, .priv_size = sizeof(ReplayGainContext), - .inputs = replaygain_inputs, - .outputs = replaygain_outputs, + FILTER_INPUTS(replaygain_inputs), + FILTER_OUTPUTS(replaygain_outputs), }; diff --git a/libavfilter/af_rubberband.c b/libavfilter/af_rubberband.c index 351104c768..6a4b71d09d 100644 --- a/libavfilter/af_rubberband.c +++ b/libavfilter/af_rubberband.c @@ -210,7 +210,6 @@ static const AVFilterPad rubberband_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad rubberband_outputs[] = { @@ -218,7 +217,6 @@ static const AVFilterPad rubberband_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_rubberband = { @@ -229,7 +227,7 @@ const AVFilter ff_af_rubberband = { .priv_class = &rubberband_class, .uninit = uninit, .activate = activate, - .inputs = rubberband_inputs, - .outputs = rubberband_outputs, + FILTER_INPUTS(rubberband_inputs), + FILTER_OUTPUTS(rubberband_outputs), .process_command = process_command, }; diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c index 8e8547c3a4..c964e0d27c 100644 --- a/libavfilter/af_sidechaincompress.c +++ b/libavfilter/af_sidechaincompress.c @@ -371,7 +371,6 @@ static const AVFilterPad sidechaincompress_inputs[] = { .name = "sidechain", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad sidechaincompress_outputs[] = { @@ -380,7 +379,6 @@ static const AVFilterPad sidechaincompress_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_sidechaincompress = { @@ -391,8 +389,8 @@ const AVFilter ff_af_sidechaincompress = { .query_formats = query_formats, .activate = activate, .uninit = uninit, - .inputs = sidechaincompress_inputs, - .outputs = sidechaincompress_outputs, + FILTER_INPUTS(sidechaincompress_inputs), + FILTER_OUTPUTS(sidechaincompress_outputs), .process_command = process_command, }; #endif /* CONFIG_SIDECHAINCOMPRESS_FILTER */ @@ -454,7 +452,6 @@ static const AVFilterPad acompressor_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = acompressor_filter_frame, }, - { NULL } }; static const AVFilterPad acompressor_outputs[] = { @@ -463,7 +460,6 @@ static const AVFilterPad acompressor_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = compressor_config_output, }, - { NULL } }; const AVFilter ff_af_acompressor = { @@ -472,8 +468,8 @@ const AVFilter ff_af_acompressor = { .priv_size = sizeof(SidechainCompressContext), .priv_class = &acompressor_class, .query_formats = acompressor_query_formats, - .inputs = acompressor_inputs, - .outputs = acompressor_outputs, + FILTER_INPUTS(acompressor_inputs), + FILTER_OUTPUTS(acompressor_outputs), .process_command = process_command, }; #endif /* CONFIG_ACOMPRESSOR_FILTER */ diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c index 4342793216..11fbc94225 100644 --- a/libavfilter/af_silencedetect.c +++ b/libavfilter/af_silencedetect.c @@ -240,7 +240,6 @@ static const AVFilterPad silencedetect_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad silencedetect_outputs[] = { @@ -248,7 +247,6 @@ static const AVFilterPad silencedetect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_silencedetect = { @@ -257,7 +255,7 @@ const AVFilter ff_af_silencedetect = { .priv_size = sizeof(SilenceDetectContext), .query_formats = query_formats, .uninit = uninit, - .inputs = silencedetect_inputs, - .outputs = silencedetect_outputs, + FILTER_INPUTS(silencedetect_inputs), + FILTER_OUTPUTS(silencedetect_outputs), .priv_class = &silencedetect_class, }; diff --git a/libavfilter/af_silenceremove.c b/libavfilter/af_silenceremove.c index 953dbc526f..e60f0f8d3a 100644 --- a/libavfilter/af_silenceremove.c +++ b/libavfilter/af_silenceremove.c @@ -923,7 +923,6 @@ static const AVFilterPad silenceremove_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad silenceremove_outputs[] = { @@ -932,7 +931,6 @@ static const AVFilterPad silenceremove_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_af_silenceremove = { @@ -943,6 +941,6 @@ const AVFilter ff_af_silenceremove = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = silenceremove_inputs, - .outputs = silenceremove_outputs, + FILTER_INPUTS(silenceremove_inputs), + FILTER_OUTPUTS(silenceremove_outputs), }; diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c index 0412bc5dda..84e1a0ba9e 100644 --- a/libavfilter/af_sofalizer.c +++ b/libavfilter/af_sofalizer.c @@ -1095,7 +1095,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1103,7 +1102,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_sofalizer = { @@ -1115,7 +1113,7 @@ const AVFilter ff_af_sofalizer = { .activate = activate, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_speechnorm.c b/libavfilter/af_speechnorm.c index a5f704422c..e94608fb41 100644 --- a/libavfilter/af_speechnorm.c +++ b/libavfilter/af_speechnorm.c @@ -542,7 +542,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -550,7 +549,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_speechnorm = { @@ -561,7 +559,7 @@ const AVFilter ff_af_speechnorm = { .priv_class = &speechnorm_class, .activate = activate, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, }; diff --git a/libavfilter/af_stereotools.c b/libavfilter/af_stereotools.c index 043265f22c..d4aca66a92 100644 --- a/libavfilter/af_stereotools.c +++ b/libavfilter/af_stereotools.c @@ -363,7 +363,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -371,7 +370,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_stereotools = { @@ -381,8 +379,8 @@ const AVFilter ff_af_stereotools = { .priv_size = sizeof(StereoToolsContext), .priv_class = &stereotools_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_stereowiden.c b/libavfilter/af_stereowiden.c index b004b24399..ce194ec5b4 100644 --- a/libavfilter/af_stereowiden.c +++ b/libavfilter/af_stereowiden.c @@ -144,7 +144,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -152,7 +151,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_stereowiden = { @@ -162,8 +160,8 @@ const AVFilter ff_af_stereowiden = { .priv_size = sizeof(StereoWidenContext), .priv_class = &stereowiden_class, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_superequalizer.c b/libavfilter/af_superequalizer.c index f48a38b148..69e03e8820 100644 --- a/libavfilter/af_superequalizer.c +++ b/libavfilter/af_superequalizer.c @@ -326,7 +326,6 @@ static const AVFilterPad superequalizer_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad superequalizer_outputs[] = { @@ -335,7 +334,6 @@ static const AVFilterPad superequalizer_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM @@ -374,6 +372,6 @@ const AVFilter ff_af_superequalizer = { .init = init, .activate = activate, .uninit = uninit, - .inputs = superequalizer_inputs, - .outputs = superequalizer_outputs, + FILTER_INPUTS(superequalizer_inputs), + FILTER_OUTPUTS(superequalizer_outputs), }; diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c index fbb2f26891..46743db85b 100644 --- a/libavfilter/af_surround.c +++ b/libavfilter/af_surround.c @@ -1770,7 +1770,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1779,7 +1778,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_surround = { @@ -1791,7 +1789,7 @@ const AVFilter ff_af_surround = { .init = init, .uninit = uninit, .activate = activate, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_tremolo.c b/libavfilter/af_tremolo.c index c3f8e5620b..1ab7832d47 100644 --- a/libavfilter/af_tremolo.c +++ b/libavfilter/af_tremolo.c @@ -136,7 +136,6 @@ static const AVFilterPad avfilter_af_tremolo_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_af_tremolo_outputs[] = { @@ -144,7 +143,6 @@ static const AVFilterPad avfilter_af_tremolo_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_tremolo = { @@ -154,6 +152,6 @@ const AVFilter ff_af_tremolo = { .priv_class = &tremolo_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_af_tremolo_inputs, - .outputs = avfilter_af_tremolo_outputs, + FILTER_INPUTS(avfilter_af_tremolo_inputs), + FILTER_OUTPUTS(avfilter_af_tremolo_outputs), }; diff --git a/libavfilter/af_vibrato.c b/libavfilter/af_vibrato.c index 8455074ef0..ec6f6558b0 100644 --- a/libavfilter/af_vibrato.c +++ b/libavfilter/af_vibrato.c @@ -174,7 +174,6 @@ static const AVFilterPad avfilter_af_vibrato_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_af_vibrato_outputs[] = { @@ -182,7 +181,6 @@ static const AVFilterPad avfilter_af_vibrato_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_vibrato = { @@ -192,6 +190,6 @@ const AVFilter ff_af_vibrato = { .priv_class = &vibrato_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_af_vibrato_inputs, - .outputs = avfilter_af_vibrato_outputs, + FILTER_INPUTS(avfilter_af_vibrato_inputs), + FILTER_OUTPUTS(avfilter_af_vibrato_outputs), }; diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 8feea25103..2d4012bfbf 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -452,7 +452,6 @@ static const AVFilterPad avfilter_af_volume_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_af_volume_outputs[] = { @@ -461,7 +460,6 @@ static const AVFilterPad avfilter_af_volume_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_volume = { @@ -472,8 +470,8 @@ const AVFilter ff_af_volume = { .priv_class = &volume_class, .init = init, .uninit = uninit, - .inputs = avfilter_af_volume_inputs, - .outputs = avfilter_af_volume_outputs, + FILTER_INPUTS(avfilter_af_volume_inputs), + FILTER_OUTPUTS(avfilter_af_volume_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index 89e1b8584b..412b690302 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@ -134,7 +134,6 @@ static const AVFilterPad volumedetect_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad volumedetect_outputs[] = { @@ -142,7 +141,6 @@ static const AVFilterPad volumedetect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_volumedetect = { @@ -151,6 +149,6 @@ const AVFilter ff_af_volumedetect = { .priv_size = sizeof(VolDetectContext), .query_formats = query_formats, .uninit = uninit, - .inputs = volumedetect_inputs, - .outputs = volumedetect_outputs, + FILTER_INPUTS(volumedetect_inputs), + FILTER_OUTPUTS(volumedetect_outputs), }; diff --git a/libavfilter/asink_anullsink.c b/libavfilter/asink_anullsink.c index dce0204839..64a733e165 100644 --- a/libavfilter/asink_anullsink.c +++ b/libavfilter/asink_anullsink.c @@ -34,13 +34,12 @@ static const AVFilterPad avfilter_asink_anullsink_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = null_filter_frame, }, - { NULL }, }; const AVFilter ff_asink_anullsink = { .name = "anullsink", .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."), .priv_size = 0, - .inputs = avfilter_asink_anullsink_inputs, + FILTER_INPUTS(avfilter_asink_anullsink_inputs), .outputs = NULL, }; diff --git a/libavfilter/asrc_afirsrc.c b/libavfilter/asrc_afirsrc.c index aba15dc5e2..9dd04d9533 100644 --- a/libavfilter/asrc_afirsrc.c +++ b/libavfilter/asrc_afirsrc.c @@ -301,7 +301,6 @@ static const AVFilterPad afirsrc_outputs[] = { .request_frame = request_frame, .config_props = config_output, }, - { NULL } }; const AVFilter ff_asrc_afirsrc = { @@ -312,6 +311,6 @@ const AVFilter ff_asrc_afirsrc = { .uninit = uninit, .priv_size = sizeof(AudioFIRSourceContext), .inputs = NULL, - .outputs = afirsrc_outputs, + FILTER_OUTPUTS(afirsrc_outputs), .priv_class = &afirsrc_class, }; diff --git a/libavfilter/asrc_anoisesrc.c b/libavfilter/asrc_anoisesrc.c index c3e6252b3d..ca86658040 100644 --- a/libavfilter/asrc_anoisesrc.c +++ b/libavfilter/asrc_anoisesrc.c @@ -230,7 +230,6 @@ static const AVFilterPad anoisesrc_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_asrc_anoisesrc = { @@ -240,6 +239,6 @@ const AVFilter ff_asrc_anoisesrc = { .priv_size = sizeof(ANoiseSrcContext), .inputs = NULL, .activate = activate, - .outputs = anoisesrc_outputs, + FILTER_OUTPUTS(anoisesrc_outputs), .priv_class = &anoisesrc_class, }; diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c index 5d9b16dfce..698102deda 100644 --- a/libavfilter/asrc_anullsrc.c +++ b/libavfilter/asrc_anullsrc.c @@ -134,7 +134,6 @@ static const AVFilterPad avfilter_asrc_anullsrc_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_asrc_anullsrc = { @@ -144,7 +143,7 @@ const AVFilter ff_asrc_anullsrc = { .query_formats = query_formats, .priv_size = sizeof(ANullContext), .inputs = NULL, - .outputs = avfilter_asrc_anullsrc_outputs, + FILTER_OUTPUTS(avfilter_asrc_anullsrc_outputs), .activate = activate, .priv_class = &anullsrc_class, }; diff --git a/libavfilter/asrc_flite.c b/libavfilter/asrc_flite.c index 1478cc07fa..61c177e0ba 100644 --- a/libavfilter/asrc_flite.c +++ b/libavfilter/asrc_flite.c @@ -271,7 +271,6 @@ static const AVFilterPad flite_outputs[] = { .config_props = config_props, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_asrc_flite = { @@ -282,6 +281,6 @@ const AVFilter ff_asrc_flite = { .uninit = uninit, .priv_size = sizeof(FliteContext), .inputs = NULL, - .outputs = flite_outputs, + FILTER_OUTPUTS(flite_outputs), .priv_class = &flite_class, }; diff --git a/libavfilter/asrc_hilbert.c b/libavfilter/asrc_hilbert.c index fe0c7c8659..460721d96a 100644 --- a/libavfilter/asrc_hilbert.c +++ b/libavfilter/asrc_hilbert.c @@ -171,7 +171,6 @@ static const AVFilterPad hilbert_outputs[] = { .request_frame = request_frame, .config_props = config_props, }, - { NULL } }; const AVFilter ff_asrc_hilbert = { @@ -182,6 +181,6 @@ const AVFilter ff_asrc_hilbert = { .uninit = uninit, .priv_size = sizeof(HilbertContext), .inputs = NULL, - .outputs = hilbert_outputs, + FILTER_OUTPUTS(hilbert_outputs), .priv_class = &hilbert_class, }; diff --git a/libavfilter/asrc_sinc.c b/libavfilter/asrc_sinc.c index ca8991ac2c..a620e08e44 100644 --- a/libavfilter/asrc_sinc.c +++ b/libavfilter/asrc_sinc.c @@ -408,7 +408,6 @@ static const AVFilterPad sinc_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM @@ -440,5 +439,5 @@ const AVFilter ff_asrc_sinc = { .query_formats = query_formats, .uninit = uninit, .inputs = NULL, - .outputs = sinc_outputs, + FILTER_OUTPUTS(sinc_outputs), }; diff --git a/libavfilter/asrc_sine.c b/libavfilter/asrc_sine.c index af0329e8c7..68c844c556 100644 --- a/libavfilter/asrc_sine.c +++ b/libavfilter/asrc_sine.c @@ -253,7 +253,6 @@ static const AVFilterPad sine_outputs[] = { .request_frame = request_frame, .config_props = config_props, }, - { NULL } }; const AVFilter ff_asrc_sine = { @@ -264,6 +263,6 @@ const AVFilter ff_asrc_sine = { .uninit = uninit, .priv_size = sizeof(SineContext), .inputs = NULL, - .outputs = sine_outputs, + FILTER_OUTPUTS(sine_outputs), .priv_class = &sine_class, }; diff --git a/libavfilter/avf_abitscope.c b/libavfilter/avf_abitscope.c index 481a218e6e..c394091b7b 100644 --- a/libavfilter/avf_abitscope.c +++ b/libavfilter/avf_abitscope.c @@ -248,7 +248,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -257,7 +256,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_abitscope = { @@ -265,8 +263,8 @@ const AVFilter ff_avf_abitscope = { .description = NULL_IF_CONFIG_SMALL("Convert input audio to audio bit scope video output."), .query_formats = query_formats, .priv_size = sizeof(AudioBitScopeContext), - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .activate = activate, .priv_class = &abitscope_class, }; diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c index 864c061c2f..96baf6da83 100644 --- a/libavfilter/avf_ahistogram.c +++ b/libavfilter/avf_ahistogram.c @@ -412,7 +412,6 @@ static const AVFilterPad ahistogram_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad ahistogram_outputs[] = { @@ -421,7 +420,6 @@ static const AVFilterPad ahistogram_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_ahistogram = { @@ -431,7 +429,7 @@ const AVFilter ff_avf_ahistogram = { .query_formats = query_formats, .priv_size = sizeof(AudioHistogramContext), .activate = activate, - .inputs = ahistogram_inputs, - .outputs = ahistogram_outputs, + FILTER_INPUTS(ahistogram_inputs), + FILTER_OUTPUTS(ahistogram_outputs), .priv_class = &ahistogram_class, }; diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c index a31805f204..a0859847c3 100644 --- a/libavfilter/avf_aphasemeter.c +++ b/libavfilter/avf_aphasemeter.c @@ -380,7 +380,6 @@ static const AVFilterPad inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; const AVFilter ff_avf_aphasemeter = { @@ -390,7 +389,7 @@ const AVFilter ff_avf_aphasemeter = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(AudioPhaseMeterContext), - .inputs = inputs, + FILTER_INPUTS(inputs), .outputs = NULL, .priv_class = &aphasemeter_class, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index a0011fe33b..f3001e99a3 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avectorscope.c @@ -403,7 +403,6 @@ static const AVFilterPad audiovectorscope_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad audiovectorscope_outputs[] = { @@ -412,7 +411,6 @@ static const AVFilterPad audiovectorscope_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_avectorscope = { @@ -422,7 +420,7 @@ const AVFilter ff_avf_avectorscope = { .query_formats = query_formats, .priv_size = sizeof(AudioVectorScopeContext), .activate = activate, - .inputs = audiovectorscope_inputs, - .outputs = audiovectorscope_outputs, + FILTER_INPUTS(audiovectorscope_inputs), + FILTER_OUTPUTS(audiovectorscope_outputs), .priv_class = &avectorscope_class, }; diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c index aa9900ebe0..aab4aa28d6 100644 --- a/libavfilter/avf_showcqt.c +++ b/libavfilter/avf_showcqt.c @@ -1577,7 +1577,6 @@ static const AVFilterPad showcqt_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad showcqt_outputs[] = { @@ -1587,7 +1586,6 @@ static const AVFilterPad showcqt_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_avf_showcqt = { @@ -1597,7 +1595,7 @@ const AVFilter ff_avf_showcqt = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(ShowCQTContext), - .inputs = showcqt_inputs, - .outputs = showcqt_outputs, + FILTER_INPUTS(showcqt_inputs), + FILTER_OUTPUTS(showcqt_outputs), .priv_class = &showcqt_class, }; diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c index 5dee3445a8..7eff726139 100644 --- a/libavfilter/avf_showfreqs.c +++ b/libavfilter/avf_showfreqs.c @@ -552,7 +552,6 @@ static const AVFilterPad showfreqs_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad showfreqs_outputs[] = { @@ -561,7 +560,6 @@ static const AVFilterPad showfreqs_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_showfreqs = { @@ -572,7 +570,7 @@ const AVFilter ff_avf_showfreqs = { .query_formats = query_formats, .priv_size = sizeof(ShowFreqsContext), .activate = activate, - .inputs = showfreqs_inputs, - .outputs = showfreqs_outputs, + FILTER_INPUTS(showfreqs_inputs), + FILTER_OUTPUTS(showfreqs_outputs), .priv_class = &showfreqs_class, }; diff --git a/libavfilter/avf_showspatial.c b/libavfilter/avf_showspatial.c index 82d202a817..a0d4ee147b 100644 --- a/libavfilter/avf_showspatial.c +++ b/libavfilter/avf_showspatial.c @@ -346,7 +346,6 @@ static const AVFilterPad showspatial_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad showspatial_outputs[] = { @@ -355,7 +354,6 @@ static const AVFilterPad showspatial_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_showspatial = { @@ -364,8 +362,8 @@ const AVFilter ff_avf_showspatial = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(ShowSpatialContext), - .inputs = showspatial_inputs, - .outputs = showspatial_outputs, + FILTER_INPUTS(showspatial_inputs), + FILTER_OUTPUTS(showspatial_outputs), .activate = spatial_activate, .priv_class = &showspatial_class, .flags = AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index 1c94a06e3f..ba8afbdc8c 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1608,7 +1608,6 @@ static const AVFilterPad showspectrum_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad showspectrum_outputs[] = { @@ -1617,7 +1616,6 @@ static const AVFilterPad showspectrum_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_showspectrum = { @@ -1626,8 +1624,8 @@ const AVFilter ff_avf_showspectrum = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(ShowSpectrumContext), - .inputs = showspectrum_inputs, - .outputs = showspectrum_outputs, + FILTER_INPUTS(showspectrum_inputs), + FILTER_OUTPUTS(showspectrum_outputs), .activate = activate, .priv_class = &showspectrum_class, .flags = AVFILTER_FLAG_SLICE_THREADS, @@ -1792,7 +1790,6 @@ static const AVFilterPad showspectrumpic_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = showspectrumpic_filter_frame, }, - { NULL } }; static const AVFilterPad showspectrumpic_outputs[] = { @@ -1802,7 +1799,6 @@ static const AVFilterPad showspectrumpic_outputs[] = { .config_props = config_output, .request_frame = showspectrumpic_request_frame, }, - { NULL } }; const AVFilter ff_avf_showspectrumpic = { @@ -1811,8 +1807,8 @@ const AVFilter ff_avf_showspectrumpic = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(ShowSpectrumContext), - .inputs = showspectrumpic_inputs, - .outputs = showspectrumpic_outputs, + FILTER_INPUTS(showspectrumpic_inputs), + FILTER_OUTPUTS(showspectrumpic_outputs), .priv_class = &showspectrumpic_class, .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/avf_showvolume.c b/libavfilter/avf_showvolume.c index d4b8c48297..2fd8298b85 100644 --- a/libavfilter/avf_showvolume.c +++ b/libavfilter/avf_showvolume.c @@ -486,7 +486,6 @@ static const AVFilterPad showvolume_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad showvolume_outputs[] = { @@ -495,7 +494,6 @@ static const AVFilterPad showvolume_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_showvolume = { @@ -506,7 +504,7 @@ const AVFilter ff_avf_showvolume = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(ShowVolumeContext), - .inputs = showvolume_inputs, - .outputs = showvolume_outputs, + FILTER_INPUTS(showvolume_inputs), + FILTER_OUTPUTS(showvolume_outputs), .priv_class = &showvolume_class, }; diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index b3639f46a5..3dd381b9fd 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -763,7 +763,6 @@ static const AVFilterPad showwaves_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad showwaves_outputs[] = { @@ -772,7 +771,6 @@ static const AVFilterPad showwaves_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_showwaves = { @@ -782,9 +780,9 @@ const AVFilter ff_avf_showwaves = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(ShowWavesContext), - .inputs = showwaves_inputs, + FILTER_INPUTS(showwaves_inputs), .activate = activate, - .outputs = showwaves_outputs, + FILTER_OUTPUTS(showwaves_outputs), .priv_class = &showwaves_class, }; @@ -877,7 +875,6 @@ static const AVFilterPad showwavespic_inputs[] = { .config_props = showwavespic_config_input, .filter_frame = showwavespic_filter_frame, }, - { NULL } }; static const AVFilterPad showwavespic_outputs[] = { @@ -887,7 +884,6 @@ static const AVFilterPad showwavespic_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_avf_showwavespic = { @@ -897,8 +893,8 @@ const AVFilter ff_avf_showwavespic = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(ShowWavesContext), - .inputs = showwavespic_inputs, - .outputs = showwavespic_outputs, + FILTER_INPUTS(showwavespic_inputs), + FILTER_OUTPUTS(showwavespic_outputs), .priv_class = &showwavespic_class, }; diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index f9d7226386..15d469ed59 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -547,14 +547,20 @@ int avfilter_process_command(AVFilterContext *filter, const char *cmd, const cha int avfilter_pad_count(const AVFilterPad *pads) { - int count; + const AVFilter *filter; + void *opaque = NULL; if (!pads) return 0; - for (count = 0; pads->name; count++) - pads++; - return count; + while (filter = av_filter_iterate(&opaque)) { + if (pads == filter->inputs) + return filter->nb_inputs; + if (pads == filter->outputs) + return filter->nb_outputs; + } + + av_assert0(!"AVFilterPad list not from a filter"); } static const char *default_filter_name(void *filter_ctx) @@ -657,7 +663,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) goto err; ret->internal->execute = default_execute; - ret->nb_inputs = avfilter_pad_count(filter->inputs); + ret->nb_inputs = filter->nb_inputs; if (ret->nb_inputs ) { ret->input_pads = av_memdup(filter->inputs, ret->nb_inputs * sizeof(*filter->inputs)); if (!ret->input_pads) @@ -667,7 +673,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) goto err; } - ret->nb_outputs = avfilter_pad_count(filter->outputs); + ret->nb_outputs = filter->nb_outputs; if (ret->nb_outputs) { ret->output_pads = av_memdup(filter->outputs, ret->nb_outputs * sizeof(*filter->outputs)); if (!ret->output_pads) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 360f63bc45..f1f19a0548 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -71,8 +71,7 @@ typedef struct AVFilterFormats AVFilterFormats; typedef struct AVFilterChannelLayouts AVFilterChannelLayouts; /** - * Get the number of elements in a NULL-terminated array of AVFilterPads (e.g. - * AVFilter.inputs/outputs). + * Get the number of elements in an AVFilter's inputs or outputs array. */ int avfilter_pad_count(const AVFilterPad *pads); @@ -156,15 +155,16 @@ typedef struct AVFilter { const char *description; /** - * List of inputs, terminated by a zeroed element. + * List of static inputs. * * NULL if there are no (static) inputs. Instances of filters with * AVFILTER_FLAG_DYNAMIC_INPUTS set may have more inputs than present in * this list. */ const AVFilterPad *inputs; + /** - * List of outputs, terminated by a zeroed element. + * List of static outputs. * * NULL if there are no (static) outputs. Instances of filters with * AVFILTER_FLAG_DYNAMIC_OUTPUTS set may have more outputs than present in @@ -195,6 +195,16 @@ typedef struct AVFilter { ***************************************************************** */ + /** + * The number of entries in the list of inputs. + */ + uint16_t nb_inputs; + + /** + * The number of entries in the list of outputs. + */ + uint16_t nb_outputs; + /** * Filter pre-initialization function * diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index 07c4812f29..8b46dcb15e 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -331,7 +331,6 @@ static const AVFilterPad avfilter_vsink_buffer_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vsink_buffer = { @@ -342,7 +341,7 @@ const AVFilter ff_vsink_buffer = { .init = common_init, .query_formats = vsink_query_formats, .activate = activate, - .inputs = avfilter_vsink_buffer_inputs, + FILTER_INPUTS(avfilter_vsink_buffer_inputs), .outputs = NULL, }; @@ -351,7 +350,6 @@ static const AVFilterPad avfilter_asink_abuffer_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_asink_abuffer = { @@ -362,6 +360,6 @@ const AVFilter ff_asink_abuffer = { .init = common_init, .query_formats = asink_query_formats, .activate = activate, - .inputs = avfilter_asink_abuffer_inputs, + FILTER_INPUTS(avfilter_asink_abuffer_inputs), .outputs = NULL, }; diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 4d0bb4f91d..632bfc7ad8 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -434,7 +434,6 @@ static const AVFilterPad avfilter_vsrc_buffer_outputs[] = { .request_frame = request_frame, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vsrc_buffer = { @@ -447,7 +446,7 @@ const AVFilter ff_vsrc_buffer = { .uninit = uninit, .inputs = NULL, - .outputs = avfilter_vsrc_buffer_outputs, + FILTER_OUTPUTS(avfilter_vsrc_buffer_outputs), .priv_class = &buffer_class, }; @@ -458,7 +457,6 @@ static const AVFilterPad avfilter_asrc_abuffer_outputs[] = { .request_frame = request_frame, .config_props = config_props, }, - { NULL } }; const AVFilter ff_asrc_abuffer = { @@ -471,6 +469,6 @@ const AVFilter ff_asrc_abuffer = { .uninit = uninit, .inputs = NULL, - .outputs = avfilter_asrc_abuffer_outputs, + FILTER_OUTPUTS(avfilter_asrc_abuffer_outputs), .priv_class = &abuffer_class, }; diff --git a/libavfilter/f_bench.c b/libavfilter/f_bench.c index e7d7c5e299..f7098adaf4 100644 --- a/libavfilter/f_bench.c +++ b/libavfilter/f_bench.c @@ -96,7 +96,6 @@ static const AVFilterPad bench_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad bench_outputs[] = { @@ -104,7 +103,6 @@ static const AVFilterPad bench_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_bench = { @@ -112,8 +110,8 @@ const AVFilter ff_vf_bench = { .description = NULL_IF_CONFIG_SMALL("Benchmark part of a filtergraph."), .priv_size = sizeof(BenchContext), .init = init, - .inputs = bench_inputs, - .outputs = bench_outputs, + FILTER_INPUTS(bench_inputs), + FILTER_OUTPUTS(bench_outputs), .priv_class = &bench_class, }; #endif /* CONFIG_BENCH_FILTER */ @@ -128,7 +126,6 @@ static const AVFilterPad abench_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad abench_outputs[] = { @@ -136,7 +133,6 @@ static const AVFilterPad abench_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_abench = { @@ -144,8 +140,8 @@ const AVFilter ff_af_abench = { .description = NULL_IF_CONFIG_SMALL("Benchmark part of a filtergraph."), .priv_size = sizeof(BenchContext), .init = init, - .inputs = abench_inputs, - .outputs = abench_outputs, + FILTER_INPUTS(abench_inputs), + FILTER_OUTPUTS(abench_outputs), .priv_class = &abench_class, }; #endif /* CONFIG_ABENCH_FILTER */ diff --git a/libavfilter/f_cue.c b/libavfilter/f_cue.c index 03804f1667..e87b7a67c7 100644 --- a/libavfilter/f_cue.c +++ b/libavfilter/f_cue.c @@ -103,7 +103,6 @@ static const AVFilterPad cue_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad cue_outputs[] = { @@ -111,7 +110,6 @@ static const AVFilterPad cue_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_cue = { @@ -119,8 +117,8 @@ const AVFilter ff_vf_cue = { .description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), .priv_size = sizeof(CueContext), .priv_class = &cue_class, - .inputs = cue_inputs, - .outputs = cue_outputs, + FILTER_INPUTS(cue_inputs), + FILTER_OUTPUTS(cue_outputs), .activate = activate, }; #endif /* CONFIG_CUE_FILTER */ @@ -134,7 +132,6 @@ static const AVFilterPad acue_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad acue_outputs[] = { @@ -142,7 +139,6 @@ static const AVFilterPad acue_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_acue = { @@ -150,8 +146,8 @@ const AVFilter ff_af_acue = { .description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), .priv_size = sizeof(CueContext), .priv_class = &acue_class, - .inputs = acue_inputs, - .outputs = acue_outputs, + FILTER_INPUTS(acue_inputs), + FILTER_OUTPUTS(acue_outputs), .activate = activate, }; #endif /* CONFIG_ACUE_FILTER */ diff --git a/libavfilter/f_drawgraph.c b/libavfilter/f_drawgraph.c index 70701e330e..a9b47483ad 100644 --- a/libavfilter/f_drawgraph.c +++ b/libavfilter/f_drawgraph.c @@ -458,7 +458,6 @@ static const AVFilterPad drawgraph_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad drawgraph_outputs[] = { @@ -468,7 +467,6 @@ static const AVFilterPad drawgraph_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_drawgraph = { @@ -479,8 +477,8 @@ const AVFilter ff_vf_drawgraph = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = drawgraph_inputs, - .outputs = drawgraph_outputs, + FILTER_INPUTS(drawgraph_inputs), + FILTER_OUTPUTS(drawgraph_outputs), }; #endif // CONFIG_DRAWGRAPH_FILTER @@ -496,7 +494,6 @@ static const AVFilterPad adrawgraph_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad adrawgraph_outputs[] = { @@ -506,7 +503,6 @@ static const AVFilterPad adrawgraph_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_avf_adrawgraph = { @@ -517,7 +513,7 @@ const AVFilter ff_avf_adrawgraph = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = adrawgraph_inputs, - .outputs = adrawgraph_outputs, + FILTER_INPUTS(adrawgraph_inputs), + FILTER_OUTPUTS(adrawgraph_outputs), }; #endif // CONFIG_ADRAWGRAPH_FILTER diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index 47ea9b59d7..15a906401b 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -1017,7 +1017,6 @@ static const AVFilterPad ebur128_inputs[] = { .filter_frame = filter_frame, .config_props = config_audio_input, }, - { NULL } }; const AVFilter ff_af_ebur128 = { @@ -1027,7 +1026,7 @@ const AVFilter ff_af_ebur128 = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = ebur128_inputs, + FILTER_INPUTS(ebur128_inputs), .outputs = NULL, .priv_class = &ebur128_class, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, diff --git a/libavfilter/f_graphmonitor.c b/libavfilter/f_graphmonitor.c index 90e93a4ac3..b712c2fdd6 100644 --- a/libavfilter/f_graphmonitor.c +++ b/libavfilter/f_graphmonitor.c @@ -395,7 +395,6 @@ static const AVFilterPad graphmonitor_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad graphmonitor_outputs[] = { @@ -404,7 +403,6 @@ static const AVFilterPad graphmonitor_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_graphmonitor = { @@ -414,8 +412,8 @@ const AVFilter ff_vf_graphmonitor = { .priv_class = &graphmonitor_class, .query_formats = query_formats, .activate = activate, - .inputs = graphmonitor_inputs, - .outputs = graphmonitor_outputs, + FILTER_INPUTS(graphmonitor_inputs), + FILTER_OUTPUTS(graphmonitor_outputs), }; #endif // CONFIG_GRAPHMONITOR_FILTER @@ -430,7 +428,6 @@ static const AVFilterPad agraphmonitor_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad agraphmonitor_outputs[] = { @@ -439,7 +436,6 @@ static const AVFilterPad agraphmonitor_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_avf_agraphmonitor = { @@ -449,7 +445,7 @@ const AVFilter ff_avf_agraphmonitor = { .priv_class = &agraphmonitor_class, .query_formats = query_formats, .activate = activate, - .inputs = agraphmonitor_inputs, - .outputs = agraphmonitor_outputs, + FILTER_INPUTS(agraphmonitor_inputs), + FILTER_OUTPUTS(agraphmonitor_outputs), }; #endif // CONFIG_AGRAPHMONITOR_FILTER diff --git a/libavfilter/f_interleave.c b/libavfilter/f_interleave.c index 259952b591..689636fc59 100644 --- a/libavfilter/f_interleave.c +++ b/libavfilter/f_interleave.c @@ -235,7 +235,6 @@ static const AVFilterPad interleave_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_interleave = { @@ -245,7 +244,7 @@ const AVFilter ff_vf_interleave = { .init = init, .uninit = uninit, .activate = activate, - .outputs = interleave_outputs, + FILTER_OUTPUTS(interleave_outputs), .priv_class = &interleave_class, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; @@ -263,7 +262,6 @@ static const AVFilterPad ainterleave_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_af_ainterleave = { @@ -273,7 +271,7 @@ const AVFilter ff_af_ainterleave = { .init = init, .uninit = uninit, .activate = activate, - .outputs = ainterleave_outputs, + FILTER_OUTPUTS(ainterleave_outputs), .priv_class = &ainterleave_class, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c index a06e8172d3..29c9f28afc 100644 --- a/libavfilter/f_loop.c +++ b/libavfilter/f_loop.c @@ -269,7 +269,6 @@ static const AVFilterPad ainputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = aconfig_input, }, - { NULL } }; static const AVFilterPad aoutputs[] = { @@ -277,7 +276,6 @@ static const AVFilterPad aoutputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_aloop = { @@ -287,8 +285,8 @@ const AVFilter ff_af_aloop = { .priv_class = &aloop_class, .activate = aactivate, .uninit = auninit, - .inputs = ainputs, - .outputs = aoutputs, + FILTER_INPUTS(ainputs), + FILTER_OUTPUTS(aoutputs), }; #endif /* CONFIG_ALOOP_FILTER */ @@ -442,7 +440,6 @@ static const AVFilterPad inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -450,7 +447,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_loop = { @@ -461,7 +457,7 @@ const AVFilter ff_vf_loop = { .init = init, .uninit = uninit, .activate = activate, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; #endif /* CONFIG_LOOP_FILTER */ diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index d0a78b00d0..cecfe62a9c 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -373,7 +373,6 @@ static const AVFilterPad ainputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad aoutputs[] = { @@ -381,7 +380,6 @@ static const AVFilterPad aoutputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_ametadata = { @@ -391,8 +389,8 @@ const AVFilter ff_af_ametadata = { .priv_class = &ametadata_class, .init = init, .uninit = uninit, - .inputs = ainputs, - .outputs = aoutputs, + FILTER_INPUTS(ainputs), + FILTER_OUTPUTS(aoutputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif /* CONFIG_AMETADATA_FILTER */ @@ -408,7 +406,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -416,7 +413,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_metadata = { @@ -426,8 +422,8 @@ const AVFilter ff_vf_metadata = { .priv_class = &metadata_class, .init = init, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif /* CONFIG_METADATA_FILTER */ diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c index 0302ed765b..8c449fbdfc 100644 --- a/libavfilter/f_perms.c +++ b/libavfilter/f_perms.c @@ -122,7 +122,6 @@ static const AVFilterPad aperms_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad aperms_outputs[] = { @@ -130,7 +129,6 @@ static const AVFilterPad aperms_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_aperms = { @@ -138,8 +136,8 @@ const AVFilter ff_af_aperms = { .description = NULL_IF_CONFIG_SMALL("Set permissions for the output audio frame."), .init = init, .priv_size = sizeof(PermsContext), - .inputs = aperms_inputs, - .outputs = aperms_outputs, + FILTER_INPUTS(aperms_inputs), + FILTER_OUTPUTS(aperms_outputs), .priv_class = &aperms_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; @@ -156,7 +154,6 @@ static const AVFilterPad perms_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad perms_outputs[] = { @@ -164,7 +161,6 @@ static const AVFilterPad perms_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_perms = { @@ -172,8 +168,8 @@ const AVFilter ff_vf_perms = { .description = NULL_IF_CONFIG_SMALL("Set permissions for the output video frame."), .init = init, .priv_size = sizeof(PermsContext), - .inputs = perms_inputs, - .outputs = perms_outputs, + FILTER_INPUTS(perms_inputs), + FILTER_OUTPUTS(perms_outputs), .priv_class = &perms_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/f_realtime.c b/libavfilter/f_realtime.c index 332ef21ac5..125bd6131c 100644 --- a/libavfilter/f_realtime.c +++ b/libavfilter/f_realtime.c @@ -81,7 +81,6 @@ static const AVFilterPad avfilter_vf_realtime_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_realtime_outputs[] = { @@ -89,7 +88,6 @@ static const AVFilterPad avfilter_vf_realtime_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_realtime = { @@ -97,8 +95,8 @@ const AVFilter ff_vf_realtime = { .description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), .priv_size = sizeof(RealtimeContext), .priv_class = &realtime_class, - .inputs = avfilter_vf_realtime_inputs, - .outputs = avfilter_vf_realtime_outputs, + FILTER_INPUTS(avfilter_vf_realtime_inputs), + FILTER_OUTPUTS(avfilter_vf_realtime_outputs), }; #endif /* CONFIG_REALTIME_FILTER */ @@ -113,7 +111,6 @@ static const AVFilterPad arealtime_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad arealtime_outputs[] = { @@ -121,7 +118,6 @@ static const AVFilterPad arealtime_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_arealtime = { @@ -129,7 +125,7 @@ const AVFilter ff_af_arealtime = { .description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), .priv_size = sizeof(RealtimeContext), .priv_class = &arealtime_class, - .inputs = arealtime_inputs, - .outputs = arealtime_outputs, + FILTER_INPUTS(arealtime_inputs), + FILTER_OUTPUTS(arealtime_outputs), }; #endif /* CONFIG_AREALTIME_FILTER */ diff --git a/libavfilter/f_reverse.c b/libavfilter/f_reverse.c index 2b3ffd28de..71acbe6f90 100644 --- a/libavfilter/f_reverse.c +++ b/libavfilter/f_reverse.c @@ -121,7 +121,6 @@ static const AVFilterPad reverse_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad reverse_outputs[] = { @@ -130,7 +129,6 @@ static const AVFilterPad reverse_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_reverse = { @@ -139,8 +137,8 @@ const AVFilter ff_vf_reverse = { .priv_size = sizeof(ReverseContext), .init = init, .uninit = uninit, - .inputs = reverse_inputs, - .outputs = reverse_outputs, + FILTER_INPUTS(reverse_inputs), + FILTER_OUTPUTS(reverse_outputs), }; #endif /* CONFIG_REVERSE_FILTER */ @@ -272,7 +270,6 @@ static const AVFilterPad areverse_inputs[] = { .filter_frame = filter_frame, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad areverse_outputs[] = { @@ -281,7 +278,6 @@ static const AVFilterPad areverse_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .request_frame = areverse_request_frame, }, - { NULL } }; const AVFilter ff_af_areverse = { @@ -291,8 +287,8 @@ const AVFilter ff_af_areverse = { .priv_size = sizeof(ReverseContext), .init = init, .uninit = uninit, - .inputs = areverse_inputs, - .outputs = areverse_outputs, + FILTER_INPUTS(areverse_inputs), + FILTER_OUTPUTS(areverse_outputs), }; #endif /* CONFIG_AREVERSE_FILTER */ diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 4a131f01c8..a8118e3271 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -473,7 +473,6 @@ static const AVFilterPad avfilter_af_aselect_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; const AVFilter ff_af_aselect = { @@ -482,7 +481,7 @@ const AVFilter ff_af_aselect = { .init = aselect_init, .uninit = uninit, .priv_size = sizeof(SelectContext), - .inputs = avfilter_af_aselect_inputs, + FILTER_INPUTS(avfilter_af_aselect_inputs), .priv_class = &aselect_class, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; @@ -529,7 +528,6 @@ static const AVFilterPad avfilter_vf_select_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; const AVFilter ff_vf_select = { @@ -540,7 +538,7 @@ const AVFilter ff_vf_select = { .query_formats = query_formats, .priv_size = sizeof(SelectContext), .priv_class = &select_class, - .inputs = avfilter_vf_select_inputs, + FILTER_INPUTS(avfilter_vf_select_inputs), .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; #endif /* CONFIG_SELECT_FILTER */ diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index 71b0a5c411..99d8ca939c 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -583,7 +583,6 @@ static const AVFilterPad sendcmd_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad sendcmd_outputs[] = { @@ -591,7 +590,6 @@ static const AVFilterPad sendcmd_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_sendcmd = { @@ -600,8 +598,8 @@ const AVFilter ff_vf_sendcmd = { .init = init, .uninit = uninit, .priv_size = sizeof(SendCmdContext), - .inputs = sendcmd_inputs, - .outputs = sendcmd_outputs, + FILTER_INPUTS(sendcmd_inputs), + FILTER_OUTPUTS(sendcmd_outputs), .priv_class = &sendcmd_class, }; @@ -618,7 +616,6 @@ static const AVFilterPad asendcmd_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad asendcmd_outputs[] = { @@ -626,7 +623,6 @@ static const AVFilterPad asendcmd_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_asendcmd = { @@ -635,8 +631,8 @@ const AVFilter ff_af_asendcmd = { .init = init, .uninit = uninit, .priv_size = sizeof(SendCmdContext), - .inputs = asendcmd_inputs, - .outputs = asendcmd_outputs, + FILTER_INPUTS(asendcmd_inputs), + FILTER_OUTPUTS(asendcmd_outputs), .priv_class = &asendcmd_class, }; diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c index 9133fcb1e3..5c9f905cc2 100644 --- a/libavfilter/f_sidedata.c +++ b/libavfilter/f_sidedata.c @@ -130,7 +130,6 @@ static const AVFilterPad ainputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad aoutputs[] = { @@ -138,7 +137,6 @@ static const AVFilterPad aoutputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_asidedata = { @@ -147,8 +145,8 @@ const AVFilter ff_af_asidedata = { .priv_size = sizeof(SideDataContext), .priv_class = &asidedata_class, .init = init, - .inputs = ainputs, - .outputs = aoutputs, + FILTER_INPUTS(ainputs), + FILTER_OUTPUTS(aoutputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif /* CONFIG_ASIDEDATA_FILTER */ @@ -164,7 +162,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -172,7 +169,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_sidedata = { @@ -181,8 +177,8 @@ const AVFilter ff_vf_sidedata = { .priv_size = sizeof(SideDataContext), .priv_class = &sidedata_class, .init = init, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif /* CONFIG_SIDEDATA_FILTER */ diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c index 774a890871..5de22e2fbe 100644 --- a/libavfilter/f_zmq.c +++ b/libavfilter/f_zmq.c @@ -214,7 +214,6 @@ static const AVFilterPad zmq_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad zmq_outputs[] = { @@ -222,7 +221,6 @@ static const AVFilterPad zmq_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_zmq = { @@ -231,8 +229,8 @@ const AVFilter ff_vf_zmq = { .init = init, .uninit = uninit, .priv_size = sizeof(ZMQContext), - .inputs = zmq_inputs, - .outputs = zmq_outputs, + FILTER_INPUTS(zmq_inputs), + FILTER_OUTPUTS(zmq_outputs), .priv_class = &zmq_class, }; @@ -249,7 +247,6 @@ static const AVFilterPad azmq_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad azmq_outputs[] = { @@ -257,7 +254,6 @@ static const AVFilterPad azmq_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_azmq = { @@ -266,8 +262,8 @@ const AVFilter ff_af_azmq = { .init = init, .uninit = uninit, .priv_size = sizeof(ZMQContext), - .inputs = azmq_inputs, - .outputs = azmq_outputs, + FILTER_INPUTS(azmq_inputs), + FILTER_OUTPUTS(azmq_outputs), .priv_class = &azmq_class, }; diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index e0996ba501..bb7d78f09c 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -116,7 +116,6 @@ static const AVFilterPad avfilter_vf_fifo_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = add_to_queue, }, - { NULL } }; static const AVFilterPad avfilter_vf_fifo_outputs[] = { @@ -125,7 +124,6 @@ static const AVFilterPad avfilter_vf_fifo_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_fifo = { @@ -134,8 +132,8 @@ const AVFilter ff_vf_fifo = { .init = init, .uninit = uninit, .priv_size = sizeof(FifoContext), - .inputs = avfilter_vf_fifo_inputs, - .outputs = avfilter_vf_fifo_outputs, + FILTER_INPUTS(avfilter_vf_fifo_inputs), + FILTER_OUTPUTS(avfilter_vf_fifo_outputs), }; static const AVFilterPad avfilter_af_afifo_inputs[] = { @@ -144,7 +142,6 @@ static const AVFilterPad avfilter_af_afifo_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = add_to_queue, }, - { NULL } }; static const AVFilterPad avfilter_af_afifo_outputs[] = { @@ -153,7 +150,6 @@ static const AVFilterPad avfilter_af_afifo_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_af_afifo = { @@ -162,6 +158,6 @@ const AVFilter ff_af_afifo = { .init = init, .uninit = uninit, .priv_size = sizeof(FifoContext), - .inputs = avfilter_af_afifo_inputs, - .outputs = avfilter_af_afifo_outputs, + FILTER_INPUTS(avfilter_af_afifo_inputs), + FILTER_OUTPUTS(avfilter_af_afifo_outputs), }; diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 6c908690b4..81fc764992 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -132,6 +132,12 @@ struct AVFilterInternal { avfilter_execute_func *execute; }; +#define FILTER_INOUTPADS(inout, array) \ + .inout = array, \ + .nb_ ## inout = FF_ARRAY_ELEMS(array) +#define FILTER_INPUTS(array) FILTER_INOUTPADS(inputs, (array)) +#define FILTER_OUTPUTS(array) FILTER_INOUTPADS(outputs, (array)) + /** * Tell if an integer is contained in the provided -1-terminated list of integers. * This is useful for determining (for instance) if an AVPixelFormat is in an diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index ac98974312..fad92033e4 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -279,7 +279,6 @@ static const AVFilterPad avfilter_vf_setpts_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_vf_setpts_outputs[] = { @@ -287,7 +286,6 @@ static const AVFilterPad avfilter_vf_setpts_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_setpts = { @@ -300,8 +298,8 @@ const AVFilter ff_vf_setpts = { .priv_size = sizeof(SetPTSContext), .priv_class = &setpts_class, - .inputs = avfilter_vf_setpts_inputs, - .outputs = avfilter_vf_setpts_outputs, + FILTER_INPUTS(avfilter_vf_setpts_inputs), + FILTER_OUTPUTS(avfilter_vf_setpts_outputs), }; #endif /* CONFIG_SETPTS_FILTER */ @@ -319,7 +317,6 @@ static const AVFilterPad asetpts_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad asetpts_outputs[] = { @@ -327,7 +324,6 @@ static const AVFilterPad asetpts_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_asetpts = { @@ -338,7 +334,7 @@ const AVFilter ff_af_asetpts = { .uninit = uninit, .priv_size = sizeof(SetPTSContext), .priv_class = &asetpts_class, - .inputs = asetpts_inputs, - .outputs = asetpts_outputs, + FILTER_INPUTS(asetpts_inputs), + FILTER_OUTPUTS(asetpts_outputs), }; #endif /* CONFIG_ASETPTS_FILTER */ diff --git a/libavfilter/settb.c b/libavfilter/settb.c index 2f68e44c5b..ae2cf9b888 100644 --- a/libavfilter/settb.c +++ b/libavfilter/settb.c @@ -167,7 +167,6 @@ static const AVFilterPad avfilter_vf_settb_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad avfilter_vf_settb_outputs[] = { @@ -176,7 +175,6 @@ static const AVFilterPad avfilter_vf_settb_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output_props, }, - { NULL } }; const AVFilter ff_vf_settb = { @@ -184,8 +182,8 @@ const AVFilter ff_vf_settb = { .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."), .priv_size = sizeof(SetTBContext), .priv_class = &settb_class, - .inputs = avfilter_vf_settb_inputs, - .outputs = avfilter_vf_settb_outputs, + FILTER_INPUTS(avfilter_vf_settb_inputs), + FILTER_OUTPUTS(avfilter_vf_settb_outputs), .activate = activate, }; #endif /* CONFIG_SETTB_FILTER */ @@ -200,7 +198,6 @@ static const AVFilterPad avfilter_af_asettb_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; static const AVFilterPad avfilter_af_asettb_outputs[] = { @@ -209,15 +206,14 @@ static const AVFilterPad avfilter_af_asettb_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output_props, }, - { NULL } }; const AVFilter ff_af_asettb = { .name = "asettb", .description = NULL_IF_CONFIG_SMALL("Set timebase for the audio output link."), .priv_size = sizeof(SetTBContext), - .inputs = avfilter_af_asettb_inputs, - .outputs = avfilter_af_asettb_outputs, + FILTER_INPUTS(avfilter_af_asettb_inputs), + FILTER_OUTPUTS(avfilter_af_asettb_outputs), .priv_class = &asettb_class, .activate = activate, }; diff --git a/libavfilter/split.c b/libavfilter/split.c index da5f681af8..8fe203d1ea 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -116,7 +116,6 @@ static const AVFilterPad avfilter_vf_split_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; const AVFilter ff_vf_split = { @@ -126,7 +125,7 @@ const AVFilter ff_vf_split = { .priv_class = &split_class, .init = split_init, .uninit = split_uninit, - .inputs = avfilter_vf_split_inputs, + FILTER_INPUTS(avfilter_vf_split_inputs), .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; @@ -137,7 +136,6 @@ static const AVFilterPad avfilter_af_asplit_inputs[] = { .type = AVMEDIA_TYPE_AUDIO, .filter_frame = filter_frame, }, - { NULL } }; const AVFilter ff_af_asplit = { @@ -147,7 +145,7 @@ const AVFilter ff_af_asplit = { .priv_class = &asplit_class, .init = split_init, .uninit = split_uninit, - .inputs = avfilter_af_asplit_inputs, + FILTER_INPUTS(avfilter_af_asplit_inputs), .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; diff --git a/libavfilter/trim.c b/libavfilter/trim.c index 261dacbc5c..c260da3a0b 100644 --- a/libavfilter/trim.c +++ b/libavfilter/trim.c @@ -195,7 +195,6 @@ static const AVFilterPad trim_inputs[] = { .filter_frame = trim_filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad trim_outputs[] = { @@ -203,7 +202,6 @@ static const AVFilterPad trim_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_trim = { @@ -212,8 +210,8 @@ const AVFilter ff_vf_trim = { .init = init, .priv_size = sizeof(TrimContext), .priv_class = &trim_class, - .inputs = trim_inputs, - .outputs = trim_outputs, + FILTER_INPUTS(trim_inputs), + FILTER_OUTPUTS(trim_outputs), }; #endif // CONFIG_TRIM_FILTER @@ -350,7 +348,6 @@ static const AVFilterPad atrim_inputs[] = { .filter_frame = atrim_filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad atrim_outputs[] = { @@ -358,7 +355,6 @@ static const AVFilterPad atrim_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_AUDIO, }, - { NULL } }; const AVFilter ff_af_atrim = { @@ -367,7 +363,7 @@ const AVFilter ff_af_atrim = { .init = init, .priv_size = sizeof(TrimContext), .priv_class = &atrim_class, - .inputs = atrim_inputs, - .outputs = atrim_outputs, + FILTER_INPUTS(atrim_inputs), + FILTER_OUTPUTS(atrim_outputs), }; #endif // CONFIG_ATRIM_FILTER diff --git a/libavfilter/vaf_spectrumsynth.c b/libavfilter/vaf_spectrumsynth.c index d44d01cd33..a59170ea02 100644 --- a/libavfilter/vaf_spectrumsynth.c +++ b/libavfilter/vaf_spectrumsynth.c @@ -532,7 +532,6 @@ static const AVFilterPad spectrumsynth_inputs[] = { .name = "phase", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad spectrumsynth_outputs[] = { @@ -541,7 +540,6 @@ static const AVFilterPad spectrumsynth_outputs[] = { .type = AVMEDIA_TYPE_AUDIO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vaf_spectrumsynth = { @@ -551,7 +549,7 @@ const AVFilter ff_vaf_spectrumsynth = { .query_formats = query_formats, .activate = activate, .priv_size = sizeof(SpectrumSynthContext), - .inputs = spectrumsynth_inputs, - .outputs = spectrumsynth_outputs, + FILTER_INPUTS(spectrumsynth_inputs), + FILTER_OUTPUTS(spectrumsynth_outputs), .priv_class = &spectrumsynth_class, }; diff --git a/libavfilter/vf_addroi.c b/libavfilter/vf_addroi.c index 1d09f31879..5f9ec21754 100644 --- a/libavfilter/vf_addroi.c +++ b/libavfilter/vf_addroi.c @@ -244,7 +244,6 @@ static const AVFilterPad addroi_inputs[] = { .config_props = addroi_config_input, .filter_frame = addroi_filter_frame, }, - { NULL } }; static const AVFilterPad addroi_outputs[] = { @@ -252,7 +251,6 @@ static const AVFilterPad addroi_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_addroi = { @@ -264,6 +262,6 @@ const AVFilter ff_vf_addroi = { .priv_size = sizeof(AddROIContext), .priv_class = &addroi_class, - .inputs = addroi_inputs, - .outputs = addroi_outputs, + FILTER_INPUTS(addroi_inputs), + FILTER_OUTPUTS(addroi_outputs), }; diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index 9b01db6605..8fb601ce06 100644 --- a/libavfilter/vf_alphamerge.c +++ b/libavfilter/vf_alphamerge.c @@ -170,7 +170,6 @@ static const AVFilterPad alphamerge_inputs[] = { .name = "alpha", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad alphamerge_outputs[] = { @@ -179,7 +178,6 @@ static const AVFilterPad alphamerge_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; static const AVOption alphamerge_options[] = { @@ -197,8 +195,8 @@ const AVFilter ff_vf_alphamerge = { .priv_class = &alphamerge_class, .init = init, .query_formats = query_formats, - .inputs = alphamerge_inputs, - .outputs = alphamerge_outputs, + FILTER_INPUTS(alphamerge_inputs), + FILTER_OUTPUTS(alphamerge_outputs), .uninit = uninit, .activate = activate, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, diff --git a/libavfilter/vf_amplify.c b/libavfilter/vf_amplify.c index 2640b61be8..0feff44a38 100644 --- a/libavfilter/vf_amplify.c +++ b/libavfilter/vf_amplify.c @@ -296,7 +296,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -305,7 +304,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; AVFILTER_DEFINE_CLASS(amplify); @@ -316,8 +314,8 @@ const AVFilter ff_vf_amplify = { .priv_size = sizeof(AmplifyContext), .priv_class = &lify_class, .query_formats = query_formats, - .outputs = outputs, - .inputs = inputs, + FILTER_OUTPUTS(outputs), + FILTER_INPUTS(inputs), .init = init, .uninit = uninit, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index f0467b5247..995c7f4f14 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -173,7 +173,6 @@ static const AVFilterPad avfilter_vf_setdar_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_setdar_outputs[] = { @@ -182,7 +181,6 @@ static const AVFilterPad avfilter_vf_setdar_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = setdar_config_props, }, - { NULL } }; const AVFilter ff_vf_setdar = { @@ -190,8 +188,8 @@ const AVFilter ff_vf_setdar = { .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."), .priv_size = sizeof(AspectContext), .priv_class = &setdar_class, - .inputs = avfilter_vf_setdar_inputs, - .outputs = avfilter_vf_setdar_outputs, + FILTER_INPUTS(avfilter_vf_setdar_inputs), + FILTER_OUTPUTS(avfilter_vf_setdar_outputs), }; #endif /* CONFIG_SETDAR_FILTER */ @@ -237,7 +235,6 @@ static const AVFilterPad avfilter_vf_setsar_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_setsar_outputs[] = { @@ -246,7 +243,6 @@ static const AVFilterPad avfilter_vf_setsar_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = setsar_config_props, }, - { NULL } }; const AVFilter ff_vf_setsar = { @@ -254,8 +250,8 @@ const AVFilter ff_vf_setsar = { .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), .priv_size = sizeof(AspectContext), .priv_class = &setsar_class, - .inputs = avfilter_vf_setsar_inputs, - .outputs = avfilter_vf_setsar_outputs, + FILTER_INPUTS(avfilter_vf_setsar_inputs), + FILTER_OUTPUTS(avfilter_vf_setsar_outputs), }; #endif /* CONFIG_SETSAR_FILTER */ diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c index ad99c7a797..4590041e97 100644 --- a/libavfilter/vf_atadenoise.c +++ b/libavfilter/vf_atadenoise.c @@ -557,7 +557,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -566,7 +565,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_atadenoise = { @@ -577,8 +575,8 @@ const AVFilter ff_vf_atadenoise = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c index f6d36abb50..914360ec0a 100644 --- a/libavfilter/vf_avgblur.c +++ b/libavfilter/vf_avgblur.c @@ -302,7 +302,6 @@ static const AVFilterPad avgblur_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avgblur_outputs[] = { @@ -310,7 +309,6 @@ static const AVFilterPad avgblur_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_avgblur = { @@ -320,8 +318,8 @@ const AVFilter ff_vf_avgblur = { .priv_class = &avgblur_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avgblur_inputs, - .outputs = avgblur_outputs, + FILTER_INPUTS(avgblur_inputs), + FILTER_OUTPUTS(avgblur_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_avgblur_opencl.c b/libavfilter/vf_avgblur_opencl.c index 3b9e56b879..e9a3bc6100 100644 --- a/libavfilter/vf_avgblur_opencl.c +++ b/libavfilter/vf_avgblur_opencl.c @@ -311,7 +311,6 @@ static const AVFilterPad avgblur_opencl_inputs[] = { .filter_frame = &avgblur_opencl_filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; @@ -321,7 +320,6 @@ static const AVFilterPad avgblur_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_output, }, - { NULL } }; @@ -348,8 +346,8 @@ const AVFilter ff_vf_avgblur_opencl = { .init = &ff_opencl_filter_init, .uninit = &avgblur_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = avgblur_opencl_inputs, - .outputs = avgblur_opencl_outputs, + FILTER_INPUTS(avgblur_opencl_inputs), + FILTER_OUTPUTS(avgblur_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -387,8 +385,8 @@ const AVFilter ff_vf_boxblur_opencl = { .init = &ff_opencl_filter_init, .uninit = &avgblur_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = avgblur_opencl_inputs, - .outputs = avgblur_opencl_outputs, + FILTER_INPUTS(avgblur_opencl_inputs), + FILTER_OUTPUTS(avgblur_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c index 1e485061cd..5ae487fc8c 100644 --- a/libavfilter/vf_avgblur_vulkan.c +++ b/libavfilter/vf_avgblur_vulkan.c @@ -386,7 +386,6 @@ static const AVFilterPad avgblur_vulkan_inputs[] = { .filter_frame = &avgblur_vulkan_filter_frame, .config_props = &ff_vk_filter_config_input, }, - { NULL } }; static const AVFilterPad avgblur_vulkan_outputs[] = { @@ -395,7 +394,6 @@ static const AVFilterPad avgblur_vulkan_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_vk_filter_config_output, }, - { NULL } }; const AVFilter ff_vf_avgblur_vulkan = { @@ -405,8 +403,8 @@ const AVFilter ff_vf_avgblur_vulkan = { .init = &ff_vk_filter_init, .uninit = &avgblur_vulkan_uninit, .query_formats = &ff_vk_filter_query_formats, - .inputs = avgblur_vulkan_inputs, - .outputs = avgblur_vulkan_outputs, + FILTER_INPUTS(avgblur_vulkan_inputs), + FILTER_OUTPUTS(avgblur_vulkan_outputs), .priv_class = &avgblur_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_bbox.c b/libavfilter/vf_bbox.c index f6426a5135..9f03db3cfd 100644 --- a/libavfilter/vf_bbox.c +++ b/libavfilter/vf_bbox.c @@ -138,7 +138,6 @@ static const AVFilterPad bbox_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad bbox_outputs[] = { @@ -147,7 +146,6 @@ static const AVFilterPad bbox_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_bbox = { @@ -156,8 +154,8 @@ const AVFilter ff_vf_bbox = { .priv_size = sizeof(BBoxContext), .priv_class = &bbox_class, .query_formats = query_formats, - .inputs = bbox_inputs, - .outputs = bbox_outputs, + FILTER_INPUTS(bbox_inputs), + FILTER_OUTPUTS(bbox_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c index 7a160798d4..6d7fa8b30d 100644 --- a/libavfilter/vf_bilateral.c +++ b/libavfilter/vf_bilateral.c @@ -368,7 +368,6 @@ static const AVFilterPad bilateral_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad bilateral_outputs[] = { @@ -376,7 +375,6 @@ static const AVFilterPad bilateral_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_bilateral = { @@ -386,8 +384,8 @@ const AVFilter ff_vf_bilateral = { .priv_class = &bilateral_class, .uninit = uninit, .query_formats = query_formats, - .inputs = bilateral_inputs, - .outputs = bilateral_outputs, + FILTER_INPUTS(bilateral_inputs), + FILTER_OUTPUTS(bilateral_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/vf_bitplanenoise.c b/libavfilter/vf_bitplanenoise.c index 71b78f3ea1..d45dd7777f 100644 --- a/libavfilter/vf_bitplanenoise.c +++ b/libavfilter/vf_bitplanenoise.c @@ -200,7 +200,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -208,7 +207,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_bitplanenoise = { @@ -216,8 +214,8 @@ const AVFilter ff_vf_bitplanenoise = { .description = NULL_IF_CONFIG_SMALL("Measure bit plane noise."), .priv_size = sizeof(BPNContext), .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .priv_class = &bitplanenoise_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c index e7fa5ce3ab..c4f63ad0c2 100644 --- a/libavfilter/vf_blackdetect.c +++ b/libavfilter/vf_blackdetect.c @@ -244,7 +244,6 @@ static const AVFilterPad blackdetect_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad blackdetect_outputs[] = { @@ -252,7 +251,6 @@ static const AVFilterPad blackdetect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_blackdetect = { @@ -260,8 +258,8 @@ const AVFilter ff_vf_blackdetect = { .description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."), .priv_size = sizeof(BlackDetectContext), .query_formats = query_formats, - .inputs = blackdetect_inputs, - .outputs = blackdetect_outputs, + FILTER_INPUTS(blackdetect_inputs), + FILTER_OUTPUTS(blackdetect_outputs), .uninit = uninit, .priv_class = &blackdetect_class, .flags = AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index 8856542053..ac7f7347c6 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -118,7 +118,6 @@ static const AVFilterPad avfilter_vf_blackframe_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_blackframe_outputs[] = { @@ -126,7 +125,6 @@ static const AVFilterPad avfilter_vf_blackframe_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO }, - { NULL } }; const AVFilter ff_vf_blackframe = { @@ -135,6 +133,6 @@ const AVFilter ff_vf_blackframe = { .priv_size = sizeof(BlackFrameContext), .priv_class = &blackframe_class, .query_formats = query_formats, - .inputs = avfilter_vf_blackframe_inputs, - .outputs = avfilter_vf_blackframe_outputs, + FILTER_INPUTS(avfilter_vf_blackframe_inputs), + FILTER_OUTPUTS(avfilter_vf_blackframe_outputs), }; diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c index 5eed52a5d8..da070f7518 100644 --- a/libavfilter/vf_blend.c +++ b/libavfilter/vf_blend.c @@ -891,7 +891,6 @@ static const AVFilterPad blend_inputs[] = { .name = "bottom", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad blend_outputs[] = { @@ -900,7 +899,6 @@ static const AVFilterPad blend_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_blend = { @@ -912,8 +910,8 @@ const AVFilter ff_vf_blend = { .priv_size = sizeof(BlendContext), .query_formats = query_formats, .activate = activate, - .inputs = blend_inputs, - .outputs = blend_outputs, + FILTER_INPUTS(blend_inputs), + FILTER_OUTPUTS(blend_outputs), .priv_class = &blend_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, @@ -953,7 +951,6 @@ static const AVFilterPad tblend_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = tblend_filter_frame, }, - { NULL } }; static const AVFilterPad tblend_outputs[] = { @@ -962,7 +959,6 @@ static const AVFilterPad tblend_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_tblend = { @@ -973,8 +969,8 @@ const AVFilter ff_vf_tblend = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = tblend_inputs, - .outputs = tblend_outputs, + FILTER_INPUTS(tblend_inputs), + FILTER_OUTPUTS(tblend_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c index 96bf8b671a..d6ef0b88a8 100644 --- a/libavfilter/vf_bm3d.c +++ b/libavfilter/vf_bm3d.c @@ -1048,7 +1048,6 @@ static const AVFilterPad bm3d_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_bm3d = { @@ -1060,7 +1059,7 @@ const AVFilter ff_vf_bm3d = { .activate = activate, .query_formats = query_formats, .inputs = NULL, - .outputs = bm3d_outputs, + FILTER_OUTPUTS(bm3d_outputs), .priv_class = &bm3d_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_DYNAMIC_INPUTS | diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c index bebbd4ef08..3ace88e5b6 100644 --- a/libavfilter/vf_boxblur.c +++ b/libavfilter/vf_boxblur.c @@ -293,7 +293,6 @@ static const AVFilterPad avfilter_vf_boxblur_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_boxblur_outputs[] = { @@ -301,7 +300,6 @@ static const AVFilterPad avfilter_vf_boxblur_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_boxblur = { @@ -311,7 +309,7 @@ const AVFilter ff_vf_boxblur = { .priv_class = &boxblur_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_boxblur_inputs, - .outputs = avfilter_vf_boxblur_outputs, + FILTER_INPUTS(avfilter_vf_boxblur_inputs), + FILTER_OUTPUTS(avfilter_vf_boxblur_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c index d63976b70b..cfa3ee1ae3 100644 --- a/libavfilter/vf_bwdif.c +++ b/libavfilter/vf_bwdif.c @@ -391,7 +391,6 @@ static const AVFilterPad avfilter_vf_bwdif_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = ff_yadif_filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_bwdif_outputs[] = { @@ -401,7 +400,6 @@ static const AVFilterPad avfilter_vf_bwdif_outputs[] = { .request_frame = ff_yadif_request_frame, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vf_bwdif = { @@ -411,7 +409,7 @@ const AVFilter ff_vf_bwdif = { .priv_class = &bwdif_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_bwdif_inputs, - .outputs = avfilter_vf_bwdif_outputs, + FILTER_INPUTS(avfilter_vf_bwdif_inputs), + FILTER_OUTPUTS(avfilter_vf_bwdif_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_cas.c b/libavfilter/vf_cas.c index 4378ccd5eb..212f022bef 100644 --- a/libavfilter/vf_cas.c +++ b/libavfilter/vf_cas.c @@ -258,7 +258,6 @@ static const AVFilterPad cas_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad cas_outputs[] = { @@ -266,7 +265,6 @@ static const AVFilterPad cas_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(CASContext, x) @@ -286,8 +284,8 @@ const AVFilter ff_vf_cas = { .priv_size = sizeof(CASContext), .priv_class = &cas_class, .query_formats = query_formats, - .inputs = cas_inputs, - .outputs = cas_outputs, + FILTER_INPUTS(cas_inputs), + FILTER_OUTPUTS(cas_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_chromaber_vulkan.c b/libavfilter/vf_chromaber_vulkan.c index 2f5bf7bbb9..96fdd7bd9c 100644 --- a/libavfilter/vf_chromaber_vulkan.c +++ b/libavfilter/vf_chromaber_vulkan.c @@ -321,7 +321,6 @@ static const AVFilterPad chromaber_vulkan_inputs[] = { .filter_frame = &chromaber_vulkan_filter_frame, .config_props = &ff_vk_filter_config_input, }, - { NULL } }; static const AVFilterPad chromaber_vulkan_outputs[] = { @@ -330,7 +329,6 @@ static const AVFilterPad chromaber_vulkan_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_vk_filter_config_output, }, - { NULL } }; const AVFilter ff_vf_chromaber_vulkan = { @@ -340,8 +338,8 @@ const AVFilter ff_vf_chromaber_vulkan = { .init = &ff_vk_filter_init, .uninit = &chromaber_vulkan_uninit, .query_formats = &ff_vk_filter_query_formats, - .inputs = chromaber_vulkan_inputs, - .outputs = chromaber_vulkan_outputs, + FILTER_INPUTS(chromaber_vulkan_inputs), + FILTER_OUTPUTS(chromaber_vulkan_outputs), .priv_class = &chromaber_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_chromakey.c b/libavfilter/vf_chromakey.c index 61a1ab53f9..2f10b8f475 100644 --- a/libavfilter/vf_chromakey.c +++ b/libavfilter/vf_chromakey.c @@ -370,7 +370,6 @@ static const AVFilterPad chromakey_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad chromakey_outputs[] = { @@ -379,7 +378,6 @@ static const AVFilterPad chromakey_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #define OFFSET(x) offsetof(ChromakeyContext, x) @@ -401,8 +399,8 @@ const AVFilter ff_vf_chromakey = { .priv_size = sizeof(ChromakeyContext), .priv_class = &chromakey_class, .query_formats = query_formats, - .inputs = chromakey_inputs, - .outputs = chromakey_outputs, + FILTER_INPUTS(chromakey_inputs), + FILTER_OUTPUTS(chromakey_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -423,7 +421,6 @@ static const AVFilterPad chromahold_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad chromahold_outputs[] = { @@ -432,7 +429,6 @@ static const AVFilterPad chromahold_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; AVFILTER_DEFINE_CLASS(chromahold); @@ -443,8 +439,8 @@ const AVFilter ff_vf_chromahold = { .priv_size = sizeof(ChromakeyContext), .priv_class = &chromahold_class, .query_formats = query_formats, - .inputs = chromahold_inputs, - .outputs = chromahold_outputs, + FILTER_INPUTS(chromahold_inputs), + FILTER_OUTPUTS(chromahold_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_chromanr.c b/libavfilter/vf_chromanr.c index 006d6410b7..68bb2a7b80 100644 --- a/libavfilter/vf_chromanr.c +++ b/libavfilter/vf_chromanr.c @@ -264,7 +264,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -272,7 +271,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; AVFILTER_DEFINE_CLASS(chromanr); @@ -283,8 +281,8 @@ const AVFilter ff_vf_chromanr = { .priv_size = sizeof(ChromaNRContext), .priv_class = &chromanr_class, .query_formats = query_formats, - .outputs = outputs, - .inputs = inputs, + FILTER_OUTPUTS(outputs), + FILTER_INPUTS(inputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c index 8079196862..d32a9e2381 100644 --- a/libavfilter/vf_chromashift.c +++ b/libavfilter/vf_chromashift.c @@ -429,7 +429,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -437,7 +436,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; AVFILTER_DEFINE_CLASS(chromashift); @@ -448,8 +446,8 @@ const AVFilter ff_vf_chromashift = { .priv_size = sizeof(ChromaShiftContext), .priv_class = &chromashift_class, .query_formats = query_formats, - .outputs = outputs, - .inputs = inputs, + FILTER_OUTPUTS(outputs), + FILTER_INPUTS(inputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -477,8 +475,8 @@ const AVFilter ff_vf_rgbashift = { .priv_size = sizeof(ChromaShiftContext), .priv_class = &rgbashift_class, .query_formats = query_formats, - .outputs = outputs, - .inputs = inputs, + FILTER_OUTPUTS(outputs), + FILTER_INPUTS(inputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c index cafdb915ea..b09012920c 100644 --- a/libavfilter/vf_ciescope.c +++ b/libavfilter/vf_ciescope.c @@ -1492,7 +1492,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1501,7 +1500,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_ciescope = { @@ -1511,6 +1509,6 @@ const AVFilter ff_vf_ciescope = { .priv_class = &ciescope_class, .query_formats = query_formats, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c index 1b5c67e7d4..67cf4e40ae 100644 --- a/libavfilter/vf_codecview.c +++ b/libavfilter/vf_codecview.c @@ -304,7 +304,6 @@ static const AVFilterPad codecview_inputs[] = { .config_props = config_input, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad codecview_outputs[] = { @@ -312,7 +311,6 @@ static const AVFilterPad codecview_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_codecview = { @@ -320,8 +318,8 @@ const AVFilter ff_vf_codecview = { .description = NULL_IF_CONFIG_SMALL("Visualize information about some codecs."), .priv_size = sizeof(CodecViewContext), .query_formats = query_formats, - .inputs = codecview_inputs, - .outputs = codecview_outputs, + FILTER_INPUTS(codecview_inputs), + FILTER_OUTPUTS(codecview_outputs), .priv_class = &codecview_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c index 1da1a643eb..3a43d43f0f 100644 --- a/libavfilter/vf_colorbalance.c +++ b/libavfilter/vf_colorbalance.c @@ -424,7 +424,6 @@ static const AVFilterPad colorbalance_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad colorbalance_outputs[] = { @@ -433,7 +432,6 @@ static const AVFilterPad colorbalance_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_colorbalance = { @@ -442,8 +440,8 @@ const AVFilter ff_vf_colorbalance = { .priv_size = sizeof(ColorBalanceContext), .priv_class = &colorbalance_class, .query_formats = query_formats, - .inputs = colorbalance_inputs, - .outputs = colorbalance_outputs, + FILTER_INPUTS(colorbalance_inputs), + FILTER_OUTPUTS(colorbalance_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorchannelmixer.c b/libavfilter/vf_colorchannelmixer.c index e259fa3028..fd85d9c67b 100644 --- a/libavfilter/vf_colorchannelmixer.c +++ b/libavfilter/vf_colorchannelmixer.c @@ -784,7 +784,6 @@ static const AVFilterPad colorchannelmixer_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad colorchannelmixer_outputs[] = { @@ -793,7 +792,6 @@ static const AVFilterPad colorchannelmixer_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_colorchannelmixer = { @@ -803,8 +801,8 @@ const AVFilter ff_vf_colorchannelmixer = { .priv_class = &colorchannelmixer_class, .uninit = uninit, .query_formats = query_formats, - .inputs = colorchannelmixer_inputs, - .outputs = colorchannelmixer_outputs, + FILTER_INPUTS(colorchannelmixer_inputs), + FILTER_OUTPUTS(colorchannelmixer_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c index 0cef043bcd..9841377629 100644 --- a/libavfilter/vf_colorconstancy.c +++ b/libavfilter/vf_colorconstancy.c @@ -725,7 +725,6 @@ static const AVFilterPad colorconstancy_inputs[] = { .config_props = config_props, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad colorconstancy_outputs[] = { @@ -733,7 +732,6 @@ static const AVFilterPad colorconstancy_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #if CONFIG_GREYEDGE_FILTER @@ -754,8 +752,8 @@ const AVFilter ff_vf_greyedge = { .priv_class = &greyedge_class, .query_formats = query_formats, .uninit = uninit, - .inputs = colorconstancy_inputs, - .outputs = colorconstancy_outputs, + FILTER_INPUTS(colorconstancy_inputs), + FILTER_OUTPUTS(colorconstancy_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_colorcontrast.c b/libavfilter/vf_colorcontrast.c index 8aae031745..0eb2f4b038 100644 --- a/libavfilter/vf_colorcontrast.c +++ b/libavfilter/vf_colorcontrast.c @@ -362,7 +362,6 @@ static const AVFilterPad colorcontrast_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad colorcontrast_outputs[] = { @@ -370,7 +369,6 @@ static const AVFilterPad colorcontrast_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(ColorContrastContext, x) @@ -395,8 +393,8 @@ const AVFilter ff_vf_colorcontrast = { .priv_size = sizeof(ColorContrastContext), .priv_class = &colorcontrast_class, .query_formats = query_formats, - .inputs = colorcontrast_inputs, - .outputs = colorcontrast_outputs, + FILTER_INPUTS(colorcontrast_inputs), + FILTER_OUTPUTS(colorcontrast_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorcorrect.c b/libavfilter/vf_colorcorrect.c index d4567d2a30..a5141c5dae 100644 --- a/libavfilter/vf_colorcorrect.c +++ b/libavfilter/vf_colorcorrect.c @@ -173,7 +173,6 @@ static const AVFilterPad colorcorrect_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad colorcorrect_outputs[] = { @@ -181,7 +180,6 @@ static const AVFilterPad colorcorrect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(ColorCorrectContext, x) @@ -204,8 +202,8 @@ const AVFilter ff_vf_colorcorrect = { .priv_size = sizeof(ColorCorrectContext), .priv_class = &colorcorrect_class, .query_formats = query_formats, - .inputs = colorcorrect_inputs, - .outputs = colorcorrect_outputs, + FILTER_INPUTS(colorcorrect_inputs), + FILTER_OUTPUTS(colorcorrect_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorize.c b/libavfilter/vf_colorize.c index 1dc99681ce..79e76a6599 100644 --- a/libavfilter/vf_colorize.c +++ b/libavfilter/vf_colorize.c @@ -263,7 +263,6 @@ static const AVFilterPad colorize_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad colorize_outputs[] = { @@ -271,7 +270,6 @@ static const AVFilterPad colorize_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(ColorizeContext, x) @@ -293,8 +291,8 @@ const AVFilter ff_vf_colorize = { .priv_size = sizeof(ColorizeContext), .priv_class = &colorize_class, .query_formats = query_formats, - .inputs = colorize_inputs, - .outputs = colorize_outputs, + FILTER_INPUTS(colorize_inputs), + FILTER_OUTPUTS(colorize_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorkey.c b/libavfilter/vf_colorkey.c index 93e69b712c..d1c576f940 100644 --- a/libavfilter/vf_colorkey.c +++ b/libavfilter/vf_colorkey.c @@ -180,7 +180,6 @@ static const AVFilterPad colorkey_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad colorkey_outputs[] = { @@ -189,7 +188,6 @@ static const AVFilterPad colorkey_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #define OFFSET(x) offsetof(ColorkeyContext, x) @@ -213,8 +211,8 @@ const AVFilter ff_vf_colorkey = { .priv_class = &colorkey_class, .query_formats = query_formats, .init = init_filter, - .inputs = colorkey_inputs, - .outputs = colorkey_outputs, + FILTER_INPUTS(colorkey_inputs), + FILTER_OUTPUTS(colorkey_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; @@ -238,8 +236,8 @@ const AVFilter ff_vf_colorhold = { .priv_class = &colorhold_class, .query_formats = query_formats, .init = init_filter, - .inputs = colorkey_inputs, - .outputs = colorkey_outputs, + FILTER_INPUTS(colorkey_inputs), + FILTER_OUTPUTS(colorkey_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorkey_opencl.c b/libavfilter/vf_colorkey_opencl.c index cd312ea53e..f4015cbf21 100644 --- a/libavfilter/vf_colorkey_opencl.c +++ b/libavfilter/vf_colorkey_opencl.c @@ -206,7 +206,6 @@ static const AVFilterPad colorkey_opencl_inputs[] = { .filter_frame = filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad colorkey_opencl_outputs[] = { @@ -215,7 +214,6 @@ static const AVFilterPad colorkey_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_output, }, - { NULL } }; #define OFFSET(x) offsetof(ColorkeyOpenCLContext, x) @@ -238,7 +236,7 @@ const AVFilter ff_vf_colorkey_opencl = { .init = &ff_opencl_filter_init, .uninit = &colorkey_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = colorkey_opencl_inputs, - .outputs = colorkey_opencl_outputs, + FILTER_INPUTS(colorkey_opencl_inputs), + FILTER_OUTPUTS(colorkey_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE }; diff --git a/libavfilter/vf_colorlevels.c b/libavfilter/vf_colorlevels.c index b17bb9f11f..0c63638d77 100644 --- a/libavfilter/vf_colorlevels.c +++ b/libavfilter/vf_colorlevels.c @@ -301,7 +301,6 @@ static const AVFilterPad colorlevels_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad colorlevels_outputs[] = { @@ -309,7 +308,6 @@ static const AVFilterPad colorlevels_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_colorlevels = { @@ -318,8 +316,8 @@ const AVFilter ff_vf_colorlevels = { .priv_size = sizeof(ColorLevelsContext), .priv_class = &colorlevels_class, .query_formats = query_formats, - .inputs = colorlevels_inputs, - .outputs = colorlevels_outputs, + FILTER_INPUTS(colorlevels_inputs), + FILTER_OUTPUTS(colorlevels_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index 0686ca068b..58b5da903f 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -493,7 +493,6 @@ static const AVFilterPad colormatrix_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad colormatrix_outputs[] = { @@ -501,7 +500,6 @@ static const AVFilterPad colormatrix_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_colormatrix = { @@ -510,8 +508,8 @@ const AVFilter ff_vf_colormatrix = { .priv_size = sizeof(ColorMatrixContext), .init = init, .query_formats = query_formats, - .inputs = colormatrix_inputs, - .outputs = colormatrix_outputs, + FILTER_INPUTS(colormatrix_inputs), + FILTER_OUTPUTS(colormatrix_outputs), .priv_class = &colormatrix_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index 65e072d137..3d3d4b4fab 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -1057,7 +1057,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1066,7 +1065,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vf_colorspace = { @@ -1077,7 +1075,7 @@ const AVFilter ff_vf_colorspace = { .query_formats = query_formats, .priv_size = sizeof(ColorSpaceContext), .priv_class = &colorspace_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_colortemperature.c b/libavfilter/vf_colortemperature.c index ad288e3b84..03b285f0be 100644 --- a/libavfilter/vf_colortemperature.c +++ b/libavfilter/vf_colortemperature.c @@ -328,7 +328,6 @@ static const AVFilterPad inputs[] = { .config_props = config_input, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -336,7 +335,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(ColorTemperatureContext, x) @@ -357,8 +355,8 @@ const AVFilter ff_vf_colortemperature = { .priv_size = sizeof(ColorTemperatureContext), .priv_class = &colortemperature_class, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c index db92f5aa0b..0fd8cc64f0 100644 --- a/libavfilter/vf_convolution.c +++ b/libavfilter/vf_convolution.c @@ -889,7 +889,6 @@ static const AVFilterPad convolution_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad convolution_outputs[] = { @@ -897,7 +896,6 @@ static const AVFilterPad convolution_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #if CONFIG_CONVOLUTION_FILTER @@ -909,8 +907,8 @@ const AVFilter ff_vf_convolution = { .priv_class = &convolution_class, .init = init, .query_formats = query_formats, - .inputs = convolution_inputs, - .outputs = convolution_outputs, + FILTER_INPUTS(convolution_inputs), + FILTER_OUTPUTS(convolution_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -938,8 +936,8 @@ const AVFilter ff_vf_prewitt = { .priv_class = &prewitt_class, .init = init, .query_formats = query_formats, - .inputs = convolution_inputs, - .outputs = convolution_outputs, + FILTER_INPUTS(convolution_inputs), + FILTER_OUTPUTS(convolution_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -958,8 +956,8 @@ const AVFilter ff_vf_sobel = { .priv_class = &sobel_class, .init = init, .query_formats = query_formats, - .inputs = convolution_inputs, - .outputs = convolution_outputs, + FILTER_INPUTS(convolution_inputs), + FILTER_OUTPUTS(convolution_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -978,8 +976,8 @@ const AVFilter ff_vf_roberts = { .priv_class = &roberts_class, .init = init, .query_formats = query_formats, - .inputs = convolution_inputs, - .outputs = convolution_outputs, + FILTER_INPUTS(convolution_inputs), + FILTER_OUTPUTS(convolution_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -998,8 +996,8 @@ const AVFilter ff_vf_kirsch = { .priv_class = &kirsch_class, .init = init, .query_formats = query_formats, - .inputs = convolution_inputs, - .outputs = convolution_outputs, + FILTER_INPUTS(convolution_inputs), + FILTER_OUTPUTS(convolution_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_convolution_opencl.c b/libavfilter/vf_convolution_opencl.c index c6218d3cd6..6932eff246 100644 --- a/libavfilter/vf_convolution_opencl.c +++ b/libavfilter/vf_convolution_opencl.c @@ -327,7 +327,6 @@ static const AVFilterPad convolution_opencl_inputs[] = { .filter_frame = &convolution_opencl_filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad convolution_opencl_outputs[] = { @@ -336,7 +335,6 @@ static const AVFilterPad convolution_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_output, }, - { NULL } }; #define OFFSET(x) offsetof(ConvolutionOpenCLContext, x) @@ -370,8 +368,8 @@ const AVFilter ff_vf_convolution_opencl = { .init = &ff_opencl_filter_init, .uninit = &convolution_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = convolution_opencl_inputs, - .outputs = convolution_opencl_outputs, + FILTER_INPUTS(convolution_opencl_inputs), + FILTER_OUTPUTS(convolution_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -396,8 +394,8 @@ const AVFilter ff_vf_sobel_opencl = { .init = &ff_opencl_filter_init, .uninit = &convolution_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = convolution_opencl_inputs, - .outputs = convolution_opencl_outputs, + FILTER_INPUTS(convolution_opencl_inputs), + FILTER_OUTPUTS(convolution_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -422,8 +420,8 @@ const AVFilter ff_vf_prewitt_opencl = { .init = &ff_opencl_filter_init, .uninit = &convolution_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = convolution_opencl_inputs, - .outputs = convolution_opencl_outputs, + FILTER_INPUTS(convolution_opencl_inputs), + FILTER_OUTPUTS(convolution_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -448,8 +446,8 @@ const AVFilter ff_vf_roberts_opencl = { .init = &ff_opencl_filter_init, .uninit = &convolution_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = convolution_opencl_inputs, - .outputs = convolution_opencl_outputs, + FILTER_INPUTS(convolution_opencl_inputs), + FILTER_OUTPUTS(convolution_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_convolve.c b/libavfilter/vf_convolve.c index fd0f3ca404..efe9c94ae0 100644 --- a/libavfilter/vf_convolve.c +++ b/libavfilter/vf_convolve.c @@ -606,7 +606,6 @@ static const AVFilterPad convolve_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_impulse, }, - { NULL } }; static const AVFilterPad convolve_outputs[] = { @@ -615,7 +614,6 @@ static const AVFilterPad convolve_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #if CONFIG_CONVOLVE_FILTER @@ -632,8 +630,8 @@ const AVFilter ff_vf_convolve = { .activate = activate, .priv_size = sizeof(ConvolveContext), .priv_class = &convolve_class, - .inputs = convolve_inputs, - .outputs = convolve_outputs, + FILTER_INPUTS(convolve_inputs), + FILTER_OUTPUTS(convolve_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; @@ -662,8 +660,8 @@ const AVFilter ff_vf_deconvolve = { .activate = activate, .priv_size = sizeof(ConvolveContext), .priv_class = &deconvolve_class, - .inputs = convolve_inputs, - .outputs = convolve_outputs, + FILTER_INPUTS(convolve_inputs), + FILTER_OUTPUTS(convolve_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c index f50ac70c92..16fbe438a1 100644 --- a/libavfilter/vf_copy.c +++ b/libavfilter/vf_copy.c @@ -70,7 +70,6 @@ static const AVFilterPad avfilter_vf_copy_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_copy_outputs[] = { @@ -78,13 +77,12 @@ static const AVFilterPad avfilter_vf_copy_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_copy = { .name = "copy", .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), - .inputs = avfilter_vf_copy_inputs, - .outputs = avfilter_vf_copy_outputs, + FILTER_INPUTS(avfilter_vf_copy_inputs), + FILTER_OUTPUTS(avfilter_vf_copy_outputs), .query_formats = query_formats, }; diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index 98f6386124..2d74c0f5ce 100644 --- a/libavfilter/vf_coreimage.m +++ b/libavfilter/vf_coreimage.m @@ -608,7 +608,6 @@ static const AVFilterPad vf_coreimage_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad vf_coreimage_outputs[] = { @@ -616,7 +615,6 @@ static const AVFilterPad vf_coreimage_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad vsrc_coreimagesrc_outputs[] = { @@ -626,7 +624,6 @@ static const AVFilterPad vsrc_coreimagesrc_outputs[] = { .request_frame = request_frame, .config_props = config_output, }, - { NULL } }; #define OFFSET(x) offsetof(CoreImageContext, x) @@ -663,8 +660,8 @@ const AVFilter ff_vf_coreimage = { .uninit = uninit, .priv_size = sizeof(CoreImageContext), .priv_class = &coreimage_class, - .inputs = vf_coreimage_inputs, - .outputs = vf_coreimage_outputs, + FF_FILTER_INPUTS(vf_coreimage_inputs), + FF_FILTER_OUTPUTS(vf_coreimage_outputs), .query_formats = query_formats, }; @@ -685,6 +682,6 @@ const AVFilter ff_vsrc_coreimagesrc = { .priv_size = sizeof(CoreImageContext), .priv_class = &coreimagesrc_class, .inputs = NULL, - .outputs = vsrc_coreimagesrc_outputs, + FF_FILTER_OUTPUTS(vsrc_coreimagesrc_outputs), .query_formats = query_formats_src, }; diff --git a/libavfilter/vf_cover_rect.c b/libavfilter/vf_cover_rect.c index a1502073fb..0a8c10e06d 100644 --- a/libavfilter/vf_cover_rect.c +++ b/libavfilter/vf_cover_rect.c @@ -236,7 +236,6 @@ static const AVFilterPad cover_rect_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad cover_rect_outputs[] = { @@ -244,7 +243,6 @@ static const AVFilterPad cover_rect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_cover_rect = { @@ -254,7 +252,7 @@ const AVFilter ff_vf_cover_rect = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = cover_rect_inputs, - .outputs = cover_rect_outputs, + FILTER_INPUTS(cover_rect_inputs), + FILTER_OUTPUTS(cover_rect_outputs), .priv_class = &cover_rect_class, }; diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 9cc9ec2844..76d375cdfc 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -380,7 +380,6 @@ static const AVFilterPad avfilter_vf_crop_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_vf_crop_outputs[] = { @@ -389,7 +388,6 @@ static const AVFilterPad avfilter_vf_crop_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_crop = { @@ -399,7 +397,7 @@ const AVFilter ff_vf_crop = { .priv_class = &crop_class, .query_formats = query_formats, .uninit = uninit, - .inputs = avfilter_vf_crop_inputs, - .outputs = avfilter_vf_crop_outputs, + FILTER_INPUTS(avfilter_vf_crop_inputs), + FILTER_OUTPUTS(avfilter_vf_crop_outputs), .process_command = process_command, }; diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c index 97c42a5c35..500ef7fa7f 100644 --- a/libavfilter/vf_cropdetect.c +++ b/libavfilter/vf_cropdetect.c @@ -260,7 +260,6 @@ static const AVFilterPad avfilter_vf_cropdetect_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_cropdetect_outputs[] = { @@ -268,7 +267,6 @@ static const AVFilterPad avfilter_vf_cropdetect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO }, - { NULL } }; const AVFilter ff_vf_cropdetect = { @@ -278,7 +276,7 @@ const AVFilter ff_vf_cropdetect = { .priv_class = &cropdetect_class, .init = init, .query_formats = query_formats, - .inputs = avfilter_vf_cropdetect_inputs, - .outputs = avfilter_vf_cropdetect_outputs, + FILTER_INPUTS(avfilter_vf_cropdetect_inputs), + FILTER_OUTPUTS(avfilter_vf_cropdetect_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c index 457fd77184..87eecd0154 100644 --- a/libavfilter/vf_curves.c +++ b/libavfilter/vf_curves.c @@ -799,7 +799,6 @@ static const AVFilterPad curves_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad curves_outputs[] = { @@ -807,7 +806,6 @@ static const AVFilterPad curves_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_curves = { @@ -817,8 +815,8 @@ const AVFilter ff_vf_curves = { .init = curves_init, .uninit = curves_uninit, .query_formats = query_formats, - .inputs = curves_inputs, - .outputs = curves_outputs, + FILTER_INPUTS(curves_inputs), + FILTER_OUTPUTS(curves_outputs), .priv_class = &curves_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c index 63c93fd98d..3063cab0f3 100644 --- a/libavfilter/vf_datascope.c +++ b/libavfilter/vf_datascope.c @@ -437,7 +437,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -446,7 +445,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_datascope = { @@ -455,8 +453,8 @@ const AVFilter ff_vf_datascope = { .priv_size = sizeof(DatascopeContext), .priv_class = &datascope_class, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -727,7 +725,6 @@ static const AVFilterPad pixscope_inputs[] = { .filter_frame = pixscope_filter_frame, .config_props = pixscope_config_input, }, - { NULL } }; static const AVFilterPad pixscope_outputs[] = { @@ -735,7 +732,6 @@ static const AVFilterPad pixscope_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_pixscope = { @@ -744,8 +740,8 @@ const AVFilter ff_vf_pixscope = { .priv_size = sizeof(PixscopeContext), .priv_class = &pixscope_class, .query_formats = query_formats, - .inputs = pixscope_inputs, - .outputs = pixscope_outputs, + FILTER_INPUTS(pixscope_inputs), + FILTER_OUTPUTS(pixscope_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = pixscope_process_command, }; @@ -1133,7 +1129,6 @@ static const AVFilterPad oscilloscope_inputs[] = { .config_props = oscilloscope_config_input, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad oscilloscope_outputs[] = { @@ -1141,7 +1136,6 @@ static const AVFilterPad oscilloscope_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_oscilloscope = { @@ -1151,8 +1145,8 @@ const AVFilter ff_vf_oscilloscope = { .priv_class = &oscilloscope_class, .query_formats = query_formats, .uninit = oscilloscope_uninit, - .inputs = oscilloscope_inputs, - .outputs = oscilloscope_outputs, + FILTER_INPUTS(oscilloscope_inputs), + FILTER_OUTPUTS(oscilloscope_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = oscilloscope_process_command, }; diff --git a/libavfilter/vf_dblur.c b/libavfilter/vf_dblur.c index f3d0ab1141..931c6c689d 100644 --- a/libavfilter/vf_dblur.c +++ b/libavfilter/vf_dblur.c @@ -281,7 +281,6 @@ static const AVFilterPad dblur_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad dblur_outputs[] = { @@ -289,7 +288,6 @@ static const AVFilterPad dblur_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_dblur = { @@ -299,8 +297,8 @@ const AVFilter ff_vf_dblur = { .priv_class = &dblur_class, .uninit = uninit, .query_formats = query_formats, - .inputs = dblur_inputs, - .outputs = dblur_outputs, + FILTER_INPUTS(dblur_inputs), + FILTER_OUTPUTS(dblur_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c index 8c0691c07f..e14d4d7c9f 100644 --- a/libavfilter/vf_dctdnoiz.c +++ b/libavfilter/vf_dctdnoiz.c @@ -811,7 +811,6 @@ static const AVFilterPad dctdnoiz_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad dctdnoiz_outputs[] = { @@ -819,7 +818,6 @@ static const AVFilterPad dctdnoiz_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_dctdnoiz = { @@ -829,8 +827,8 @@ const AVFilter ff_vf_dctdnoiz = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = dctdnoiz_inputs, - .outputs = dctdnoiz_outputs, + FILTER_INPUTS(dctdnoiz_inputs), + FILTER_OUTPUTS(dctdnoiz_outputs), .priv_class = &dctdnoiz_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c index 767f1c7687..77ddd89ebb 100644 --- a/libavfilter/vf_deband.c +++ b/libavfilter/vf_deband.c @@ -456,7 +456,6 @@ static const AVFilterPad avfilter_vf_deband_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_deband_outputs[] = { @@ -464,7 +463,6 @@ static const AVFilterPad avfilter_vf_deband_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_deband = { @@ -474,8 +472,8 @@ const AVFilter ff_vf_deband = { .priv_class = &deband_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_deband_inputs, - .outputs = avfilter_vf_deband_outputs, + FILTER_INPUTS(avfilter_vf_deband_inputs), + FILTER_OUTPUTS(avfilter_vf_deband_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_deblock.c b/libavfilter/vf_deblock.c index 4069123baf..60f2d206bb 100644 --- a/libavfilter/vf_deblock.c +++ b/libavfilter/vf_deblock.c @@ -398,7 +398,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -407,7 +406,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; AVFILTER_DEFINE_CLASS(deblock); @@ -418,8 +416,8 @@ const AVFilter ff_vf_deblock = { .priv_size = sizeof(DeblockContext), .priv_class = &deblock_class, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c index 9ef03ff1a3..b3f43140a4 100644 --- a/libavfilter/vf_decimate.c +++ b/libavfilter/vf_decimate.c @@ -428,7 +428,6 @@ static const AVFilterPad decimate_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_decimate = { @@ -439,7 +438,7 @@ const AVFilter ff_vf_decimate = { .uninit = decimate_uninit, .priv_size = sizeof(DecimateContext), .query_formats = query_formats, - .outputs = decimate_outputs, + FILTER_OUTPUTS(decimate_outputs), .priv_class = &decimate_class, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_dedot.c b/libavfilter/vf_dedot.c index 8660eb08b4..38f2e75939 100644 --- a/libavfilter/vf_dedot.c +++ b/libavfilter/vf_dedot.c @@ -384,7 +384,6 @@ static const AVFilterPad inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -393,7 +392,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; AVFILTER_DEFINE_CLASS(dedot); @@ -406,7 +404,7 @@ const AVFilter ff_vf_dedot = { .query_formats = query_formats, .activate = activate, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_deflicker.c b/libavfilter/vf_deflicker.c index b3a301edaf..c15f8cec33 100644 --- a/libavfilter/vf_deflicker.c +++ b/libavfilter/vf_deflicker.c @@ -451,7 +451,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -460,7 +459,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_deflicker = { @@ -470,6 +468,6 @@ const AVFilter ff_vf_deflicker = { .priv_class = &deflicker_class, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c index 06c4c5e2df..ea0a9f4345 100644 --- a/libavfilter/vf_deinterlace_qsv.c +++ b/libavfilter/vf_deinterlace_qsv.c @@ -576,7 +576,6 @@ static const AVFilterPad qsvdeint_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = qsvdeint_filter_frame, }, - { NULL } }; static const AVFilterPad qsvdeint_outputs[] = { @@ -586,7 +585,6 @@ static const AVFilterPad qsvdeint_outputs[] = { .config_props = qsvdeint_config_props, .request_frame = qsvdeint_request_frame, }, - { NULL } }; const AVFilter ff_vf_deinterlace_qsv = { @@ -599,8 +597,8 @@ const AVFilter ff_vf_deinterlace_qsv = { .priv_size = sizeof(QSVDeintContext), .priv_class = &qsvdeint_class, - .inputs = qsvdeint_inputs, - .outputs = qsvdeint_outputs, + FILTER_INPUTS(qsvdeint_inputs), + FILTER_OUTPUTS(qsvdeint_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_deinterlace_vaapi.c b/libavfilter/vf_deinterlace_vaapi.c index fa71947098..5ec830213e 100644 --- a/libavfilter/vf_deinterlace_vaapi.c +++ b/libavfilter/vf_deinterlace_vaapi.c @@ -369,7 +369,6 @@ static const AVFilterPad deint_vaapi_inputs[] = { .filter_frame = &deint_vaapi_filter_frame, .config_props = &ff_vaapi_vpp_config_input, }, - { NULL } }; static const AVFilterPad deint_vaapi_outputs[] = { @@ -378,7 +377,6 @@ static const AVFilterPad deint_vaapi_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &deint_vaapi_config_output, }, - { NULL } }; const AVFilter ff_vf_deinterlace_vaapi = { @@ -388,8 +386,8 @@ const AVFilter ff_vf_deinterlace_vaapi = { .init = &deint_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, .query_formats = &ff_vaapi_vpp_query_formats, - .inputs = deint_vaapi_inputs, - .outputs = deint_vaapi_outputs, + FILTER_INPUTS(deint_vaapi_inputs), + FILTER_OUTPUTS(deint_vaapi_outputs), .priv_class = &deint_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_dejudder.c b/libavfilter/vf_dejudder.c index 5816f82322..0aa8ab7a1e 100644 --- a/libavfilter/vf_dejudder.c +++ b/libavfilter/vf_dejudder.c @@ -163,7 +163,6 @@ static const AVFilterPad dejudder_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad dejudder_outputs[] = { @@ -172,7 +171,6 @@ static const AVFilterPad dejudder_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_out_props, }, - { NULL } }; const AVFilter ff_vf_dejudder = { @@ -180,8 +178,8 @@ const AVFilter ff_vf_dejudder = { .description = NULL_IF_CONFIG_SMALL("Remove judder produced by pullup."), .priv_size = sizeof(DejudderContext), .priv_class = &dejudder_class, - .inputs = dejudder_inputs, - .outputs = dejudder_outputs, + FILTER_INPUTS(dejudder_inputs), + FILTER_OUTPUTS(dejudder_outputs), .init = dejudder_init, .uninit = dejudder_uninit, }; diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 4d2966e249..f7320aa0fe 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -384,7 +384,6 @@ static const AVFilterPad avfilter_vf_delogo_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_vf_delogo_outputs[] = { @@ -392,7 +391,6 @@ static const AVFilterPad avfilter_vf_delogo_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_delogo = { @@ -403,7 +401,7 @@ const AVFilter ff_vf_delogo = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_delogo_inputs, - .outputs = avfilter_vf_delogo_outputs, + FILTER_INPUTS(avfilter_vf_delogo_inputs), + FILTER_OUTPUTS(avfilter_vf_delogo_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_derain.c b/libavfilter/vf_derain.c index a5c003ecdf..720cc70f5c 100644 --- a/libavfilter/vf_derain.c +++ b/libavfilter/vf_derain.c @@ -112,7 +112,6 @@ static const AVFilterPad derain_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad derain_outputs[] = { @@ -120,7 +119,6 @@ static const AVFilterPad derain_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_derain = { @@ -130,8 +128,8 @@ const AVFilter ff_vf_derain = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = derain_inputs, - .outputs = derain_outputs, + FILTER_INPUTS(derain_inputs), + FILTER_OUTPUTS(derain_outputs), .priv_class = &derain_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index 7794eecc8d..4d3d950191 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -537,7 +537,6 @@ static const AVFilterPad deshake_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad deshake_outputs[] = { @@ -545,7 +544,6 @@ static const AVFilterPad deshake_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_deshake = { @@ -555,7 +553,7 @@ const AVFilter ff_vf_deshake = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = deshake_inputs, - .outputs = deshake_outputs, + FILTER_INPUTS(deshake_inputs), + FILTER_OUTPUTS(deshake_outputs), .priv_class = &deshake_class, }; diff --git a/libavfilter/vf_deshake_opencl.c b/libavfilter/vf_deshake_opencl.c index 2fd682003f..93c50a410d 100644 --- a/libavfilter/vf_deshake_opencl.c +++ b/libavfilter/vf_deshake_opencl.c @@ -2141,7 +2141,6 @@ static const AVFilterPad deshake_opencl_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad deshake_opencl_outputs[] = { @@ -2150,7 +2149,6 @@ static const AVFilterPad deshake_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_output, }, - { NULL } }; #define OFFSET(x) offsetof(DeshakeOpenCLContext, x) @@ -2196,7 +2194,7 @@ const AVFilter ff_vf_deshake_opencl = { .uninit = &deshake_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, .activate = activate, - .inputs = deshake_opencl_inputs, - .outputs = deshake_opencl_outputs, + FILTER_INPUTS(deshake_opencl_inputs), + FILTER_OUTPUTS(deshake_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE }; diff --git a/libavfilter/vf_despill.c b/libavfilter/vf_despill.c index 315104638b..a19d3fed4d 100644 --- a/libavfilter/vf_despill.c +++ b/libavfilter/vf_despill.c @@ -135,7 +135,6 @@ static const AVFilterPad despill_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad despill_outputs[] = { @@ -144,7 +143,6 @@ static const AVFilterPad despill_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #define OFFSET(x) offsetof(DespillContext, x) @@ -172,8 +170,8 @@ const AVFilter ff_vf_despill = { .priv_size = sizeof(DespillContext), .priv_class = &despill_class, .query_formats = query_formats, - .inputs = despill_inputs, - .outputs = despill_outputs, + FILTER_INPUTS(despill_inputs), + FILTER_OUTPUTS(despill_outputs), .process_command = ff_filter_process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_detelecine.c b/libavfilter/vf_detelecine.c index e345e3062a..7f34a88217 100644 --- a/libavfilter/vf_detelecine.c +++ b/libavfilter/vf_detelecine.c @@ -360,7 +360,6 @@ static const AVFilterPad detelecine_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad detelecine_outputs[] = { @@ -369,7 +368,6 @@ static const AVFilterPad detelecine_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_detelecine = { @@ -380,6 +378,6 @@ const AVFilter ff_vf_detelecine = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = detelecine_inputs, - .outputs = detelecine_outputs, + FILTER_INPUTS(detelecine_inputs), + FILTER_OUTPUTS(detelecine_outputs), }; diff --git a/libavfilter/vf_displace.c b/libavfilter/vf_displace.c index fcdbadb1c1..0bd35b2516 100644 --- a/libavfilter/vf_displace.c +++ b/libavfilter/vf_displace.c @@ -388,7 +388,6 @@ static const AVFilterPad displace_inputs[] = { .name = "ymap", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad displace_outputs[] = { @@ -397,7 +396,6 @@ static const AVFilterPad displace_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_displace = { @@ -407,8 +405,8 @@ const AVFilter ff_vf_displace = { .uninit = uninit, .query_formats = query_formats, .activate = activate, - .inputs = displace_inputs, - .outputs = displace_outputs, + FILTER_INPUTS(displace_inputs), + FILTER_OUTPUTS(displace_outputs), .priv_class = &displace_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_dnn_classify.c b/libavfilter/vf_dnn_classify.c index eb8758b265..904067f5f6 100644 --- a/libavfilter/vf_dnn_classify.c +++ b/libavfilter/vf_dnn_classify.c @@ -308,7 +308,6 @@ static const AVFilterPad dnn_classify_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad dnn_classify_outputs[] = { @@ -316,7 +315,6 @@ static const AVFilterPad dnn_classify_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_dnn_classify = { @@ -326,8 +324,8 @@ const AVFilter ff_vf_dnn_classify = { .init = dnn_classify_init, .uninit = dnn_classify_uninit, .query_formats = dnn_classify_query_formats, - .inputs = dnn_classify_inputs, - .outputs = dnn_classify_outputs, + FILTER_INPUTS(dnn_classify_inputs), + FILTER_OUTPUTS(dnn_classify_outputs), .priv_class = &dnn_classify_class, .activate = dnn_classify_activate, }; diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c index 629743ae61..200b5897c1 100644 --- a/libavfilter/vf_dnn_detect.c +++ b/libavfilter/vf_dnn_detect.c @@ -518,7 +518,6 @@ static const AVFilterPad dnn_detect_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad dnn_detect_outputs[] = { @@ -526,7 +525,6 @@ static const AVFilterPad dnn_detect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_dnn_detect = { @@ -536,8 +534,8 @@ const AVFilter ff_vf_dnn_detect = { .init = dnn_detect_init, .uninit = dnn_detect_uninit, .query_formats = dnn_detect_query_formats, - .inputs = dnn_detect_inputs, - .outputs = dnn_detect_outputs, + FILTER_INPUTS(dnn_detect_inputs), + FILTER_OUTPUTS(dnn_detect_outputs), .priv_class = &dnn_detect_class, .activate = dnn_detect_activate, }; diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c index 8b7471c8cb..5f24955263 100644 --- a/libavfilter/vf_dnn_processing.c +++ b/libavfilter/vf_dnn_processing.c @@ -434,7 +434,6 @@ static const AVFilterPad dnn_processing_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad dnn_processing_outputs[] = { @@ -443,7 +442,6 @@ static const AVFilterPad dnn_processing_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_dnn_processing = { @@ -453,8 +451,8 @@ const AVFilter ff_vf_dnn_processing = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = dnn_processing_inputs, - .outputs = dnn_processing_outputs, + FILTER_INPUTS(dnn_processing_inputs), + FILTER_OUTPUTS(dnn_processing_outputs), .priv_class = &dnn_processing_class, .activate = activate, }; diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index 373a6f45dd..8b5f2e8c32 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -388,7 +388,6 @@ static const AVFilterPad drawbox_inputs[] = { .filter_frame = filter_frame, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad drawbox_outputs[] = { @@ -396,7 +395,6 @@ static const AVFilterPad drawbox_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_drawbox = { @@ -406,8 +404,8 @@ const AVFilter ff_vf_drawbox = { .priv_class = &drawbox_class, .init = init, .query_formats = query_formats, - .inputs = drawbox_inputs, - .outputs = drawbox_outputs, + FILTER_INPUTS(drawbox_inputs), + FILTER_OUTPUTS(drawbox_outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; @@ -472,7 +470,6 @@ static const AVFilterPad drawgrid_inputs[] = { .filter_frame = drawgrid_filter_frame, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad drawgrid_outputs[] = { @@ -480,7 +477,6 @@ static const AVFilterPad drawgrid_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_drawgrid = { @@ -490,8 +486,8 @@ const AVFilter ff_vf_drawgrid = { .priv_class = &drawgrid_class, .init = init, .query_formats = query_formats, - .inputs = drawgrid_inputs, - .outputs = drawgrid_outputs, + FILTER_INPUTS(drawgrid_inputs), + FILTER_OUTPUTS(drawgrid_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index c4c09894e4..9ca68d43dd 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1619,7 +1619,6 @@ static const AVFilterPad avfilter_vf_drawtext_inputs[] = { .config_props = config_input, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad avfilter_vf_drawtext_outputs[] = { @@ -1627,7 +1626,6 @@ static const AVFilterPad avfilter_vf_drawtext_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_drawtext = { @@ -1638,8 +1636,8 @@ const AVFilter ff_vf_drawtext = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_drawtext_inputs, - .outputs = avfilter_vf_drawtext_outputs, + FILTER_INPUTS(avfilter_vf_drawtext_inputs), + FILTER_OUTPUTS(avfilter_vf_drawtext_outputs), .process_command = command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c index e6111b4a27..982ed729cf 100644 --- a/libavfilter/vf_edgedetect.c +++ b/libavfilter/vf_edgedetect.c @@ -416,7 +416,6 @@ static const AVFilterPad edgedetect_inputs[] = { .config_props = config_props, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad edgedetect_outputs[] = { @@ -424,7 +423,6 @@ static const AVFilterPad edgedetect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_edgedetect = { @@ -434,8 +432,8 @@ const AVFilter ff_vf_edgedetect = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = edgedetect_inputs, - .outputs = edgedetect_outputs, + FILTER_INPUTS(edgedetect_inputs), + FILTER_OUTPUTS(edgedetect_outputs), .priv_class = &edgedetect_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c index afaa6225d2..91854243d3 100644 --- a/libavfilter/vf_elbg.c +++ b/libavfilter/vf_elbg.c @@ -239,7 +239,6 @@ static const AVFilterPad elbg_inputs[] = { .filter_frame = filter_frame, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad elbg_outputs[] = { @@ -247,7 +246,6 @@ static const AVFilterPad elbg_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_elbg = { @@ -258,6 +256,6 @@ const AVFilter ff_vf_elbg = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = elbg_inputs, - .outputs = elbg_outputs, + FILTER_INPUTS(elbg_inputs), + FILTER_OUTPUTS(elbg_outputs), }; diff --git a/libavfilter/vf_entropy.c b/libavfilter/vf_entropy.c index 73ece7cbb9..bac962fbd9 100644 --- a/libavfilter/vf_entropy.c +++ b/libavfilter/vf_entropy.c @@ -179,7 +179,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -187,7 +186,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_entropy = { @@ -196,8 +194,8 @@ const AVFilter ff_vf_entropy = { .priv_size = sizeof(EntropyContext), .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .priv_class = &entropy_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_epx.c b/libavfilter/vf_epx.c index f33be65095..afbf3ba01e 100644 --- a/libavfilter/vf_epx.c +++ b/libavfilter/vf_epx.c @@ -259,7 +259,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -268,14 +267,13 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_epx = { .name = "epx", .description = NULL_IF_CONFIG_SMALL("Scale the input using EPX algorithm."), - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .query_formats = query_formats, .priv_size = sizeof(EPXContext), .priv_class = &epx_class, diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index e1953db891..7763601935 100644 --- a/libavfilter/vf_eq.c +++ b/libavfilter/vf_eq.c @@ -335,7 +335,6 @@ static const AVFilterPad eq_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad eq_outputs[] = { @@ -343,7 +342,6 @@ static const AVFilterPad eq_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(EQContext, x) @@ -379,8 +377,8 @@ const AVFilter ff_vf_eq = { .description = NULL_IF_CONFIG_SMALL("Adjust brightness, contrast, gamma, and saturation."), .priv_size = sizeof(EQContext), .priv_class = &eq_class, - .inputs = eq_inputs, - .outputs = eq_outputs, + FILTER_INPUTS(eq_inputs), + FILTER_OUTPUTS(eq_outputs), .process_command = process_command, .query_formats = query_formats, .init = initialize, diff --git a/libavfilter/vf_estdif.c b/libavfilter/vf_estdif.c index 92b1c77806..9e3d03fcac 100644 --- a/libavfilter/vf_estdif.c +++ b/libavfilter/vf_estdif.c @@ -559,7 +559,6 @@ static const AVFilterPad estdif_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad estdif_outputs[] = { @@ -569,7 +568,6 @@ static const AVFilterPad estdif_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_estdif = { @@ -579,8 +577,8 @@ const AVFilter ff_vf_estdif = { .priv_class = &estdif_class, .uninit = uninit, .query_formats = query_formats, - .inputs = estdif_inputs, - .outputs = estdif_outputs, + FILTER_INPUTS(estdif_inputs), + FILTER_OUTPUTS(estdif_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_exposure.c b/libavfilter/vf_exposure.c index 135a9a0e03..220c573797 100644 --- a/libavfilter/vf_exposure.c +++ b/libavfilter/vf_exposure.c @@ -103,7 +103,6 @@ static const AVFilterPad exposure_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad exposure_outputs[] = { @@ -111,7 +110,6 @@ static const AVFilterPad exposure_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(ExposureContext, x) @@ -131,8 +129,8 @@ const AVFilter ff_vf_exposure = { .priv_size = sizeof(ExposureContext), .priv_class = &exposure_class, .query_formats = query_formats, - .inputs = exposure_inputs, - .outputs = exposure_outputs, + FILTER_INPUTS(exposure_inputs), + FILTER_OUTPUTS(exposure_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c index cede3d669e..bf58b58ffd 100644 --- a/libavfilter/vf_extractplanes.c +++ b/libavfilter/vf_extractplanes.c @@ -376,7 +376,6 @@ static const AVFilterPad extractplanes_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; const AVFilter ff_vf_extractplanes = { @@ -387,7 +386,7 @@ const AVFilter ff_vf_extractplanes = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = extractplanes_inputs, + FILTER_INPUTS(extractplanes_inputs), .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; @@ -411,7 +410,7 @@ const AVFilter ff_vf_alphaextract = { .init = init_alphaextract, .uninit = uninit, .query_formats = query_formats, - .inputs = extractplanes_inputs, + FILTER_INPUTS(extractplanes_inputs), .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c index 05ab762ec8..d212c983c5 100644 --- a/libavfilter/vf_fade.c +++ b/libavfilter/vf_fade.c @@ -555,7 +555,6 @@ static const AVFilterPad avfilter_vf_fade_inputs[] = { .filter_frame = filter_frame, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad avfilter_vf_fade_outputs[] = { @@ -563,7 +562,6 @@ static const AVFilterPad avfilter_vf_fade_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_fade = { @@ -573,8 +571,8 @@ const AVFilter ff_vf_fade = { .priv_size = sizeof(FadeContext), .priv_class = &fade_class, .query_formats = query_formats, - .inputs = avfilter_vf_fade_inputs, - .outputs = avfilter_vf_fade_outputs, + FILTER_INPUTS(avfilter_vf_fade_inputs), + FILTER_OUTPUTS(avfilter_vf_fade_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_fftdnoiz.c b/libavfilter/vf_fftdnoiz.c index eeb3dd9572..110674d5a1 100644 --- a/libavfilter/vf_fftdnoiz.c +++ b/libavfilter/vf_fftdnoiz.c @@ -669,7 +669,6 @@ static const AVFilterPad fftdnoiz_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad fftdnoiz_outputs[] = { @@ -678,7 +677,6 @@ static const AVFilterPad fftdnoiz_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_fftdnoiz = { @@ -688,8 +686,8 @@ const AVFilter ff_vf_fftdnoiz = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = fftdnoiz_inputs, - .outputs = fftdnoiz_outputs, + FILTER_INPUTS(fftdnoiz_inputs), + FILTER_OUTPUTS(fftdnoiz_outputs), .priv_class = &fftdnoiz_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c index 541e780ce1..b1b657596d 100644 --- a/libavfilter/vf_fftfilt.c +++ b/libavfilter/vf_fftfilt.c @@ -414,7 +414,6 @@ static const AVFilterPad fftfilt_inputs[] = { .config_props = config_props, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad fftfilt_outputs[] = { @@ -422,7 +421,6 @@ static const AVFilterPad fftfilt_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_fftfilt = { @@ -430,8 +428,8 @@ const AVFilter ff_vf_fftfilt = { .description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to pixels in frequency domain."), .priv_size = sizeof(FFTFILTContext), .priv_class = &fftfilt_class, - .inputs = fftfilt_inputs, - .outputs = fftfilt_outputs, + FILTER_INPUTS(fftfilt_inputs), + FILTER_OUTPUTS(fftfilt_outputs), .query_formats = query_formats, .init = initialize, .uninit = uninit, diff --git a/libavfilter/vf_field.c b/libavfilter/vf_field.c index 555e615d2e..8d06ffe663 100644 --- a/libavfilter/vf_field.c +++ b/libavfilter/vf_field.c @@ -89,7 +89,6 @@ static const AVFilterPad field_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad field_outputs[] = { @@ -98,14 +97,13 @@ static const AVFilterPad field_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props_output, }, - { NULL } }; const AVFilter ff_vf_field = { .name = "field", .description = NULL_IF_CONFIG_SMALL("Extract a field from the input video."), .priv_size = sizeof(FieldContext), - .inputs = field_inputs, - .outputs = field_outputs, + FILTER_INPUTS(field_inputs), + FILTER_OUTPUTS(field_outputs), .priv_class = &field_class, }; diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c index a6c0237f02..c6c2a8eebe 100644 --- a/libavfilter/vf_fieldhint.c +++ b/libavfilter/vf_fieldhint.c @@ -284,7 +284,6 @@ static const AVFilterPad inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -293,7 +292,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_fieldhint = { @@ -304,6 +302,6 @@ const AVFilter ff_vf_fieldhint = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c index 9626737b40..cd62ee5611 100644 --- a/libavfilter/vf_fieldmatch.c +++ b/libavfilter/vf_fieldmatch.c @@ -1037,7 +1037,6 @@ static const AVFilterPad fieldmatch_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_fieldmatch = { @@ -1049,7 +1048,7 @@ const AVFilter ff_vf_fieldmatch = { .activate = activate, .uninit = fieldmatch_uninit, .inputs = NULL, - .outputs = fieldmatch_outputs, + FILTER_OUTPUTS(fieldmatch_outputs), .priv_class = &fieldmatch_class, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index eefa417fb3..c045d1634d 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -173,7 +173,6 @@ static const AVFilterPad avfilter_vf_fieldorder_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_fieldorder_outputs[] = { @@ -181,7 +180,6 @@ static const AVFilterPad avfilter_vf_fieldorder_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_fieldorder = { @@ -190,7 +188,7 @@ const AVFilter ff_vf_fieldorder = { .priv_size = sizeof(FieldOrderContext), .priv_class = &fieldorder_class, .query_formats = query_formats, - .inputs = avfilter_vf_fieldorder_inputs, - .outputs = avfilter_vf_fieldorder_outputs, + FILTER_INPUTS(avfilter_vf_fieldorder_inputs), + FILTER_OUTPUTS(avfilter_vf_fieldorder_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_fillborders.c b/libavfilter/vf_fillborders.c index 8ceac44c76..ed671a067d 100644 --- a/libavfilter/vf_fillborders.c +++ b/libavfilter/vf_fillborders.c @@ -709,7 +709,6 @@ static const AVFilterPad fillborders_inputs[] = { .filter_frame = filter_frame, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad fillborders_outputs[] = { @@ -717,7 +716,6 @@ static const AVFilterPad fillborders_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_fillborders = { @@ -726,8 +724,8 @@ const AVFilter ff_vf_fillborders = { .priv_size = sizeof(FillBordersContext), .priv_class = &fillborders_class, .query_formats = query_formats, - .inputs = fillborders_inputs, - .outputs = fillborders_outputs, + FILTER_INPUTS(fillborders_inputs), + FILTER_OUTPUTS(fillborders_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c index c0c210d9ef..5425a352ba 100644 --- a/libavfilter/vf_find_rect.c +++ b/libavfilter/vf_find_rect.c @@ -292,7 +292,6 @@ static const AVFilterPad foc_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad foc_outputs[] = { @@ -300,7 +299,6 @@ static const AVFilterPad foc_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_find_rect = { @@ -310,7 +308,7 @@ const AVFilter ff_vf_find_rect = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = foc_inputs, - .outputs = foc_outputs, + FILTER_INPUTS(foc_inputs), + FILTER_OUTPUTS(foc_outputs), .priv_class = &find_rect_class, }; diff --git a/libavfilter/vf_floodfill.c b/libavfilter/vf_floodfill.c index 28045f1c2e..21741cdb4f 100644 --- a/libavfilter/vf_floodfill.c +++ b/libavfilter/vf_floodfill.c @@ -385,7 +385,6 @@ static const AVFilterPad floodfill_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad floodfill_outputs[] = { @@ -393,7 +392,6 @@ static const AVFilterPad floodfill_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(FloodfillContext, x) @@ -422,7 +420,7 @@ const AVFilter ff_vf_floodfill = { .priv_class = &floodfill_class, .query_formats = query_formats, .uninit = uninit, - .inputs = floodfill_inputs, - .outputs = floodfill_outputs, + FILTER_INPUTS(floodfill_inputs), + FILTER_OUTPUTS(floodfill_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index 6c5475b84a..cdac5f3d03 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -151,7 +151,6 @@ static const AVFilterPad avfilter_vf_format_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .get_video_buffer = ff_null_get_video_buffer, }, - { NULL } }; static const AVFilterPad avfilter_vf_format_outputs[] = { @@ -159,7 +158,6 @@ static const AVFilterPad avfilter_vf_format_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO }, - { NULL } }; const AVFilter ff_vf_format = { @@ -174,8 +172,8 @@ const AVFilter ff_vf_format = { .priv_size = sizeof(FormatContext), .priv_class = &format_class, - .inputs = avfilter_vf_format_inputs, - .outputs = avfilter_vf_format_outputs, + FILTER_INPUTS(avfilter_vf_format_inputs), + FILTER_OUTPUTS(avfilter_vf_format_outputs), }; #endif /* CONFIG_FORMAT_FILTER */ @@ -190,7 +188,6 @@ static const AVFilterPad avfilter_vf_noformat_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .get_video_buffer = ff_null_get_video_buffer, }, - { NULL } }; static const AVFilterPad avfilter_vf_noformat_outputs[] = { @@ -198,7 +195,6 @@ static const AVFilterPad avfilter_vf_noformat_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO }, - { NULL } }; const AVFilter ff_vf_noformat = { @@ -213,7 +209,7 @@ const AVFilter ff_vf_noformat = { .priv_size = sizeof(FormatContext), .priv_class = &noformat_class, - .inputs = avfilter_vf_noformat_inputs, - .outputs = avfilter_vf_noformat_outputs, + FILTER_INPUTS(avfilter_vf_noformat_inputs), + FILTER_OUTPUTS(avfilter_vf_noformat_outputs), }; #endif /* CONFIG_NOFORMAT_FILTER */ diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index fbc845da1b..b8714727fa 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -370,7 +370,6 @@ static const AVFilterPad avfilter_vf_fps_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad avfilter_vf_fps_outputs[] = { @@ -379,7 +378,6 @@ static const AVFilterPad avfilter_vf_fps_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vf_fps = { @@ -390,6 +388,6 @@ const AVFilter ff_vf_fps = { .priv_size = sizeof(FPSContext), .priv_class = &fps_class, .activate = activate, - .inputs = avfilter_vf_fps_inputs, - .outputs = avfilter_vf_fps_outputs, + FILTER_INPUTS(avfilter_vf_fps_inputs), + FILTER_OUTPUTS(avfilter_vf_fps_outputs), }; diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index 2bf6ed538a..73c973036a 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -454,7 +454,6 @@ static const AVFilterPad framepack_inputs[] = { .name = "right", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad framepack_outputs[] = { @@ -463,7 +462,6 @@ static const AVFilterPad framepack_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_framepack = { @@ -472,8 +470,8 @@ const AVFilter ff_vf_framepack = { .priv_size = sizeof(FramepackContext), .priv_class = &framepack_class, .query_formats = query_formats, - .inputs = framepack_inputs, - .outputs = framepack_outputs, + FILTER_INPUTS(framepack_inputs), + FILTER_OUTPUTS(framepack_outputs), .activate = activate, .uninit = framepack_uninit, }; diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c index e8f6b5b8c5..597f9a0f9f 100644 --- a/libavfilter/vf_framerate.c +++ b/libavfilter/vf_framerate.c @@ -426,7 +426,6 @@ static const AVFilterPad framerate_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad framerate_outputs[] = { @@ -435,7 +434,6 @@ static const AVFilterPad framerate_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_framerate = { @@ -446,8 +444,8 @@ const AVFilter ff_vf_framerate = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = framerate_inputs, - .outputs = framerate_outputs, + FILTER_INPUTS(framerate_inputs), + FILTER_OUTPUTS(framerate_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, .activate = activate, }; diff --git a/libavfilter/vf_framestep.c b/libavfilter/vf_framestep.c index d61ce0dc56..5509df53e9 100644 --- a/libavfilter/vf_framestep.c +++ b/libavfilter/vf_framestep.c @@ -77,7 +77,6 @@ static const AVFilterPad framestep_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad framestep_outputs[] = { @@ -86,7 +85,6 @@ static const AVFilterPad framestep_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output_props, }, - { NULL } }; const AVFilter ff_vf_framestep = { @@ -94,7 +92,7 @@ const AVFilter ff_vf_framestep = { .description = NULL_IF_CONFIG_SMALL("Select one frame every N frames."), .priv_size = sizeof(FrameStepContext), .priv_class = &framestep_class, - .inputs = framestep_inputs, - .outputs = framestep_outputs, + FILTER_INPUTS(framestep_inputs), + FILTER_OUTPUTS(framestep_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_freezedetect.c b/libavfilter/vf_freezedetect.c index 39d712d21e..152ffdbe30 100644 --- a/libavfilter/vf_freezedetect.c +++ b/libavfilter/vf_freezedetect.c @@ -207,7 +207,6 @@ static const AVFilterPad freezedetect_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad freezedetect_outputs[] = { @@ -215,7 +214,6 @@ static const AVFilterPad freezedetect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_freezedetect = { @@ -225,7 +223,7 @@ const AVFilter ff_vf_freezedetect = { .priv_class = &freezedetect_class, .uninit = uninit, .query_formats = query_formats, - .inputs = freezedetect_inputs, - .outputs = freezedetect_outputs, + FILTER_INPUTS(freezedetect_inputs), + FILTER_OUTPUTS(freezedetect_outputs), .activate = activate, }; diff --git a/libavfilter/vf_freezeframes.c b/libavfilter/vf_freezeframes.c index e29eb07cec..a272336ff2 100644 --- a/libavfilter/vf_freezeframes.c +++ b/libavfilter/vf_freezeframes.c @@ -142,7 +142,6 @@ static const AVFilterPad freezeframes_inputs[] = { .name = "replace", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL }, }; static const AVFilterPad freezeframes_outputs[] = { @@ -151,7 +150,6 @@ static const AVFilterPad freezeframes_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL }, }; const AVFilter ff_vf_freezeframes = { @@ -159,8 +157,8 @@ const AVFilter ff_vf_freezeframes = { .description = NULL_IF_CONFIG_SMALL("Freeze video frames."), .priv_size = sizeof(FreezeFramesContext), .priv_class = &freezeframes_class, - .inputs = freezeframes_inputs, - .outputs = freezeframes_outputs, + FILTER_INPUTS(freezeframes_inputs), + FILTER_OUTPUTS(freezeframes_outputs), .activate = activate, .uninit = uninit, }; diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 00e5ff2444..65191e1932 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -402,7 +402,6 @@ static const AVFilterPad avfilter_vf_frei0r_inputs[] = { .config_props = config_input_props, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_frei0r_outputs[] = { @@ -410,7 +409,6 @@ static const AVFilterPad avfilter_vf_frei0r_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_frei0r = { @@ -421,8 +419,8 @@ const AVFilter ff_vf_frei0r = { .uninit = uninit, .priv_size = sizeof(Frei0rContext), .priv_class = &frei0r_class, - .inputs = avfilter_vf_frei0r_inputs, - .outputs = avfilter_vf_frei0r_outputs, + FILTER_INPUTS(avfilter_vf_frei0r_inputs), + FILTER_OUTPUTS(avfilter_vf_frei0r_outputs), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; @@ -498,7 +496,6 @@ static const AVFilterPad avfilter_vsrc_frei0r_src_outputs[] = { .request_frame = source_request_frame, .config_props = source_config_props }, - { NULL } }; const AVFilter ff_vsrc_frei0r_src = { @@ -510,5 +507,5 @@ const AVFilter ff_vsrc_frei0r_src = { .uninit = uninit, .query_formats = query_formats, .inputs = NULL, - .outputs = avfilter_vsrc_frei0r_src_outputs, + FILTER_OUTPUTS(avfilter_vsrc_frei0r_src_outputs), }; diff --git a/libavfilter/vf_fspp.c b/libavfilter/vf_fspp.c index 88b13d638f..238dbcb429 100644 --- a/libavfilter/vf_fspp.c +++ b/libavfilter/vf_fspp.c @@ -653,7 +653,6 @@ static const AVFilterPad fspp_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad fspp_outputs[] = { @@ -661,7 +660,6 @@ static const AVFilterPad fspp_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_fspp = { @@ -670,8 +668,8 @@ const AVFilter ff_vf_fspp = { .priv_size = sizeof(FSPPContext), .uninit = uninit, .query_formats = query_formats, - .inputs = fspp_inputs, - .outputs = fspp_outputs, + FILTER_INPUTS(fspp_inputs), + FILTER_OUTPUTS(fspp_outputs), .priv_class = &fspp_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c index 1def5b049b..1167056bb5 100644 --- a/libavfilter/vf_gblur.c +++ b/libavfilter/vf_gblur.c @@ -382,7 +382,6 @@ static const AVFilterPad gblur_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad gblur_outputs[] = { @@ -390,7 +389,6 @@ static const AVFilterPad gblur_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_gblur = { @@ -400,8 +398,8 @@ const AVFilter ff_vf_gblur = { .priv_class = &gblur_class, .uninit = uninit, .query_formats = query_formats, - .inputs = gblur_inputs, - .outputs = gblur_outputs, + FILTER_INPUTS(gblur_inputs), + FILTER_OUTPUTS(gblur_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index 4162476f41..a90db705a1 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -475,7 +475,6 @@ static const AVFilterPad geq_inputs[] = { .config_props = geq_config_props, .filter_frame = geq_filter_frame, }, - { NULL } }; static const AVFilterPad geq_outputs[] = { @@ -483,7 +482,6 @@ static const AVFilterPad geq_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_geq = { @@ -493,8 +491,8 @@ const AVFilter ff_vf_geq = { .init = geq_init, .uninit = geq_uninit, .query_formats = geq_query_formats, - .inputs = geq_inputs, - .outputs = geq_outputs, + FILTER_INPUTS(geq_inputs), + FILTER_OUTPUTS(geq_outputs), .priv_class = &geq_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index f1cf9a3a06..6171e75a28 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -237,7 +237,6 @@ static const AVFilterPad avfilter_vf_gradfun_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_gradfun_outputs[] = { @@ -245,7 +244,6 @@ static const AVFilterPad avfilter_vf_gradfun_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_gradfun = { @@ -256,7 +254,7 @@ const AVFilter ff_vf_gradfun = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_gradfun_inputs, - .outputs = avfilter_vf_gradfun_outputs, + FILTER_INPUTS(avfilter_vf_gradfun_inputs), + FILTER_OUTPUTS(avfilter_vf_gradfun_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c index 3bdde30b58..57c0161022 100644 --- a/libavfilter/vf_guided.c +++ b/libavfilter/vf_guided.c @@ -486,7 +486,6 @@ static const AVFilterPad guided_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_guided = { @@ -499,7 +498,7 @@ const AVFilter ff_vf_guided = { .priv_class = &guided_class, .activate = activate, .inputs = NULL, - .outputs = guided_outputs, + FILTER_OUTPUTS(guided_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index 2a0defda6c..2706ebc822 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -234,7 +234,6 @@ static const AVFilterPad avfilter_vf_hflip_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad avfilter_vf_hflip_outputs[] = { @@ -242,7 +241,6 @@ static const AVFilterPad avfilter_vf_hflip_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_hflip = { @@ -251,7 +249,7 @@ const AVFilter ff_vf_hflip = { .priv_size = sizeof(FlipContext), .priv_class = &hflip_class, .query_formats = query_formats, - .inputs = avfilter_vf_hflip_inputs, - .outputs = avfilter_vf_hflip_outputs, + FILTER_INPUTS(avfilter_vf_hflip_inputs), + FILTER_OUTPUTS(avfilter_vf_hflip_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c index dc17afe30d..d37dc07389 100644 --- a/libavfilter/vf_histeq.c +++ b/libavfilter/vf_histeq.c @@ -256,7 +256,6 @@ static const AVFilterPad histeq_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad histeq_outputs[] = { @@ -264,7 +263,6 @@ static const AVFilterPad histeq_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_histeq = { @@ -273,8 +271,8 @@ const AVFilter ff_vf_histeq = { .priv_size = sizeof(HisteqContext), .init = init, .query_formats = query_formats, - .inputs = histeq_inputs, - .outputs = histeq_outputs, + FILTER_INPUTS(histeq_inputs), + FILTER_OUTPUTS(histeq_outputs), .priv_class = &histeq_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c index bd9408c42d..ff79d2130c 100644 --- a/libavfilter/vf_histogram.c +++ b/libavfilter/vf_histogram.c @@ -488,7 +488,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -497,7 +496,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #if CONFIG_HISTOGRAM_FILTER @@ -507,8 +505,8 @@ const AVFilter ff_vf_histogram = { .description = NULL_IF_CONFIG_SMALL("Compute and draw a histogram."), .priv_size = sizeof(HistogramContext), .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .priv_class = &histogram_class, }; @@ -549,8 +547,8 @@ const AVFilter ff_vf_thistogram = { .description = NULL_IF_CONFIG_SMALL("Compute and draw a temporal histogram."), .priv_size = sizeof(HistogramContext), .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .uninit = uninit, .priv_class = &thistogram_class, }; diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 99c43593cd..b40abbdbda 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -383,7 +383,6 @@ static const AVFilterPad avfilter_vf_hqdn3d_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; @@ -392,7 +391,6 @@ static const AVFilterPad avfilter_vf_hqdn3d_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO }, - { NULL } }; const AVFilter ff_vf_hqdn3d = { @@ -403,8 +401,8 @@ const AVFilter ff_vf_hqdn3d = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_hqdn3d_inputs, - .outputs = avfilter_vf_hqdn3d_outputs, + FILTER_INPUTS(avfilter_vf_hqdn3d_inputs), + FILTER_OUTPUTS(avfilter_vf_hqdn3d_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_hqx.c b/libavfilter/vf_hqx.c index b6c3893b66..ca9eb8f7ef 100644 --- a/libavfilter/vf_hqx.c +++ b/libavfilter/vf_hqx.c @@ -538,7 +538,6 @@ static const AVFilterPad hqx_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad hqx_outputs[] = { @@ -547,7 +546,6 @@ static const AVFilterPad hqx_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_hqx = { @@ -556,8 +554,8 @@ const AVFilter ff_vf_hqx = { .priv_size = sizeof(HQXContext), .init = init, .query_formats = query_formats, - .inputs = hqx_inputs, - .outputs = hqx_outputs, + FILTER_INPUTS(hqx_inputs), + FILTER_OUTPUTS(hqx_outputs), .priv_class = &hqx_class, .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c index 3df27d985c..c35722eb4b 100644 --- a/libavfilter/vf_hue.c +++ b/libavfilter/vf_hue.c @@ -502,7 +502,6 @@ static const AVFilterPad hue_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad hue_outputs[] = { @@ -510,7 +509,6 @@ static const AVFilterPad hue_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_hue = { @@ -521,8 +519,8 @@ const AVFilter ff_vf_hue = { .uninit = uninit, .query_formats = query_formats, .process_command = process_command, - .inputs = hue_inputs, - .outputs = hue_outputs, + FILTER_INPUTS(hue_inputs), + FILTER_OUTPUTS(hue_outputs), .priv_class = &hue_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c index 4a8fed0688..f00f105f84 100644 --- a/libavfilter/vf_hwdownload.c +++ b/libavfilter/vf_hwdownload.c @@ -180,7 +180,6 @@ static const AVFilterPad hwdownload_inputs[] = { .config_props = hwdownload_config_input, .filter_frame = hwdownload_filter_frame, }, - { NULL } }; static const AVFilterPad hwdownload_outputs[] = { @@ -189,7 +188,6 @@ static const AVFilterPad hwdownload_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = hwdownload_config_output, }, - { NULL } }; const AVFilter ff_vf_hwdownload = { @@ -199,7 +197,7 @@ const AVFilter ff_vf_hwdownload = { .query_formats = hwdownload_query_formats, .priv_size = sizeof(HWDownloadContext), .priv_class = &hwdownload_class, - .inputs = hwdownload_inputs, - .outputs = hwdownload_outputs, + FILTER_INPUTS(hwdownload_inputs), + FILTER_OUTPUTS(hwdownload_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index d829b47b44..f9eb8f241d 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -407,7 +407,6 @@ static const AVFilterPad hwmap_inputs[] = { .get_video_buffer = hwmap_get_buffer, .filter_frame = hwmap_filter_frame, }, - { NULL } }; static const AVFilterPad hwmap_outputs[] = { @@ -416,7 +415,6 @@ static const AVFilterPad hwmap_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = hwmap_config_output, }, - { NULL } }; const AVFilter ff_vf_hwmap = { @@ -426,7 +424,7 @@ const AVFilter ff_vf_hwmap = { .priv_size = sizeof(HWMapContext), .priv_class = &hwmap_class, .query_formats = hwmap_query_formats, - .inputs = hwmap_inputs, - .outputs = hwmap_outputs, + FILTER_INPUTS(hwmap_inputs), + FILTER_OUTPUTS(hwmap_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_hwupload.c b/libavfilter/vf_hwupload.c index 8263829a39..4cbc621af3 100644 --- a/libavfilter/vf_hwupload.c +++ b/libavfilter/vf_hwupload.c @@ -238,7 +238,6 @@ static const AVFilterPad hwupload_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = hwupload_filter_frame, }, - { NULL } }; static const AVFilterPad hwupload_outputs[] = { @@ -247,7 +246,6 @@ static const AVFilterPad hwupload_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = hwupload_config_output, }, - { NULL } }; const AVFilter ff_vf_hwupload = { @@ -257,7 +255,7 @@ const AVFilter ff_vf_hwupload = { .query_formats = hwupload_query_formats, .priv_size = sizeof(HWUploadContext), .priv_class = &hwupload_class, - .inputs = hwupload_inputs, - .outputs = hwupload_outputs, + FILTER_INPUTS(hwupload_inputs), + FILTER_OUTPUTS(hwupload_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_hwupload_cuda.c b/libavfilter/vf_hwupload_cuda.c index 138949a5ed..31c1cdbddb 100644 --- a/libavfilter/vf_hwupload_cuda.c +++ b/libavfilter/vf_hwupload_cuda.c @@ -171,7 +171,6 @@ static const AVFilterPad cudaupload_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = cudaupload_filter_frame, }, - { NULL } }; static const AVFilterPad cudaupload_outputs[] = { @@ -180,7 +179,6 @@ static const AVFilterPad cudaupload_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = cudaupload_config_output, }, - { NULL } }; const AVFilter ff_vf_hwupload_cuda = { @@ -195,8 +193,8 @@ const AVFilter ff_vf_hwupload_cuda = { .priv_size = sizeof(CudaUploadContext), .priv_class = &cudaupload_class, - .inputs = cudaupload_inputs, - .outputs = cudaupload_outputs, + FILTER_INPUTS(cudaupload_inputs), + FILTER_OUTPUTS(cudaupload_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_hysteresis.c b/libavfilter/vf_hysteresis.c index 12025f9eb6..cbbee2691b 100644 --- a/libavfilter/vf_hysteresis.c +++ b/libavfilter/vf_hysteresis.c @@ -362,7 +362,6 @@ static const AVFilterPad hysteresis_inputs[] = { .name = "alt", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad hysteresis_outputs[] = { @@ -371,7 +370,6 @@ static const AVFilterPad hysteresis_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_hysteresis = { @@ -382,8 +380,8 @@ const AVFilter ff_vf_hysteresis = { .uninit = uninit, .query_formats = query_formats, .activate = activate, - .inputs = hysteresis_inputs, - .outputs = hysteresis_outputs, + FILTER_INPUTS(hysteresis_inputs), + FILTER_OUTPUTS(hysteresis_outputs), .priv_class = &hysteresis_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c index f5dcdfc906..8c59d59cd9 100644 --- a/libavfilter/vf_identity.c +++ b/libavfilter/vf_identity.c @@ -389,7 +389,6 @@ static const AVFilterPad identity_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_ref, }, - { NULL } }; static const AVFilterPad identity_outputs[] = { @@ -398,7 +397,6 @@ static const AVFilterPad identity_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; static const AVOption options[] = { @@ -420,8 +418,8 @@ const AVFilter ff_vf_identity = { .activate = activate, .priv_size = sizeof(IdentityContext), .priv_class = &identity_class, - .inputs = identity_inputs, - .outputs = identity_outputs, + FILTER_INPUTS(identity_inputs), + FILTER_OUTPUTS(identity_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; @@ -442,8 +440,8 @@ const AVFilter ff_vf_msad = { .activate = activate, .priv_size = sizeof(IdentityContext), .priv_class = &msad_class, - .inputs = identity_inputs, - .outputs = identity_outputs, + FILTER_INPUTS(identity_inputs), + FILTER_OUTPUTS(identity_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 36ec73df46..e006e72da9 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -425,7 +425,6 @@ static const AVFilterPad idet_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad idet_outputs[] = { @@ -434,7 +433,6 @@ static const AVFilterPad idet_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame }, - { NULL } }; const AVFilter ff_vf_idet = { @@ -444,7 +442,7 @@ const AVFilter ff_vf_idet = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = idet_inputs, - .outputs = idet_outputs, + FILTER_INPUTS(idet_inputs), + FILTER_OUTPUTS(idet_outputs), .priv_class = &idet_class, }; diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c index 9b21f2e7a7..8e829b2f69 100644 --- a/libavfilter/vf_il.c +++ b/libavfilter/vf_il.c @@ -187,7 +187,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -195,7 +194,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_il = { @@ -203,8 +201,8 @@ const AVFilter ff_vf_il = { .description = NULL_IF_CONFIG_SMALL("Deinterleave or interleave fields."), .priv_size = sizeof(IlContext), .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .priv_class = &il_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c index 04c04b7e13..85b426d0b0 100644 --- a/libavfilter/vf_kerndeint.c +++ b/libavfilter/vf_kerndeint.c @@ -292,7 +292,6 @@ static const AVFilterPad kerndeint_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad kerndeint_outputs[] = { @@ -300,7 +299,6 @@ static const AVFilterPad kerndeint_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; @@ -311,6 +309,6 @@ const AVFilter ff_vf_kerndeint = { .priv_class = &kerndeint_class, .uninit = uninit, .query_formats = query_formats, - .inputs = kerndeint_inputs, - .outputs = kerndeint_outputs, + FILTER_INPUTS(kerndeint_inputs), + FILTER_OUTPUTS(kerndeint_outputs), }; diff --git a/libavfilter/vf_lagfun.c b/libavfilter/vf_lagfun.c index 0f4f38e0ed..8c674f9915 100644 --- a/libavfilter/vf_lagfun.c +++ b/libavfilter/vf_lagfun.c @@ -202,7 +202,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -211,7 +210,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; AVFILTER_DEFINE_CLASS(lagfun); @@ -223,8 +221,8 @@ const AVFilter ff_vf_lagfun = { .priv_class = &lagfun_class, .query_formats = query_formats, .uninit = uninit, - .outputs = outputs, - .inputs = inputs, + FILTER_OUTPUTS(outputs), + FILTER_INPUTS(inputs), .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c index 9d89f79101..3964a56b71 100644 --- a/libavfilter/vf_lenscorrection.c +++ b/libavfilter/vf_lenscorrection.c @@ -342,7 +342,6 @@ static const AVFilterPad lenscorrection_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad lenscorrection_outputs[] = { @@ -351,7 +350,6 @@ static const AVFilterPad lenscorrection_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_lenscorrection = { @@ -359,8 +357,8 @@ const AVFilter ff_vf_lenscorrection = { .description = NULL_IF_CONFIG_SMALL("Rectify the image by correcting for lens distortion."), .priv_size = sizeof(LenscorrectionCtx), .query_formats = query_formats, - .inputs = lenscorrection_inputs, - .outputs = lenscorrection_outputs, + FILTER_INPUTS(lenscorrection_inputs), + FILTER_OUTPUTS(lenscorrection_outputs), .priv_class = &lenscorrection_class, .uninit = uninit, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/vf_lensfun.c b/libavfilter/vf_lensfun.c index ffe81b9bc2..8dcfdba3e4 100644 --- a/libavfilter/vf_lensfun.c +++ b/libavfilter/vf_lensfun.c @@ -523,7 +523,6 @@ static const AVFilterPad lensfun_inputs[] = { .config_props = config_props, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad lensfun_outputs[] = { @@ -531,7 +530,6 @@ static const AVFilterPad lensfun_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_lensfun = { @@ -541,8 +539,8 @@ const AVFilter ff_vf_lensfun = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = lensfun_inputs, - .outputs = lensfun_outputs, + FILTER_INPUTS(lensfun_inputs), + FILTER_OUTPUTS(lensfun_outputs), .priv_class = &lensfun_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index 8c65007044..4a5bc06871 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -413,7 +413,6 @@ static const AVFilterPad avfilter_vf_ocv_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_ocv_outputs[] = { @@ -421,7 +420,6 @@ static const AVFilterPad avfilter_vf_ocv_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_ocv = { @@ -432,6 +430,6 @@ const AVFilter ff_vf_ocv = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = avfilter_vf_ocv_inputs, - .outputs = avfilter_vf_ocv_outputs, + FILTER_INPUTS(avfilter_vf_ocv_inputs), + FILTER_OUTPUTS(avfilter_vf_ocv_outputs), }; diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c index fc8a0183be..d3e9f62e33 100644 --- a/libavfilter/vf_libvmaf.c +++ b/libavfilter/vf_libvmaf.c @@ -350,7 +350,6 @@ static const AVFilterPad libvmaf_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_ref, }, - { NULL } }; static const AVFilterPad libvmaf_outputs[] = { @@ -359,7 +358,6 @@ static const AVFilterPad libvmaf_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_libvmaf = { @@ -372,6 +370,6 @@ const AVFilter ff_vf_libvmaf = { .activate = activate, .priv_size = sizeof(LIBVMAFContext), .priv_class = &libvmaf_class, - .inputs = libvmaf_inputs, - .outputs = libvmaf_outputs, + FILTER_INPUTS(libvmaf_inputs), + FILTER_OUTPUTS(libvmaf_outputs), }; diff --git a/libavfilter/vf_limiter.c b/libavfilter/vf_limiter.c index 3bf1b371cf..eb8abad77b 100644 --- a/libavfilter/vf_limiter.c +++ b/libavfilter/vf_limiter.c @@ -246,7 +246,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -254,7 +253,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_limiter = { @@ -264,8 +262,8 @@ const AVFilter ff_vf_limiter = { .priv_class = &limiter_class, .init = init, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_lumakey.c b/libavfilter/vf_lumakey.c index 8b2a102369..8c2a80a13b 100644 --- a/libavfilter/vf_lumakey.c +++ b/libavfilter/vf_lumakey.c @@ -177,7 +177,6 @@ static const AVFilterPad lumakey_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad lumakey_outputs[] = { @@ -185,7 +184,6 @@ static const AVFilterPad lumakey_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(LumakeyContext, x) @@ -206,8 +204,8 @@ const AVFilter ff_vf_lumakey = { .priv_size = sizeof(LumakeyContext), .priv_class = &lumakey_class, .query_formats = query_formats, - .inputs = lumakey_inputs, - .outputs = lumakey_outputs, + FILTER_INPUTS(lumakey_inputs), + FILTER_OUTPUTS(lumakey_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index 78f0955446..43e2b684d8 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -580,13 +580,11 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad outputs[] = { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define DEFINE_LUT_FILTER(name_, description_) \ @@ -598,8 +596,8 @@ static const AVFilterPad outputs[] = { .init = name_##_init, \ .uninit = uninit, \ .query_formats = query_formats, \ - .inputs = inputs, \ - .outputs = outputs, \ + FILTER_INPUTS(inputs), \ + FILTER_OUTPUTS(outputs), \ .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | \ AVFILTER_FLAG_SLICE_THREADS, \ .process_command = process_command, \ diff --git a/libavfilter/vf_lut2.c b/libavfilter/vf_lut2.c index 85669a2e2d..1984d27976 100644 --- a/libavfilter/vf_lut2.c +++ b/libavfilter/vf_lut2.c @@ -533,7 +533,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_inputy, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -542,7 +541,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = lut2_config_output, }, - { NULL } }; static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, @@ -569,8 +567,8 @@ const AVFilter ff_vf_lut2 = { .uninit = uninit, .query_formats = query_formats, .activate = activate, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, @@ -640,7 +638,6 @@ static const AVFilterPad tlut2_inputs[] = { .filter_frame = tlut2_filter_frame, .config_props = config_inputx, }, - { NULL } }; static const AVFilterPad tlut2_outputs[] = { @@ -649,7 +646,6 @@ static const AVFilterPad tlut2_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_tlut2 = { @@ -660,8 +656,8 @@ const AVFilter ff_vf_tlut2 = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = tlut2_inputs, - .outputs = tlut2_outputs, + FILTER_INPUTS(tlut2_inputs), + FILTER_OUTPUTS(tlut2_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c index b81ef46b48..7c1ae8d16c 100644 --- a/libavfilter/vf_lut3d.c +++ b/libavfilter/vf_lut3d.c @@ -1339,7 +1339,6 @@ static const AVFilterPad lut3d_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad lut3d_outputs[] = { @@ -1347,7 +1346,6 @@ static const AVFilterPad lut3d_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_lut3d = { @@ -1357,8 +1355,8 @@ const AVFilter ff_vf_lut3d = { .init = lut3d_init, .uninit = lut3d_uninit, .query_formats = query_formats, - .inputs = lut3d_inputs, - .outputs = lut3d_outputs, + FILTER_INPUTS(lut3d_inputs), + FILTER_OUTPUTS(lut3d_outputs), .priv_class = &lut3d_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, @@ -1605,7 +1603,6 @@ static const AVFilterPad haldclut_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_clut, }, - { NULL } }; static const AVFilterPad haldclut_outputs[] = { @@ -1614,7 +1611,6 @@ static const AVFilterPad haldclut_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_haldclut = { @@ -1626,8 +1622,8 @@ const AVFilter ff_vf_haldclut = { .uninit = haldclut_uninit, .query_formats = query_formats, .activate = activate, - .inputs = haldclut_inputs, - .outputs = haldclut_outputs, + FILTER_INPUTS(haldclut_inputs), + FILTER_OUTPUTS(haldclut_outputs), .priv_class = &haldclut_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, @@ -2271,7 +2267,6 @@ static const AVFilterPad lut1d_inputs[] = { .filter_frame = filter_frame_1d, .config_props = config_input_1d, }, - { NULL } }; static const AVFilterPad lut1d_outputs[] = { @@ -2279,7 +2274,6 @@ static const AVFilterPad lut1d_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_lut1d = { @@ -2288,8 +2282,8 @@ const AVFilter ff_vf_lut1d = { .priv_size = sizeof(LUT1DContext), .init = lut1d_init, .query_formats = query_formats, - .inputs = lut1d_inputs, - .outputs = lut1d_outputs, + FILTER_INPUTS(lut1d_inputs), + FILTER_OUTPUTS(lut1d_outputs), .priv_class = &lut1d_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = lut1d_process_command, diff --git a/libavfilter/vf_maskedclamp.c b/libavfilter/vf_maskedclamp.c index 2cd1ec88c7..e2d908cf74 100644 --- a/libavfilter/vf_maskedclamp.c +++ b/libavfilter/vf_maskedclamp.c @@ -304,7 +304,6 @@ static const AVFilterPad maskedclamp_inputs[] = { .name = "bright", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad maskedclamp_outputs[] = { @@ -313,7 +312,6 @@ static const AVFilterPad maskedclamp_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_maskedclamp = { @@ -323,8 +321,8 @@ const AVFilter ff_vf_maskedclamp = { .uninit = uninit, .activate = activate, .query_formats = query_formats, - .inputs = maskedclamp_inputs, - .outputs = maskedclamp_outputs, + FILTER_INPUTS(maskedclamp_inputs), + FILTER_OUTPUTS(maskedclamp_outputs), .priv_class = &maskedclamp_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, diff --git a/libavfilter/vf_maskedmerge.c b/libavfilter/vf_maskedmerge.c index 6a15a907c5..47e5a16dd3 100644 --- a/libavfilter/vf_maskedmerge.c +++ b/libavfilter/vf_maskedmerge.c @@ -305,7 +305,6 @@ static const AVFilterPad maskedmerge_inputs[] = { .name = "mask", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad maskedmerge_outputs[] = { @@ -314,7 +313,6 @@ static const AVFilterPad maskedmerge_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_maskedmerge = { @@ -324,8 +322,8 @@ const AVFilter ff_vf_maskedmerge = { .uninit = uninit, .query_formats = query_formats, .activate = activate, - .inputs = maskedmerge_inputs, - .outputs = maskedmerge_outputs, + FILTER_INPUTS(maskedmerge_inputs), + FILTER_OUTPUTS(maskedmerge_outputs), .priv_class = &maskedmerge_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, diff --git a/libavfilter/vf_maskedminmax.c b/libavfilter/vf_maskedminmax.c index 6ad5ddb1de..273bc2413a 100644 --- a/libavfilter/vf_maskedminmax.c +++ b/libavfilter/vf_maskedminmax.c @@ -313,7 +313,6 @@ static const AVFilterPad maskedminmax_inputs[] = { .name = "filter2", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad maskedminmax_outputs[] = { @@ -322,7 +321,6 @@ static const AVFilterPad maskedminmax_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #define maskedmin_options maskedminmax_options @@ -337,8 +335,8 @@ const AVFilter ff_vf_maskedmin = { .uninit = uninit, .activate = activate, .query_formats = query_formats, - .inputs = maskedminmax_inputs, - .outputs = maskedminmax_outputs, + FILTER_INPUTS(maskedminmax_inputs), + FILTER_OUTPUTS(maskedminmax_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; @@ -355,8 +353,8 @@ const AVFilter ff_vf_maskedmax = { .uninit = uninit, .activate = activate, .query_formats = query_formats, - .inputs = maskedminmax_inputs, - .outputs = maskedminmax_outputs, + FILTER_INPUTS(maskedminmax_inputs), + FILTER_OUTPUTS(maskedminmax_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_maskedthreshold.c b/libavfilter/vf_maskedthreshold.c index e80d383f9d..5539df0bb7 100644 --- a/libavfilter/vf_maskedthreshold.c +++ b/libavfilter/vf_maskedthreshold.c @@ -270,7 +270,6 @@ static const AVFilterPad maskedthreshold_inputs[] = { .name = "reference", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad maskedthreshold_outputs[] = { @@ -279,7 +278,6 @@ static const AVFilterPad maskedthreshold_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; AVFILTER_DEFINE_CLASS(maskedthreshold); @@ -292,8 +290,8 @@ const AVFilter ff_vf_maskedthreshold = { .uninit = uninit, .activate = activate, .query_formats = query_formats, - .inputs = maskedthreshold_inputs, - .outputs = maskedthreshold_outputs, + FILTER_INPUTS(maskedthreshold_inputs), + FILTER_OUTPUTS(maskedthreshold_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_maskfun.c b/libavfilter/vf_maskfun.c index 70198c66bc..5f842a66ab 100644 --- a/libavfilter/vf_maskfun.c +++ b/libavfilter/vf_maskfun.c @@ -298,7 +298,6 @@ static const AVFilterPad maskfun_inputs[] = { .config_props = config_input, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad maskfun_outputs[] = { @@ -306,7 +305,6 @@ static const AVFilterPad maskfun_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_maskfun = { @@ -315,8 +313,8 @@ const AVFilter ff_vf_maskfun = { .priv_size = sizeof(MaskFunContext), .query_formats = query_formats, .uninit = uninit, - .inputs = maskfun_inputs, - .outputs = maskfun_outputs, + FILTER_INPUTS(maskfun_inputs), + FILTER_OUTPUTS(maskfun_outputs), .priv_class = &maskfun_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c index 034e72a487..88c8b25a6d 100644 --- a/libavfilter/vf_mcdeint.c +++ b/libavfilter/vf_mcdeint.c @@ -290,7 +290,6 @@ static const AVFilterPad mcdeint_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad mcdeint_outputs[] = { @@ -298,7 +297,6 @@ static const AVFilterPad mcdeint_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_mcdeint = { @@ -307,7 +305,7 @@ const AVFilter ff_vf_mcdeint = { .priv_size = sizeof(MCDeintContext), .uninit = uninit, .query_formats = query_formats, - .inputs = mcdeint_inputs, - .outputs = mcdeint_outputs, + FILTER_INPUTS(mcdeint_inputs), + FILTER_OUTPUTS(mcdeint_outputs), .priv_class = &mcdeint_class, }; diff --git a/libavfilter/vf_median.c b/libavfilter/vf_median.c index e02629a5ca..03a4986cf4 100644 --- a/libavfilter/vf_median.c +++ b/libavfilter/vf_median.c @@ -273,7 +273,6 @@ static const AVFilterPad median_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad median_outputs[] = { @@ -281,7 +280,6 @@ static const AVFilterPad median_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_median = { @@ -291,8 +289,8 @@ const AVFilter ff_vf_median = { .priv_class = &median_class, .uninit = uninit, .query_formats = query_formats, - .inputs = median_inputs, - .outputs = median_outputs, + FILTER_INPUTS(median_inputs), + FILTER_OUTPUTS(median_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_mergeplanes.c b/libavfilter/vf_mergeplanes.c index 30888f62af..d3f7a32d7d 100644 --- a/libavfilter/vf_mergeplanes.c +++ b/libavfilter/vf_mergeplanes.c @@ -293,7 +293,6 @@ static const AVFilterPad mergeplanes_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_mergeplanes = { @@ -306,6 +305,6 @@ const AVFilter ff_vf_mergeplanes = { .query_formats = query_formats, .activate = activate, .inputs = NULL, - .outputs = mergeplanes_outputs, + FILTER_OUTPUTS(mergeplanes_outputs), .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_mestimate.c b/libavfilter/vf_mestimate.c index 1b65c738d5..582da48568 100644 --- a/libavfilter/vf_mestimate.c +++ b/libavfilter/vf_mestimate.c @@ -353,7 +353,6 @@ static const AVFilterPad mestimate_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad mestimate_outputs[] = { @@ -361,7 +360,6 @@ static const AVFilterPad mestimate_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_mestimate = { @@ -371,6 +369,6 @@ const AVFilter ff_vf_mestimate = { .priv_class = &mestimate_class, .uninit = uninit, .query_formats = query_formats, - .inputs = mestimate_inputs, - .outputs = mestimate_outputs, + FILTER_INPUTS(mestimate_inputs), + FILTER_OUTPUTS(mestimate_outputs), }; diff --git a/libavfilter/vf_midequalizer.c b/libavfilter/vf_midequalizer.c index ec1ffe5539..0e87723609 100644 --- a/libavfilter/vf_midequalizer.c +++ b/libavfilter/vf_midequalizer.c @@ -363,7 +363,6 @@ static const AVFilterPad midequalizer_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input1, }, - { NULL } }; static const AVFilterPad midequalizer_outputs[] = { @@ -372,7 +371,6 @@ static const AVFilterPad midequalizer_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_midequalizer = { @@ -382,8 +380,8 @@ const AVFilter ff_vf_midequalizer = { .uninit = uninit, .query_formats = query_formats, .activate = activate, - .inputs = midequalizer_inputs, - .outputs = midequalizer_outputs, + FILTER_INPUTS(midequalizer_inputs), + FILTER_OUTPUTS(midequalizer_outputs), .priv_class = &midequalizer_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c index 4b58eb00d8..33a4059042 100644 --- a/libavfilter/vf_minterpolate.c +++ b/libavfilter/vf_minterpolate.c @@ -1242,7 +1242,6 @@ static const AVFilterPad minterpolate_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad minterpolate_outputs[] = { @@ -1251,7 +1250,6 @@ static const AVFilterPad minterpolate_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_minterpolate = { @@ -1261,6 +1259,6 @@ const AVFilter ff_vf_minterpolate = { .priv_class = &minterpolate_class, .uninit = uninit, .query_formats = query_formats, - .inputs = minterpolate_inputs, - .outputs = minterpolate_outputs, + FILTER_INPUTS(minterpolate_inputs), + FILTER_OUTPUTS(minterpolate_outputs), }; diff --git a/libavfilter/vf_misc_vaapi.c b/libavfilter/vf_misc_vaapi.c index ca0d46ff19..83aedcdc31 100644 --- a/libavfilter/vf_misc_vaapi.c +++ b/libavfilter/vf_misc_vaapi.c @@ -222,7 +222,6 @@ static const AVFilterPad misc_vaapi_inputs[] = { .filter_frame = &misc_vaapi_filter_frame, .config_props = &ff_vaapi_vpp_config_input, }, - { NULL } }; static const AVFilterPad misc_vaapi_outputs[] = { @@ -231,7 +230,6 @@ static const AVFilterPad misc_vaapi_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_vaapi_vpp_config_output, }, - { NULL } }; const AVFilter ff_vf_denoise_vaapi = { @@ -241,8 +239,8 @@ const AVFilter ff_vf_denoise_vaapi = { .init = &denoise_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, .query_formats = &ff_vaapi_vpp_query_formats, - .inputs = misc_vaapi_inputs, - .outputs = misc_vaapi_outputs, + FILTER_INPUTS(misc_vaapi_inputs), + FILTER_OUTPUTS(misc_vaapi_outputs), .priv_class = &denoise_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -254,8 +252,8 @@ const AVFilter ff_vf_sharpness_vaapi = { .init = &sharpness_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, .query_formats = &ff_vaapi_vpp_query_formats, - .inputs = misc_vaapi_inputs, - .outputs = misc_vaapi_outputs, + FILTER_INPUTS(misc_vaapi_inputs), + FILTER_OUTPUTS(misc_vaapi_outputs), .priv_class = &sharpness_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c index 0ca60d5522..5af14cca12 100644 --- a/libavfilter/vf_mix.c +++ b/libavfilter/vf_mix.c @@ -352,7 +352,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #if CONFIG_MIX_FILTER @@ -364,7 +363,7 @@ const AVFilter ff_vf_mix = { .priv_size = sizeof(MixContext), .priv_class = &mix_class, .query_formats = query_formats, - .outputs = outputs, + FILTER_OUTPUTS(outputs), .init = init, .uninit = uninit, .activate = activate, @@ -430,7 +429,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = tmix_filter_frame, }, - { NULL } }; AVFILTER_DEFINE_CLASS(tmix); @@ -441,8 +439,8 @@ const AVFilter ff_vf_tmix = { .priv_size = sizeof(MixContext), .priv_class = &tmix_class, .query_formats = query_formats, - .outputs = outputs, - .inputs = inputs, + FILTER_OUTPUTS(outputs), + FILTER_INPUTS(inputs), .init = init, .uninit = uninit, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/vf_monochrome.c b/libavfilter/vf_monochrome.c index 870811d4d4..46c3ec2be2 100644 --- a/libavfilter/vf_monochrome.c +++ b/libavfilter/vf_monochrome.c @@ -271,7 +271,6 @@ static const AVFilterPad monochrome_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad monochrome_outputs[] = { @@ -279,7 +278,6 @@ static const AVFilterPad monochrome_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(MonochromeContext, x) @@ -301,8 +299,8 @@ const AVFilter ff_vf_monochrome = { .priv_size = sizeof(MonochromeContext), .priv_class = &monochrome_class, .query_formats = query_formats, - .inputs = monochrome_inputs, - .outputs = monochrome_outputs, + FILTER_INPUTS(monochrome_inputs), + FILTER_OUTPUTS(monochrome_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_mpdecimate.c b/libavfilter/vf_mpdecimate.c index 301475906e..8d515396f3 100644 --- a/libavfilter/vf_mpdecimate.c +++ b/libavfilter/vf_mpdecimate.c @@ -228,7 +228,6 @@ static const AVFilterPad mpdecimate_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad mpdecimate_outputs[] = { @@ -236,7 +235,6 @@ static const AVFilterPad mpdecimate_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_mpdecimate = { @@ -247,6 +245,6 @@ const AVFilter ff_vf_mpdecimate = { .priv_size = sizeof(DecimateContext), .priv_class = &mpdecimate_class, .query_formats = query_formats, - .inputs = mpdecimate_inputs, - .outputs = mpdecimate_outputs, + FILTER_INPUTS(mpdecimate_inputs), + FILTER_OUTPUTS(mpdecimate_outputs), }; diff --git a/libavfilter/vf_neighbor.c b/libavfilter/vf_neighbor.c index ea6449830c..acc027e2b0 100644 --- a/libavfilter/vf_neighbor.c +++ b/libavfilter/vf_neighbor.c @@ -341,7 +341,6 @@ static const AVFilterPad neighbor_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad neighbor_outputs[] = { @@ -349,7 +348,6 @@ static const AVFilterPad neighbor_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(NContext, x) @@ -364,8 +362,8 @@ const AVFilter ff_vf_##name_ = { \ .priv_size = sizeof(NContext), \ .priv_class = &name_##_class, \ .query_formats = query_formats, \ - .inputs = neighbor_inputs, \ - .outputs = neighbor_outputs, \ + FILTER_INPUTS(neighbor_inputs), \ + FILTER_OUTPUTS(neighbor_outputs), \ .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC| \ AVFILTER_FLAG_SLICE_THREADS, \ .process_command = ff_filter_process_command, \ diff --git a/libavfilter/vf_neighbor_opencl.c b/libavfilter/vf_neighbor_opencl.c index e00245089d..68becfe143 100644 --- a/libavfilter/vf_neighbor_opencl.c +++ b/libavfilter/vf_neighbor_opencl.c @@ -245,7 +245,6 @@ static const AVFilterPad neighbor_opencl_inputs[] = { .filter_frame = &neighbor_opencl_filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad neighbor_opencl_outputs[] = { @@ -254,7 +253,6 @@ static const AVFilterPad neighbor_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_output, }, - { NULL } }; #define OFFSET(x) offsetof(NeighborOpenCLContext, x) @@ -281,8 +279,8 @@ const AVFilter ff_vf_erosion_opencl = { .init = &ff_opencl_filter_init, .uninit = &neighbor_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = neighbor_opencl_inputs, - .outputs = neighbor_opencl_outputs, + FILTER_INPUTS(neighbor_opencl_inputs), + FILTER_OUTPUTS(neighbor_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -309,8 +307,8 @@ const AVFilter ff_vf_dilation_opencl = { .init = &ff_opencl_filter_init, .uninit = &neighbor_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = neighbor_opencl_inputs, - .outputs = neighbor_opencl_outputs, + FILTER_INPUTS(neighbor_opencl_inputs), + FILTER_OUTPUTS(neighbor_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c index 95cdad780e..819073aa80 100644 --- a/libavfilter/vf_nlmeans.c +++ b/libavfilter/vf_nlmeans.c @@ -563,7 +563,6 @@ static const AVFilterPad nlmeans_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad nlmeans_outputs[] = { @@ -571,7 +570,6 @@ static const AVFilterPad nlmeans_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_nlmeans = { @@ -581,8 +579,8 @@ const AVFilter ff_vf_nlmeans = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = nlmeans_inputs, - .outputs = nlmeans_outputs, + FILTER_INPUTS(nlmeans_inputs), + FILTER_OUTPUTS(nlmeans_outputs), .priv_class = &nlmeans_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_nlmeans_opencl.c b/libavfilter/vf_nlmeans_opencl.c index 0f16b2fe49..6e28f4be7a 100644 --- a/libavfilter/vf_nlmeans_opencl.c +++ b/libavfilter/vf_nlmeans_opencl.c @@ -417,7 +417,6 @@ static const AVFilterPad nlmeans_opencl_inputs[] = { .filter_frame = &nlmeans_opencl_filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad nlmeans_opencl_outputs[] = { @@ -426,7 +425,6 @@ static const AVFilterPad nlmeans_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_output, }, - { NULL } }; const AVFilter ff_vf_nlmeans_opencl = { @@ -437,7 +435,7 @@ const AVFilter ff_vf_nlmeans_opencl = { .init = &ff_opencl_filter_init, .uninit = &nlmeans_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = nlmeans_opencl_inputs, - .outputs = nlmeans_opencl_outputs, + FILTER_INPUTS(nlmeans_opencl_inputs), + FILTER_OUTPUTS(nlmeans_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c index cffb23d37c..806f67d9b3 100644 --- a/libavfilter/vf_nnedi.c +++ b/libavfilter/vf_nnedi.c @@ -1140,7 +1140,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1150,7 +1149,6 @@ static const AVFilterPad outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_nnedi = { @@ -1161,8 +1159,8 @@ const AVFilter ff_vf_nnedi = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c index 73e88063e9..e0afd28793 100644 --- a/libavfilter/vf_noise.c +++ b/libavfilter/vf_noise.c @@ -326,7 +326,6 @@ static const AVFilterPad noise_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad noise_outputs[] = { @@ -334,7 +333,6 @@ static const AVFilterPad noise_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_noise = { @@ -344,8 +342,8 @@ const AVFilter ff_vf_noise = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = noise_inputs, - .outputs = noise_outputs, + FILTER_INPUTS(noise_inputs), + FILTER_OUTPUTS(noise_outputs), .priv_class = &noise_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_normalize.c b/libavfilter/vf_normalize.c index a9474056af..26f8e2f426 100644 --- a/libavfilter/vf_normalize.c +++ b/libavfilter/vf_normalize.c @@ -516,7 +516,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -524,7 +523,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_normalize = { @@ -534,8 +532,8 @@ const AVFilter ff_vf_normalize = { .priv_class = &normalize_class, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_null.c b/libavfilter/vf_null.c index 1f0e85e900..33b1185ce0 100644 --- a/libavfilter/vf_null.c +++ b/libavfilter/vf_null.c @@ -31,7 +31,6 @@ static const AVFilterPad avfilter_vf_null_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad avfilter_vf_null_outputs[] = { @@ -39,12 +38,11 @@ static const AVFilterPad avfilter_vf_null_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_null = { .name = "null", .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), - .inputs = avfilter_vf_null_inputs, - .outputs = avfilter_vf_null_outputs, + FILTER_INPUTS(avfilter_vf_null_inputs), + FILTER_OUTPUTS(avfilter_vf_null_outputs), }; diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c index d33e7222ef..7691f41932 100644 --- a/libavfilter/vf_ocr.c +++ b/libavfilter/vf_ocr.c @@ -132,7 +132,6 @@ static const AVFilterPad ocr_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad ocr_outputs[] = { @@ -140,7 +139,6 @@ static const AVFilterPad ocr_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_ocr = { @@ -151,6 +149,6 @@ const AVFilter ff_vf_ocr = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = ocr_inputs, - .outputs = ocr_outputs, + FILTER_INPUTS(ocr_inputs), + FILTER_OUTPUTS(ocr_outputs), }; diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index 8fec1f554c..f723ebe0e8 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -1094,7 +1094,6 @@ static const AVFilterPad avfilter_vf_overlay_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_overlay, }, - { NULL } }; static const AVFilterPad avfilter_vf_overlay_outputs[] = { @@ -1103,7 +1102,6 @@ static const AVFilterPad avfilter_vf_overlay_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_overlay = { @@ -1117,8 +1115,8 @@ const AVFilter ff_vf_overlay = { .query_formats = query_formats, .activate = activate, .process_command = process_command, - .inputs = avfilter_vf_overlay_inputs, - .outputs = avfilter_vf_overlay_outputs, + FILTER_INPUTS(avfilter_vf_overlay_inputs), + FILTER_OUTPUTS(avfilter_vf_overlay_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_overlay_cuda.c b/libavfilter/vf_overlay_cuda.c index 5bab678b0f..4c0719871b 100644 --- a/libavfilter/vf_overlay_cuda.c +++ b/libavfilter/vf_overlay_cuda.c @@ -565,7 +565,6 @@ static const AVFilterPad overlay_cuda_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_overlay, }, - { NULL } }; static const AVFilterPad overlay_cuda_outputs[] = { @@ -574,7 +573,6 @@ static const AVFilterPad overlay_cuda_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &overlay_cuda_config_output, }, - { NULL } }; const AVFilter ff_vf_overlay_cuda = { @@ -586,8 +584,8 @@ const AVFilter ff_vf_overlay_cuda = { .uninit = &overlay_cuda_uninit, .activate = &overlay_cuda_activate, .query_formats = &overlay_cuda_query_formats, - .inputs = overlay_cuda_inputs, - .outputs = overlay_cuda_outputs, + FILTER_INPUTS(overlay_cuda_inputs), + FILTER_OUTPUTS(overlay_cuda_outputs), .preinit = overlay_cuda_framesync_preinit, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_overlay_opencl.c b/libavfilter/vf_overlay_opencl.c index 6ba622baaa..4f1d6bbdd2 100644 --- a/libavfilter/vf_overlay_opencl.c +++ b/libavfilter/vf_overlay_opencl.c @@ -300,7 +300,6 @@ static const AVFilterPad overlay_opencl_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad overlay_opencl_outputs[] = { @@ -309,7 +308,6 @@ static const AVFilterPad overlay_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &overlay_opencl_config_output, }, - { NULL } }; const AVFilter ff_vf_overlay_opencl = { @@ -321,7 +319,7 @@ const AVFilter ff_vf_overlay_opencl = { .uninit = &overlay_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, .activate = &overlay_opencl_activate, - .inputs = overlay_opencl_inputs, - .outputs = overlay_opencl_outputs, + FILTER_INPUTS(overlay_opencl_inputs), + FILTER_OUTPUTS(overlay_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c index 14c4c37a3c..578ef47e88 100644 --- a/libavfilter/vf_overlay_qsv.c +++ b/libavfilter/vf_overlay_qsv.c @@ -403,7 +403,6 @@ static const AVFilterPad overlay_qsv_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_overlay_input, }, - { NULL } }; static const AVFilterPad overlay_qsv_outputs[] = { @@ -412,7 +411,6 @@ static const AVFilterPad overlay_qsv_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_overlay_qsv = { @@ -424,8 +422,8 @@ const AVFilter ff_vf_overlay_qsv = { .init = overlay_qsv_init, .uninit = overlay_qsv_uninit, .activate = activate, - .inputs = overlay_qsv_inputs, - .outputs = overlay_qsv_outputs, + FILTER_INPUTS(overlay_qsv_inputs), + FILTER_OUTPUTS(overlay_qsv_outputs), .priv_class = &overlay_qsv_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c index 8dd3bd2092..1815709d82 100644 --- a/libavfilter/vf_overlay_vulkan.c +++ b/libavfilter/vf_overlay_vulkan.c @@ -463,7 +463,6 @@ static const AVFilterPad overlay_vulkan_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_vk_filter_config_input, }, - { NULL } }; static const AVFilterPad overlay_vulkan_outputs[] = { @@ -472,7 +471,6 @@ static const AVFilterPad overlay_vulkan_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &overlay_vulkan_config_output, }, - { NULL } }; const AVFilter ff_vf_overlay_vulkan = { @@ -483,8 +481,8 @@ const AVFilter ff_vf_overlay_vulkan = { .uninit = &overlay_vulkan_uninit, .query_formats = &ff_vk_filter_query_formats, .activate = &overlay_vulkan_activate, - .inputs = overlay_vulkan_inputs, - .outputs = overlay_vulkan_outputs, + FILTER_INPUTS(overlay_vulkan_inputs), + FILTER_OUTPUTS(overlay_vulkan_outputs), .priv_class = &overlay_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_owdenoise.c b/libavfilter/vf_owdenoise.c index 6a832b8f3c..80ce3ca654 100644 --- a/libavfilter/vf_owdenoise.c +++ b/libavfilter/vf_owdenoise.c @@ -351,7 +351,6 @@ static const AVFilterPad owdenoise_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad owdenoise_outputs[] = { @@ -359,7 +358,6 @@ static const AVFilterPad owdenoise_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_owdenoise = { @@ -368,8 +366,8 @@ const AVFilter ff_vf_owdenoise = { .priv_size = sizeof(OWDenoiseContext), .uninit = uninit, .query_formats = query_formats, - .inputs = owdenoise_inputs, - .outputs = owdenoise_outputs, + FILTER_INPUTS(owdenoise_inputs), + FILTER_OUTPUTS(owdenoise_outputs), .priv_class = &owdenoise_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index 871f2930af..0524509df7 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -441,7 +441,6 @@ static const AVFilterPad avfilter_vf_pad_inputs[] = { .get_video_buffer = get_video_buffer, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_pad_outputs[] = { @@ -450,7 +449,6 @@ static const AVFilterPad avfilter_vf_pad_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_pad = { @@ -459,6 +457,6 @@ const AVFilter ff_vf_pad = { .priv_size = sizeof(PadContext), .priv_class = &pad_class, .query_formats = query_formats, - .inputs = avfilter_vf_pad_inputs, - .outputs = avfilter_vf_pad_outputs, + FILTER_INPUTS(avfilter_vf_pad_inputs), + FILTER_OUTPUTS(avfilter_vf_pad_outputs), }; diff --git a/libavfilter/vf_pad_opencl.c b/libavfilter/vf_pad_opencl.c index 8155a96e03..9e6fc94097 100644 --- a/libavfilter/vf_pad_opencl.c +++ b/libavfilter/vf_pad_opencl.c @@ -354,7 +354,6 @@ static const AVFilterPad pad_opencl_inputs[] = { .filter_frame = filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad pad_opencl_outputs[] = { @@ -363,7 +362,6 @@ static const AVFilterPad pad_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &pad_opencl_config_output, }, - { NULL } }; #define OFFSET(x) offsetof(PadOpenCLContext, x) @@ -391,7 +389,7 @@ const AVFilter ff_vf_pad_opencl = { .init = &ff_opencl_filter_init, .uninit = &pad_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = pad_opencl_inputs, - .outputs = pad_opencl_outputs, + FILTER_INPUTS(pad_opencl_inputs), + FILTER_OUTPUTS(pad_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE }; diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index ef8bc181c5..af77cf49e0 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -557,7 +557,6 @@ static const AVFilterPad palettegen_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad palettegen_outputs[] = { @@ -567,7 +566,6 @@ static const AVFilterPad palettegen_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_palettegen = { @@ -576,7 +574,7 @@ const AVFilter ff_vf_palettegen = { .priv_size = sizeof(PaletteGenContext), .uninit = uninit, .query_formats = query_formats, - .inputs = palettegen_inputs, - .outputs = palettegen_outputs, + FILTER_INPUTS(palettegen_inputs), + FILTER_OUTPUTS(palettegen_outputs), .priv_class = &palettegen_class, }; diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index f07ef5d760..c9ff5d6932 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_paletteuse.c @@ -1122,7 +1122,6 @@ static const AVFilterPad paletteuse_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_palette, }, - { NULL } }; static const AVFilterPad paletteuse_outputs[] = { @@ -1131,7 +1130,6 @@ static const AVFilterPad paletteuse_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_paletteuse = { @@ -1142,7 +1140,7 @@ const AVFilter ff_vf_paletteuse = { .init = init, .uninit = uninit, .activate = activate, - .inputs = paletteuse_inputs, - .outputs = paletteuse_outputs, + FILTER_INPUTS(paletteuse_inputs), + FILTER_OUTPUTS(paletteuse_outputs), .priv_class = &paletteuse_class, }; diff --git a/libavfilter/vf_perspective.c b/libavfilter/vf_perspective.c index eb8e5e2414..df65976198 100644 --- a/libavfilter/vf_perspective.c +++ b/libavfilter/vf_perspective.c @@ -497,7 +497,6 @@ static const AVFilterPad perspective_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad perspective_outputs[] = { @@ -505,7 +504,6 @@ static const AVFilterPad perspective_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_perspective = { @@ -515,8 +513,8 @@ const AVFilter ff_vf_perspective = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = perspective_inputs, - .outputs = perspective_outputs, + FILTER_INPUTS(perspective_inputs), + FILTER_OUTPUTS(perspective_outputs), .priv_class = &perspective_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c index 3262454348..cab6174d72 100644 --- a/libavfilter/vf_phase.c +++ b/libavfilter/vf_phase.c @@ -221,7 +221,6 @@ static const AVFilterPad phase_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad phase_outputs[] = { @@ -229,7 +228,6 @@ static const AVFilterPad phase_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_phase = { @@ -239,8 +237,8 @@ const AVFilter ff_vf_phase = { .priv_class = &phase_class, .uninit = uninit, .query_formats = query_formats, - .inputs = phase_inputs, - .outputs = phase_outputs, + FILTER_INPUTS(phase_inputs), + FILTER_OUTPUTS(phase_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_photosensitivity.c b/libavfilter/vf_photosensitivity.c index c28d06b08a..96c99828cf 100644 --- a/libavfilter/vf_photosensitivity.c +++ b/libavfilter/vf_photosensitivity.c @@ -315,7 +315,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -323,7 +322,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_photosensitivity = { @@ -333,6 +331,6 @@ const AVFilter ff_vf_photosensitivity = { .priv_class = &photosensitivity_class, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c index b56839d994..12815aea9c 100644 --- a/libavfilter/vf_pixdesctest.c +++ b/libavfilter/vf_pixdesctest.c @@ -113,7 +113,6 @@ static const AVFilterPad avfilter_vf_pixdesctest_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad avfilter_vf_pixdesctest_outputs[] = { @@ -121,7 +120,6 @@ static const AVFilterPad avfilter_vf_pixdesctest_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_pixdesctest = { @@ -129,6 +127,6 @@ const AVFilter ff_vf_pixdesctest = { .description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."), .priv_size = sizeof(PixdescTestContext), .uninit = uninit, - .inputs = avfilter_vf_pixdesctest_inputs, - .outputs = avfilter_vf_pixdesctest_outputs, + FILTER_INPUTS(avfilter_vf_pixdesctest_inputs), + FILTER_OUTPUTS(avfilter_vf_pixdesctest_outputs), }; diff --git a/libavfilter/vf_pp.c b/libavfilter/vf_pp.c index 3fb1333bd6..c27c2029c0 100644 --- a/libavfilter/vf_pp.c +++ b/libavfilter/vf_pp.c @@ -177,7 +177,6 @@ static const AVFilterPad pp_inputs[] = { .config_props = pp_config_props, .filter_frame = pp_filter_frame, }, - { NULL } }; static const AVFilterPad pp_outputs[] = { @@ -185,7 +184,6 @@ static const AVFilterPad pp_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_pp = { @@ -195,8 +193,8 @@ const AVFilter ff_vf_pp = { .init = pp_init, .uninit = pp_uninit, .query_formats = pp_query_formats, - .inputs = pp_inputs, - .outputs = pp_outputs, + FILTER_INPUTS(pp_inputs), + FILTER_OUTPUTS(pp_outputs), .process_command = pp_process_command, .priv_class = &pp_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c index d632d9bea8..74f20365e0 100644 --- a/libavfilter/vf_pp7.c +++ b/libavfilter/vf_pp7.c @@ -387,7 +387,6 @@ static const AVFilterPad pp7_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad pp7_outputs[] = { @@ -395,7 +394,6 @@ static const AVFilterPad pp7_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_pp7 = { @@ -404,8 +402,8 @@ const AVFilter ff_vf_pp7 = { .priv_size = sizeof(PP7Context), .uninit = uninit, .query_formats = query_formats, - .inputs = pp7_inputs, - .outputs = pp7_outputs, + FILTER_INPUTS(pp7_inputs), + FILTER_OUTPUTS(pp7_outputs), .priv_class = &pp7_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c index 1dde273eae..dbfb6e33b6 100644 --- a/libavfilter/vf_premultiply.c +++ b/libavfilter/vf_premultiply.c @@ -819,7 +819,6 @@ static const AVFilterPad premultiply_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #if CONFIG_PREMULTIPLY_FILTER @@ -833,7 +832,7 @@ const AVFilter ff_vf_premultiply = { .query_formats = query_formats, .activate = activate, .inputs = NULL, - .outputs = premultiply_outputs, + FILTER_OUTPUTS(premultiply_outputs), .priv_class = &premultiply_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_DYNAMIC_INPUTS | @@ -856,7 +855,7 @@ const AVFilter ff_vf_unpremultiply = { .query_formats = query_formats, .activate = activate, .inputs = NULL, - .outputs = premultiply_outputs, + FILTER_OUTPUTS(premultiply_outputs), .priv_class = &unpremultiply_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_DYNAMIC_INPUTS | diff --git a/libavfilter/vf_procamp_vaapi.c b/libavfilter/vf_procamp_vaapi.c index 5527556d09..758546abf9 100644 --- a/libavfilter/vf_procamp_vaapi.c +++ b/libavfilter/vf_procamp_vaapi.c @@ -219,7 +219,6 @@ static const AVFilterPad procamp_vaapi_inputs[] = { .filter_frame = &procamp_vaapi_filter_frame, .config_props = &ff_vaapi_vpp_config_input, }, - { NULL } }; static const AVFilterPad procamp_vaapi_outputs[] = { @@ -228,7 +227,6 @@ static const AVFilterPad procamp_vaapi_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_vaapi_vpp_config_output, }, - { NULL } }; const AVFilter ff_vf_procamp_vaapi = { @@ -238,8 +236,8 @@ const AVFilter ff_vf_procamp_vaapi = { .init = &procamp_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, .query_formats = &ff_vaapi_vpp_query_formats, - .inputs = procamp_vaapi_inputs, - .outputs = procamp_vaapi_outputs, + FILTER_INPUTS(procamp_vaapi_inputs), + FILTER_OUTPUTS(procamp_vaapi_outputs), .priv_class = &procamp_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c index 4b38baeb3c..9bedfbff2a 100644 --- a/libavfilter/vf_program_opencl.c +++ b/libavfilter/vf_program_opencl.c @@ -359,7 +359,6 @@ static const AVFilterPad program_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &program_opencl_config_output, }, - { NULL } }; const AVFilter ff_vf_program_opencl = { @@ -373,7 +372,7 @@ const AVFilter ff_vf_program_opencl = { .query_formats = &ff_opencl_filter_query_formats, .activate = &program_opencl_activate, .inputs = NULL, - .outputs = program_opencl_outputs, + FILTER_OUTPUTS(program_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -412,7 +411,6 @@ static const AVFilterPad openclsrc_outputs[] = { .config_props = &program_opencl_config_output, .request_frame = &program_opencl_request_frame, }, - { NULL } }; const AVFilter ff_vsrc_openclsrc = { @@ -424,7 +422,7 @@ const AVFilter ff_vsrc_openclsrc = { .uninit = &program_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, .inputs = NULL, - .outputs = openclsrc_outputs, + FILTER_OUTPUTS(openclsrc_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c index 35b9a10519..69dbfda99b 100644 --- a/libavfilter/vf_pseudocolor.c +++ b/libavfilter/vf_pseudocolor.c @@ -893,7 +893,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -901,7 +900,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static av_cold void uninit(AVFilterContext *ctx) @@ -924,8 +922,8 @@ const AVFilter ff_vf_pseudocolor = { .priv_class = &pseudocolor_class, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index 715230142b..f74eb4d5ec 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -452,7 +452,6 @@ static const AVFilterPad psnr_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_ref, }, - { NULL } }; static const AVFilterPad psnr_outputs[] = { @@ -461,7 +460,6 @@ static const AVFilterPad psnr_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_psnr = { @@ -474,7 +472,7 @@ const AVFilter ff_vf_psnr = { .activate = activate, .priv_size = sizeof(PSNRContext), .priv_class = &psnr_class, - .inputs = psnr_inputs, - .outputs = psnr_outputs, + FILTER_INPUTS(psnr_inputs), + FILTER_OUTPUTS(psnr_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index 8be10b4fa4..57e86e9c89 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -750,7 +750,6 @@ static const AVFilterPad pullup_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad pullup_outputs[] = { @@ -758,7 +757,6 @@ static const AVFilterPad pullup_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_pullup = { @@ -768,6 +766,6 @@ const AVFilter ff_vf_pullup = { .priv_class = &pullup_class, .uninit = uninit, .query_formats = query_formats, - .inputs = pullup_inputs, - .outputs = pullup_outputs, + FILTER_INPUTS(pullup_inputs), + FILTER_OUTPUTS(pullup_outputs), }; diff --git a/libavfilter/vf_qp.c b/libavfilter/vf_qp.c index c932d45a76..d942ba1579 100644 --- a/libavfilter/vf_qp.c +++ b/libavfilter/vf_qp.c @@ -182,7 +182,6 @@ static const AVFilterPad qp_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad qp_outputs[] = { @@ -190,15 +189,14 @@ static const AVFilterPad qp_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_qp = { .name = "qp", .description = NULL_IF_CONFIG_SMALL("Change video quantization parameters."), .priv_size = sizeof(QPContext), - .inputs = qp_inputs, - .outputs = qp_outputs, + FILTER_INPUTS(qp_inputs), + FILTER_OUTPUTS(qp_outputs), .priv_class = &qp_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_random.c b/libavfilter/vf_random.c index 5e4c30a3b5..b3acdd1fcf 100644 --- a/libavfilter/vf_random.c +++ b/libavfilter/vf_random.c @@ -127,7 +127,6 @@ static const AVFilterPad random_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad random_outputs[] = { @@ -136,7 +135,6 @@ static const AVFilterPad random_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_random = { @@ -146,6 +144,6 @@ const AVFilter ff_vf_random = { .priv_class = &random_class, .init = init, .uninit = uninit, - .inputs = random_inputs, - .outputs = random_outputs, + FILTER_INPUTS(random_inputs), + FILTER_OUTPUTS(random_outputs), }; diff --git a/libavfilter/vf_readeia608.c b/libavfilter/vf_readeia608.c index fe4a8c4648..0a4643a346 100644 --- a/libavfilter/vf_readeia608.c +++ b/libavfilter/vf_readeia608.c @@ -542,7 +542,6 @@ static const AVFilterPad readeia608_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad readeia608_outputs[] = { @@ -550,7 +549,6 @@ static const AVFilterPad readeia608_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_readeia608 = { @@ -559,8 +557,8 @@ const AVFilter ff_vf_readeia608 = { .priv_size = sizeof(ReadEIA608Context), .priv_class = &readeia608_class, .query_formats = query_formats, - .inputs = readeia608_inputs, - .outputs = readeia608_outputs, + FILTER_INPUTS(readeia608_inputs), + FILTER_OUTPUTS(readeia608_outputs), .uninit = uninit, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, diff --git a/libavfilter/vf_readvitc.c b/libavfilter/vf_readvitc.c index 8dde55b7da..d117a81284 100644 --- a/libavfilter/vf_readvitc.c +++ b/libavfilter/vf_readvitc.c @@ -232,7 +232,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -240,7 +239,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_readvitc = { @@ -248,8 +246,8 @@ const AVFilter ff_vf_readvitc = { .description = NULL_IF_CONFIG_SMALL("Read vertical interval timecode and write it to frame metadata."), .priv_size = sizeof(ReadVitcContext), .priv_class = &readvitc_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .init = init, .query_formats = query_formats, }; diff --git a/libavfilter/vf_remap.c b/libavfilter/vf_remap.c index 5ab6199d71..476dc6d7e7 100644 --- a/libavfilter/vf_remap.c +++ b/libavfilter/vf_remap.c @@ -386,7 +386,6 @@ static const AVFilterPad remap_inputs[] = { .name = "ymap", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad remap_outputs[] = { @@ -395,7 +394,6 @@ static const AVFilterPad remap_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_remap = { @@ -405,8 +403,8 @@ const AVFilter ff_vf_remap = { .uninit = uninit, .query_formats = query_formats, .activate = activate, - .inputs = remap_inputs, - .outputs = remap_outputs, + FILTER_INPUTS(remap_inputs), + FILTER_OUTPUTS(remap_outputs), .priv_class = &remap_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_removegrain.c b/libavfilter/vf_removegrain.c index 2fde9a954c..93aecf9d0a 100644 --- a/libavfilter/vf_removegrain.c +++ b/libavfilter/vf_removegrain.c @@ -634,7 +634,6 @@ static const AVFilterPad removegrain_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad removegrain_outputs[] = { @@ -642,7 +641,6 @@ static const AVFilterPad removegrain_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_removegrain = { @@ -650,8 +648,8 @@ const AVFilter ff_vf_removegrain = { .description = NULL_IF_CONFIG_SMALL("Remove grain."), .priv_size = sizeof(RemoveGrainContext), .query_formats = query_formats, - .inputs = removegrain_inputs, - .outputs = removegrain_outputs, + FILTER_INPUTS(removegrain_inputs), + FILTER_OUTPUTS(removegrain_outputs), .priv_class = &removegrain_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c index 92eeb2e5f5..acf09960ff 100644 --- a/libavfilter/vf_removelogo.c +++ b/libavfilter/vf_removelogo.c @@ -559,7 +559,6 @@ static const AVFilterPad removelogo_inputs[] = { .config_props = config_props_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad removelogo_outputs[] = { @@ -567,7 +566,6 @@ static const AVFilterPad removelogo_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_removelogo = { @@ -577,8 +575,8 @@ const AVFilter ff_vf_removelogo = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = removelogo_inputs, - .outputs = removelogo_outputs, + FILTER_INPUTS(removelogo_inputs), + FILTER_OUTPUTS(removelogo_outputs), .priv_class = &removelogo_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_repeatfields.c b/libavfilter/vf_repeatfields.c index 75f2fdbfb2..ca4bd97b2f 100644 --- a/libavfilter/vf_repeatfields.c +++ b/libavfilter/vf_repeatfields.c @@ -167,7 +167,6 @@ static const AVFilterPad repeatfields_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad repeatfields_outputs[] = { @@ -175,7 +174,6 @@ static const AVFilterPad repeatfields_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_repeatfields = { @@ -183,7 +181,7 @@ const AVFilter ff_vf_repeatfields = { .description = NULL_IF_CONFIG_SMALL("Hard repeat fields based on MPEG repeat field flag."), .priv_size = sizeof(RepeatFieldsContext), .uninit = uninit, - .inputs = repeatfields_inputs, - .outputs = repeatfields_outputs, + FILTER_INPUTS(repeatfields_inputs), + FILTER_OUTPUTS(repeatfields_outputs), .query_formats = query_formats, }; diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c index 654a7171a9..80c087bfdc 100644 --- a/libavfilter/vf_rotate.c +++ b/libavfilter/vf_rotate.c @@ -585,7 +585,6 @@ static const AVFilterPad rotate_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad rotate_outputs[] = { @@ -594,7 +593,6 @@ static const AVFilterPad rotate_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vf_rotate = { @@ -605,8 +603,8 @@ const AVFilter ff_vf_rotate = { .uninit = uninit, .query_formats = query_formats, .process_command = process_command, - .inputs = rotate_inputs, - .outputs = rotate_outputs, + FILTER_INPUTS(rotate_inputs), + FILTER_OUTPUTS(rotate_outputs), .priv_class = &rotate_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_sab.c b/libavfilter/vf_sab.c index b4f8f128b7..bc7e7e30ed 100644 --- a/libavfilter/vf_sab.c +++ b/libavfilter/vf_sab.c @@ -309,7 +309,6 @@ static const AVFilterPad sab_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad sab_outputs[] = { @@ -317,7 +316,6 @@ static const AVFilterPad sab_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_sab = { @@ -327,8 +325,8 @@ const AVFilter ff_vf_sab = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = sab_inputs, - .outputs = sab_outputs, + FILTER_INPUTS(sab_inputs), + FILTER_OUTPUTS(sab_outputs), .priv_class = &sab_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 160ad8b584..ce39217515 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -957,7 +957,6 @@ static const AVFilterPad avfilter_vf_scale_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_scale_outputs[] = { @@ -966,7 +965,6 @@ static const AVFilterPad avfilter_vf_scale_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vf_scale = { @@ -977,8 +975,8 @@ const AVFilter ff_vf_scale = { .query_formats = query_formats, .priv_size = sizeof(ScaleContext), .priv_class = &scale_class, - .inputs = avfilter_vf_scale_inputs, - .outputs = avfilter_vf_scale_outputs, + FILTER_INPUTS(avfilter_vf_scale_inputs), + FILTER_OUTPUTS(avfilter_vf_scale_outputs), .process_command = process_command, }; @@ -1002,7 +1000,6 @@ static const AVFilterPad avfilter_vf_scale2ref_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame_ref, }, - { NULL } }; static const AVFilterPad avfilter_vf_scale2ref_outputs[] = { @@ -1018,7 +1015,6 @@ static const AVFilterPad avfilter_vf_scale2ref_outputs[] = { .config_props = config_props_ref, .request_frame= request_frame_ref, }, - { NULL } }; const AVFilter ff_vf_scale2ref = { @@ -1029,7 +1025,7 @@ const AVFilter ff_vf_scale2ref = { .query_formats = query_formats, .priv_size = sizeof(ScaleContext), .priv_class = &scale2ref_class, - .inputs = avfilter_vf_scale2ref_inputs, - .outputs = avfilter_vf_scale2ref_outputs, + FILTER_INPUTS(avfilter_vf_scale2ref_inputs), + FILTER_OUTPUTS(avfilter_vf_scale2ref_outputs), .process_command = process_command, }; diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c index ecb3d62256..60f83736e6 100644 --- a/libavfilter/vf_scale_cuda.c +++ b/libavfilter/vf_scale_cuda.c @@ -625,7 +625,6 @@ static const AVFilterPad cudascale_inputs[] = { .filter_frame = cudascale_filter_frame, .get_video_buffer = cudascale_get_video_buffer, }, - { NULL } }; static const AVFilterPad cudascale_outputs[] = { @@ -634,7 +633,6 @@ static const AVFilterPad cudascale_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = cudascale_config_props, }, - { NULL } }; const AVFilter ff_vf_scale_cuda = { @@ -648,8 +646,8 @@ const AVFilter ff_vf_scale_cuda = { .priv_size = sizeof(CUDAScaleContext), .priv_class = &cudascale_class, - .inputs = cudascale_inputs, - .outputs = cudascale_outputs, + FILTER_INPUTS(cudascale_inputs), + FILTER_OUTPUTS(cudascale_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c index 3f5538ad3f..3e25c2c95f 100644 --- a/libavfilter/vf_scale_npp.c +++ b/libavfilter/vf_scale_npp.c @@ -577,7 +577,6 @@ static const AVFilterPad nppscale_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = nppscale_filter_frame, }, - { NULL } }; static const AVFilterPad nppscale_outputs[] = { @@ -586,7 +585,6 @@ static const AVFilterPad nppscale_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = nppscale_config_props, }, - { NULL } }; const AVFilter ff_vf_scale_npp = { @@ -601,8 +599,8 @@ const AVFilter ff_vf_scale_npp = { .priv_size = sizeof(NPPScaleContext), .priv_class = &nppscale_class, - .inputs = nppscale_inputs, - .outputs = nppscale_outputs, + FILTER_INPUTS(nppscale_inputs), + FILTER_OUTPUTS(nppscale_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_scale_qsv.c b/libavfilter/vf_scale_qsv.c index 2f3afa6ace..2c9f8e153b 100644 --- a/libavfilter/vf_scale_qsv.c +++ b/libavfilter/vf_scale_qsv.c @@ -650,7 +650,6 @@ static const AVFilterPad qsvscale_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = qsvscale_filter_frame, }, - { NULL } }; static const AVFilterPad qsvscale_outputs[] = { @@ -659,7 +658,6 @@ static const AVFilterPad qsvscale_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = qsvscale_config_props, }, - { NULL } }; const AVFilter ff_vf_scale_qsv = { @@ -673,8 +671,8 @@ const AVFilter ff_vf_scale_qsv = { .priv_size = sizeof(QSVScaleContext), .priv_class = &qsvscale_class, - .inputs = qsvscale_inputs, - .outputs = qsvscale_outputs, + FILTER_INPUTS(qsvscale_inputs), + FILTER_OUTPUTS(qsvscale_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index 41ff93156d..554b7bac4f 100644 --- a/libavfilter/vf_scale_vaapi.c +++ b/libavfilter/vf_scale_vaapi.c @@ -269,7 +269,6 @@ static const AVFilterPad scale_vaapi_inputs[] = { .filter_frame = &scale_vaapi_filter_frame, .config_props = &ff_vaapi_vpp_config_input, }, - { NULL } }; static const AVFilterPad scale_vaapi_outputs[] = { @@ -278,7 +277,6 @@ static const AVFilterPad scale_vaapi_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &scale_vaapi_config_output, }, - { NULL } }; const AVFilter ff_vf_scale_vaapi = { @@ -288,8 +286,8 @@ const AVFilter ff_vf_scale_vaapi = { .init = &scale_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, .query_formats = &ff_vaapi_vpp_query_formats, - .inputs = scale_vaapi_inputs, - .outputs = scale_vaapi_outputs, + FILTER_INPUTS(scale_vaapi_inputs), + FILTER_OUTPUTS(scale_vaapi_outputs), .priv_class = &scale_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c index 95503480ef..4eb4fe5664 100644 --- a/libavfilter/vf_scale_vulkan.c +++ b/libavfilter/vf_scale_vulkan.c @@ -512,7 +512,6 @@ static const AVFilterPad scale_vulkan_inputs[] = { .filter_frame = &scale_vulkan_filter_frame, .config_props = &ff_vk_filter_config_input, }, - { NULL } }; static const AVFilterPad scale_vulkan_outputs[] = { @@ -521,7 +520,6 @@ static const AVFilterPad scale_vulkan_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &scale_vulkan_config_output, }, - { NULL } }; const AVFilter ff_vf_scale_vulkan = { @@ -531,8 +529,8 @@ const AVFilter ff_vf_scale_vulkan = { .init = &ff_vk_filter_init, .uninit = &scale_vulkan_uninit, .query_formats = &ff_vk_filter_query_formats, - .inputs = scale_vulkan_inputs, - .outputs = scale_vulkan_outputs, + FILTER_INPUTS(scale_vulkan_inputs), + FILTER_OUTPUTS(scale_vulkan_outputs), .priv_class = &scale_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_scdet.c b/libavfilter/vf_scdet.c index b9ea30d47a..b8017a00e5 100644 --- a/libavfilter/vf_scdet.c +++ b/libavfilter/vf_scdet.c @@ -196,7 +196,6 @@ static const AVFilterPad scdet_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad scdet_outputs[] = { @@ -204,7 +203,6 @@ static const AVFilterPad scdet_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_scdet = { @@ -214,7 +212,7 @@ const AVFilter ff_vf_scdet = { .priv_class = &scdet_class, .uninit = uninit, .query_formats = query_formats, - .inputs = scdet_inputs, - .outputs = scdet_outputs, + FILTER_INPUTS(scdet_inputs), + FILTER_OUTPUTS(scdet_outputs), .activate = activate, }; diff --git a/libavfilter/vf_scroll.c b/libavfilter/vf_scroll.c index 77d8db51bc..c574e7bc1b 100644 --- a/libavfilter/vf_scroll.c +++ b/libavfilter/vf_scroll.c @@ -197,7 +197,6 @@ static const AVFilterPad scroll_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad scroll_outputs[] = { @@ -205,7 +204,6 @@ static const AVFilterPad scroll_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_scroll = { @@ -214,8 +212,8 @@ const AVFilter ff_vf_scroll = { .priv_size = sizeof(ScrollContext), .priv_class = &scroll_class, .query_formats = query_formats, - .inputs = scroll_inputs, - .outputs = scroll_outputs, + FILTER_INPUTS(scroll_inputs), + FILTER_OUTPUTS(scroll_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c index af6e8b2518..0db971d7a2 100644 --- a/libavfilter/vf_selectivecolor.c +++ b/libavfilter/vf_selectivecolor.c @@ -456,7 +456,6 @@ static const AVFilterPad selectivecolor_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad selectivecolor_outputs[] = { @@ -464,7 +463,6 @@ static const AVFilterPad selectivecolor_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_selectivecolor = { @@ -472,8 +470,8 @@ const AVFilter ff_vf_selectivecolor = { .description = NULL_IF_CONFIG_SMALL("Apply CMYK adjustments to specific color ranges."), .priv_size = sizeof(SelectiveColorContext), .query_formats = query_formats, - .inputs = selectivecolor_inputs, - .outputs = selectivecolor_outputs, + FILTER_INPUTS(selectivecolor_inputs), + FILTER_OUTPUTS(selectivecolor_outputs), .priv_class = &selectivecolor_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_separatefields.c b/libavfilter/vf_separatefields.c index c2c7352ad1..7db64c5479 100644 --- a/libavfilter/vf_separatefields.c +++ b/libavfilter/vf_separatefields.c @@ -161,7 +161,6 @@ static const AVFilterPad separatefields_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad separatefields_outputs[] = { @@ -170,7 +169,6 @@ static const AVFilterPad separatefields_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props_output, }, - { NULL } }; const AVFilter ff_vf_separatefields = { @@ -179,6 +177,6 @@ const AVFilter ff_vf_separatefields = { .priv_size = sizeof(SeparateFieldsContext), .activate = activate, .uninit = uninit, - .inputs = separatefields_inputs, - .outputs = separatefields_outputs, + FILTER_INPUTS(separatefields_inputs), + FILTER_OUTPUTS(separatefields_outputs), }; diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c index 0cb3af33ed..0a79599bab 100644 --- a/libavfilter/vf_setparams.c +++ b/libavfilter/vf_setparams.c @@ -151,7 +151,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -159,7 +158,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_setparams = { @@ -167,8 +165,8 @@ const AVFilter ff_vf_setparams = { .description = NULL_IF_CONFIG_SMALL("Force field, or color property for the output video frame."), .priv_size = sizeof(SetParamsContext), .priv_class = &setparams_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; #if CONFIG_SETRANGE_FILTER @@ -206,8 +204,8 @@ const AVFilter ff_vf_setrange = { .priv_size = sizeof(SetParamsContext), .init = init_setrange, .priv_class = &setrange_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; #endif /* CONFIG_SETRANGE_FILTER */ @@ -240,7 +238,7 @@ const AVFilter ff_vf_setfield = { .priv_size = sizeof(SetParamsContext), .init = init_setfield, .priv_class = &setfield_class, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; #endif /* CONFIG_SETFIELD_FILTER */ diff --git a/libavfilter/vf_shear.c b/libavfilter/vf_shear.c index 849592ccde..481dc0c82a 100644 --- a/libavfilter/vf_shear.c +++ b/libavfilter/vf_shear.c @@ -301,7 +301,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -310,7 +309,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_shear = { @@ -319,8 +317,8 @@ const AVFilter ff_vf_shear = { .priv_size = sizeof(ShearContext), .init = init, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .priv_class = &shear_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index dfb7f86359..87c2bed73d 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -661,7 +661,6 @@ static const AVFilterPad avfilter_vf_showinfo_inputs[] = { .filter_frame = filter_frame, .config_props = config_props_in, }, - { NULL } }; static const AVFilterPad avfilter_vf_showinfo_outputs[] = { @@ -670,14 +669,13 @@ static const AVFilterPad avfilter_vf_showinfo_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props_out, }, - { NULL } }; const AVFilter ff_vf_showinfo = { .name = "showinfo", .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."), - .inputs = avfilter_vf_showinfo_inputs, - .outputs = avfilter_vf_showinfo_outputs, + FILTER_INPUTS(avfilter_vf_showinfo_inputs), + FILTER_OUTPUTS(avfilter_vf_showinfo_outputs), .priv_size = sizeof(ShowInfoContext), .priv_class = &showinfo_class, }; diff --git a/libavfilter/vf_showpalette.c b/libavfilter/vf_showpalette.c index 2455af687c..569f5040d0 100644 --- a/libavfilter/vf_showpalette.c +++ b/libavfilter/vf_showpalette.c @@ -100,7 +100,6 @@ static const AVFilterPad showpalette_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad showpalette_outputs[] = { @@ -109,7 +108,6 @@ static const AVFilterPad showpalette_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_showpalette = { @@ -117,7 +115,7 @@ const AVFilter ff_vf_showpalette = { .description = NULL_IF_CONFIG_SMALL("Display frame palette."), .priv_size = sizeof(ShowPaletteContext), .query_formats = query_formats, - .inputs = showpalette_inputs, - .outputs = showpalette_outputs, + FILTER_INPUTS(showpalette_inputs), + FILTER_OUTPUTS(showpalette_outputs), .priv_class = &showpalette_class, }; diff --git a/libavfilter/vf_shuffleframes.c b/libavfilter/vf_shuffleframes.c index cdc70f552e..14b90e6446 100644 --- a/libavfilter/vf_shuffleframes.c +++ b/libavfilter/vf_shuffleframes.c @@ -144,7 +144,6 @@ static const AVFilterPad shuffleframes_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL }, }; static const AVFilterPad shuffleframes_outputs[] = { @@ -152,7 +151,6 @@ static const AVFilterPad shuffleframes_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL }, }; const AVFilter ff_vf_shuffleframes = { @@ -162,7 +160,7 @@ const AVFilter ff_vf_shuffleframes = { .priv_class = &shuffleframes_class, .init = init, .uninit = uninit, - .inputs = shuffleframes_inputs, - .outputs = shuffleframes_outputs, + FILTER_INPUTS(shuffleframes_inputs), + FILTER_OUTPUTS(shuffleframes_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_shufflepixels.c b/libavfilter/vf_shufflepixels.c index 051be44bf3..f782b8fd0c 100644 --- a/libavfilter/vf_shufflepixels.c +++ b/libavfilter/vf_shufflepixels.c @@ -433,7 +433,6 @@ static const AVFilterPad shufflepixels_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL }, }; static const AVFilterPad shufflepixels_outputs[] = { @@ -442,7 +441,6 @@ static const AVFilterPad shufflepixels_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL }, }; const AVFilter ff_vf_shufflepixels = { @@ -452,7 +450,7 @@ const AVFilter ff_vf_shufflepixels = { .priv_class = &shufflepixels_class, .query_formats = query_formats, .uninit = uninit, - .inputs = shufflepixels_inputs, - .outputs = shufflepixels_outputs, + FILTER_INPUTS(shufflepixels_inputs), + FILTER_OUTPUTS(shufflepixels_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_shuffleplanes.c b/libavfilter/vf_shuffleplanes.c index d1e1d11074..3ca4aa976d 100644 --- a/libavfilter/vf_shuffleplanes.c +++ b/libavfilter/vf_shuffleplanes.c @@ -151,7 +151,6 @@ static const AVFilterPad shuffleplanes_inputs[] = { .config_props = shuffleplanes_config_input, .filter_frame = shuffleplanes_filter_frame, }, - { NULL }, }; static const AVFilterPad shuffleplanes_outputs[] = { @@ -159,7 +158,6 @@ static const AVFilterPad shuffleplanes_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL }, }; const AVFilter ff_vf_shuffleplanes = { @@ -168,7 +166,7 @@ const AVFilter ff_vf_shuffleplanes = { .priv_size = sizeof(ShufflePlanesContext), .priv_class = &shuffleplanes_class, .query_formats = query_formats, - .inputs = shuffleplanes_inputs, - .outputs = shuffleplanes_outputs, + FILTER_INPUTS(shuffleplanes_inputs), + FILTER_OUTPUTS(shuffleplanes_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index 49a2996b5c..6e8d6a6108 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -997,7 +997,6 @@ static const AVFilterPad signalstats_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad signalstats_outputs[] = { @@ -1006,7 +1005,6 @@ static const AVFilterPad signalstats_outputs[] = { .config_props = config_output, .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_signalstats = { @@ -1016,8 +1014,8 @@ const AVFilter ff_vf_signalstats = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(SignalstatsContext), - .inputs = signalstats_inputs, - .outputs = signalstats_outputs, + FILTER_INPUTS(signalstats_inputs), + FILTER_OUTPUTS(signalstats_outputs), .priv_class = &signalstats_class, .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c index 69930e9f02..8ea75b003f 100644 --- a/libavfilter/vf_signature.c +++ b/libavfilter/vf_signature.c @@ -755,7 +755,6 @@ static const AVFilterPad signature_outputs[] = { .request_frame = request_frame, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_signature = { @@ -766,7 +765,7 @@ const AVFilter ff_vf_signature = { .init = init, .uninit = uninit, .query_formats = query_formats, - .outputs = signature_outputs, + FILTER_OUTPUTS(signature_outputs), .inputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c index 1820bbb265..24aa533fd7 100644 --- a/libavfilter/vf_smartblur.c +++ b/libavfilter/vf_smartblur.c @@ -277,7 +277,6 @@ static const AVFilterPad smartblur_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad smartblur_outputs[] = { @@ -285,7 +284,6 @@ static const AVFilterPad smartblur_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_smartblur = { @@ -295,8 +293,8 @@ const AVFilter ff_vf_smartblur = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = smartblur_inputs, - .outputs = smartblur_outputs, + FILTER_INPUTS(smartblur_inputs), + FILTER_OUTPUTS(smartblur_outputs), .priv_class = &smartblur_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index 51f3670f4a..b3a52fc99b 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -495,7 +495,6 @@ static const AVFilterPad spp_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad spp_outputs[] = { @@ -503,7 +502,6 @@ static const AVFilterPad spp_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_spp = { @@ -513,8 +511,8 @@ const AVFilter ff_vf_spp = { .init_dict = init_dict, .uninit = uninit, .query_formats = query_formats, - .inputs = spp_inputs, - .outputs = spp_outputs, + FILTER_INPUTS(spp_inputs), + FILTER_OUTPUTS(spp_outputs), .process_command = process_command, .priv_class = &spp_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 4373f749d3..f009a868f8 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -174,7 +174,6 @@ static const AVFilterPad sr_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad sr_outputs[] = { @@ -183,7 +182,6 @@ static const AVFilterPad sr_outputs[] = { .config_props = config_output, .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_sr = { @@ -193,7 +191,7 @@ const AVFilter ff_vf_sr = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = sr_inputs, - .outputs = sr_outputs, + FILTER_INPUTS(sr_inputs), + FILTER_OUTPUTS(sr_outputs), .priv_class = &sr_class, }; diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index 618b24c010..acb7e26001 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -578,7 +578,6 @@ static const AVFilterPad ssim_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_ref, }, - { NULL } }; static const AVFilterPad ssim_outputs[] = { @@ -587,7 +586,6 @@ static const AVFilterPad ssim_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_ssim = { @@ -600,7 +598,7 @@ const AVFilter ff_vf_ssim = { .activate = activate, .priv_size = sizeof(SSIMContext), .priv_class = &ssim_class, - .inputs = ssim_inputs, - .outputs = ssim_outputs, + FILTER_INPUTS(ssim_inputs), + FILTER_OUTPUTS(ssim_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c index 3368e25c9c..a73360f5d8 100644 --- a/libavfilter/vf_stack.c +++ b/libavfilter/vf_stack.c @@ -401,7 +401,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #if CONFIG_HSTACK_FILTER @@ -415,7 +414,7 @@ const AVFilter ff_vf_hstack = { .priv_size = sizeof(StackContext), .priv_class = &hstack_class, .query_formats = query_formats, - .outputs = outputs, + FILTER_OUTPUTS(outputs), .init = init, .uninit = uninit, .activate = activate, @@ -435,7 +434,7 @@ const AVFilter ff_vf_vstack = { .priv_size = sizeof(StackContext), .priv_class = &vstack_class, .query_formats = query_formats, - .outputs = outputs, + FILTER_OUTPUTS(outputs), .init = init, .uninit = uninit, .activate = activate, @@ -462,7 +461,7 @@ const AVFilter ff_vf_xstack = { .priv_size = sizeof(StackContext), .priv_class = &xstack_class, .query_formats = query_formats, - .outputs = outputs, + FILTER_OUTPUTS(outputs), .init = init, .uninit = uninit, .activate = activate, diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c index 099dd5724b..4cfdee636c 100644 --- a/libavfilter/vf_stereo3d.c +++ b/libavfilter/vf_stereo3d.c @@ -1096,7 +1096,6 @@ static const AVFilterPad stereo3d_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad stereo3d_outputs[] = { @@ -1105,7 +1104,6 @@ static const AVFilterPad stereo3d_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_stereo3d = { @@ -1114,8 +1112,8 @@ const AVFilter ff_vf_stereo3d = { .priv_size = sizeof(Stereo3DContext), .uninit = uninit, .query_formats = query_formats, - .inputs = stereo3d_inputs, - .outputs = stereo3d_outputs, + FILTER_INPUTS(stereo3d_inputs), + FILTER_OUTPUTS(stereo3d_outputs), .priv_class = &stereo3d_class, .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index ab32e1b7f3..2964970221 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -202,7 +202,6 @@ static const AVFilterPad ass_inputs[] = { .config_props = config_input, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad ass_outputs[] = { @@ -210,7 +209,6 @@ static const AVFilterPad ass_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #if CONFIG_ASS_FILTER @@ -254,8 +252,8 @@ const AVFilter ff_vf_ass = { .init = init_ass, .uninit = uninit, .query_formats = query_formats, - .inputs = ass_inputs, - .outputs = ass_outputs, + FILTER_INPUTS(ass_inputs), + FILTER_OUTPUTS(ass_outputs), .priv_class = &ass_class, }; #endif @@ -488,8 +486,8 @@ const AVFilter ff_vf_subtitles = { .init = init_subtitles, .uninit = uninit, .query_formats = query_formats, - .inputs = ass_inputs, - .outputs = ass_outputs, + FILTER_INPUTS(ass_inputs), + FILTER_OUTPUTS(ass_outputs), .priv_class = &subtitles_class, }; #endif diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c index d6371644e6..a55372bad9 100644 --- a/libavfilter/vf_super2xsai.c +++ b/libavfilter/vf_super2xsai.c @@ -344,7 +344,6 @@ static const AVFilterPad super2xsai_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad super2xsai_outputs[] = { @@ -353,7 +352,6 @@ static const AVFilterPad super2xsai_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_super2xsai = { @@ -361,7 +359,7 @@ const AVFilter ff_vf_super2xsai = { .description = NULL_IF_CONFIG_SMALL("Scale the input by 2x using the Super2xSaI pixel art algorithm."), .priv_size = sizeof(Super2xSaIContext), .query_formats = query_formats, - .inputs = super2xsai_inputs, - .outputs = super2xsai_outputs, + FILTER_INPUTS(super2xsai_inputs), + FILTER_OUTPUTS(super2xsai_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c index 3b96790798..b72e56e00d 100644 --- a/libavfilter/vf_swaprect.c +++ b/libavfilter/vf_swaprect.c @@ -232,7 +232,6 @@ static const AVFilterPad inputs[] = { .config_props = config_input, .needs_writable = 1, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -240,7 +239,6 @@ static const AVFilterPad outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_swaprect = { @@ -250,8 +248,8 @@ const AVFilter ff_vf_swaprect = { .priv_class = &swaprect_class, .query_formats = query_formats, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c index 34868eb0c9..8c0ad08468 100644 --- a/libavfilter/vf_swapuv.c +++ b/libavfilter/vf_swapuv.c @@ -100,7 +100,6 @@ static const AVFilterPad swapuv_inputs[] = { .get_video_buffer = get_video_buffer, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad swapuv_outputs[] = { @@ -108,7 +107,6 @@ static const AVFilterPad swapuv_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_swapuv = { @@ -117,7 +115,7 @@ const AVFilter ff_vf_swapuv = { .query_formats = query_formats, .priv_size = sizeof(SwapUVContext), .priv_class = &swapuv_class, - .inputs = swapuv_inputs, - .outputs = swapuv_outputs, + FILTER_INPUTS(swapuv_inputs), + FILTER_OUTPUTS(swapuv_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c index 52a3f2f353..99c6d22b7d 100644 --- a/libavfilter/vf_telecine.c +++ b/libavfilter/vf_telecine.c @@ -275,7 +275,6 @@ static const AVFilterPad telecine_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad telecine_outputs[] = { @@ -284,7 +283,6 @@ static const AVFilterPad telecine_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_telecine = { @@ -295,6 +293,6 @@ const AVFilter ff_vf_telecine = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = telecine_inputs, - .outputs = telecine_outputs, + FILTER_INPUTS(telecine_inputs), + FILTER_OUTPUTS(telecine_outputs), }; diff --git a/libavfilter/vf_threshold.c b/libavfilter/vf_threshold.c index 17ceb0dfa8..5928c0cc23 100644 --- a/libavfilter/vf_threshold.c +++ b/libavfilter/vf_threshold.c @@ -342,7 +342,6 @@ static const AVFilterPad inputs[] = { .name = "max", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -351,7 +350,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_threshold = { @@ -362,8 +360,8 @@ const AVFilter ff_vf_threshold = { .uninit = uninit, .query_formats = query_formats, .activate = activate, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c index d81702b323..acfc0ce481 100644 --- a/libavfilter/vf_thumbnail.c +++ b/libavfilter/vf_thumbnail.c @@ -272,7 +272,6 @@ static const AVFilterPad thumbnail_inputs[] = { .config_props = config_props, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad thumbnail_outputs[] = { @@ -281,7 +280,6 @@ static const AVFilterPad thumbnail_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_thumbnail = { @@ -291,8 +289,8 @@ const AVFilter ff_vf_thumbnail = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = thumbnail_inputs, - .outputs = thumbnail_outputs, + FILTER_INPUTS(thumbnail_inputs), + FILTER_OUTPUTS(thumbnail_outputs), .priv_class = &thumbnail_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c index d92c613d91..df9bba22e0 100644 --- a/libavfilter/vf_thumbnail_cuda.c +++ b/libavfilter/vf_thumbnail_cuda.c @@ -428,7 +428,6 @@ static const AVFilterPad thumbnail_cuda_inputs[] = { .config_props = config_props, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad thumbnail_cuda_outputs[] = { @@ -437,7 +436,6 @@ static const AVFilterPad thumbnail_cuda_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_thumbnail_cuda = { @@ -447,8 +445,8 @@ const AVFilter ff_vf_thumbnail_cuda = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = thumbnail_cuda_inputs, - .outputs = thumbnail_cuda_outputs, + FILTER_INPUTS(thumbnail_cuda_inputs), + FILTER_OUTPUTS(thumbnail_cuda_outputs), .priv_class = &thumbnail_cuda_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index 11392169e4..13bd53bba6 100644 --- a/libavfilter/vf_tile.c +++ b/libavfilter/vf_tile.c @@ -272,7 +272,6 @@ static const AVFilterPad tile_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad tile_outputs[] = { @@ -282,7 +281,6 @@ static const AVFilterPad tile_outputs[] = { .config_props = config_props, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_tile = { @@ -292,7 +290,7 @@ const AVFilter ff_vf_tile = { .uninit = uninit, .query_formats = query_formats, .priv_size = sizeof(TileContext), - .inputs = tile_inputs, - .outputs = tile_outputs, + FILTER_INPUTS(tile_inputs), + FILTER_OUTPUTS(tile_outputs), .priv_class = &tile_class, }; diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c index 6ab43b527d..7c0f00898b 100644 --- a/libavfilter/vf_tinterlace.c +++ b/libavfilter/vf_tinterlace.c @@ -540,7 +540,6 @@ static const AVFilterPad tinterlace_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad tinterlace_outputs[] = { @@ -549,7 +548,6 @@ static const AVFilterPad tinterlace_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_out_props, }, - { NULL } }; const AVFilter ff_vf_tinterlace = { @@ -558,8 +556,8 @@ const AVFilter ff_vf_tinterlace = { .priv_size = sizeof(TInterlaceContext), .uninit = uninit, .query_formats = query_formats, - .inputs = tinterlace_inputs, - .outputs = tinterlace_outputs, + FILTER_INPUTS(tinterlace_inputs), + FILTER_OUTPUTS(tinterlace_outputs), .priv_class = &tinterlace_class, }; @@ -571,7 +569,7 @@ const AVFilter ff_vf_interlace = { .init = init_interlace, .uninit = uninit, .query_formats = query_formats, - .inputs = tinterlace_inputs, - .outputs = tinterlace_outputs, + FILTER_INPUTS(tinterlace_inputs), + FILTER_OUTPUTS(tinterlace_outputs), .priv_class = &interlace_class, }; diff --git a/libavfilter/vf_tmidequalizer.c b/libavfilter/vf_tmidequalizer.c index 3516592ee4..cf9fcf9047 100644 --- a/libavfilter/vf_tmidequalizer.c +++ b/libavfilter/vf_tmidequalizer.c @@ -415,7 +415,6 @@ static const AVFilterPad tmidequalizer_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad tmidequalizer_outputs[] = { @@ -424,7 +423,6 @@ static const AVFilterPad tmidequalizer_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_tmidequalizer = { @@ -433,8 +431,8 @@ const AVFilter ff_vf_tmidequalizer = { .priv_size = sizeof(TMidEqualizerContext), .uninit = uninit, .query_formats = query_formats, - .inputs = tmidequalizer_inputs, - .outputs = tmidequalizer_outputs, + FILTER_INPUTS(tmidequalizer_inputs), + FILTER_OUTPUTS(tmidequalizer_outputs), .priv_class = &tmidequalizer_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c index da6b4e235d..6c7a2d27d1 100644 --- a/libavfilter/vf_tonemap.c +++ b/libavfilter/vf_tonemap.c @@ -323,7 +323,6 @@ static const AVFilterPad tonemap_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad tonemap_outputs[] = { @@ -331,7 +330,6 @@ static const AVFilterPad tonemap_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_tonemap = { @@ -341,7 +339,7 @@ const AVFilter ff_vf_tonemap = { .query_formats = query_formats, .priv_size = sizeof(TonemapContext), .priv_class = &tonemap_class, - .inputs = tonemap_inputs, - .outputs = tonemap_outputs, + FILTER_INPUTS(tonemap_inputs), + FILTER_OUTPUTS(tonemap_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c index 8cf7c099ee..f659669159 100644 --- a/libavfilter/vf_tonemap_opencl.c +++ b/libavfilter/vf_tonemap_opencl.c @@ -527,7 +527,6 @@ static const AVFilterPad tonemap_opencl_inputs[] = { .filter_frame = &tonemap_opencl_filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad tonemap_opencl_outputs[] = { @@ -536,7 +535,6 @@ static const AVFilterPad tonemap_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &tonemap_opencl_config_output, }, - { NULL } }; const AVFilter ff_vf_tonemap_opencl = { @@ -547,7 +545,7 @@ const AVFilter ff_vf_tonemap_opencl = { .init = &ff_opencl_filter_init, .uninit = &tonemap_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = tonemap_opencl_inputs, - .outputs = tonemap_opencl_outputs, + FILTER_INPUTS(tonemap_opencl_inputs), + FILTER_OUTPUTS(tonemap_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c index d33c4f8f6d..a5cf9b0d8d 100644 --- a/libavfilter/vf_tonemap_vaapi.c +++ b/libavfilter/vf_tonemap_vaapi.c @@ -391,7 +391,6 @@ static const AVFilterPad tonemap_vaapi_inputs[] = { .filter_frame = &tonemap_vaapi_filter_frame, .config_props = &ff_vaapi_vpp_config_input, }, - { NULL } }; static const AVFilterPad tonemap_vaapi_outputs[] = { @@ -400,7 +399,6 @@ static const AVFilterPad tonemap_vaapi_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_vaapi_vpp_config_output, }, - { NULL } }; const AVFilter ff_vf_tonemap_vaapi = { @@ -410,8 +408,8 @@ const AVFilter ff_vf_tonemap_vaapi = { .init = &tonemap_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, .query_formats = &ff_vaapi_vpp_query_formats, - .inputs = tonemap_vaapi_inputs, - .outputs = tonemap_vaapi_outputs, + FILTER_INPUTS(tonemap_vaapi_inputs), + FILTER_OUTPUTS(tonemap_vaapi_outputs), .priv_class = &tonemap_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c index d23869f3e2..badd24fd06 100644 --- a/libavfilter/vf_tpad.c +++ b/libavfilter/vf_tpad.c @@ -193,7 +193,6 @@ static const AVFilterPad tpad_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad tpad_outputs[] = { @@ -201,7 +200,6 @@ static const AVFilterPad tpad_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_tpad = { @@ -212,6 +210,6 @@ const AVFilter ff_vf_tpad = { .query_formats = query_formats, .activate = activate, .uninit = uninit, - .inputs = tpad_inputs, - .outputs = tpad_outputs, + FILTER_INPUTS(tpad_inputs), + FILTER_OUTPUTS(tpad_outputs), }; diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index 6affbed0a6..2a2654ebc9 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -385,7 +385,6 @@ static const AVFilterPad avfilter_vf_transpose_inputs[] = { .get_video_buffer = get_video_buffer, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_transpose_outputs[] = { @@ -394,7 +393,6 @@ static const AVFilterPad avfilter_vf_transpose_outputs[] = { .config_props = config_props_output, .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_transpose = { @@ -403,7 +401,7 @@ const AVFilter ff_vf_transpose = { .priv_size = sizeof(TransContext), .priv_class = &transpose_class, .query_formats = query_formats, - .inputs = avfilter_vf_transpose_inputs, - .outputs = avfilter_vf_transpose_outputs, + FILTER_INPUTS(avfilter_vf_transpose_inputs), + FILTER_OUTPUTS(avfilter_vf_transpose_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_transpose_npp.c b/libavfilter/vf_transpose_npp.c index ad79d22f7f..14b9d62488 100644 --- a/libavfilter/vf_transpose_npp.c +++ b/libavfilter/vf_transpose_npp.c @@ -460,7 +460,6 @@ static const AVFilterPad npptranspose_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = npptranspose_filter_frame, }, - { NULL } }; static const AVFilterPad npptranspose_outputs[] = { @@ -469,7 +468,6 @@ static const AVFilterPad npptranspose_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = npptranspose_config_props, }, - { NULL } }; const AVFilter ff_vf_transpose_npp = { @@ -480,7 +478,7 @@ const AVFilter ff_vf_transpose_npp = { .query_formats = npptranspose_query_formats, .priv_size = sizeof(NPPTransposeContext), .priv_class = &npptranspose_class, - .inputs = npptranspose_inputs, - .outputs = npptranspose_outputs, + FILTER_INPUTS(npptranspose_inputs), + FILTER_OUTPUTS(npptranspose_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_transpose_opencl.c b/libavfilter/vf_transpose_opencl.c index 2877d3c826..352e65af1e 100644 --- a/libavfilter/vf_transpose_opencl.c +++ b/libavfilter/vf_transpose_opencl.c @@ -260,7 +260,6 @@ static const AVFilterPad transpose_opencl_inputs[] = { .filter_frame = &transpose_opencl_filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad transpose_opencl_outputs[] = { @@ -269,7 +268,6 @@ static const AVFilterPad transpose_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &transpose_opencl_config_output, }, - { NULL } }; const AVFilter ff_vf_transpose_opencl = { @@ -280,7 +278,7 @@ const AVFilter ff_vf_transpose_opencl = { .init = &ff_opencl_filter_init, .uninit = &transpose_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = transpose_opencl_inputs, - .outputs = transpose_opencl_outputs, + FILTER_INPUTS(transpose_opencl_inputs), + FILTER_OUTPUTS(transpose_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_transpose_vaapi.c b/libavfilter/vf_transpose_vaapi.c index 79413e0eeb..d57cdf5d2b 100644 --- a/libavfilter/vf_transpose_vaapi.c +++ b/libavfilter/vf_transpose_vaapi.c @@ -260,7 +260,6 @@ static const AVFilterPad transpose_vaapi_inputs[] = { .get_video_buffer = get_video_buffer, .config_props = &ff_vaapi_vpp_config_input, }, - { NULL } }; static const AVFilterPad transpose_vaapi_outputs[] = { @@ -269,7 +268,6 @@ static const AVFilterPad transpose_vaapi_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &transpose_vaapi_vpp_config_output, }, - { NULL } }; const AVFilter ff_vf_transpose_vaapi = { @@ -279,8 +277,8 @@ const AVFilter ff_vf_transpose_vaapi = { .init = &transpose_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, .query_formats = &ff_vaapi_vpp_query_formats, - .inputs = transpose_vaapi_inputs, - .outputs = transpose_vaapi_outputs, + FILTER_INPUTS(transpose_vaapi_inputs), + FILTER_OUTPUTS(transpose_vaapi_outputs), .priv_class = &transpose_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index e9f75a673f..f6209ac39f 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -342,7 +342,6 @@ static const AVFilterPad avfilter_vf_unsharp_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_vf_unsharp_outputs[] = { @@ -350,7 +349,6 @@ static const AVFilterPad avfilter_vf_unsharp_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_unsharp = { @@ -361,7 +359,7 @@ const AVFilter ff_vf_unsharp = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_unsharp_inputs, - .outputs = avfilter_vf_unsharp_outputs, + FILTER_INPUTS(avfilter_vf_unsharp_inputs), + FILTER_OUTPUTS(avfilter_vf_unsharp_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_unsharp_opencl.c b/libavfilter/vf_unsharp_opencl.c index 200350de9f..129611c70d 100644 --- a/libavfilter/vf_unsharp_opencl.c +++ b/libavfilter/vf_unsharp_opencl.c @@ -386,7 +386,6 @@ static const AVFilterPad unsharp_opencl_inputs[] = { .filter_frame = &unsharp_opencl_filter_frame, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad unsharp_opencl_outputs[] = { @@ -395,7 +394,6 @@ static const AVFilterPad unsharp_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &ff_opencl_filter_config_output, }, - { NULL } }; const AVFilter ff_vf_unsharp_opencl = { @@ -406,7 +404,7 @@ const AVFilter ff_vf_unsharp_opencl = { .init = &ff_opencl_filter_init, .uninit = &unsharp_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, - .inputs = unsharp_opencl_inputs, - .outputs = unsharp_opencl_outputs, + FILTER_INPUTS(unsharp_opencl_inputs), + FILTER_OUTPUTS(unsharp_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_untile.c b/libavfilter/vf_untile.c index 9035e819d4..2bf5146591 100644 --- a/libavfilter/vf_untile.c +++ b/libavfilter/vf_untile.c @@ -172,7 +172,6 @@ static const AVFilterPad untile_inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad untile_outputs[] = { @@ -181,7 +180,6 @@ static const AVFilterPad untile_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_untile = { @@ -192,7 +190,7 @@ const AVFilter ff_vf_untile = { .query_formats = query_formats, .activate = activate, .priv_size = sizeof(UntileContext), - .inputs = untile_inputs, - .outputs = untile_outputs, + FILTER_INPUTS(untile_inputs), + FILTER_OUTPUTS(untile_outputs), .priv_class = &untile_class, }; diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c index 0ed9abe92c..ba6ae816a8 100644 --- a/libavfilter/vf_uspp.c +++ b/libavfilter/vf_uspp.c @@ -480,7 +480,6 @@ static const AVFilterPad uspp_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad uspp_outputs[] = { @@ -488,7 +487,6 @@ static const AVFilterPad uspp_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_uspp = { @@ -497,8 +495,8 @@ const AVFilter ff_vf_uspp = { .priv_size = sizeof(USPPContext), .uninit = uninit, .query_formats = query_formats, - .inputs = uspp_inputs, - .outputs = uspp_outputs, + FILTER_INPUTS(uspp_inputs), + FILTER_OUTPUTS(uspp_outputs), .priv_class = &uspp_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index d4bd5756da..4a7ec13835 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -4966,7 +4966,6 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -4975,7 +4974,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_v360 = { @@ -4985,8 +4983,8 @@ const AVFilter ff_vf_v360 = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .priv_class = &v360_class, .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, diff --git a/libavfilter/vf_vaguedenoiser.c b/libavfilter/vf_vaguedenoiser.c index b3a800e360..ea23067110 100644 --- a/libavfilter/vf_vaguedenoiser.c +++ b/libavfilter/vf_vaguedenoiser.c @@ -595,7 +595,6 @@ static const AVFilterPad vaguedenoiser_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; @@ -604,7 +603,6 @@ static const AVFilterPad vaguedenoiser_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO }, - { NULL } }; const AVFilter ff_vf_vaguedenoiser = { @@ -615,7 +613,7 @@ const AVFilter ff_vf_vaguedenoiser = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = vaguedenoiser_inputs, - .outputs = vaguedenoiser_outputs, + FILTER_INPUTS(vaguedenoiser_inputs), + FILTER_OUTPUTS(vaguedenoiser_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c index 0669230890..b8b406430c 100644 --- a/libavfilter/vf_vectorscope.c +++ b/libavfilter/vf_vectorscope.c @@ -1575,7 +1575,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -1584,7 +1583,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_vectorscope = { @@ -1594,6 +1592,6 @@ const AVFilter ff_vf_vectorscope = { .priv_class = &vectorscope_class, .query_formats = query_formats, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c index 95a693a7e1..a4a475dda4 100644 --- a/libavfilter/vf_vflip.c +++ b/libavfilter/vf_vflip.c @@ -133,7 +133,6 @@ static const AVFilterPad avfilter_vf_vflip_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_vf_vflip_outputs[] = { @@ -141,7 +140,6 @@ static const AVFilterPad avfilter_vf_vflip_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_vflip = { @@ -149,7 +147,7 @@ const AVFilter ff_vf_vflip = { .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."), .priv_size = sizeof(FlipContext), .priv_class = &vflip_class, - .inputs = avfilter_vf_vflip_inputs, - .outputs = avfilter_vf_vflip_outputs, + FILTER_INPUTS(avfilter_vf_vflip_inputs), + FILTER_OUTPUTS(avfilter_vf_vflip_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_vfrdet.c b/libavfilter/vf_vfrdet.c index 7e37036aef..fda8c2d485 100644 --- a/libavfilter/vf_vfrdet.c +++ b/libavfilter/vf_vfrdet.c @@ -93,7 +93,6 @@ static const AVFilterPad vfrdet_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad vfrdet_outputs[] = { @@ -101,7 +100,6 @@ static const AVFilterPad vfrdet_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_vfrdet = { @@ -110,6 +108,6 @@ const AVFilter ff_vf_vfrdet = { .priv_size = sizeof(VFRDETContext), .init = init, .uninit = uninit, - .inputs = vfrdet_inputs, - .outputs = vfrdet_outputs, + FILTER_INPUTS(vfrdet_inputs), + FILTER_OUTPUTS(vfrdet_outputs), }; diff --git a/libavfilter/vf_vibrance.c b/libavfilter/vf_vibrance.c index abbc25436f..53c8bf6212 100644 --- a/libavfilter/vf_vibrance.c +++ b/libavfilter/vf_vibrance.c @@ -344,7 +344,6 @@ static const AVFilterPad vibrance_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad vibrance_outputs[] = { @@ -352,7 +351,6 @@ static const AVFilterPad vibrance_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(VibranceContext, x) @@ -378,8 +376,8 @@ const AVFilter ff_vf_vibrance = { .priv_size = sizeof(VibranceContext), .priv_class = &vibrance_class, .query_formats = query_formats, - .inputs = vibrance_inputs, - .outputs = vibrance_outputs, + FILTER_INPUTS(vibrance_inputs), + FILTER_OUTPUTS(vibrance_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c index cde6a5e709..5e12d31d0e 100644 --- a/libavfilter/vf_vidstabdetect.c +++ b/libavfilter/vf_vidstabdetect.c @@ -193,7 +193,6 @@ static const AVFilterPad avfilter_vf_vidstabdetect_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_vf_vidstabdetect_outputs[] = { @@ -201,7 +200,6 @@ static const AVFilterPad avfilter_vf_vidstabdetect_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_vidstabdetect = { @@ -213,7 +211,7 @@ const AVFilter ff_vf_vidstabdetect = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_vidstabdetect_inputs, - .outputs = avfilter_vf_vidstabdetect_outputs, + FILTER_INPUTS(avfilter_vf_vidstabdetect_inputs), + FILTER_OUTPUTS(avfilter_vf_vidstabdetect_outputs), .priv_class = &vidstabdetect_class, }; diff --git a/libavfilter/vf_vidstabtransform.c b/libavfilter/vf_vidstabtransform.c index 342da0b26b..3499b9afe4 100644 --- a/libavfilter/vf_vidstabtransform.c +++ b/libavfilter/vf_vidstabtransform.c @@ -294,7 +294,6 @@ static const AVFilterPad avfilter_vf_vidstabtransform_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad avfilter_vf_vidstabtransform_outputs[] = { @@ -302,7 +301,6 @@ static const AVFilterPad avfilter_vf_vidstabtransform_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_vidstabtransform = { @@ -314,7 +312,7 @@ const AVFilter ff_vf_vidstabtransform = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_vidstabtransform_inputs, - .outputs = avfilter_vf_vidstabtransform_outputs, + FILTER_INPUTS(avfilter_vf_vidstabtransform_inputs), + FILTER_OUTPUTS(avfilter_vf_vidstabtransform_outputs), .priv_class = &vidstabtransform_class, }; diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c index 4d2381abcb..3563993efa 100644 --- a/libavfilter/vf_vif.c +++ b/libavfilter/vf_vif.c @@ -627,7 +627,6 @@ static const AVFilterPad vif_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input_ref, }, - { NULL } }; static const AVFilterPad vif_outputs[] = { @@ -636,7 +635,6 @@ static const AVFilterPad vif_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_vif = { @@ -647,7 +645,7 @@ const AVFilter ff_vf_vif = { .priv_size = sizeof(VIFContext), .priv_class = &vif_class, .activate = activate, - .inputs = vif_inputs, - .outputs = vif_outputs, + FILTER_INPUTS(vif_inputs), + FILTER_OUTPUTS(vif_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_vignette.c b/libavfilter/vf_vignette.c index ef67deb278..8e9f196ab9 100644 --- a/libavfilter/vf_vignette.c +++ b/libavfilter/vf_vignette.c @@ -327,7 +327,6 @@ static const AVFilterPad vignette_inputs[] = { .filter_frame = filter_frame, .config_props = config_props, }, - { NULL } }; static const AVFilterPad vignette_outputs[] = { @@ -335,7 +334,6 @@ static const AVFilterPad vignette_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_vignette = { @@ -345,8 +343,8 @@ const AVFilter ff_vf_vignette = { .init = init, .uninit = uninit, .query_formats = query_formats, - .inputs = vignette_inputs, - .outputs = vignette_outputs, + FILTER_INPUTS(vignette_inputs), + FILTER_OUTPUTS(vignette_outputs), .priv_class = &vignette_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c index 454ebb8afa..67cc012b18 100644 --- a/libavfilter/vf_vmafmotion.c +++ b/libavfilter/vf_vmafmotion.c @@ -347,7 +347,6 @@ static const AVFilterPad vmafmotion_inputs[] = { .filter_frame = filter_frame, .config_props = config_input_ref, }, - { NULL } }; static const AVFilterPad vmafmotion_outputs[] = { @@ -355,7 +354,6 @@ static const AVFilterPad vmafmotion_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; const AVFilter ff_vf_vmafmotion = { @@ -366,6 +364,6 @@ const AVFilter ff_vf_vmafmotion = { .query_formats = query_formats, .priv_size = sizeof(VMAFMotionContext), .priv_class = &vmafmotion_class, - .inputs = vmafmotion_inputs, - .outputs = vmafmotion_outputs, + FILTER_INPUTS(vmafmotion_inputs), + FILTER_OUTPUTS(vmafmotion_outputs), }; diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index ee9317a49e..c268b5dba8 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -600,7 +600,6 @@ static const AVFilterPad vpp_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, }, - { NULL } }; static const AVFilterPad vpp_outputs[] = { @@ -609,7 +608,6 @@ static const AVFilterPad vpp_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_vpp_qsv = { @@ -619,8 +617,8 @@ const AVFilter ff_vf_vpp_qsv = { .query_formats = query_formats, .init = vpp_init, .uninit = vpp_uninit, - .inputs = vpp_inputs, - .outputs = vpp_outputs, + FILTER_INPUTS(vpp_inputs), + FILTER_OUTPUTS(vpp_outputs), .activate = activate, .priv_class = &vpp_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c index e8e55d5be3..1d9de8ef57 100644 --- a/libavfilter/vf_w3fdif.c +++ b/libavfilter/vf_w3fdif.c @@ -597,7 +597,6 @@ static const AVFilterPad w3fdif_inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad w3fdif_outputs[] = { @@ -607,7 +606,6 @@ static const AVFilterPad w3fdif_outputs[] = { .config_props = config_output, .request_frame = request_frame, }, - { NULL } }; const AVFilter ff_vf_w3fdif = { @@ -617,8 +615,8 @@ const AVFilter ff_vf_w3fdif = { .priv_class = &w3fdif_class, .uninit = uninit, .query_formats = query_formats, - .inputs = w3fdif_inputs, - .outputs = w3fdif_outputs, + FILTER_INPUTS(w3fdif_inputs), + FILTER_OUTPUTS(w3fdif_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index 977ebad9ce..e75516bf8b 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -3477,7 +3477,6 @@ static const AVFilterPad inputs[] = { .filter_frame = filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -3486,7 +3485,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_waveform = { @@ -3496,7 +3494,7 @@ const AVFilter ff_vf_waveform = { .priv_class = &waveform_class, .query_formats = query_formats, .uninit = uninit, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c index 98b8d0bd06..88b342ec67 100644 --- a/libavfilter/vf_weave.c +++ b/libavfilter/vf_weave.c @@ -178,7 +178,6 @@ static const AVFilterPad weave_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad weave_outputs[] = { @@ -187,7 +186,6 @@ static const AVFilterPad weave_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props_output, }, - { NULL } }; const AVFilter ff_vf_weave = { @@ -197,8 +195,8 @@ const AVFilter ff_vf_weave = { .priv_class = &weave_class, .query_formats = query_formats, .uninit = uninit, - .inputs = weave_inputs, - .outputs = weave_outputs, + FILTER_INPUTS(weave_inputs), + FILTER_OUTPUTS(weave_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; @@ -223,7 +221,7 @@ const AVFilter ff_vf_doubleweave = { .query_formats = query_formats, .init = init, .uninit = uninit, - .inputs = weave_inputs, - .outputs = weave_outputs, + FILTER_INPUTS(weave_inputs), + FILTER_OUTPUTS(weave_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c index 28642fa323..49a5287fb1 100644 --- a/libavfilter/vf_xbr.c +++ b/libavfilter/vf_xbr.c @@ -409,7 +409,6 @@ static const AVFilterPad xbr_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad xbr_outputs[] = { @@ -418,14 +417,13 @@ static const AVFilterPad xbr_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_xbr = { .name = "xbr", .description = NULL_IF_CONFIG_SMALL("Scale the input using xBR algorithm."), - .inputs = xbr_inputs, - .outputs = xbr_outputs, + FILTER_INPUTS(xbr_inputs), + FILTER_OUTPUTS(xbr_outputs), .query_formats = query_formats, .priv_size = sizeof(XBRContext), .priv_class = &xbr_class, diff --git a/libavfilter/vf_xfade.c b/libavfilter/vf_xfade.c index c3e5f3df85..6672116ea4 100644 --- a/libavfilter/vf_xfade.c +++ b/libavfilter/vf_xfade.c @@ -1941,7 +1941,6 @@ static const AVFilterPad xfade_inputs[] = { .name = "xfade", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad xfade_outputs[] = { @@ -1950,7 +1949,6 @@ static const AVFilterPad xfade_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_xfade = { @@ -1961,7 +1959,7 @@ const AVFilter ff_vf_xfade = { .query_formats = query_formats, .activate = xfade_activate, .uninit = uninit, - .inputs = xfade_inputs, - .outputs = xfade_outputs, + FILTER_INPUTS(xfade_inputs), + FILTER_OUTPUTS(xfade_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_xfade_opencl.c b/libavfilter/vf_xfade_opencl.c index 5b64ea2f08..d9fd6adcd6 100644 --- a/libavfilter/vf_xfade_opencl.c +++ b/libavfilter/vf_xfade_opencl.c @@ -411,7 +411,6 @@ static const AVFilterPad xfade_opencl_inputs[] = { .get_video_buffer = get_video_buffer, .config_props = &ff_opencl_filter_config_input, }, - { NULL } }; static const AVFilterPad xfade_opencl_outputs[] = { @@ -420,7 +419,6 @@ static const AVFilterPad xfade_opencl_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = &xfade_opencl_config_output, }, - { NULL } }; const AVFilter ff_vf_xfade_opencl = { @@ -432,7 +430,7 @@ const AVFilter ff_vf_xfade_opencl = { .uninit = &xfade_opencl_uninit, .query_formats = &ff_opencl_filter_query_formats, .activate = &xfade_opencl_activate, - .inputs = xfade_opencl_inputs, - .outputs = xfade_opencl_outputs, + FILTER_INPUTS(xfade_opencl_inputs), + FILTER_OUTPUTS(xfade_opencl_outputs), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_xmedian.c b/libavfilter/vf_xmedian.c index c8ff37f797..ca48b97802 100644 --- a/libavfilter/vf_xmedian.c +++ b/libavfilter/vf_xmedian.c @@ -382,7 +382,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; #if CONFIG_XMEDIAN_FILTER @@ -394,7 +393,7 @@ const AVFilter ff_vf_xmedian = { .priv_size = sizeof(XMedianContext), .priv_class = &xmedian_class, .query_formats = query_formats, - .outputs = outputs, + FILTER_OUTPUTS(outputs), .preinit = xmedian_framesync_preinit, .init = init, .uninit = uninit, @@ -458,7 +457,6 @@ static const AVFilterPad tmedian_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = tmedian_filter_frame, }, - { NULL } }; static const AVFilterPad tmedian_outputs[] = { @@ -467,7 +465,6 @@ static const AVFilterPad tmedian_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; AVFILTER_DEFINE_CLASS(tmedian); @@ -478,8 +475,8 @@ const AVFilter ff_vf_tmedian = { .priv_size = sizeof(XMedianContext), .priv_class = &tmedian_class, .query_formats = query_formats, - .inputs = tmedian_inputs, - .outputs = tmedian_outputs, + FILTER_INPUTS(tmedian_inputs), + FILTER_OUTPUTS(tmedian_outputs), .init = init, .uninit = uninit, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 41069a711c..bd7b750255 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -336,7 +336,6 @@ static const AVFilterPad avfilter_vf_yadif_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = ff_yadif_filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_yadif_outputs[] = { @@ -346,7 +345,6 @@ static const AVFilterPad avfilter_vf_yadif_outputs[] = { .request_frame = ff_yadif_request_frame, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_yadif = { @@ -356,7 +354,7 @@ const AVFilter ff_vf_yadif = { .priv_class = &yadif_class, .uninit = uninit, .query_formats = query_formats, - .inputs = avfilter_vf_yadif_inputs, - .outputs = avfilter_vf_yadif_outputs, + FILTER_INPUTS(avfilter_vf_yadif_inputs), + FILTER_OUTPUTS(avfilter_vf_yadif_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_yadif_cuda.c b/libavfilter/vf_yadif_cuda.c index 95267d6a1c..5ddb9a9324 100644 --- a/libavfilter/vf_yadif_cuda.c +++ b/libavfilter/vf_yadif_cuda.c @@ -363,7 +363,6 @@ static const AVFilterPad deint_cuda_inputs[] = { .filter_frame = ff_yadif_filter_frame, .config_props = config_input, }, - { NULL } }; static const AVFilterPad deint_cuda_outputs[] = { @@ -373,7 +372,6 @@ static const AVFilterPad deint_cuda_outputs[] = { .request_frame = ff_yadif_request_frame, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_yadif_cuda = { @@ -383,8 +381,8 @@ const AVFilter ff_vf_yadif_cuda = { .priv_class = &yadif_cuda_class, .uninit = deint_cuda_uninit, .query_formats = deint_cuda_query_formats, - .inputs = deint_cuda_inputs, - .outputs = deint_cuda_outputs, + FILTER_INPUTS(deint_cuda_inputs), + FILTER_OUTPUTS(deint_cuda_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_yaepblur.c b/libavfilter/vf_yaepblur.c index c68edc815a..de16f26ab5 100644 --- a/libavfilter/vf_yaepblur.c +++ b/libavfilter/vf_yaepblur.c @@ -309,7 +309,6 @@ static const AVFilterPad yaep_inputs[] = { .config_props = config_input, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad yaep_outputs[] = { @@ -317,7 +316,6 @@ static const AVFilterPad yaep_outputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; #define OFFSET(x) offsetof(YAEPContext, x) @@ -342,8 +340,8 @@ const AVFilter ff_vf_yaepblur = { .priv_class = &yaepblur_class, .uninit = uninit, .query_formats = query_formats, - .inputs = yaep_inputs, - .outputs = yaep_outputs, + FILTER_INPUTS(yaep_inputs), + FILTER_OUTPUTS(yaep_outputs), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c index 8a350aa92a..92769f1fd1 100644 --- a/libavfilter/vf_zoompan.c +++ b/libavfilter/vf_zoompan.c @@ -361,7 +361,6 @@ static const AVFilterPad inputs[] = { .name = "default", .type = AVMEDIA_TYPE_VIDEO, }, - { NULL } }; static const AVFilterPad outputs[] = { @@ -370,7 +369,6 @@ static const AVFilterPad outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vf_zoompan = { @@ -382,6 +380,6 @@ const AVFilter ff_vf_zoompan = { .uninit = uninit, .query_formats = query_formats, .activate = activate, - .inputs = inputs, - .outputs = outputs, + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c index d21de8d9db..dfea00f9eb 100644 --- a/libavfilter/vf_zscale.c +++ b/libavfilter/vf_zscale.c @@ -914,7 +914,6 @@ static const AVFilterPad avfilter_vf_zscale_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL } }; static const AVFilterPad avfilter_vf_zscale_outputs[] = { @@ -923,7 +922,6 @@ static const AVFilterPad avfilter_vf_zscale_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vf_zscale = { @@ -934,7 +932,7 @@ const AVFilter ff_vf_zscale = { .priv_size = sizeof(ZScaleContext), .priv_class = &zscale_class, .uninit = uninit, - .inputs = avfilter_vf_zscale_inputs, - .outputs = avfilter_vf_zscale_outputs, + FILTER_INPUTS(avfilter_vf_zscale_inputs), + FILTER_OUTPUTS(avfilter_vf_zscale_outputs), .process_command = process_command, }; diff --git a/libavfilter/vsink_nullsink.c b/libavfilter/vsink_nullsink.c index 1c796b7cb8..f21299c6f0 100644 --- a/libavfilter/vsink_nullsink.c +++ b/libavfilter/vsink_nullsink.c @@ -32,13 +32,12 @@ static const AVFilterPad avfilter_vsink_nullsink_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, }, - { NULL }, }; const AVFilter ff_vsink_nullsink = { .name = "nullsink", .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."), .priv_size = 0, - .inputs = avfilter_vsink_nullsink_inputs, + FILTER_INPUTS(avfilter_vsink_nullsink_inputs), .outputs = NULL, }; diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c index 0b5b131786..9a62cfedc3 100644 --- a/libavfilter/vsrc_cellauto.c +++ b/libavfilter/vsrc_cellauto.c @@ -321,7 +321,6 @@ static const AVFilterPad cellauto_outputs[] = { .request_frame = request_frame, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vsrc_cellauto = { @@ -333,5 +332,5 @@ const AVFilter ff_vsrc_cellauto = { .uninit = uninit, .query_formats = query_formats, .inputs = NULL, - .outputs = cellauto_outputs, + FILTER_OUTPUTS(cellauto_outputs), }; diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c index c1962b1ed8..0195bc5fde 100644 --- a/libavfilter/vsrc_gradients.c +++ b/libavfilter/vsrc_gradients.c @@ -292,7 +292,6 @@ static const AVFilterPad gradients_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vsrc_gradients = { @@ -302,7 +301,7 @@ const AVFilter ff_vsrc_gradients = { .priv_class = &gradients_class, .query_formats = query_formats, .inputs = NULL, - .outputs = gradients_outputs, + FILTER_OUTPUTS(gradients_outputs), .activate = activate, .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c index b954f855c7..2165d1a70f 100644 --- a/libavfilter/vsrc_life.c +++ b/libavfilter/vsrc_life.c @@ -436,7 +436,6 @@ static const AVFilterPad life_outputs[] = { .request_frame = request_frame, .config_props = config_props, }, - { NULL} }; const AVFilter ff_vsrc_life = { @@ -448,5 +447,5 @@ const AVFilter ff_vsrc_life = { .uninit = uninit, .query_formats = query_formats, .inputs = NULL, - .outputs = life_outputs, + FILTER_OUTPUTS(life_outputs), }; diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c index 20ae55835b..df8584b37c 100644 --- a/libavfilter/vsrc_mandelbrot.c +++ b/libavfilter/vsrc_mandelbrot.c @@ -413,7 +413,6 @@ static const AVFilterPad mandelbrot_outputs[] = { .request_frame = request_frame, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vsrc_mandelbrot = { @@ -425,5 +424,5 @@ const AVFilter ff_vsrc_mandelbrot = { .uninit = uninit, .query_formats = query_formats, .inputs = NULL, - .outputs = mandelbrot_outputs, + FILTER_OUTPUTS(mandelbrot_outputs), }; diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c index 0a6f3498b5..f94a78fb84 100644 --- a/libavfilter/vsrc_mptestsrc.c +++ b/libavfilter/vsrc_mptestsrc.c @@ -351,7 +351,6 @@ static const AVFilterPad mptestsrc_outputs[] = { .request_frame = request_frame, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vsrc_mptestsrc = { @@ -362,5 +361,5 @@ const AVFilter ff_vsrc_mptestsrc = { .init = init, .query_formats = query_formats, .inputs = NULL, - .outputs = mptestsrc_outputs, + FILTER_OUTPUTS(mptestsrc_outputs), }; diff --git a/libavfilter/vsrc_sierpinski.c b/libavfilter/vsrc_sierpinski.c index eec9e8c25d..18cced0f28 100644 --- a/libavfilter/vsrc_sierpinski.c +++ b/libavfilter/vsrc_sierpinski.c @@ -217,7 +217,6 @@ static const AVFilterPad sierpinski_outputs[] = { .request_frame = sierpinski_request_frame, .config_props = config_output, }, - { NULL } }; const AVFilter ff_vsrc_sierpinski = { @@ -227,6 +226,6 @@ const AVFilter ff_vsrc_sierpinski = { .priv_class = &sierpinski_class, .query_formats = query_formats, .inputs = NULL, - .outputs = sierpinski_outputs, + FILTER_OUTPUTS(sierpinski_outputs), .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 56b46c6bd8..646e8257aa 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -263,7 +263,6 @@ static const AVFilterPad color_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = color_config_props, }, - { NULL } }; const AVFilter ff_vsrc_color = { @@ -276,7 +275,7 @@ const AVFilter ff_vsrc_color = { .activate = activate, .query_formats = color_query_formats, .inputs = NULL, - .outputs = color_outputs, + FILTER_OUTPUTS(color_outputs), .process_command = color_process_command, }; @@ -394,7 +393,6 @@ static const AVFilterPad haldclutsrc_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = haldclutsrc_config_props, }, - { NULL } }; const AVFilter ff_vsrc_haldclutsrc = { @@ -407,7 +405,7 @@ const AVFilter ff_vsrc_haldclutsrc = { .query_formats = haldclutsrc_query_formats, .activate = activate, .inputs = NULL, - .outputs = haldclutsrc_outputs, + FILTER_OUTPUTS(haldclutsrc_outputs), }; #endif /* CONFIG_HALDCLUTSRC_FILTER */ @@ -432,7 +430,6 @@ static const AVFilterPad nullsrc_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL }, }; const AVFilter ff_vsrc_nullsrc = { @@ -444,7 +441,7 @@ const AVFilter ff_vsrc_nullsrc = { .priv_size = sizeof(TestSourceContext), .priv_class = &nullsrc_class, .inputs = NULL, - .outputs = nullsrc_outputs, + FILTER_OUTPUTS(nullsrc_outputs), }; #endif /* CONFIG_NULLSRC_FILTER */ @@ -665,7 +662,6 @@ static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vsrc_testsrc = { @@ -678,7 +674,7 @@ const AVFilter ff_vsrc_testsrc = { .query_formats = test_query_formats, .activate = activate, .inputs = NULL, - .outputs = avfilter_vsrc_testsrc_outputs, + FILTER_OUTPUTS(avfilter_vsrc_testsrc_outputs), }; #endif /* CONFIG_TESTSRC_FILTER */ @@ -938,7 +934,6 @@ static const AVFilterPad avfilter_vsrc_testsrc2_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = test2_config_props, }, - { NULL } }; const AVFilter ff_vsrc_testsrc2 = { @@ -951,7 +946,7 @@ const AVFilter ff_vsrc_testsrc2 = { .query_formats = test2_query_formats, .activate = activate, .inputs = NULL, - .outputs = avfilter_vsrc_testsrc2_outputs, + FILTER_OUTPUTS(avfilter_vsrc_testsrc2_outputs), }; #endif /* CONFIG_TESTSRC2_FILTER */ @@ -1110,7 +1105,6 @@ static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = rgbtest_config_props, }, - { NULL } }; const AVFilter ff_vsrc_rgbtestsrc = { @@ -1123,7 +1117,7 @@ const AVFilter ff_vsrc_rgbtestsrc = { .query_formats = rgbtest_query_formats, .activate = activate, .inputs = NULL, - .outputs = avfilter_vsrc_rgbtestsrc_outputs, + FILTER_OUTPUTS(avfilter_vsrc_rgbtestsrc_outputs), }; #endif /* CONFIG_RGBTESTSRC_FILTER */ @@ -1283,7 +1277,6 @@ static const AVFilterPad avfilter_vsrc_yuvtestsrc_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = yuvtest_config_props, }, - { NULL } }; const AVFilter ff_vsrc_yuvtestsrc = { @@ -1296,7 +1289,7 @@ const AVFilter ff_vsrc_yuvtestsrc = { .query_formats = yuvtest_query_formats, .activate = activate, .inputs = NULL, - .outputs = avfilter_vsrc_yuvtestsrc_outputs, + FILTER_OUTPUTS(avfilter_vsrc_yuvtestsrc_outputs), }; #endif /* CONFIG_YUVTESTSRC_FILTER */ @@ -1423,7 +1416,6 @@ static const AVFilterPad smptebars_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL } }; #if CONFIG_PAL75BARS_FILTER @@ -1470,7 +1462,7 @@ const AVFilter ff_vsrc_pal75bars = { .query_formats = smptebars_query_formats, .activate = activate, .inputs = NULL, - .outputs = smptebars_outputs, + FILTER_OUTPUTS(smptebars_outputs), }; #endif /* CONFIG_PAL75BARS_FILTER */ @@ -1517,7 +1509,7 @@ const AVFilter ff_vsrc_pal100bars = { .query_formats = smptebars_query_formats, .activate = activate, .inputs = NULL, - .outputs = smptebars_outputs, + FILTER_OUTPUTS(smptebars_outputs), }; #endif /* CONFIG_PAL100BARS_FILTER */ @@ -1585,7 +1577,7 @@ const AVFilter ff_vsrc_smptebars = { .query_formats = smptebars_query_formats, .activate = activate, .inputs = NULL, - .outputs = smptebars_outputs, + FILTER_OUTPUTS(smptebars_outputs), }; #endif /* CONFIG_SMPTEBARS_FILTER */ @@ -1691,7 +1683,7 @@ const AVFilter ff_vsrc_smptehdbars = { .query_formats = smptebars_query_formats, .activate = activate, .inputs = NULL, - .outputs = smptebars_outputs, + FILTER_OUTPUTS(smptebars_outputs), }; #endif /* CONFIG_SMPTEHDBARS_FILTER */ @@ -1753,7 +1745,6 @@ static const AVFilterPad avfilter_vsrc_allyuv_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_props, }, - { NULL } }; const AVFilter ff_vsrc_allyuv = { @@ -1766,7 +1757,7 @@ const AVFilter ff_vsrc_allyuv = { .query_formats = allyuv_query_formats, .activate = activate, .inputs = NULL, - .outputs = avfilter_vsrc_allyuv_outputs, + FILTER_OUTPUTS(avfilter_vsrc_allyuv_outputs), }; #endif /* CONFIG_ALLYUV_FILTER */ @@ -1827,7 +1818,6 @@ static const AVFilterPad avfilter_vsrc_allrgb_outputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = allrgb_config_props, }, - { NULL } }; const AVFilter ff_vsrc_allrgb = { @@ -1840,7 +1830,7 @@ const AVFilter ff_vsrc_allrgb = { .query_formats = allrgb_query_formats, .activate = activate, .inputs = NULL, - .outputs = avfilter_vsrc_allrgb_outputs, + FILTER_OUTPUTS(avfilter_vsrc_allrgb_outputs), }; #endif /* CONFIG_ALLRGB_FILTER */ From patchwork Sun Aug 15 09:55:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29524 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1103874iov; Sun, 15 Aug 2021 02:56:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc7vHJl3cu8duodSjCQiDfHgBGbD0QtZdTTl3yh14R9zHlWHKoWg6Qb7YYE7XPOPUAHPbZ X-Received: by 2002:a05:6402:5192:: with SMTP id q18mr13392274edd.149.1629021367511; Sun, 15 Aug 2021 02:56:07 -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 n26si6924664edr.521.2021.08.15.02.56.07; Sun, 15 Aug 2021 02:56:07 -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=j86zxb5H; 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 3ECF3689B0B; Sun, 15 Aug 2021 12:56:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067031.outbound.protection.outlook.com [40.92.67.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 09FB56891DE for ; Sun, 15 Aug 2021 12:55:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RGkKexDq3o2vkdG2vL1Oe9+PoT4BTDEUt4NOWqWcvEZUBZVYGPQnf0ChtLxEP5PZdcLZf5LxbtLDXwQ+PSrvcfbZWKzr1ffxthd67LJ0Hr8MpyOsMe3Z0GfTJJkPG0FpS5C9itFmucllF06cPC11Ock7mksqCjri9+F/hKT2BCaGEq62+NKSsRpO2NPpNrnrlLhr8IrBEBF0oRmF+BcozMiSVqCb/hb5OK4LDNXAnHZmlhJJ4jChY9iFxVH8VC1V8aRA26tnWv0Z6KF4Z66El+oY0b5HTp2jdoP+4kyCJU4kSE7gxR1jpvDaqr9xdKukMb/0rHCtEqrtUeNRh8E7Iw== 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-SenderADCheck; bh=3xScIYOZxfTA1ixm3TL8rAOy5PHbXt6bmMExriOZ2Zw=; b=I9XfLwChRUhvvPkf4DnL/mlLVgfNYHJyMGGDtLGJEFkIgK5H4VzeZlGmGnJux3qO3QuHifeCuc+VWz9COY86udzaWDIv8NuPa/KUoG3xNOK3R8fpmKxKS9QPlIcSfWDuaTPb6yXy8zTRltBJv+jmBM0WBA2FWVPhVEO76ORA++2J56yw/CeeVyq2eSGPlpxDBUcE7/TKCuJEJ1aXOlNIQJ6AXU5gbuW6INCH7sXcR3sjUtYSzKekAivRxsI6IkxlJF7GYNC92PHw+bz12WgHbDGzLIWr3vEvQ8vxNdOLQG3oVFOgmbltKMMhX3dpY/EQ622A9zYuAU4rL8usJFZ42Q== 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=3xScIYOZxfTA1ixm3TL8rAOy5PHbXt6bmMExriOZ2Zw=; b=j86zxb5H3BHxByXfyOpdhg9ITKtBKsE+qxJMmnszAYVGSQybQLeYv5485fWcQjHUUysPRxt9Xg5KOcNZR9pTnvofpDm4rEXVeYTob3ZMnzTshI6o0QvP0PjJuoNmknC5MmAHYIa/zeMnGp+VqoEwiBAIuYeJtys5YHXkz3mLsgVxUofUWZF+4Ex1JO3wvqElGdrrmRqX+lVZQOLk0PqwPx67mSJTtH7IaxkhvPuQCkt362deyHLx4NR4XpbkcbQZWrrhKoFUzfw9rAVOIYCvSpD6zaB+V50IXjjjF/2zViHwUa3HzgVBIjxlwn1+STxc486fKrigSVAS1ltFPlb34A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:55:56 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:55:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:31 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [L2Re9mKY/iUKLZ1gN3kPQiQxmRxUFSsx] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:55:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 16a69fe3-c8d6-4279-1c58-08d95fd2e034 X-MS-Exchange-SLBlob-MailProps: dEG5jEBie8lKHvznhXgTQSmnqG0tvrHxQo15KakAb0FNVJZvtRuwk9nGptkrIvA54lL98PS1W8URwfTzmrPoFVw4xx2gjfov0wMdnEst40HL6pys9HJ06HXx5XEzaI/ndvpaG8yE8mieI9p9dA4MNypfAc4+O0cNIz4rmAqm8GRcWUmnuFJmQVazx5SQZ5KDe+1czg/QtKxIBNlwm5Uzn/JnFaPLQB9OgzkXpG/GqM9HX4RQrtq5h79mnnefGv6F93/XzAQv2Mebyuukx6J2EBziMjYTblPLC8v3Yu2jk9l1o/01KkpDECWRCn5C2gQGBRZpSj9bfk7p+Mjl5ZAJsfl6Rv7kghgRlAIP1yTk1cf7cR4wCSkmKWaLmRGj7KTjn5kX4SvJ4TsbUSFEaAHv8yb/u0uOigsOH8J9pEJg7pkwzriJ4KJQIjYhFoTdn98x+NNDMx33btn/SwlnsgorhUPGn/dxIwHqcDzZYZ67OxLVxMv8Z9QlA2UC0/wDss7/rDpjXjKapNpnA30ggKb0b59O7CU2h+CODzZwwNugbJhzhkcFHaGjKRo0tlbi6huq/grbR5yLgAikGA/yceg3t/ql3tuIKo48Xc3GyyUSIkVa7lwrz6cyKNwBYZ8bRkwBOcvJq5rNpBqI2zlwlmIzmnUsM6LfVFIcpJA5D9e8g/oBZZjt+v1uZg== X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NNG38i9WBXWat7VEjQA1Z0wLtf4aJROCFKdVuEH29/qzu4DcW3VUMHtQlWtF8sYpXCsVd9PrZVBTuZQj1pnpHdoF26YwhELZW82xft7WsKK7oglhod1LOfJVstTmzj6wESLZ0hIR8Syg6b4oB8lZx1S/C8qVw6qtT/bW71mwF6cR3g+pkjJidqAsqh19NkJNYqpalO0ZLn67yajVHixscqeVKCDIWYAFyZ2lqGOyuAcok0wzUvWlg/qJMYiLOebhQM2wm5TdYkB8lZ5t9by08zHE2ZjUms1PNrO38LxscSBtX4V51P/6RsU4jgKMn7DGyTKLNgXLRMhUuJpH461BkJlCIiOkRuvtHuakU07I45PED7mQs6bHONJMZ4ITi9RSrX2YyJgFwAmD4HXHRC9TwKcLo87k4Iheaj+u1UU4VVZs+DKGnsTmAzQDpBXF6zOq X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1rqZm5WbfuiwcI8l+WyhcLAkDDdGZiV18jTviNZuKlUUTngBlRs6cZOrLKvDQbvJQSahLISFzlWJXhd40f+dS8y9uLNwXliSxR+ARx35vQDtaDj14iX3zQT389i8xCQ9qkVNj6vN6Y+cH94FStkCqA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16a69fe3-c8d6-4279-1c58-08d95fd2e034 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:55:56.0849 (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: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 03/10] avfilter/avfilter: Add avfilter_filter_pad_count() 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: 4UJ8O7V5SZne It is intended as replacement for avfilter_pad_count(). In contrast to the latter, it avoids a loop. Signed-off-by: Andreas Rheinhardt --- Missing APIchanges entry and version bump. libavfilter/avfilter.c | 5 +++++ libavfilter/avfilter.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 15d469ed59..5032fd99d6 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -563,6 +563,11 @@ int avfilter_pad_count(const AVFilterPad *pads) av_assert0(!"AVFilterPad list not from a filter"); } +unsigned avfilter_filter_pad_count(const AVFilter *filter, int is_output) +{ + return is_output ? filter->nb_outputs : filter->nb_inputs; +} + static const char *default_filter_name(void *filter_ctx) { AVFilterContext *ctx = filter_ctx; diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index f1f19a0548..0905f308eb 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -332,6 +332,11 @@ typedef struct AVFilter { int (*activate)(AVFilterContext *ctx); } AVFilter; +/** + * Get the number of elements in an AVFilter's inputs or outputs array. + */ +unsigned avfilter_filter_pad_count(const AVFilter *filter, int is_output); + /** * Process multiple parts of the frame concurrently. */ From patchwork Sun Aug 15 09:55:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29531 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1103976iov; Sun, 15 Aug 2021 02:56:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjRAKAohV6LDBELpVCw73Mq7vz/QvyqpHLSLmq1eRpBm3Dg3MbgMV6Z/6CrAdkgTQnhQ1k X-Received: by 2002:aa7:d787:: with SMTP id s7mr13566448edq.336.1629021376964; Sun, 15 Aug 2021 02:56:16 -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 t13si6892749edc.254.2021.08.15.02.56.16; Sun, 15 Aug 2021 02:56:16 -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=ZCEVPxNL; 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 52B7D689DD9; Sun, 15 Aug 2021 12:56:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067105.outbound.protection.outlook.com [40.92.67.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ABCD368981E for ; Sun, 15 Aug 2021 12:56:05 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ezzs88Iob1lN5PT6IvB44Cp/ePBwvY9RPiCfLRN7DsxflFgiAt2JuPGiu81OYL/3Dyjtpo8HcWwAZ27eQ8WdCIg8+PiSD/CPyvgLbTKxFvtKczNWcaj6IhgIK+fPi7GGwdCGDZZLRVUMSLpIW08cIc237WAmqEQJY/OtLFxHgdUEPAZcNZ/G+HNvTV+llnNHgs3An6n/JoYw+ijON2TF+ZoE/sMqmRt8Zt6eu1pSfCNgDH18SBuKEvm9Aw3pzlAFEpSryAiIY2n4e3KYoMX93Ig2aaJBw/ByfQB8a71NznQHulu0WzVA8djW/okNv3TumeUuS5zxMKf7JfYRz9NXhw== 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-SenderADCheck; bh=LFqfgy3t9RlnZyUr7kgYQkTpGQr/grhk3uYhlksSOtA=; b=cq3qfKb73MeppQnvjF7hspfpQUAiWyNt8Twjy+CUXZYgQsEe27GhC+VaeTYXRDJXQ5wL6YCwMuvPCJZkF5PY3CdUeBpe38rNbfDIg7x7l3wCL/7BfzWlvOwYPzUKyEqLNwLyj2BtiUgesMNvWMg18+EY4Hw+BgWqE3TACuZgz4LZMckn2PVYwDsI/xP/fqPygSlEyqJ732GbFUBZidb90sxMLuq7rv7Wp/z6ZcQGQWMwOjP4X/vCGUSZE/ao3mL/aKrgv5oZhae3PXCLySgWV+BiNuhS37gzs9NpX3HeULTkImo3HGMw9BbdPfyrPARsLK1320TMvFnUiSHXyuKo+A== 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=LFqfgy3t9RlnZyUr7kgYQkTpGQr/grhk3uYhlksSOtA=; b=ZCEVPxNLaZQ+ebSLkvomEayqjlpZEu7+UzSczkzoNxnvCH73i9f3KRh+UzPwo6OnJk62Do2o5hWYcGNFnU0lykgNJjRLEvrUsdKZUMNYLYyTGCusTBKGX4hGH63FKXTowaiVhVwH4jE6K/0xq9aPhMZwMTtIj13PBO5lePgxA9C0DBgqPHBUKQP2A4BHQ7D/yy4yZbVzJ8OXvnTnuKEgHQHS3nNtvgQJdgfY68He5Ywq6mvgqP2aqODdF0bFh3di0io/mhJkS0xaiaz43Xk4Aif1n6ZCqVKOtldVozyxQas+fPnrBL1jel89gniceLplIufeECJFHYozFqeAC2a5jA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:56:04 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:56:04 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:32 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [HpwhEMK/cDjyT5afiG23K+qT3eMsms30] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:56:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5f038767-7f05-4b5f-0ec9-08d95fd2e547 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRlrIlNS1TwwsM0PAgDGnqz91+0qxdoua8XHm3xK8WSfspZSsuRWJaIyFTHwLUs7hJVlArutFmXVX0hPpBtm3/YwGoS+vTH3XnZK18fHt2H3wwUxNvuZM4rs+61Qc4mzbDRwIpRRJmiSnVQRd5WcU39A1UuDZY7ifAM2EFZj8e/ATfLpzt+85cy+py4ye38fE1Jl5IbiROOHhfkNm+ZwHkzLUZ0OObb7i9r6j9roriVs3uDZAuUAUgzdMFAPTCOSOJFFRPx+xQppJw/WA2WPRy8AN83IKr/v/B+UA19jixsAEMaxrkhuKVkRsFzkaAP2NSU1Ev8aOpYiz7fgsRD2g5t+qFHFP3ykjoLK5MfJGklQx54/uU/9GRmD6PsamoskGBycA7/fVWLcv+Fxi5hCc9LGNBJILIQGoy9bpNnvi1n77igZ7PV0jK2WDnDZLsVtigDsyRGRdFIydqM3/dUl+ceQPgzlcfG2IHTmxex6YaCDcS4TgObTzT82GNu3UfZvcUaxipRPeBuMxMXncV3ZvejfsCo/E7Gc+9AQJKkxEu6yppSB2TnyWfXU5GifUcWz8wx1NW+gat7DEcDLgS10HbAzdzDtSDZtysMRW6RACgPSZ+l8vwAvCFUEpPD/SwE+Q3Kl5+sn+YxMm0GYD0W1TWuxc95AiMbDCXcjle3taapz9cT5mNCgRY4pPESsfUnGHOUcj7GYpj7K4uODVxQbS1ktM1JGTWG7q83kGP3c1lR2y/Wov5XrToNlnce48jPE5M= X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xavlC6oLuIkCHOGS2L9GRCMrIu+EuGhCwIkGAFYQnnzD7asVFZ7h34zii4emVrKEHlgEedhC+e0fsjvMG0PG7e2xuj/fhj6XoFKxFm3bXZFgBYaekm9fPVqzo6s5QJR19GCWwV8V5zrxJnqS1rJiemJwYatwQVSplW8gH4OnIxDGTB8UxRvPVu6hGuRN/sn82SFXxYO+cMkX0uMRVDGo0pmF7A3iQ1K+cZ4zlAMN5G5DUMF0pdpz94iG1rwmkgSkNVkqEv9A0tblQ5rzJcBJDAUbE+L26Zil/jqTNLLCNfHhVYgZ5DmvLDpvXx1IeSEFiH08vRL6UjKDlHUiKvMosgUGvhH3L4tGWJZbY631VJX5dCT8Zl/L+s0glQsYTc2AFfGUOfd5+mFWHHNZIJug6cwDFZjfvAY1k32dXKC0BzaK40WjAw1f8cxyx8JG1pFJ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: W+iMw7iSX2ULFuUjpaghaRu672NICsWYWeRNjmi1mtUbuOBDOfpShGGFbFe/cUqhCWe6SjqPJiRPncl/7LluytxdUHghneq7T8IE7Kj0NGW/Xl7g63OAfcLCgDoDIkhmeujg6ZCoyakthcR7lxdF4w== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f038767-7f05-4b5f-0ec9-08d95fd2e547 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:56:04.6047 (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: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 04/10] fftools/cmdutils: Switch to avfilter_filter_pad_count() 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: BQ3ngX8nniKt Signed-off-by: Andreas Rheinhardt --- fftools/cmdutils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 96d38803df..2dd035a7cf 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1713,7 +1713,7 @@ int show_filters(void *optctx, const char *opt, const char *arg) *(descr_cur++) = '>'; } pad = i ? filter->outputs : filter->inputs; - nb_pads = avfilter_pad_count(pad); + nb_pads = avfilter_filter_pad_count(filter, i); for (j = 0; j < nb_pads; j++) { if (descr_cur >= descr + sizeof(descr) - 4) break; @@ -1949,7 +1949,7 @@ static void show_help_filter(const char *name) printf(" slice threading supported\n"); printf(" Inputs:\n"); - count = avfilter_pad_count(f->inputs); + count = avfilter_filter_pad_count(f, 0); for (i = 0; i < count; i++) { printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->inputs, i), media_type_string(avfilter_pad_get_type(f->inputs, i))); @@ -1960,7 +1960,7 @@ static void show_help_filter(const char *name) printf(" none (source filter)\n"); printf(" Outputs:\n"); - count = avfilter_pad_count(f->outputs); + count = avfilter_filter_pad_count(f, 1); for (i = 0; i < count; i++) { printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->outputs, i), media_type_string(avfilter_pad_get_type(f->outputs, i))); From patchwork Sun Aug 15 09:55:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29529 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1104042iov; Sun, 15 Aug 2021 02:56:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/Smozpig885ykKcNOSzQ5zInDWLwI+3OoCUabdxKP6YzMZ3F5VQL+RVodiVtzraNyjsjQ X-Received: by 2002:a17:906:158f:: with SMTP id k15mr10998864ejd.241.1629021386881; Sun, 15 Aug 2021 02:56:26 -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 dp17si7257347ejc.724.2021.08.15.02.56.26; Sun, 15 Aug 2021 02:56:26 -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=RFV9USkb; 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 5F0EA689E94; Sun, 15 Aug 2021 12:56:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067105.outbound.protection.outlook.com [40.92.67.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C42F7689C64 for ; Sun, 15 Aug 2021 12:56:10 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jnZG9hRnpoMcYWu8HgVc6jLWtNwAYw9mXLXUHgdH7bU+gqIEWu7bWJDVstUPrbx68F5xTo3BAIyc2TsRSuVOVeQNSwz/zMU7+/iyBDfzMxVUhUtPzP3E14ZXJgoPOg/V989MODO3Ie/+Ej9P7d7hMsk+n5g/A1mpNlq7JfMdJ/DkQvv6yZY3PonjQa5y93+nH0FwxSUvckJDvV86OtGxWpWqEbfulIvkDqI7+C6AjcG8PjKRM/P2hP9lDj7mbj8JoNR8jvbWyi73jDeGeCVAyfQtlqlnDcgCIpUbVDQs2Av3SMVHV6P8RqxDKpRX4qbJXzwsus3UXkWWTUJ6yh0U7w== 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-SenderADCheck; bh=25r48EuE2lW+RX3xp5bemNTJ9xZhht8TnD8LZfnKeco=; b=PaFNGQQKgtVo/9vGBvDrHLZGq+CGZ9aYfTcC+/zLhqtkDgQSK1Zo/A91kho7RrUYPfiNdCrBcCYl6Jaj8rBVmEaDUCa0Neq8tBesl9/MI1sjI+SejhYrjllAuzNSFt6WfMT8Pet/262mKLKEibVfOdhE5T3girVHfWJn5c1XX5FwKRHcyfOyndEuN7WrAgDDbbwkICA/0br+G6MIM0WUP0paZ+2dhqLoGbRxcFry7YY6uzLNz/SEBdHKIpBU1hhWJBBJExo0fv6MCUuwMH3mG/AS2N6P95b+MpqRTmWZ35aWe6GNiRmuLXzBj3y2f9dRLOptP4iTQQh9yw9EsZzU0A== 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=25r48EuE2lW+RX3xp5bemNTJ9xZhht8TnD8LZfnKeco=; b=RFV9USkbAopChYG16KOfLLLwtz0WzTeHBU4XZEVV7lhfS557wtf6fX32C7u52X4FVh2hfMquXkvqDBi7pQfaySMDJNGBCzFujBzIMY4aEVYVElYsFIOOzIHOCaL1Vm0BQtFRH/7/OmxN98TSqWiBjTu9PkHEAHSUxmd337PmhX6J7GgTyuATBIRXoBw2u+j2egO1d5iYq5bj9wJcr1Ga+47tAY94JV8/xl7d/UdReYiK+pC/LbxF0QZI4u6KOmiJMob6mv04srET8ZS8pgmtCEjeNmEWjRdrGEftAZxC+wEm6OrFtahRlawdot9CfFirmf/BO0UCspAodw8W+Sdpqg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:56:06 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:56:06 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:33 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [fbaPO3Tz+E2XRXc9rK3TnJbjTylz+oTt] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:56:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f522e610-c412-4c68-7a57-08d95fd2e63d X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UIMhWUD35g0FxUDNN6JTWbEBmdCjAkM3yudF4WrPUNPHM0U/bG1wU7djenT9KK/YMqt/p6YdIjLhPlyDZhWVMwtWi85DUOesxnJX+n4Y7kJXWdp1PwHkZ8CrCLotk+dOLPeZ1TN7FxkD9Rx2dr/4vB8QtOViPxUbxqukq8l0UPYlQH5Tsty1RVsYpM6mg8oP/84RlU0X+k+8xqwTMS2uT5W/4IgbF0uGnCwDw9jFfil1fG1xPW1nZyNlA/Kk5J5sx6cJ1oYnSsyCgNQX8B7PY5+yhy7gQFjlcJUq/SaXvKW5CuEIeAq3IJt9pTH3WrQYZ4UhS4V3NbGH1Yop0wdpjsHXFwLvUi4T44JVVfoThnLsmHalyQtzFj1t3MKIo23ut3kwpajbbQb+vQ772ou4et8BRU04cwtYrftQ+M97/jF98XyJg9wvlvoQ/I0XHRmcjqgR4YFXgj/CYwcaDwvgy2BKwKJ770io6eAWzOZ5zAQWRQt9kBMP7afoYEJAZkpfISh6E0E+mk9nETgY69/5oeYP0t4Zb+aRp3UPkmkuRrIEJR6jNngGAIec84V891JKkfN3OSLYt7M0FvasBUSFpo2QJ9kcrffkhbHenLExmJwdEO5agx57yAm7jOBJR+2mZyqFBqNA1TFxIhpT5fB1ucrD65w/Skd9pzdYj/LoyqyBIQEkZ8cyyKlpzkSzFYNI30vWGLnv/6ddA== X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kiEzVw/TbPBXpnfpz6Hng81kVx7Y3YTJL59jKFtXI7WEtSJU3/j3jb5LJ7ALYtG6b2qXtTURvVTOipwK6ubKK3pv8kn747410uuEt08yCCwr/I95ODE8hUKItYnC694j2U6Vo4Ul9Kk9q0BbdNDu6btPftnTqj7hYeOw6/FDc7ho0Gb7Hm4kEgNXfLL+NSbZJkLRqoc8wFe9ZGuqISd06q1UQjoXgMqKVkFtMc+GNLwv19lgcpbAlSVSj7m27+mvnJCMHbzJEzrbbrVFUdnuhNji/7nz+xrQD9bB25FOtQH+NTYaAe8/K3ZpnmU0OUUs6BM8pzZqpqi6CWs8CG+Ho/VzqdPKhQp13LnETDQK9hXANbZdcezwzwLQs5lqcgahgXi/iWM9DmXbNqavO9lxqvtba6JyjytKMI5UHpvWRWLjE0Dux+XihHz6w2MDjAZ1 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iPz6bxMZBi/HZHAvOV7kUnfGiE6TBXqkN2eo3CH1HGJcr/MW+HCv0/k0XoWbiZMxJeohFvQ0vf4Pf1Q8M9QFVyN8qTrIK0UgMHDdykmBtyNBxR8z4W+gGqRANN3JvtmMMioMjuOSyEw0ipkNnPrUSw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f522e610-c412-4c68-7a57-08d95fd2e63d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:56:06.2196 (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: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 05/10] avfilter/avfilter: Deprecate avfilter_pad_count() 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: XOsev46ljrsr It is unnecessary as the number of static inputs and outputs can now be directly read via AVFilter.nb_(in|out)puts. Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.h | 5 +++++ libavfilter/version.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 0905f308eb..6006663e70 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -70,10 +70,15 @@ typedef struct AVFilterPad AVFilterPad; typedef struct AVFilterFormats AVFilterFormats; typedef struct AVFilterChannelLayouts AVFilterChannelLayouts; +#if FF_API_PAD_COUNT /** * Get the number of elements in an AVFilter's inputs or outputs array. + * + * @deprecated Use avfilter_filter_pad_count() instead. */ +attribute_deprecated int avfilter_pad_count(const AVFilterPad *pads); +#endif /** * Get the name of an AVFilterPad. diff --git a/libavfilter/version.h b/libavfilter/version.h index 75cd10dccd..31d9e6750c 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -56,5 +56,8 @@ #ifndef FF_API_BUFFERSINK_ALLOC #define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9) #endif +#ifndef FF_API_PAD_COUNT +#define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9) +#endif #endif /* AVFILTER_VERSION_H */ From patchwork Sun Aug 15 09:55:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29526 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1104124iov; Sun, 15 Aug 2021 02:56:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaS5HW5ckP2dHhHCpaZOdoPIA49nqq1ToEUpFNzFVDTRGEztC0w2tTic/QanBVlDyx77Zb X-Received: by 2002:a17:906:3157:: with SMTP id e23mr11090320eje.29.1629021396597; Sun, 15 Aug 2021 02:56:36 -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 l20si7064665edw.100.2021.08.15.02.56.36; Sun, 15 Aug 2021 02:56:36 -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=jSKTC8Oz; 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 63304689B43; Sun, 15 Aug 2021 12:56:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067105.outbound.protection.outlook.com [40.92.67.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DC61C689963 for ; Sun, 15 Aug 2021 12:56:15 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d55TgIITOv7sXWahgPdWBp3efK6f9vfg7ykODMCgOuJREO3vbMLJ8dgEMQa0hD8M2BiGwrmR0ogjUGJbD9NZ8B9SV4IfjUmfuuW6Y79s/lxQT92/stwIWCt36SR6tZiK9gLExnHrdhVod+cTj7Oue4a4utiXhNEioxWxEK3RTXDUy14Y0auaBDYffTx2rCCVS4S1s6D2yG+BPg9PCXNjwd1O7V0yfSt1gLnh/cQ7m336uSAKqYZQS3uSq3QmWy1NdCD4Sp1HlhS+pycpHrv4iz4LIrFwIO0b0pmq9uB+7d+g1J6rq2zk3XLxu1Z7yFRFVPZBSEzkNGjx9eujVBzppA== 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-SenderADCheck; bh=KN8IY+hv6os/t6OoL7kKI74JEHidhC7GAh/fF1L80Lo=; b=d/0Zh8db8B+P0FjPgokei1B2mTT3gRyc6osWFHdSK63zoaY9QbaBgOZMD05zZMM6ajPs6fpZ4eat3DKXxA4RRtwtd9wumTJrFxbSx+mxqlGI9H962QNCOQVCjdKteZw5JOKdvFjYdpRaqbKHbUuvJHC5z6h+bKIbTxZjXO+S9bGXObvHUwe1uRlLu5zS1Qnv6DoCe6fT4Dj+VUbpomJUmujWj9ZswYfMc3YkM8+CNqWuuF389xUDKIURuGsNr4bGldjIvU0Pu0V46wavfmWA4C6OZb2fNsKkb4A/S2y3Xe2SaTu1N0+sb/O3OaawoHaMVxi28q/G8BuF7Bdd7sTtSQ== 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=KN8IY+hv6os/t6OoL7kKI74JEHidhC7GAh/fF1L80Lo=; b=jSKTC8OzctFYrnzIPtEWHyf7UJ7x3IadwWKC+F25zJXrlpdxTM0blm6HFB7WvAa9yg/NyCEFbocfXWdWSA/k0h7EJw0xRQnfLIkutlF4FMTMet2LGIOPblKxaYmwEyGeBNghlaWcpS/+3dYAtIBXNikaZN5/XNuIlQwGIR6BUpBce3AViV/DAkQvpsM72EPpXMCCKjnBmOYEN6Ftm69aFpFOoyGr6jRtxbvo9mlByUlo1n5ly3vymuBgPwDJEUzCd0QzTDiq48Y1lGJwKOxNloYUS64H5NYkZnlnBloQk93UzZAIQNLxChhGH+ly4UqhgFWuxS3ccOa6tpC+hl2mdw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:56:07 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:56:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:34 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [aRJZNLbHfHCqROOmHe3yUHO4hAu7GrXi] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:56:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 678972b0-ba19-49e4-807e-08d95fd2e71c X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UIMhWUD35g0FxUDNN6JTWbE4v7CYgaqzJvKhnHNdncXypiKoYaQrh1lnVR2CTF8BO2y/bnkMvY0ffefEt9PmHF9DPJNiKfVNknvYhY0OoYzjb0H2lgJ3PgCyRYnuJVa7JGrpNsHvttIaWh+HCjoDpc8JJGf/iZKKGr6LNQLNokyyihLY9fNWXHm1w4NvyvCfsnhP428SPGW4ZJDAnMmYQ6GgXCY1kHxcxXYnuSsjRoLtiCFmWSoA0B3QCT2RBDytroSeCkL5l7U3k9jevfnaq19DfznDZT8JMPWLM6w/jxm/dDTaLwkh9DdJXXnZIMvMsMGdP3KpZ43b4LVESEGEzKeAQ+HBeihgQ3Ik9QKg+EriYyHegQUMS2KiWK5b7MzK+mVeNn3MiW4H+2KCAjRXEz+WF8AkOzjUs3kE0EH+XEwv/XSB3eYJiGF0k3nK2FFf+84lmzMCiYWdP/nKHERgz9N6hdsBhS1Xbx8bMftC7yIVf8wTrkV+ZA70w6KcCVeeTxE/nAP1NGraVS+n2rzaZ04+FExnBZ5QR+WPnxgRUuaAMdFCb4akJx4QYwgY3/G4LU3uTKuzXzU+wftpRP9/7/wq7FmPe7rtdtNX56JVs39i910WpYthXvFUneaRUQDEmDOrBjnuiVGrXg8haJi/vNKBolII+NFqnKbICt0TGWKj5cyPbNdD+RArwSshsfgwYoA1NjQmlOH3A== X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SacQKcp7/oA+nPmOcSZGtZ+mIs/p6NcVFe0NVDW0GLRKEptYjnzWNX2E0DVnSPKsD1Ing0Z3dN4NJeggpAam1DCczt420EqMSuX1GCLCwRVZ/72GMx8354CGbQ0vWPNT6xGGFH+xhzcHDK2y00j4Gy1pRmIAojYTX3Cd3OoRm41giVbtI2IG6++IrzeTyct1xw40dUlopjVz9TAuEuuPoba1Y+MZXMsYse30r++vANrbvT+RJZGUI6JyJDesN6M3n+Uv0kJrIXDB8PCQCbP6hfqdXcddxhD6FCxRxXH0igol5K1zXn2SlCmvpfzRG3+vm4qu3ZjGT3Uuhzlq8w/OAFD7DpDhwN3fmnRdDG233nogj8JlO7UDROQIn3p+f9ZV7OHPhj/u/Mz9WslLVQ2rTr1ElINbcJ8qLs97KOX1wkFT+Vx5grHL5hTRPsJN5RIB X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cyHjshCI8SfWhdfgy3zC0Y2ttuh+MQA1LCm4yo7Sq0MpId0P13nPOJS22EvU+eMCMlVllEEhZ51qpzh4Vk/lyAfM0CIk+FlEQJplCplJ/R4Mz+L1t4xePH+PHS5qZHPV4TFgV6L8j2fG5BaSCuapzg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 678972b0-ba19-49e4-807e-08d95fd2e71c X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:56:07.6713 (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: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 06/10] avfilter/vf_coreimage: Simplify query_formats 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: UmLw0guTGO0a Using ff_set_common_formats_from_list() avoids using different functions depending upon how many inputs the filter has. Signed-off-by: Andreas Rheinhardt --- Untested as I don't have a mac. libavfilter/vf_coreimage.m | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index 2d74c0f5ce..80a7e33847 100644 --- a/libavfilter/vf_coreimage.m +++ b/libavfilter/vf_coreimage.m @@ -142,40 +142,7 @@ static int query_formats(AVFilterContext *fctx) AV_PIX_FMT_NONE }; - AVFilterFormats *inout_formats; - int ret; - - if (!(inout_formats = ff_make_format_list(inout_fmts_rgb))) { - return AVERROR(ENOMEM); - } - - if ((ret = ff_formats_ref(inout_formats, &fctx->inputs[0]->outcfg.formats)) < 0 || - (ret = ff_formats_ref(inout_formats, &fctx->outputs[0]->incfg.formats)) < 0) { - return ret; - } - - return 0; -} - -static int query_formats_src(AVFilterContext *fctx) -{ - static const enum AVPixelFormat inout_fmts_rgb[] = { - AV_PIX_FMT_ARGB, - AV_PIX_FMT_NONE - }; - - AVFilterFormats *inout_formats; - int ret; - - if (!(inout_formats = ff_make_format_list(inout_fmts_rgb))) { - return AVERROR(ENOMEM); - } - - if ((ret = ff_formats_ref(inout_formats, &fctx->outputs[0]->incfg.formats)) < 0) { - return ret; - } - - return 0; + return ff_set_common_formats_from_list(fctx, inout_fmts_rgb); } static int apply_filter(CoreImageContext *ctx, AVFilterLink *link, AVFrame *frame) @@ -683,5 +650,5 @@ const AVFilter ff_vsrc_coreimagesrc = { .priv_class = &coreimagesrc_class, .inputs = NULL, FF_FILTER_OUTPUTS(vsrc_coreimagesrc_outputs), - .query_formats = query_formats_src, + .query_formats = query_formats, }; From patchwork Sun Aug 15 09:55:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29528 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1104177iov; Sun, 15 Aug 2021 02:56:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztHhBU/xAVzxI/O7CQwpb60lca2ngpX2znc8k8m5/DrE75/73Cozy27K39RaLpC+RWJ50w X-Received: by 2002:a17:906:3bc3:: with SMTP id v3mr10874568ejf.482.1629021407080; Sun, 15 Aug 2021 02:56:47 -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 y2si7189737edv.102.2021.08.15.02.56.46; Sun, 15 Aug 2021 02:56:47 -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=ITkRdagG; 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 5427C68A0F9; Sun, 15 Aug 2021 12:56:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067105.outbound.protection.outlook.com [40.92.67.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 10C1968A0F9 for ; Sun, 15 Aug 2021 12:56:21 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eNZ6kwaScUmGdwd/KVFhn+Pj0iDeha0elwafjzxG/1BYlgfwkXeuFCLIwO0WysjNVZTBgeaS/1EMnndkEe9bICOolBOPba/DGjfo5Fe6QGaqIArOLJSl8H5LF29AXvP9tbmZFHgSiZAit5DL0mawEqgS3VppKk4GSQvCn7uGIxyb/d7WDwwC57i1timXIBmRY8yswUK+suUY9KZyrzdr6jvz3Q4+5JzyuWeS26+bT95JigDGPTt+vJJ23pnKmka9TAAEUmFNsZJGXvABcsXxAPXtY3PsBNBF0a+lNF9Wb4OGYcSS0QI42EjNKYTdxufy2KZdmVp9I2kz2dMyj94D0A== 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-SenderADCheck; bh=TNrvDu3nhvzoMoy+08PBLLh2sCUrKJrExKRRb+kKA7w=; b=Oe5//ypdpzd0baTRY7N4urAkwnsurfaxAcvkjXEjuWJFcqm3envZ4/v681thHYH3lXMdfTTThp76K6/i9Pffq3WuvScHf72V+sHlDDl7NZKBAorI445Xt4WsrKFjcwixUnMDPfMxCyFtenG8vNVyMhPKSYlZfrBt+/yReD8E6rWXJWODK+tCs4Yt2qypMulFPNREZxnnnmugU73lGx8xfsGTQnD2x4pi/FbUS4mD4JMh60VkLPReIuGo6FP8LB0yHqNKlANZRfH8GGbmztp5NjGH+9VnmIZxFvtwcwu45TZt0M+4xFzwls17SjwYLgdhCryx9UfCsWnzG0f9070lkw== 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=TNrvDu3nhvzoMoy+08PBLLh2sCUrKJrExKRRb+kKA7w=; b=ITkRdagGofH09/eh+okg3I3/68Dv3ZMbXYJp/F8nCCkn8Z/2foRm1pwlpyID3RWfBTKS8ecpzMVKMny3kAi2kX2l9Zk3Vw8jIKxgmzenRgWin+jd23yZwvtFnfugORvVlNi3grxNJKQi0TcPkD5bDJOTm0e5/iMmcyf0S7NxkrnGBiLsEsIMajZ5QaG8Y+3oOyEgqueHjBYnCGf0mhNR+Yckf1vpC4pSaGW1457WSSvORUI541BEiL7Oa27gwEuI1WXWztNOrS0HxvI2Xg3XOPjW3KF+mGv8wduulWRbQ4z/rzWmIRpdd+9pBRPNLODMUH+THBOgmakzsRxo49H52A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:56:08 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:56:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:35 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [jZko6AMCfv2utU4C0WAfUDJ7gRhQrovD] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:56:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 581c1075-0c80-464e-0beb-08d95fd2e7ba X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVjun0oR/i13HcFhFL6IneNKWxHkS/HhJB4/cELPESPlqqnShd5xhh6liv9JNqjq56smGGVViJp1rbkTPsY0qpEzu9Qa0G1LmNcsUQCM1hubCIBjrTatticdxJ3kICH/NJXCul4xCRgIYXNkryq2rqHgVkrfKPZrI8ltglUw8lwqKV6qfdzOOOQFijU9hVAL1Uu3bAnf5DzKQ4v93F2CBC4jNeEfu8N9e77ylrgbNJPhV/hKQWqq5Cs5fIckfS4vsCrkWSqlsZUqpY09YcTq3KZ+Ngy4Et74SNc4J+XrcJLCdNE4uC4m7hw464Esp3bYW0M40JzxSktA4yiVZrpt7v49a1eGxOpLW0FTAF8iDCi7I0tJgXklww9Ejy0vTm8yMXrXXPsPem++8hXkY8bIT9YjzMQ6W5bT9eyKla291acStveI/5Q1TZd2yKI/Ni4U00rzP0bmLh9vjiA/y0zbP+o9E6Jl1wNA/YOWhEaligbNHFyzQl96YxrshrhQkTavR1ObmbVbhfnhAo/5dIC1rUW6IE76SMqyMYAaT8H69EZk/maN+jCopveQliVGT84v4PD/O2JYqBmVOD/tqqzt7lTcv/UhIjcM7RKntLJyMSVFiI7kWDb1eWvk+GwOL/5v9HUwWefr78b0CcZ9El6oR/th2ny3MWVTNGAmXlxuet24kCrp25ZB/4dHPWoN6ag+g00gpnqBxS2jWMkOTC5MZq9RkwarcuYxps= X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PWh1PalzRM6P9SeQQOjr/mKOcva4BJGwZWJgeu6cZRdSLLb6vn3BXhlR/+rEbczQvnaNmsol0iqnl9wvGvdWnepfv62X25xhhAmJF2Re+BsFsBxV1jntPawJpQ1NHc10nUHcPPT4kpA033DKU2fHKPAjb6Y70XJsjVdeOAcQFHoGUEaXNyMZK7IZJT6PCD7gBu16Yn67Eja7CGJogAjqfvXLafLI9348fRFlAzwbQms0LJ9oxNoIjivYWY2h8c/ptd9Qy/3K+gbHe1fupbw4TOOwCbfc0mrEvToNrNr/EckMUZWCaPhl6FJP2g+Mcwx3u+eFI3xp6GfQmj3X9W66J3xnX3ZKbUYo1ydvIzcmvsSZrFqH0uA+pMbQKrBobVfiiLZE/eKmzVby11UwkLJxHAlABoFBYt0kNBUaX/otxvbKvD43NrvKoq1WU1WcvurO X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fHYx1aOw5S+v+k7ROOyvQjpvgytBJwC3UvVtdcpalJMh1gHpb5K7fhn1DrxfmF1fwf1w8dQ+CMpN1i/An7xCop8OsENw0enq2msU6qyTpcdztJz/RKLYy4kXnFhI5CTsMqqSj0pbkhTcGNFsqtGOWg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 581c1075-0c80-464e-0beb-08d95fd2e7ba X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:56:08.6948 (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: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 07/10] avfilter/vf_fieldorder: Simplify setting common pixel formats 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: gkN8YcLMV2gp by using ff_set_common_formats(). Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_fieldorder.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index c045d1634d..d34119c920 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -58,9 +58,7 @@ static int query_formats(AVFilterContext *ctx) (ret = ff_add_format(&formats, pix_fmt)) < 0) return ret; } - if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0 || - (ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0) - return ret; + return ff_set_common_formats(ctx, formats); } return 0; From patchwork Sun Aug 15 09:55:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29532 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1104249iov; Sun, 15 Aug 2021 02:56:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx427fq4hcnV6yN0QPX9JP+VqMzs2aqa2RwrSANn+mJ7LDFb03j2c5mZaoMooF7SNTXpGDH X-Received: by 2002:a17:906:3745:: with SMTP id e5mr10892313ejc.400.1629021417373; Sun, 15 Aug 2021 02:56:57 -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 y2si7305557ejr.90.2021.08.15.02.56.57; Sun, 15 Aug 2021 02:56:57 -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=l3uQJOO4; 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 1B17A68A2BD; Sun, 15 Aug 2021 12:56:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067105.outbound.protection.outlook.com [40.92.67.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 29E55689963 for ; Sun, 15 Aug 2021 12:56:21 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AC8nuMVLZuw02qflxst6TEMapWN1EogR1U7Q/HUNKvm2THJfEAZ57+bIdS2IRUe4wXOmLxsofN+yrSvOA2azVVi5LZr03v9levyGzsTfevoAev6p78oTcef69YcsNJ75RDg/butYxW6eLifJ3lFYnqryUbczd+LK8CrWvNONT/6cdbfWh7a/NfK5aWYmFBk4U9HZ+0lmSZkdduT5ZxbnBX52GhT7v/SCs3cfdqf/sXwF1yWPifdR3niqH8wLPBCqpTCwuTl2W/vvJ5E+/FnFI6DDxfQjwQzHXrqgXoRWp/KZx78TQSfNfKQSWbDY8FoLShTbVB/iGwsl35fr2zc3ow== 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-SenderADCheck; bh=idslXOrUQgzk7l9ZMKEc9MgkG9sgNmRpWRMRci1z7Ho=; b=jXC6jP5jc6Yqu/gNoBZjI6E6pcaYCI794ZU9s9vD6FWf0amMPqmiPei1WWd7++5FxNwGAgJFWGDIwrOQAKmyxIJNzH0S0IcsSVIHtCPwAc1+HYwCSgBXYQvKhSVBjx9Vad9zvBJut8zkr3UK/9lvYOVqzmDpz4FkKDd6hGlp1mw6mfbWguEOTSSc6JziwF0dWKdTNQBtZCknl+Z+yWmdVxTLy7Gh59pKwhwgmNo0l37TYHCzf5ej8x/RhMaIBVP3Bxr796ymBnOJCupjqL50MZU9BXDkfByZYZIMYvkumGWXBZMJAVEmnb90gSp9S5+31AzDiGB5boP/v6+sYiF13A== 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=idslXOrUQgzk7l9ZMKEc9MgkG9sgNmRpWRMRci1z7Ho=; b=l3uQJOO4JogXT12Iec076gkX8DWM4vInBF5gREOFsmaGpK5fIiyikYi/U50PuZMILkJx+da1/4U0h9/SgWYgHjiT+1qXFeUpYJC6JLvAONvNUj0LC4Tx0oLC8d0CkNveUrBXxl/XQ7m2/55jg/QZbuSIlq08ApcRR4lwX24+ndgUnk0CC+Br8NTOx2XCy5raKRD2Hayq6pn8m6nQAmjTk88j4Vi5zE2r+6mBwXIVEqMYwo2wMWey5zKs4B5X2geUg4BnE1y5WHdBKaqe1ANuMUCTma3Vmg4Hj19cJvhrZ0gv7BRhtDTYyWLB4ysNZnSg8z8+ukw8VTzvDUXAkQ/g9w== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:56:09 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:56:09 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:36 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [FdOkD3ACgW1PiVr5+AcfvXW/H2c73EYF] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:56:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e6aac5c7-da59-452c-7a62-08d95fd2e85a X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVjun0oR/i13HcFhFL6IneNiVUllv0s61Qnl3I+gWvYoR+hZJwES3fEYjkKSlYgZ+LzhkBnGHsWG8Qrh70Kgu7JJO9/LPLuEgPv3WNpd11XlwEedjhCnYoQtU0fa98l6d+k5+rMxwHLaVjghINCSN/XmqbYNl4zdOuAvfgGOOJBK7bpodZJqn6MsxAZG++ZNJCC/5bZGMt0bmUzksjLNuG7QPFr8zOEj+PiVrsZZnl9ATNiI/v7+Q5TLhecbfa/K3K51zrQ/ypQMvhJd002wPOSBwNqTWigJlv5yWYjTITsbfnJDxdkpEsYiUCquT10HS9JcENM8mPK8fcZI5xlXMkB2FO2oTuLgSKRsPVDDPAtUQnpZWxb1XeNgaqAp9ft22uLRSx+GRzg2HS5qxELCKO6t0zkapbn+W72DbsE+O6tlQ1zTjAn86JA1lVmlQOzhSo2cMKYzeeCPUWY70tpdvirjbVvEQ8e+KY4SHtPTH1khODN+S0A9Bee2LGlLFnnNjixBLv8scQD1FJSdp69Bcw29Dk5v5Ykdo9BbjY1ZNMOWrZAFjjdG/b4b8Nlx6H2Yk1uQ8SvxYzpepH+zsuiKiSp6AgfGoTNWl86RwBCy1HYTDUUHsL2pUMeQqVpqFA+oVLU3vWC29MRo85OzRMAmNr/D0FTC6TPUru++jbnjhZgz1kdYuBJ+BVD1i2ZEujjksYeuY5i70Q9KR98YvSUo6m5B0WPLjDBrUI= X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gMdh+YsyfY3itn3hQOY0uYulfiLHNTA9DHmtJMAFdQYr7JQ5gHXewHR90xQOw2yOMjUcFFalV6ddde8fBnKJ217tAXcooaeTwcYieoGUFEaGcKkhyWtagm/bfbNPLl4YBljFVtyoRb706BN8w1N8e+yZzqDLJvc9gqaI4wy7cVvZsIvoS+VpvfLxGpbmaPuPZaAwqXAbdBLe4hGyQu0jBpWKCGqITzX9oOmrVmPwHeLiNi2qiZSs5n0hDSnOL395cuYMuPFUUxjRfsQqx2tzVjyupRFTM/nxatG96obrm0OwRqdQan0eGd3egV+a6TVy6XYYIz33D7HH86zKDnwsKEIIMttlU89z68p3wB6Nw9Lx3QsC8/sX7dRkZ9nSImstikMEfROGD+eZIAMnfVJaSGYDRPAhMrHnzLpaRK116ZLrRbUxquxhhHIsMiiuWGHk X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Q/B/DUXviAHSHHGN6B7ZekgTELk/C75PifIjQ+ZTvn/f2B+QGNtbS0FfcbUKn/FpmVdHlsRKPvi5I0VRfuhv8boL4Gu4LH1LX0raHSRZbM7xfn1KDoSr2So1lLQ8Ma5C8RrQvPhRiBhSCfU9XVCnsQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6aac5c7-da59-452c-7a62-08d95fd2e85a X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:56:09.7581 (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: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 08/10] avfilter/formats: Avoid redundant counter 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: oWw/A8GIklMm The ff_set_common_(formats|channel_layouts|samplerates) have to free their list in case it doesn't have an owner; therefore they tracked whether they attached it to an owner. But the list's refcount already contains such a counter, so we don't have to keep track of whether we have attached the list to an owner. Signed-off-by: Andreas Rheinhardt --- libavfilter/formats.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 9e39d65a3c..cc73c5abcb 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -623,7 +623,7 @@ void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref) } #define SET_COMMON_FORMATS(ctx, fmts, ref_fn, unref_fn) \ - int count = 0, i; \ + int i; \ \ if (!fmts) \ return AVERROR(ENOMEM); \ @@ -634,7 +634,6 @@ void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref) if (ret < 0) { \ return ret; \ } \ - count++; \ } \ } \ for (i = 0; i < ctx->nb_outputs; i++) { \ @@ -643,13 +642,11 @@ void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref) if (ret < 0) { \ return ret; \ } \ - count++; \ } \ } \ \ - if (!count) { \ + if (!fmts->refcount) \ unref_fn(&fmts); \ - } \ \ return 0; From patchwork Sun Aug 15 09:55:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29530 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1104330iov; Sun, 15 Aug 2021 02:57:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvgcQ8V8T67IEVnKnE/evYNnHAbYmYZdik+4oKKfj25anXi/H+/afrxnwoI0C8jqXydQV+ X-Received: by 2002:a17:906:3bc3:: with SMTP id v3mr10875263ejf.482.1629021427644; Sun, 15 Aug 2021 02:57:07 -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 bq14si7142982edb.57.2021.08.15.02.57.07; Sun, 15 Aug 2021 02:57:07 -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=oubKci5q; 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 C797768A214; Sun, 15 Aug 2021 12:56:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067105.outbound.protection.outlook.com [40.92.67.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 42404689B43 for ; Sun, 15 Aug 2021 12:56:21 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nzQtZrxiws1pbsketr40pv0PCl0qccKmq3RQd7Un/ULyqVRYQKmKtZNp/ZaFYc+5DCbE0yqEAPE7UZdgp1RskVNBihzl2+DWJY7GVGFp3gFWa6BdJmKhQhNJ5+5IkWS5l519XJ0aassI5t2ySban617f9cmD7NyWvr1urc55WM/qru+Lb62Ezmg4aKetJx1sS7Tkui0hEZt5Vgu2mWd7vwWQedQvIw/gnWEfCQSRcXkrqp9gYla//35mh9NM3B4vtxOyHPrD7xq8mfDxjpXcfRDi7Acpq6629i/9CA81HPhIlwN1zC3dVKOaCQF6ZgV4kmvMRfzhOIglKkGuiCpKCw== 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-SenderADCheck; bh=iXVlzC2JE5OmOoqK30dfRDgNCNCVh5kUK9JKNtESVp0=; b=O0ByYstE6Nwow8Osft7UifIMvn6zyiBAnLSe09H2DCcSBlTSmy7/2HSAzuIfP2aUjt/p5FL4qYj/pg8YbGrNLh1a0u84AbAyiWtpbc2hGR8NQ2ExjqH72gEG9B6UuwyKF2XPTUlkFSKAltbmcwOU6f6UEM6/4yTiTE1lrjbdeoi4d8D6SfrB3cVRiSWxSPQTiyut/R4b/lgdvTLhNtB+TmdO2QVQQgcn5ZmoXlTvy9VvLsSDGVFrG36DDMPA9f0PG+wA0uvGjx7RgJG+gREZs6hYZ6iM2ZFk/wMpHuVtOkdQGUtickN9iWDj5CCdPqQ9CVIPtSgM0ixJKl5FjqyLoQ== 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=iXVlzC2JE5OmOoqK30dfRDgNCNCVh5kUK9JKNtESVp0=; b=oubKci5qn/WW15E9ATLCrKCi8HL0jdIozn2GBfz6coiicRs0cxAEJ4ZWIxS1QHkv0wr3D0w87SlUV1uxENkj7vcY9E6vVDXUTuk5v//N6ykMMYcXG/r/I+fg16KbYswltkMzKKDVUOOxnBpUMZOfgw9913rjhG8ygICei92tjHt4geD++NjzhNbi0+46AR6rRKpIzRcOAeuE0KqpwuhbVVZ+JRUZsR/DoWoURP7xMm/lA/YPMFXYOj8EcCPqr6C+kdjpbVkWxmjwKjx6pCokwpFkXaiAjdk06vqajEvzRZAOGI6c4fV1gqgNm25NVhHHOOujEhQmskWs7pRm6x0AiA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:56:10 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:56:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:37 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [dGAVdqGGmHErV5roCN4DWGu6BMqEDzBd] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:56:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 68b04073-34e7-45a6-2f28-08d95fd2e8e5 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRlrIlNS1TwwsM0PAgDGnqzBd1f6OZZXvkYI3kLDZOn6I6xeraA4jY0zIjT00sT/ewGyVnfm+WXUh3NcZ+Go8tq6SqjuFBnoQyN3H+ksdv5gOdQaSHCnCjMA7tdbPSwiFwCuEK49Z9cKJ3JDbRpbb5W0CDyRgyhddqc3+hu8OcpGFt6KukIEP2OvkQ6vJuftOBKSuNK6dSAqJ/5c5ncb7+/IwLCA62orK7+dT6ISQfaCgF5ECWWRgD1klJuSyFMXJSHcOMcsDAi+JoperUAKgHjTY+o4WyCAjO12Am44TEwwZPy6cJD7ArDVQ05FGlFHLhNHrvBqak8d1Ooc9rRpdUY62RQmazFmrOMhkKQ1RxdlpuLOdLr4OpVogGdelKf+4N8diU/j2G/Am/9fLldOuce6JbVUrz17qF9Ecxln13e73G2kWro6MF+2C88nIflSjdcTe13Y408/b0pwQ8q4HHZjhFr1hyx3YMGZYo+05h/fghNn0NQEOQ8FAyXaXzB79e0xsmdPv95zV/gdZWlCauu9mJXt8B95O6q6FdFjIJTZyrOtKWODIfELaQJrttT8yKNFC1RwBidgO0Y4W5kctbH7ADUI2alB5YkwxQLHLM88CbEHI5jdn7o+O1mvWvyBvGnqecW3YLNoVd2MEYBBxx4pGfuhG+n6cJx10bGWmw+LTmV+cJvoAuZFn61NvmP/1ynjYtzj2k4cOTi0bkm6GqQJqBEpneoLXxnfFTNEJhPUEPrgWgAR6KnzUrIATNjKi4= X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JogZzBxk0E7SQ1f2+4mBiyPbneoNEoaoS3pD7uv96V83h2VAHNllizfdXMZHYbIxhJdM8j8jDSySUU/WN/2gkKMez8DxcUzYCmoJWMWJQ9iVfC8o6RNfcGiNbpl9cUAZ3dSlG/aqSo0st1KdB2lJwUeAyAAR3V/DM3R8VXpoaDboZlPkfWj2sM7ikkGK3cmgtSY9TwX28gYfan0oFxYNo+s7SCZXCPFWhh0QRC2aqw/uYK4F8Vuis+9lBGX9HdotkzEJl48/czl2abFvzmf6kuiF+KTHnxaaPljictw6aw8YzXi8E3narPuUU69Zrlj5Xe9UCQwn/vxEnATNfRvU6r1+gcbUU3yc5pAUmMsLNG4Rb3zlgCvBUqJ43wbPVxa0LrUKlKSqiCE6zqL9W14A1it/zfafQnEOSzIm9wsbhIS4DAPVMEsM7wxvDD4BfZ9j X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C0Fapq6tSzydCsXU+mcXTJTrKmzbxQeKH9+VXox75Mp/SKU9k10YjUL/zdZzT3F3mAURMh4gh63Ct0x8iu8/A3bFJA1JxC/FhJ5iIdSe6myALT1SarSuoZo+HnNPM3kCaOdi1tBFNr7CKxnk0mq+iA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68b04073-34e7-45a6-2f28-08d95fd2e8e5 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:56:10.6602 (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: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 09/10] avfilter/formats: Don't set samplerate or channel count on video links 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: hzOsI+Guhc0v This currently happens by accident in a few filters that use ff_set_common_(samplerates|channel_layouts) like afir (if the response option is set) or agraphmonitor (due to the default code in avfiltergraph.c). So change those functions to make sure it does no longer happen. Signed-off-by: Andreas Rheinhardt --- 1. Contrary to ff_default_query_formats() the default code in avfiltergraph.c still uses ff_all_channel_layouts, not ff_all_channel_counts. I believe that this doesn't make sense and intend to change it after having inspected all filters for compatibility with the change. After it is changed, ff_default_query_formats() can be used directly. 2. These defaults can be used to e.g. remove lots of ff_set_common_all_samplerates() and calls. I will also look into this. 3. I don't like the way it is decided whether the audio components get initialized in ff_default_query_formats() and in the default code in avfiltergraph.c: In many cases this will lead to an unnecessary allocation (if the query_formats function has already set everything) and furthermore I don't think one should only look at the first input or (lacking that) the first output. Using internal per-filter flags seems more reasonable for this. 4. Just a quick question: If several links are set to individual lists that each contain exactly one element that coincides for all of these lists, then one could just as well use a shared list for all these links!? After all, in both cases the format negotiation will lead to the same result: The given format will be choosen for all these links. (E.g. vf_yadif_cuda.c can be simplified if the answer turns out to be yes (as I expect).) libavfilter/formats.c | 16 ++++++++++------ libavfilter/formats.h | 6 +++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index cc73c5abcb..9ceb32255b 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -622,14 +622,16 @@ void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref) FORMATS_CHANGEREF(oldref, newref); } -#define SET_COMMON_FORMATS(ctx, fmts, ref_fn, unref_fn) \ +#define SET_COMMON_FORMATS(ctx, fmts, _type, ref_fn, unref_fn) \ int i; \ \ if (!fmts) \ return AVERROR(ENOMEM); \ \ for (i = 0; i < ctx->nb_inputs; i++) { \ - if (ctx->inputs[i] && !ctx->inputs[i]->outcfg.fmts) { \ + AVFilterLink *const link = ctx->inputs[i]; \ + if (link && !link->outcfg.fmts && \ + (_type == AVMEDIA_TYPE_UNKNOWN || link->type == _type)) { \ int ret = ref_fn(fmts, &ctx->inputs[i]->outcfg.fmts); \ if (ret < 0) { \ return ret; \ @@ -637,7 +639,9 @@ void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref) } \ } \ for (i = 0; i < ctx->nb_outputs; i++) { \ - if (ctx->outputs[i] && !ctx->outputs[i]->incfg.fmts) { \ + AVFilterLink *const link = ctx->outputs[i]; \ + if (link && !link->incfg.fmts && \ + (_type == AVMEDIA_TYPE_UNKNOWN || link->type == _type)) { \ int ret = ref_fn(fmts, &ctx->outputs[i]->incfg.fmts); \ if (ret < 0) { \ return ret; \ @@ -653,7 +657,7 @@ void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref) int ff_set_common_channel_layouts(AVFilterContext *ctx, AVFilterChannelLayouts *channel_layouts) { - SET_COMMON_FORMATS(ctx, channel_layouts, + SET_COMMON_FORMATS(ctx, channel_layouts, AVMEDIA_TYPE_AUDIO, ff_channel_layouts_ref, ff_channel_layouts_unref); } @@ -671,7 +675,7 @@ int ff_set_common_all_channel_counts(AVFilterContext *ctx) int ff_set_common_samplerates(AVFilterContext *ctx, AVFilterFormats *samplerates) { - SET_COMMON_FORMATS(ctx, samplerates, + SET_COMMON_FORMATS(ctx, samplerates, AVMEDIA_TYPE_AUDIO, ff_formats_ref, ff_formats_unref); } @@ -693,7 +697,7 @@ int ff_set_common_all_samplerates(AVFilterContext *ctx) */ int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) { - SET_COMMON_FORMATS(ctx, formats, + SET_COMMON_FORMATS(ctx, formats, AVMEDIA_TYPE_UNKNOWN, ff_formats_ref, ff_formats_unref); } diff --git a/libavfilter/formats.h b/libavfilter/formats.h index ed513c265a..bef6557578 100644 --- a/libavfilter/formats.h +++ b/libavfilter/formats.h @@ -144,9 +144,9 @@ av_warn_unused_result AVFilterChannelLayouts *ff_make_format64_list(const int64_t *fmts); /** - * A helper for query_formats() which sets all links to the same list of channel - * layouts/sample rates. If there are no links hooked to this filter, the list - * is freed. + * Helpers for query_formats() which set all free audio links to the same list + * of channel layouts/sample rates. If there are no links hooked to this list, + * the list is freed. */ av_warn_unused_result int ff_set_common_channel_layouts(AVFilterContext *ctx, From patchwork Sun Aug 15 09:55:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29525 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1104468iov; Sun, 15 Aug 2021 02:57:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwskJiJhyZXnambb762EzF1KCGxYAuzlYQoDnU1x074wnt+e4sRoC7CxBcXc1CqckoXHAe4 X-Received: by 2002:a17:906:a24c:: with SMTP id bi12mr11004811ejb.530.1629021453052; Sun, 15 Aug 2021 02:57:33 -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 g17si1656726edb.536.2021.08.15.02.57.32; Sun, 15 Aug 2021 02:57:33 -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=kh7jwnBt; 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 E949468A40E; Sun, 15 Aug 2021 12:56:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2025.outbound.protection.outlook.com [40.92.91.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6B12868A15F for ; Sun, 15 Aug 2021 12:56:39 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lUe+kMr+17FL4YHchlImhcvpYahNAgTsWmTo8i/1DBqZ9O4WX1ds5c/lUz9kwoRAbxQu3onqoE8w7QXlQejEc1ZWUtG3ObB0SW46nt9kmC3f0onxHUVfY5s3BTDsuPST4Zkl5TMF8YtOIuf2AyvXIkST6+xDBLT6mSjFbp4tJOijflYer8m07M6IPpODP6fdnYz8N9JnCDBn2oza6avYxs9U53d2D7B+HWAk2+k5KhYUQnMsRauuQJL77phpUuaZczQS8l4+/6kCzV2+WO6LvWbxPePVlJ9H2tNEJBjS482p3zCqDlrvSGBK1aQeJvkxzYV4eSQRMisGwXZE/VVibA== 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-SenderADCheck; bh=yNQqy7mILvEie1oV8QhLKZl+4Iz3at+af3WPZxD6TmE=; b=iaTXrxorBlmUopPoYsE4oEk1Xd470YPFjNSYH0jD6vWrfYwx0GLTFmX7M4D/O8GX8tKzJeilmDS7eeUjEuDvJm83qlGXlWVuXc+woQFxSd+0HkHuQCIzMuEKGP5K9VrcvE5O7nlRZwsgyJjRg5UiAEBsMdt1ZRxmwvgvGo1BPGGLlM2vlIiy0CqlVGMZsie7mbgWMYLyo88NdUagxRRe3NchgQRdCnJORHa+0JkDf8S9cs8zhQG2JAri6t2Tp0oaKqxiTvPUXl/em53y8Pr1qEU2z6qMT024VplwdpfmtnRZnmN4SRk3gmeTyP/ixirpSf3IkCGOMTrZ4Mv6DA8Qsw== 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=yNQqy7mILvEie1oV8QhLKZl+4Iz3at+af3WPZxD6TmE=; b=kh7jwnBtjS1N7pOjHygBPRvcFqjsshl1cO5Te5WORRhtugG02sIj6Wkt9dI/XhXcs+xe6CSfeuQmY0f2lWBkasJiBjd4zLswy3TywwX85oZxVba2Ct3wNtRiUoGLoxh8aUzORdgSwmlOO8u1oHlzaOP7KvtiO1tLAj/c+kCc72xNbZ8Q6pRWVQN3fySNZeQczKt8ZALRktoU2tkt1m1b4gM1vsrJv9bPPV4Wg6hjTaWTxhN4nl/MWZzTm4ptRe60WmfWooB+tf9R1RRwO/xD454G4MD5ia0EZlyVEY0+5Oa6XFAq8ejIhM4JhPu1K6xNAEuaeLVZ7UWw3gkJ3N3Oyw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:56:11 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:56:11 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:38 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [eBUWoT1rFBd8fDqwlEsLQf8ZuGQr5Eev] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:56:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc4c1eba-ac57-4525-fe99-08d95fd2e97f X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UIMhWUD35g0FxUDNN6JTWbEpefnWOu8Pk4g2nyY5t1zC/PHTdRGlmXqD6zHA5MEk1uoaLdm095SimrZy/uNtmq3IeUHMD3Flndg0tlG6VGJDKiYk9W01C3nSIQMBLwi9ynK2SA2z4/oFRq26fSTU1TrWq6nVRYPiN4McBGC4LhBzNw5mcWucgFDG4KdDal7amaPlOFnxbBgmhtgYoEQLoV5owucfCJB8NM89h25HN3xT3jk9qcuDF6+oKTJhCjWhnlzf6GxISlGSXKfD+nqx17IpzNaIRZ4cVuN8pzf6yPuhbEyoHBCdghg9c+huhxi3p5d2QssOEv2GG/9Z9O+IkURysilPhhjLMTbOvrFDgp1VlQpqohx5cEtazTYAD4DvHd8c0EmhNw16jOiDXS9/5mMGB+VYTnkgSrHx2eKSDGM/N3IDfbWaRvt/zJ+Bn29s+kD2mDnCGjFy8F9Edl3UhSOQ1nYi7zPyZUxWsOQxu4PqXUEROxkfOtRgSw/yo+RD1AmcorEChveU916hcoYdrklPyZZsvPmDO5V2IVbHbDKgtArpTCpC/xqr/DPhdMjW5T2MfYqiC16vCjv5gk/rWkS32AOcAXywuxxJps9XQmeDwZUNjITBFrxJP8Sh7pfCqw1sgvo7IYh2GE0zFUVDzJgRvt7nRzg4NI6sl22ATKlamIfkn8q+aD37dQLMfev8mtT9t4vDjXV4A== X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4ah+hJbkhCeEjRSb5yQhqYPXP2K77levuClZty7sGAF0Q0cw2Sh4bv3O/SUc8mHMoAWqEF2WZ+aUklkaaZPCccStGkLjMjLj+Zwrzo8zTsuHy3ggz7cmRCU6VL87AkGwyIesw2BcJf9ki1g+Y/r21ZKaA5raZ6+HR1Je1EKU711VYSqug+JhefjI5oAgBPpJTbCxiGkrRqwS21Sx9ee4tqBtIKr/CRy28QLOQB9Yvb8h7+fDNf7r53v31RouU7bHOneo4fuvQg96+VLDek7Igu/5T4MzAUwbb+wppP8LVxVgHQIAgKBobC51d2+sQd1/PgbN4iU66GcpuH5dTxSEAs3EdGPghVHkpx7U/GXj2uzptreBSU0BD5wQLB7etvqhkeFjzLAtWVRSz8ar7I6cpvC0GCA0GNnPrY3w2qEkSp+LZ00iOGskV5CBEZwpvV1H X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BMHAilVnDsHKib8g3pmo8BXC/YKIFIOBVj7hj/rvlvtJ80tVxadMpIw123zovho1Lh1fNhr7S3VojkBkeHFwtp5I/Ww2lStBwLUAVkRH8ttg+BqlMtfEMI5Rf0/7X3GhZ2OUHFT06Gmrk7qDAaGFvA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc4c1eba-ac57-4525-fe99-08d95fd2e97f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:56:11.6778 (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: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 10/10] avfilter/avfiltergraph: Remove dead checks 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: B9K2JtufCqqF These checks emit warnings in case the channel layouts lists are inconsistent; yet since 69f5f6ea375950b4845b241ee27054bfc8f00343 a function that is called earlier errors out if they are inconsistent. Signed-off-by: Andreas Rheinhardt --- This relies on no audio parts being set for video links, but this is indeed so since the last commit. libavfilter/avfiltergraph.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 41a91a9bda..4f11d9a029 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -295,21 +295,6 @@ AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *nam return NULL; } -static void sanitize_channel_layouts(void *log, AVFilterChannelLayouts *l) -{ - if (!l) - return; - if (l->nb_channel_layouts) { - if (l->all_layouts || l->all_counts) - av_log(log, AV_LOG_WARNING, "All layouts set on non-empty list\n"); - l->all_layouts = l->all_counts = 0; - } else { - if (l->all_counts && !l->all_layouts) - av_log(log, AV_LOG_WARNING, "All counts without all layouts\n"); - l->all_layouts = 1; - } -} - static int filter_link_check_formats(void *log, AVFilterLink *link, AVFilterFormatsConfig *cfg) { int ret; @@ -359,7 +344,7 @@ static int filter_check_formats(AVFilterContext *ctx) static int filter_query_formats(AVFilterContext *ctx) { - int ret, i; + int ret; AVFilterFormats *formats; AVFilterChannelLayouts *chlayouts; enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type : @@ -376,11 +361,6 @@ static int filter_query_formats(AVFilterContext *ctx) if (ret < 0) return ret; - for (i = 0; i < ctx->nb_inputs; i++) - sanitize_channel_layouts(ctx, ctx->inputs[i]->outcfg.channel_layouts); - for (i = 0; i < ctx->nb_outputs; i++) - sanitize_channel_layouts(ctx, ctx->outputs[i]->incfg.channel_layouts); - formats = ff_all_formats(type); if ((ret = ff_set_common_formats(ctx, formats)) < 0) return ret;