From patchwork Thu Sep 30 13:40:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30744 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp694643iob; Thu, 30 Sep 2021 06:55:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7QEX2mfueZq48vbLOn7+aJb9qZpUEOrdC2KQlL1ELyo1C22JwFR7f3/2bRD2uffbJOiNR X-Received: by 2002:a17:906:2b07:: with SMTP id a7mr7333427ejg.284.1633010141345; Thu, 30 Sep 2021 06:55:41 -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 18si3939093ejy.624.2021.09.30.06.55.41; Thu, 30 Sep 2021 06:55:41 -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=pJO62aXs; 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 0393868AE72; Thu, 30 Sep 2021 16:47:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064022.outbound.protection.outlook.com [40.92.64.22]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8502968AE62 for ; Thu, 30 Sep 2021 16:46:59 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ajJYqocfrEKo3hA11fblQlRxj7wsQ84SX3RuS6Okbtl92QMX6QT02/hvz0EH785zYE1a0ajTulC8IPhhEmvGye9AcCiGEC2KkPpAnmkS3fPtdcptUOltEceoGcXG+63D/sgy/AQcn6DJZZTVD9EtcCvlEXcOCHYyBgdf85Yk7U3rOKsuDXBJVsOzO8GIKYvperfjg+MUyngeZy5713bMjAOpUq/81dEaRbxfmflcCtSQCt6DUm5vZA2s/2fnG/I4TD1v0DcXm7A7D/sd/EZLkwDVXvwCCBLijbY2wREpjMCWSwxh3hGGeL7EtUWV4PB38GDCEaKfZXEo58FcWEIruQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Mj7o7cnNmM8qeudQBI35gAB8VriQySqyH+uqtvzs/fM=; b=YkTsXdKlfx0hUeioNsJvVcgQ8yqdq85bltTaM0R+CrzTVZjLLqg5/mA80wpUDNrLFCy2KZ+xAN25USHY50koZ3ZColUC1VUPrtAWiRAmUsv54LHJfteuogckShoad3w58dQ90jJZS2bfG7zE5Dcm3Ex95c3dJn+LbjwInvj6lTJ3zkyKH+3o5fOmhqlY3S1gWr7k6iZJmpdIrXEQxZqQcpQpxcOdkF0nO1LPhzOvvrVMJL/0pAmfh+qgxbYEoSO7adpkEyOzxIbLj53tetRBW22gnqXcLOUiaVi2vPYvOGIksy540nDhOTvJHZ/6QjRlf4u2f2S9vDdwviSp731VBQ== 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=Mj7o7cnNmM8qeudQBI35gAB8VriQySqyH+uqtvzs/fM=; b=pJO62aXsbvxszm22Ixu1px1CMmimY44RQO602kUPMRqY6765uJmdUjnQw5OML5lz8tUUgdVxXvRchQoWQ+3a032V0q/KzpM1zRcsnaqd5e5b7ix2/GUFjR5B0rPmKl8uopPCEuaeH1lz7q3brda+ggm480QaKMd3jrHjU0xuUP59RrL86A4Dxaydu3ZZYnPwMd5WjlyCoZqj+9/rbhi+bMxEivuOe283bsAzG2NcwouunMmdIFDeJetFIgVdcH6/fpywzyJNtuWL9XVyKl9gXcKJEpIUgLLkIhIYoM93hKuUdyDnIWrD0XNJDu2HdesxAMeiiznqLU5Aqg8fE1sZOA== Received: from PR3PR03MB6665.eurprd03.prod.outlook.com (2603:10a6:102:7d::6) by PA4PR03MB6704.eurprd03.prod.outlook.com (2603:10a6:102:e2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14; Thu, 30 Sep 2021 13:46:58 +0000 Received: from PR3PR03MB6665.eurprd03.prod.outlook.com ([fe80::15d4:ff2d:e607:cf68]) by PR3PR03MB6665.eurprd03.prod.outlook.com ([fe80::15d4:ff2d:e607:cf68%3]) with mapi id 15.20.4566.015; Thu, 30 Sep 2021 13:46:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 30 Sep 2021 15:40:03 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [/+HQermtdh9WBmNitqDpnkFNLuCRTMiX] X-ClientProxiedBy: AS9PR06CA0306.eurprd06.prod.outlook.com (2603:10a6:20b:45b::15) To PR3PR03MB6665.eurprd03.prod.outlook.com (2603:10a6:102:7d::6) X-Microsoft-Original-Message-ID: <20210930134239.2672698-61-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AS9PR06CA0306.eurprd06.prod.outlook.com (2603:10a6:20b:45b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Thu, 30 Sep 2021 13:46:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02970d84-01ed-4e5d-f583-08d98418c5f6 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiQEFGYb/YN4yvKEtCzw5Q2lK7Q8FL92qbOzptFBBX5RO7cy0RxZGfynQPPTeiKgaPJeT1qFnU9B2f4eO5ZhTV7Izg42u9mjUDGbzGB0/MIBMDkyioQ7k8+HuozLwW68u/9KC8e2G91KUBQlF8wil438or3bX+VOno/1HOOzVSuOf4J8CAVqKZK8ljxmVBEI3cjlCDA50YznKIZBzIWMIyC5NqQYahOjbbXSgcLi1iAz8Qwm0uaZxW5Suwm2sgz/xGIg9tCKr42YlXxkQDwWDE/JOhsJ86K/Y334xUqqUbyeF0jxDqolEcYPz8k/HKZ02Qdo5zzOpmtjc0xu7z55Bsq2ShYWDl4wa0plJNhpmFLbVg2ezApweeJGCUTOFhybcsyhO6KDbBO4v6y33xSl/ydP4vU3biTjmLR7uk/wV/Fuo9mrtDczmFj9sSiWpwg0HRSyfxz6/90s4FaNNFiqSiTcGcvCXoEntVYY0uBxYCVHRtUWb842gMrCBjozVJpOQW0JdQpLEcrG+xKFCGWz5j0so/Ea7brhMX9HgTIET/ghZeUqPsQyz0I/CozG+qfKa3V6N8xTYBql/afmv+IFvjiyTi9g5X+GwxvywTkWf5AA9MQl4e4v/r2oMsYMmKK0aABQJJWC8GiPENmFhQQKwQD8zEISo2TyXmKqbmY4IzraQhRcGyEiAl8+z1Q9yU9flL8C60pTNy/YpkBvo06PpUXx8DY8vdCh3yJNzysgkRo5RqfPlqZjKomZDNZIODjvRdA= X-MS-TrafficTypeDiagnostic: PA4PR03MB6704: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KGXabQUXwVNGv9T0gLbIsgPLs0D8/UrNJWF8MnWHo9HYrMsa5oVBfmO+rF6DFyCcVDEsRmtI5dMOk3n5jarLwvs0Z8zmHNGFEc0HOJyWBheH8Phlpyq8/7HsGWhyXeaxbHnJSV/mduxhI8DwYDVaAqBS0CDTwY5RVE6KS8JFA0Y9HHoK+6MSJmab17EkUF4bdU79aCy851pKMulTWE17AAPB2o8Qs//WHHw015DtYD2DKLYPI2NX4aYNwRov0TAx+LsSfmwIN9W1wjLHqjHbVdamCT0U/efBDIWusWH+zCh7liYZ+C/FNwnCCbDqgtujEqTlT7g7/Z+nfpm8o4MYJqK6gRM6n8OubgsRHxVGs/DyyTlw5bFSS2gBoaBpDeRORAWiaT13xY8kQvelOK2Z5BRxAudjYG+noAcGj8r/qhVdZTmC7j6U5WheH3/fj9oZ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xozGQmsT603zgKULF2x2ED3Q4PyPQ/GNmjOQaDrHI1dmSvNR8JM9fFT5QPJDfEUokCiUYRIx03GpvpfkFRfaoYrQwAx91tAOl9f6slrdEjD2sS1MIrziBGDEmxoUJ49TCES+BNB9bH0yrTf+Zf/X7w== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02970d84-01ed-4e5d-f583-08d98418c5f6 X-MS-Exchange-CrossTenant-AuthSource: PR3PR03MB6665.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2021 13:46:58.7004 (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: PA4PR03MB6704 Subject: [FFmpeg-devel] [PATCH 062/218] avfilter/vf_colorlevels: Use formats list instead of query function 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: wOcSWzfssOIN Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_colorlevels.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/libavfilter/vf_colorlevels.c b/libavfilter/vf_colorlevels.c index 552b701a2d..c089740b0a 100644 --- a/libavfilter/vf_colorlevels.c +++ b/libavfilter/vf_colorlevels.c @@ -84,22 +84,6 @@ static const AVOption colorlevels_options[] = { AVFILTER_DEFINE_CLASS(colorlevels); -static int query_formats(AVFilterContext *ctx) -{ - static const enum AVPixelFormat pix_fmts[] = { - AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR, - AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, - AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0, - AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, - AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48, - AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64, - AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA, - AV_PIX_FMT_NONE - }; - - return ff_set_common_formats_from_list(ctx, pix_fmts); -} - typedef struct ThreadData { const uint8_t *srcrow; uint8_t *dstrow; @@ -388,7 +372,13 @@ const AVFilter ff_vf_colorlevels = { .priv_class = &colorlevels_class, FILTER_INPUTS(colorlevels_inputs), FILTER_OUTPUTS(colorlevels_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_PIXFMTS(AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR, + AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, + AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0, + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48, + AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64, + AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, };