From patchwork Fri Oct 4 08:42:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52032 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp268985vqg; Fri, 4 Oct 2024 02:09:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUtKMtTTm3SKxp+jSTX+R2PavYRkYrBPwb9Ml2eDpUUaoHj59RjYXu/al2vluZmVpQrXmxKgCIFEQrJCgzcFLuA@gmail.com X-Google-Smtp-Source: AGHT+IFg8UUWygWJ+L1eBnIrVb6v0mwzFcHt/tYfBxrM7qnx62tDAshsojKqwU03MxqOUyPPSlwb X-Received: by 2002:a17:907:e2d0:b0:a98:ec66:5e28 with SMTP id a640c23a62f3a-a991bdc15f1mr186773966b.49.1728032963044; 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=OiMLkDJ2mc7hgDrmvoRbI5SCXrNAvhQBjcErZOF/6D6qN5qs24n2Wt9uC3LNDmbg9r +IxSbSQkwUuGZrfebFL70/KIpu5IbmPlXBznx9Y9ix7LZLckc42rhLF6IpJze8EMLFzq oOkrcyWg6nbZ7D5cKMJ3Zk6nQZyL/RzZpEwLdaH5iOb4rWfKicLUDxLESOIKz3/jH3Yw 1sJb+NEyoFO8HSubYDyPhb6+jTyo4Udi123ax9OHsWY9LJG0+yBKCQyVFJUCh0jW2RTz rCmfLfLqa5bK4vAhlLVB3s7rLLX8LSkPSWYAHt6RpOwOMwbj0bfydNlDvRocnMwIOZgM YPjw== 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=8nYJmMPvdHqFbQwyg7qdNUZh2qG5vAgcN6Gw02rzxUE=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=RNdZOOhSEU843VBwecbFu0vlZhqBFIbioBsLCVq5svLBkLrDcK96x6ehF8P8CGnRvF a1NVCO7Dx1HbcsV8OQ6WB/7kzJRGNC2wuAw4goWLPeK115BKD+n8mt1jJKX5oNl2k6JI FWoIwihIlFei4FWf1RY/0w7JvHBatLm/phf0ZTf5iZTuOnxIDGpd8xaQHPfO403AVvhA h6WqqNfOR/mi4OgrHDsLbjoele14T5B8AhtfVonr5NBN3adJcYzlUQIcEfLPFlt6beph /SCJnVE0Iee/KW7GgnQZDw0FJcTY+W/tXdZiLANV/gEdKkAOBAukqFEcos1L6Nt7ck6I aVWA==; 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=baQa6dyz; 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-a99110feb22si193025966b.976.2024.10.04.02.09.22; 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=baQa6dyz; 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 8C1F768DB9D; Fri, 4 Oct 2024 11:43:15 +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 6684F68DA21 for ; Fri, 4 Oct 2024 11:42:57 +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=baQa6dyz; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 412504E2C for ; Fri, 4 Oct 2024 10:42:53 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 2yMrzVXviqQ9 for ; Fri, 4 Oct 2024 10:42:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031370; bh=H9ateBqQB2QzlS8Blr90b8j4fiWIMD+ANLcQY9rd05M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=baQa6dyz3xlflBjAHjIE4ax3649mEA36fksvTJKQ0QCDWxXfpBHf/xN7rdvFOb4ct kxyhC6hSVyi5/n1DK8ToRXzYNXx9nJntSLbvWWtjVEgL6xmmON1rqhdV3jKVDFZDN0 yM3xqGOcGfVVTD/UrkB8tY8J4TnYgb832oySuT1x7V4KCWKHsIzNSBiDs3OPDeLLoH iykwSIZryiDxB/VVTsyFnpf+J6gdsnjXCVPqCOz2DA5Z8dQAJqek0j5/f4u7pt4aS+ tmt1CN5vZ1AugggMy84cl9EfbiELlQDmxMeco1YBUq4IzV1ZNE3oyoFrDAwnb+CVUI idvknGhBmI0Jg== 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 7C3524E32 for ; Fri, 4 Oct 2024 10:42:50 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 5D5D83A1E5F for ; Fri, 04 Oct 2024 10:42:50 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 4 Oct 2024 10:42:30 +0200 Message-ID: <20241004084230.27419-20-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 20/20] lavfi/vf_geq: 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: Q26SDp0Q2jMe --- libavfilter/vf_geq.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index bb95f45e2e..3f5f3796ba 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -336,9 +336,11 @@ end: return ret; } -static int geq_query_formats(AVFilterContext *ctx) +static int geq_query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - GEQContext *geq = ctx->priv; + const GEQContext *geq = ctx->priv; static const enum AVPixelFormat yuv_pix_fmts[] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, @@ -371,7 +373,7 @@ static int geq_query_formats(AVFilterContext *ctx) }; const enum AVPixelFormat *pix_fmts = geq->is_rgb ? rgb_pix_fmts : yuv_pix_fmts; - return ff_set_common_formats_from_list(ctx, pix_fmts); + return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, pix_fmts); } static int geq_config_props(AVFilterLink *inlink) @@ -532,7 +534,7 @@ const AVFilter ff_vf_geq = { .uninit = geq_uninit, FILTER_INPUTS(geq_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(geq_query_formats), + FILTER_QUERY_FUNC2(geq_query_formats), .priv_class = &geq_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, };