From patchwork Fri Oct 4 08:42:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52029 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp268872vqg; Fri, 4 Oct 2024 02:09:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhAOuAvS5sPlC1HeXIUTy49hJW4RtlBe57VOHT+8XqDZyuM02Z0loeK+v4HIFnPf74Roz8DGyVDyUMdUra0rNG@gmail.com X-Google-Smtp-Source: AGHT+IGtABMKfUloWLSP5PpccTc3zcmPzWeeaIY9KCiQBiEq9MZnNZeOWvCgE4KzHvCpAvlypUN6 X-Received: by 2002:a05:6512:308f:b0:539:986e:cd68 with SMTP id 2adb3069b0e04-539ab9ec4eemr1091538e87.60.1728032950752; Fri, 04 Oct 2024 02:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728032950; cv=none; d=google.com; s=arc-20240605; b=gZha2d54nsDj1u8Ml1gNaWtRU2ncdRAyWeqzIRVlIHqyTi4yQEon9SabXUcA9rN5J6 FeL3p/DMslp84aURMOTK4dEMfHBbGIjL6v4k83bEHM/EvFdlNy7QtjTkY40tfIo+wb53 u2vl4rNV3d6I6R9iIqDi9WBbY/R713sXTorSS5AnVgGK9naRsdsXIoHTF/qQhtNWCYc+ PcFa0oFxmywMA40VajOoikyc2Dpfn6rH5bvwyEuKtYY/KmWrsW8UleTxopT5Ipsk57mB xUep6okB2CPDtzvU7yid256HKo/JDSgUXUJZ2kmCeh/ywLSP1yslySatHVvnaueh8xJv 11gQ== 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=DThIfGMQbSfb887DvdnK7fu0TXjeD+6hfyqgh5MKWpY=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=E24H77q9oBuScD6fQSCzVnDKdFr6ilYnipplR/WxEcI46Wz+XqokKwg2wwDNIUg99B WTOpWEJBJzHQrnPJ3XGeVDD8a9bifAapgxyrDxCxuiwVaGGsn/KyIjDR1GzbvR7Cux8E fNEHXjFy/wysOuV0mH7ExbKhY+Y4v1MDuiBn2UG/i069wuTjMII1P7APnv1tBVWyk1J0 hS/Iv/ZsKTAxQpSRi0dYoZXPWr0doqsuH6N9M2/6f0oksPNauauU4fmRLxUDhJeopZcK 28UFdkiWapbVzc/FWNl9WvKxAsMV5NBJC12KB71ZxKgCSgqLwFakaFdMIcoJ08/ZViWZ ra5g==; 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=IhiJ80HI; 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 2adb3069b0e04-539a824e488si1072489e87.27.2024.10.04.02.09.10; Fri, 04 Oct 2024 02:09:10 -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=IhiJ80HI; 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 BDC1668DB57; Fri, 4 Oct 2024 11:43:08 +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 2B6F568DA21 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=IhiJ80HI; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 9CD214E23 for ; Fri, 4 Oct 2024 10:42:52 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id Ur7jG3lUjgyA for ; Fri, 4 Oct 2024 10:42:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031370; bh=AEpm5ayA8PHGtCY4jk7lzEGg/OOLrytuawMpFWdpv/M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IhiJ80HIh7lSFqKsp+kUQykYEbU4N5GTNk4lzQUA4K6P7hH8KfdqWmjRmacVGuCUe NN1S4CcLhCf/tlHY5H7QXYpcfvYFruNXhDUrtDc+0MUTM3s3hMW2Ri53BpLGqyN5rE SEGrKGgfoDrpRxOdDXFzdVScdGdD9LsaPtLGo7r8dHPCwHqUQbrmefjmSeH2JGgJpn 8X9dKuA2hnFM8gQNGsGoa4oToae7zy3AjD5H6CmUzrTCzqdV77hXY2KggLxPs+le4a 1WpBL2G9iYQNI+pihjJraSk4DRoKDl3RQPzdyOptPmC5J7TJVeDQJcwlPVmVb3BvTK omOoGJmx2EMBw== 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 0F1894E29 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 EE84C3A0F02 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:21 +0200 Message-ID: <20241004084230.27419-11-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 11/20] lavfi/vf_edgedetect: 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: GTwnVaF0apEz --- libavfilter/vf_edgedetect.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c index 32339a0d8b..1077095fd3 100644 --- a/libavfilter/vf_edgedetect.c +++ b/libavfilter/vf_edgedetect.c @@ -97,7 +97,9 @@ static av_cold int init(AVFilterContext *ctx) return 0; } -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { const EdgeDetectContext *edgedetect = ctx->priv; static const enum AVPixelFormat wires_pix_fmts[] = {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}; @@ -114,7 +116,7 @@ static int query_formats(AVFilterContext *ctx) } else { av_assert0(0); } - 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 config_props(AVFilterLink *inlink) @@ -258,7 +260,7 @@ const AVFilter ff_vf_edgedetect = { .uninit = uninit, FILTER_INPUTS(edgedetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .priv_class = &edgedetect_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, };