From patchwork Sun Mar 31 05:31:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47682 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp94488pzb; Sat, 30 Mar 2024 22:32:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWqUHAFWCm8ewqVpQBo9TEJdMCq1ogalZospvvTJ/u891vbBc5SHbgtHE8iu+7tjq9xcQJ2WQ2hhhXgHbeLXq00JLOgzjL3IWqFkg== X-Google-Smtp-Source: AGHT+IEshqdGLruVn3D1m9HkyjiCdZBuNdx1WYe3qR1GoM7aTR6Le7XBeHez0SSEYIS0VuSdcsAi X-Received: by 2002:a05:6402:268c:b0:56b:7f64:86f7 with SMTP id w12-20020a056402268c00b0056b7f6486f7mr5660083edd.3.1711863141728; Sat, 30 Mar 2024 22:32:21 -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 y17-20020a056402271100b0056bb554e345si3455652edd.447.2024.03.30.22.32.21; Sat, 30 Mar 2024 22:32:21 -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=GMXFg5oX; 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 6CB3768CD68; Sun, 31 Mar 2024 08:31:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03olkn2013.outbound.protection.outlook.com [40.92.57.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D93CA68CAED for ; Sun, 31 Mar 2024 08:31:47 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kw+Lu7s98hC0pWVnOvMLTxQHg2Dry3UxTKKodQh2HNSMiWiOX6GDR54U2liRR8GfgMiqetdG8ijOWLeo5QaeAF/tci6CEflY5TPQfHQm6ZDusYV6z+uq35D47Koaq/y+ask0wQdvX5AKaxxBy09dy1phvQ/7o8QbOsrb9qjSbAJV0QCo2sfEc8OX8rSOBRqc230C5EiAsN2KSVpkf+abTc+kh1UIeS3/KoCkAGBuH+xuPPJDUR+nXgTcuYq89ZUmbtQ/pm+m1sshDa1oiE6xzZJ+3jiZZ1LKkpjySaZGXcUH57HWvxCTjP9QnUXoC4wXxCzHJRN9mS+vLceT6eBQjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IKw/Ir3UKYBQgQDKM4gGhpeMghizBumXJ0LO1aNrh8A=; b=eMcYeF1pzQPJOJR+b7sRqkFN/wZzkW53qwan0PGKsUp6oB9zLM7F3II6i02D2GBFaq+uOz1/i2g7marhxbus+xpAoMr42aXQs0Il2Ycok07ibR+yQYaQo5QLUB1X2pfdjhZnKiYIOf08b1ohR4b0koi8hoJHfaMl4zAn4kslc+117Xk0tQx5Qz0IvJx2GS/Wx9bNXcyH170ZGf8xdRsz9eqGWtCryvTG58eHY5owf48lJ2FONOZN4ZbKOlQDdvaxo85FSi63r7I/iSYxOv8c/RZVkUvP6z3uQf38iRAvHvFazkL0oFCHsKKPscVrsXL9CAoYrhcA4Jl1xbmVfE8r7A== 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=IKw/Ir3UKYBQgQDKM4gGhpeMghizBumXJ0LO1aNrh8A=; b=GMXFg5oXQ7Y8ZsWROMyLIhfS9qZKdcoxIDo9mBbUEmlfWF8bHmh3wDsrKOGJ5vldKkYprmpOkDoE+e37leO3uGii6+WODRmNyAqRoYlrLgdEhjvOLA76KwGjoM/ezvD0F4bO1pjcR3p6VxGolvtVjk8VyBYof29zuQn8dJHWGTDOqmf5+UjUMZrehFYPZ9nRyu5o7rCma5PKvp9dWmOWLEF0hGWpKp1V/+NM1rzeKQJFp46mcZYNzT5tbzjguN958dsoNbKqSSmx4JIg6PXQQNpoEIZLAA6JK5nKZ3cu7SANgBdR+qJrsElLhj6TXeGdfo9UOZEK+nc8fsimqn/kXw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0416.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:4c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.43; Sun, 31 Mar 2024 05:31:40 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Sun, 31 Mar 2024 05:31:40 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 31 Mar 2024 07:31:21 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [T9b/zvCeU//ErmTWVppAghhr7X88FiMmf7KRpIUqjRU=] X-ClientProxiedBy: ZR2P278CA0020.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:46::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240331053123.293740-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS4P250MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: abfd5867-67c0-41bd-8a99-08dc5143d740 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vXAq5dblODQLkarifjaOlAHB21bRj7sGWg0OARkoItU6ZEZy/MypD2KXfHHk4m+FG5jKj19DBjDr3coG8PXkJin+eET86PV6iN1PXr+ccABpPjM/jv+oseVqtEmTC0q2srITPnxYl2IYr7/Mar9upVmcMqHk7mfsc6qQWKssJyulpdwvxwYWREFfVyCyUH6Y6MS+9LcYaLWSaAO2YihqzptjUwBtKFPaxFWK53vhHIFcSaYQO1Zpagr8G4A2Wq/4qKpfg3K1dXdAEmN9cd7XPlRxXPhE00ogdiFuDe5ByP1NpeCWSeFf2Vqo2GUOM5v29epd3akg/PKR7X8vZ7wjj3naEdnt9QS1KDoEs2A8hvFAY2+wElS4UGWy3z2TS8NQoIRGhAuR8GbR+4v/7C9R8YhXLBdaxDpw1JyLrrvEVGDuZVc3He9bNsM8dTSvFY8672UtpLx4z03/bFqObDKHZem5BEWyLMVs++x2Q9yhALDXZ+c9CNTASFSYQYURsyGg1Mf05QLX1JObBPLc/UK8s/fhXkj2sToypMQ8tVyD7NHou7qmkWCKURgAf6gW+FXV8iXauzONw1pP42ugf654GEd3W3G0K+e8Apur05eQrWvvHE+26Fr+bKbUyRUFDU64 X-MS-Exchange-AntiSpam-MessageData-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C48WyN4HHxNMz3/tptqwOClNtL05zGsK6s+2lj1iuNVNeWxPHqyj3F/K0E0mDF/0qEBP4CsKOrRkpmobHM7QlAZFNUNGqQhoiWHsKVW7kK5c4joUlxcdPL2lNZPjvMZBVwkQRjIULPROSFMSGqfP6/UsFjq9UDJJZmzvKPAoxjzdVknM8RlIQ5MaowXkllNIghSchPXVCSmqLhAhie8/aTCH7KnITb8epLTo3gGVkUhHayHn5v1wAQ+uUXqkBRvwVywDSMmA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: abfd5867-67c0-41bd-8a99-08dc5143d740 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2024 05:31:40.0100 (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: AS4P250MB0416 Subject: [FFmpeg-devel] [PATCH 08/10] avfilter/vf_grayworld: Remove empty options and AVClass 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: bCMpdInv+mgn This filter only had an AVClass and empty options because up until recently, avfilter_init_str() errored out when options were provided for a filter without an AVClass. But setting (generic) options is necessary to take advantage of timeline support. So with avfilter_init_str() fixed, the AVClass and the options can be removed. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_grayworld.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libavfilter/vf_grayworld.c b/libavfilter/vf_grayworld.c index 61ed832253..0b6d673168 100644 --- a/libavfilter/vf_grayworld.c +++ b/libavfilter/vf_grayworld.c @@ -27,7 +27,6 @@ #include "libavutil/imgutils.h" #include "libavutil/mem.h" -#include "libavutil/opt.h" #include "avfilter.h" #include "internal.h" @@ -41,20 +40,11 @@ typedef struct ThreadData { } ThreadData; typedef struct GrayWorldContext { - const AVClass *class; float *tmpplab; int *line_count_pels; float *line_sum; } GrayWorldContext; -#define OFFSET(x) offsetof(GrayWorldContext, x) -#define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_RUNTIME_PARAM -static const AVOption grayworld_options[] = { - { NULL } -}; - -AVFILTER_DEFINE_CLASS(grayworld); - static void apply_matrix(const float matrix[3][3], const float input[3], float output[3]) { output[0] = matrix[0][0] * input[0] + matrix[0][1] * input[1] + matrix[0][2] * input[2]; @@ -311,7 +301,6 @@ const AVFilter ff_vf_grayworld = { .name = "grayworld", .description = NULL_IF_CONFIG_SMALL("Adjust white balance using LAB gray world algorithm"), .priv_size = sizeof(GrayWorldContext), - .priv_class = &grayworld_class, FILTER_INPUTS(grayworld_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32),