From patchwork Fri Oct 4 08:42:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52033 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp268988vqg; Fri, 4 Oct 2024 02:09:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXYD7RHWnhXKdn4J4FV+WMQEF+8INmwAtY2EcbBse36+wsFr2igmQS/5qBQz99YkgWlQV8bYx373vUOWIB2qCEB@gmail.com X-Google-Smtp-Source: AGHT+IGv3HWsRL5k8zFAAfpLnluFLf6lcUkGCEvtkcKUO2KP+s6OIDqiX74hKtJRhmq0f2pUny9R X-Received: by 2002:a17:907:f1d3:b0:a86:97e5:8d4e with SMTP id a640c23a62f3a-a991bd0c743mr195776766b.23.1728032963821; Fri, 04 Oct 2024 02:09:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728032963; cv=none; d=google.com; s=arc-20240605; b=TQpNVkwf+uBZ0uxXtt6oLWEKJ8LORQ54Qfae5MGK7vbJ1/R9M5TPBTBRvYFyQFqd7B YJNrjCwkmkyGHvBsYSrzZkc5IqlEpuMWzLIFb0LgACXbrFfB7FwkB8iFeVi9DppNBddh h2Aw0H/7l7u2i4TAiG8rvQ7sj4Tab2QnWZN0ZJmwvWgdhr9A8xMDNn/RCvf7kQI1CKaC Nh0I45+ppya4BAgCee7kkBVp130C1aR2vIDRv1WWAYd/hrJdPrixKrXGJb51D5U5V6Cd 4GtpjgPl2UK0Us1t7nz3Ogp0rwQ6SS6iMZozsI4DssQSACZBNc3AeSlJHouN5TmYr822 GjaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=nhQTHzGI3KjoabuA00o7JS6XWDvJtPFxDsjc+bLSGUo=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ioU7CshvjjFCDswgSjm2T4yUFGNmYed9KsmPQPYRVmVF73BpD4DH/1beYT9HyP67aE 9PvKyj2yf+RFIhExQPdS/BsPg/6NIpVgdZgJY3TAoEmVVpSC3Ke51FVjm/T7sl5O9unI ncZnwE/0Hrn2ScjDWSOGu5YaIjp5FKch8xxzvSUG4G2Up1Kqpmc5NQnun6dDFWvkMkVS ecuTm9xqLZbbG9xcN5N3gyPKKVUZ+q0r21znWQJEjm7FHSUKXTxXultF65uuAqO/Rskm HsQWFchoromzP0lIyyc0Oqiw15NE4rWeCW+1GxI3v4l3Qq8uXM7+Tgv1PkjQqcPyuJln FnIQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=H0l+OEhG; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a99110e13c0si197022766b.839.2024.10.04.02.09.23; Fri, 04 Oct 2024 02:09:23 -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=@khirnov.net header.s=mail header.b=H0l+OEhG; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 86B3468DBD9; Fri, 4 Oct 2024 11:43:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 984D168D9E2 for ; Fri, 4 Oct 2024 11:42:56 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=H0l+OEhG; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id BA9794E16 for ; Fri, 4 Oct 2024 10:42:51 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id jztz8R0E-cwT for ; Fri, 4 Oct 2024 10:42:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031369; bh=6vG8ZgP/D12ZGMFiJ6H7RGzxZ5UtP6NYnkSc+BMB8kc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=H0l+OEhGuNycjycRiSyGjHPN811nbNFX7CSBBP8CLiqVp1nilTu1uruRG1LA+9PDJ 88234UTcBURM74GA2l5XWqy38GHK6z1i26Yx9vTp7hIIJsjqWjxSLm4iHxy/TPz1ba yoslIUI1iExWtJmiNsV/4SFmVHXHoBcTG3HYLApPsnPlgrOUDw5RfqUiN/I2zEsnTm cFuJN9WrJP1WW8Z9AnyOuivqrU0Va9JAvPVauMuF9++MoC/QCfD3heug3vVd/JgS3T WLIgoLZ95YqN4fCzrXgSzbOx3iP6m38q7Vq2fAYsvkuGhE9zTt6Gwx9mZUIOWxFk9t 4oGnSQEiXAyhg== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id E46C04E1B for ; Fri, 4 Oct 2024 10:42:49 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id CD77B3A1E5F for ; Fri, 04 Oct 2024 10:42:49 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 4 Oct 2024 10:42:18 +0200 Message-ID: <20241004084230.27419-8-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241004084230.27419-1-anton@khirnov.net> References: <20241004084230.27419-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/20] lavfi/vf_deband: switch to query_func2() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qcixdDUIwJzB --- libavfilter/vf_deband.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c index 31b864b760..4ba22c85a0 100644 --- a/libavfilter/vf_deband.c +++ b/libavfilter/vf_deband.c @@ -71,9 +71,11 @@ static const AVOption deband_options[] = { AVFILTER_DEFINE_CLASS(deband); -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - DebandContext *s = ctx->priv; + const DebandContext *s = ctx->priv; static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, @@ -110,7 +112,8 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_NONE }; - return ff_set_common_formats_from_list(ctx, s->coupling ? cpix_fmts : pix_fmts); + return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, + s->coupling ? cpix_fmts : pix_fmts); } static float frand(int x, int y) @@ -468,7 +471,7 @@ const AVFilter ff_vf_deband = { .uninit = uninit, FILTER_INPUTS(avfilter_vf_deband_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, };