From patchwork Fri Oct 4 08:42:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52018 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp257275vqg; Fri, 4 Oct 2024 01:43:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUiimeS5wzPTFvqy2P1z3Doi3e8reV5vOYCTMcrXY4RlYw6QkxhEM9LuY/7xsa03MXwhP8iBz09LKyv3N4lXkxw@gmail.com X-Google-Smtp-Source: AGHT+IGD8cRTiSZmheSZeXJ5GwI9NrtqJ2GNQ7mgE48cIx6FkSUNBl76ycrZPXYJ9TI4APT97pUf X-Received: by 2002:a2e:a9a5:0:b0:2f7:5993:f4d7 with SMTP id 38308e7fff4ca-2faf3d9d140mr10604181fa.35.1728031381347; Fri, 04 Oct 2024 01:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728031381; cv=none; d=google.com; s=arc-20240605; b=Tjiwsxb4JqbggOVdRvlxt4JsdMy3dsUoB0TDFn+fgiNOqkZcX0aR9QNm+NRIcMFfFv VmutaeSgqKrwYRCJagT1OB+Y6s6yUDjvONKmE8eSXCbyZyT9Go/bt5BdFsi0h5CaOjEJ ezk7dkuXhoTtzXvDJZOrzRQkfwhrVuu5W3CB3xs6wHEi0amVqE1M21ZAobOLVPDrsYZ1 E6O/WDOR+2f6cJUSId5IZLVNaqHHs8QggfsLc60IllbP/0NZk3Nx1lAwSz4Vyz+jwuIX TFW6JQNePcvgU7kNlruFS+VfpbYRhpxqqf/cEL0X5eecjpE0Kuk76tSGLxYjgv0Xo2r5 WRWA== 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:message-id:date:to:from :dkim-signature:delivered-to; bh=WJ3BiEztpzSf/BW1FHIBuKZ8YHdfZKz97OqmQqHV6B0=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=V0r+fNt9rMUIdGDbAu78IZCIuj2skqo3lGRMcL+tbaev+H5VDZGzcQG1JlQTUfIlky Bi/XyQ+u/JsdTRHHhiwnhta7vi9HGt8XUKDgZdq410gGlSCJRoFK1wrwdSWdVG3XNqSp TjNg9qduHtbCZyLHCPw6bhGhG1Ma3qJw2ngcp2EdMmuOZhU/qhA7s8YKzNGLmGbdFs7j OBxq5YtCcGd4AG26OKITmE287DuGe9g0CAnC4m7uRSnYMKo+uZ1dxr3FpNhE/hYds3g9 84m/iJSqKG8F8/H0gnzbQLFwlY38+aZRSA5I+9VJB2VPtpXH0g1C1QW7bOsvSDNZZaM2 wjBQ==; 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=QI0Ncu0y; 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 38308e7fff4ca-2faecc94d76si9967381fa.478.2024.10.04.01.43.00; Fri, 04 Oct 2024 01:43:01 -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=QI0Ncu0y; 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 F253468D4BF; Fri, 4 Oct 2024 11:42:56 +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 233B368C74A for ; Fri, 4 Oct 2024 11:42:51 +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=QI0Ncu0y; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id C07BF4E25 for ; Fri, 4 Oct 2024 10:42:50 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 47kMnAr1JTNe for ; Fri, 4 Oct 2024 10:42:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031369; bh=B/9DCMDRGQqLWtbGIcXEsbltEku3VV3SnT+sqgR9aIc=; h=From:To:Subject:Date:From; b=QI0Ncu0yXMVwhFt6aW7yb2w/UAa9opb7z+x68XoDfKHXz6vHsJS7CYa+tzkh/GYnH Q7ZlUMzlI91nOnrM4ZjzZlKO73GejTOqlfXN6GJVCI74xWh2nzstZOA2m52s42Lnh9 KjBMKvKr8Tcbpgsi8VyBafRubJXyC6PFTUvXiZg5LgNEyMF/FOJO0VLFon7hSZ/rKN 6+54h8X0wQWi9b0Nfm6TrjiiVPbCWCh4sFqBqyBfdGGFM5t2ALl34QndTaJok3l6Ee shJ14ijeShbh7lCQ5W4QLzeiDPcGvNJTya2xuE3/U33uNA3lQERUmCE+1hQgav/lEn reWDKXf1lGsKg== 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 AC5C04DEE 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 7E78F3A0139 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:11 +0200 Message-ID: <20241004084230.27419-1-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/20] lavfi/vf_alphamerge: 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: Nl2zZwjG61tW Simplify the implementation by using the fact that ff_set_common_*() will ignore those links on which the formats have already been set. --- libavfilter/vf_alphamerge.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index 2abb7e5583..c732f29367 100644 --- a/libavfilter/vf_alphamerge.c +++ b/libavfilter/vf_alphamerge.c @@ -96,7 +96,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) { static const enum AVPixelFormat main_fmts[] = { AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P, @@ -105,15 +107,18 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_NONE }; static const enum AVPixelFormat alpha_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; - AVFilterFormats *main_formats = ff_make_format_list(main_fmts); int ret; - if ((ret = ff_formats_ref(main_formats, &ctx->inputs[0]->outcfg.formats)) < 0 || - (ret = ff_formats_ref(main_formats, &ctx->outputs[0]->incfg.formats)) < 0) - return ret; + ret = ff_formats_ref(ff_make_format_list(alpha_fmts), + &cfg_in[1]->formats); + if (ret < 0) + return ret; - return ff_formats_ref(ff_make_format_list(alpha_fmts), - &ctx->inputs[1]->outcfg.formats); + ret = ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, main_fmts); + if (ret < 0) + return ret; + + return 0; } static int config_input_main(AVFilterLink *inlink) @@ -203,7 +208,7 @@ const AVFilter ff_vf_alphamerge = { .init = init, FILTER_INPUTS(alphamerge_inputs), FILTER_OUTPUTS(alphamerge_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .uninit = uninit, .activate = activate, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, From patchwork Fri Oct 4 08:42:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52019 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp257363vqg; Fri, 4 Oct 2024 01:43:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWSCcCf5vAfQq7vlfAAHhYl/ehWY7NYys8jM8Um3YLHCDKCRGOlJvc0a9Bw9pcdBwRVAxr2A7Xr7LHHijtYuywU@gmail.com X-Google-Smtp-Source: AGHT+IGoJ0BbSferpWRS9WaNmAK83MRqvdos+nCxvCV+0DansgRE5lp7j4n+gz9CAuQ0oV9dMEpU X-Received: by 2002:a05:6512:3088:b0:52f:368:5018 with SMTP id 2adb3069b0e04-539ab8adce3mr1089856e87.43.1728031392476; Fri, 04 Oct 2024 01:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728031392; cv=none; d=google.com; s=arc-20240605; b=ClTLlQt9aOvX+FoMQsu3WZUlKVMnXqBZPp38b/6/herblTxVULuKoV+HT2XZEX8DVl z4J+SoAj/Ey1p9sHmAAX2Pd+upYkW0Y6we7MsWgZUmV4wiZPJZlptHP80jZ5r3wI0wYW 4FlhzmWzYy9BxTE4MI4V0C3l2yGmMS+VHSjVaf+gjUEWWM7cdR4HPFxK47okAFxE9c+O 7UUoFNAw9ZKHzGEmrSX7TJk4P6Lg8o9ndHsf58Gkxu3xMDwpBMNd//lNVzR2PMdVK6a9 6xmWEHx69o42geF5G0T4oXjXlb5q36Ahcm0NEeB6NWgWJhW3eWrCFz/M+rw2+18gn8ld jpsQ== 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=pdvteRV3CdAPoCuAFCGUPAEBKl+fUuGp0jusAGqUS5I=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=GXtguxUyUXRA9WBxUeel0+2nOA6k9iFnXZpeuCN1PPXACz62Jc8Zm7h+IfCMeiU9T8 i+BU4rDHD0UE3DIDFBRoq5Z+Ccgh/T8RrRDcU5a+CVt6f3D+CSG77V69WPoBwo5NUqX2 y5K7IV3FjsArVtNPJI942969FZJ9H+Lw6wYKhOo6Fof/Or3cmzg0jD6azxdXtaSKLIaF k3szkmjySLW6oMLEMucSzWl2yB1smgm+pAAj3CI0Z2EwIVqchwvPbhWs3eOvXLT5iUSN sO2HWAYtLV3IQ57JYnkwFUz4vfFwDYNa/jjOidY9BoPk8f7FKKBrlUsomzg8eq4hMt65 HLiw==; 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=E7HJKl2Z; 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 4fb4d7f45d1cf-5c8ca3e2a85si1962388a12.144.2024.10.04.01.43.11; Fri, 04 Oct 2024 01:43:12 -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=E7HJKl2Z; 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 E718D68DADA; Fri, 4 Oct 2024 11:42:57 +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 2D61368CFEA for ; Fri, 4 Oct 2024 11:42:51 +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=E7HJKl2Z; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id C3C8D4E27 for ; Fri, 4 Oct 2024 10:42:50 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id LEmh75OTYuKC for ; Fri, 4 Oct 2024 10:42:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031369; bh=jhd49JTcyNuW/eBd5lx8HEbBNFtF9/bbjjoDYZqkmtk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E7HJKl2ZWbJqbOAElNTsMSEJQzmLjCo/qc7rVMrDjbap0XV1IlJUFvNc65JeA4f9+ Gut3QDPyUDwIR3GwiZdazrTEVVf0W3+BMUOCzrzYzU0StbU8Jjf7/+GXuNO7pyJgN/ 2iVi/S/l1SUsYo8q56cA7h5Qh9Mft6WkDx6DpMsCF6OuCzx1YnkdrpmyRDBPdh9Cqt OFn+HxUAvw35eb5kyA7MAUmMT3YWOmT3QIPP1ZSyVnQN+eQt++l3ItHg6Lvm4e11cF hiSb70eiw3/EUza0pNcUEBQcfSnKpxD279gON8SkURitgg1yr0pzW2ym3AkTwulnBS TeXVI3sLEmDIw== 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 AC540EFF 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 8C1E43A0F02 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:12 +0200 Message-ID: <20241004084230.27419-2-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 02/20] lavfi/vf_boxblur: 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: l6O0t8KDqdWg --- libavfilter/vf_boxblur.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c index 27cf57a7c1..d684dee99d 100644 --- a/libavfilter/vf_boxblur.c +++ b/libavfilter/vf_boxblur.c @@ -55,7 +55,9 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&s->temp[1]); } -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { AVFilterFormats *formats = NULL; int fmt, ret; @@ -69,7 +71,7 @@ static int query_formats(AVFilterContext *ctx) return ret; } - return ff_set_common_formats(ctx, formats); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, formats); } static int config_input(AVFilterLink *inlink) @@ -303,6 +305,6 @@ const AVFilter ff_vf_boxblur = { .uninit = uninit, FILTER_INPUTS(avfilter_vf_boxblur_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; From patchwork Fri Oct 4 08:42:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52028 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp268830vqg; Fri, 4 Oct 2024 02:09:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTSQZtY6gDC4HrwvDpYMyIlWT6nZExf7sOMT6W3wZxUFx0mMCOHjIdngEWIcB4alMBYsSEgXtqIZ8Dtn0JzBV7@gmail.com X-Google-Smtp-Source: AGHT+IGNl5ue4peIiiD/5BgYBszvvHpAR4hmxstqMfdnLgCPGa5gBdq0fi4QTWFsdZkGa2lwCkSu X-Received: by 2002:a05:6402:2682:b0:5c5:b90a:5803 with SMTP id 4fb4d7f45d1cf-5c8d2f2dfe4mr1984345a12.7.1728032946817; Fri, 04 Oct 2024 02:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728032946; cv=none; d=google.com; s=arc-20240605; b=FToUByORF79bNTlNf1CW7Rjrs8XY7JRSynT0LqlowLoSACXID7W7zfnIqwGZF8Q3kh Zw4YUZDps4jRWTDiupbQtCWQl4cZjBxY9qiHjBaS5qcbxxEIUEW7VYebNSMzYkuxvnGK M41fAo77Yj5dHgY/8rq0gKhE2ou3C50ZxrvbvuGIYWWa1tRL6YikRAn+hFAbvONh3Shx +1gmUQi1OlCdQUaudHNg7bthCsAA8wLJYaI/wbdvZr01c362qtr0CWLcFTSs2dSYhLOk vbrpWX0NlBxtKUotbpQ6Hk7EudDJBT5YNhJqcAk82x8PJe+y5QNf/qclkZljf9F3QMa/ 2tRA== 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=mdmKivBMdK263vG2RIuP0+VhVMkACS46CTaHE8llh8A=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=LvX+zwhM4x3bXD00aHjZEWk15QKXdrdUdvtwNhezON7iZTYAzBPY0l5BmPbvpCi5DY 6/Beoz/RHulX4U8TCjDyLlpoCefEFb821+foQoAt6Uo6YDxuGXSXf+3UqNcX7VR2aT4q bH/61pzy/JpVd7l4k7aTtP/rugNqSEyY3XKtNF5lCjnVG/l8TNAfb8wnuy3RQlnlbA8i s2u4eT/yK97/t+ObeyMaBm+7w7RlQubLewgQl47NjShDNP6gKo6CEoIZaZINu34g2e52 iaTiqrgsVlXaxmPC/+LI2vxsigrMivj6AE44IGUBWQQLiP1sxiynRJPA/omkv1+00hPp jJfQ==; 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=LpERTyv2; 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 4fb4d7f45d1cf-5c8ca47d54asi2013511a12.255.2024.10.04.02.09.06; Fri, 04 Oct 2024 02:09:06 -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=LpERTyv2; 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 5FA9F68D9CC; Fri, 4 Oct 2024 11:43:00 +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 7E8E068D4BF for ; Fri, 4 Oct 2024 11:42:51 +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=LpERTyv2; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 2F273EFF 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 cj3-7L7Oaoev for ; Fri, 4 Oct 2024 10:42:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031369; bh=EbNi4QPHMc1Bs5G0/0k/0XqhYClofdCwB7AHHjATbXA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LpERTyv2YG55rMlE+DXNYkCcrmyPOHeo2554tVOxk0n2y+zGPy07atJlpMWt0BCB6 noo4aS5SeZvaIVY8aq/eqVbAsF7A0TmH+JoECJVPk6KMwiIr2OR7438WD0StE1XkUa Hx+gI2v0c2tAfn3Xs/l9vDyLGLSNtpWJLOdyjVl5VCPzThtB85sgmROzcKN5V2wOMV UuCLqBSQypJySdQwpbs2Cm08ji90hFlhJjc9tvly8EqghdZw6kUCFmOuAh6hw9SVx9 qvPcueSgx1+oamTv4W5U6Ng2uU8YaCOWRAlFj29DIEypOiuAEMK8hY8F5zRrl8YY/e dbL/DEF01ae3Q== 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 AC7544E0F 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 979E33A0F41 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:13 +0200 Message-ID: <20241004084230.27419-3-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 03/20] lavfi/vf_ciescope: 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: R0FxEr1fSF6r --- libavfilter/vf_ciescope.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c index 260ca26187..8ca47aaafd 100644 --- a/libavfilter/vf_ciescope.c +++ b/libavfilter/vf_ciescope.c @@ -139,14 +139,16 @@ static const enum AVPixelFormat out_pix_fmts[] = { AV_PIX_FMT_NONE }; -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { int ret; - if ((ret = ff_formats_ref(ff_make_format_list(in_pix_fmts), &ctx->inputs[0]->outcfg.formats)) < 0) + if ((ret = ff_formats_ref(ff_make_format_list(in_pix_fmts), &cfg_in[0]->formats)) < 0) return ret; - if ((ret = ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->incfg.formats)) < 0) + if ((ret = ff_formats_ref(ff_make_format_list(out_pix_fmts), &cfg_out[0]->formats)) < 0) return ret; return 0; @@ -1559,5 +1561,5 @@ const AVFilter ff_vf_ciescope = { .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; From patchwork Fri Oct 4 08:42:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52020 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp257441vqg; Fri, 4 Oct 2024 01:43:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWH2tFxQ8W09HZVkSvqmS3JXi+FTFw5xYqw0+kdKjjFEw/TEJ4uSGEE+kYpWc0gb3WKj250xP1bmHefxmIiT06k@gmail.com X-Google-Smtp-Source: AGHT+IEN5viIfgFRlTAjkkcdedYh4S2eyy03VcHlLKG+m1E9lfstPGIggh95BnPZ6wWiVSyz3Vg4 X-Received: by 2002:a2e:bc1a:0:b0:2fa:d2c3:a7dc with SMTP id 38308e7fff4ca-2faf3d73f52mr3109111fa.10.1728031404377; Fri, 04 Oct 2024 01:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728031404; cv=none; d=google.com; s=arc-20240605; b=FOh5mR/2ybQ9xlem+2WWzHwm1qGHzIV3TuntkDqaZj9EnjjRgmhmjnk/2zdAGN3GOn S18jHIpeqcwhFT0DTjUuCmCqZAPHze/pKSvQ0qqiU50cJGi6JEnyJYAJrjaCpEvB4TYZ LLbcyNQpSwbaJ8p72ph7K+rLlypk6zgr6+kyE7F/qS1U8bI2xiXxEfOVaro2vLWaBR0V sNF7SSpGhNVhUIJC1tF/ftBigdfY8q3pArS71ANPGDS1Oa1ahzyp4g6AXVZ/rqpDg0Fu 14rIWwdlS1Zu2kn/6YStVmgN6t6q2iDJTv6CU6w/5pTuoK/0YC4kwjtTOAs13CHjIMHU g9AA== 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=vJoH0x3LAlDKt2PsipmUqL5+wKWmC2JG22qyP+RfWq8=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=k9fnhar3yeI5PpAs68UPPTIqqtxXmZG6CM8580xExmqufe6+C1hxvMLB0CmgszvXka poPsBa/8Lmag1Nutm0DPd4Jp04dzohDM0NxxEEwhSGw6sZIiCoSUxrnPeZDrToIaeVr6 GLiLV7IytDThN97kovPhzTvu/tSF0mcPJWiKz2vSemIZsNlOebvYrRliiLosXAAF7ygi 6ufeE2nZr3ajqTcYtZNlhwTVcNaZvY3gFdGjMVrIXxmzudCuH4V9n44Yd1gayx2WQnOu OF726MlzBnn1dZ8jCIV1J7KWc+Yaz/ogDvbERFXsCICtUlqdWV7SxJNVcjSDRC/Ep5mO /nwg==; 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=EC7KyFy0; 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 38308e7fff4ca-2faf62b16a3si2037541fa.25.2024.10.04.01.43.23; Fri, 04 Oct 2024 01:43:24 -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=EC7KyFy0; 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 0F7BC68DAF3; Fri, 4 Oct 2024 11:42:59 +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 B30A868D9E2 for ; Fri, 4 Oct 2024 11:42:51 +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=EC7KyFy0; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 408F84DEE 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 KXYRUr7L-HiD for ; Fri, 4 Oct 2024 10:42:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031369; bh=ax01H+Z6rO6zOmzDtqKcchk69O4Z6bVZgTdTQ4IhuHU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EC7KyFy0HHNGTHVZ1tlYdPVMXWkJy/pvvLEYTZtDr00EaDS7vpZS8gUY/g1pQSDEy fcKH57AnHxt+o8PEHUUL6XVpiXbHRoeeabtorm4Tw99oBFjjxeVMe0oX8L/sWeAEYN yQHDWqs4HYWt2IpBxYUx8b5U/mn6MfHle5H10cKs99SWf8/EU5blN/p7Yx1cqllFKv mpw1jFf1t8qWVbcLUJiKg5tzCsXyZDdHVd58ZjFxcoDjMcIcr6kOB22uxnSka+NyON /ZY9VmVQ/UQw64O1WDexbwJzTf8xsEcID7EcWYtaP0aPQlnXSDxOt6rvtsF3h7kAnx eHF5SpG47XOHQ== 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 BC0924E14 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 A25243A1A1B 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:14 +0200 Message-ID: <20241004084230.27419-4-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 04/20] lavfi/vf_colorspace: 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: qFtyk/Wec8q7 --- libavfilter/vf_colorspace.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index 344dcd5f9e..62055aa1bf 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -830,7 +830,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) return ff_filter_frame(outlink, out); } -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, @@ -840,32 +842,34 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_NONE }; int res; - ColorSpaceContext *s = ctx->priv; - AVFilterLink *outlink = ctx->outputs[0]; - AVFilterFormats *formats = ff_make_format_list(pix_fmts); + const ColorSpaceContext *s = ctx->priv; + AVFilterFormats *formats; - res = ff_formats_ref(ff_make_formats_list_singleton(s->out_csp), &outlink->incfg.color_spaces); + res = ff_formats_ref(ff_make_formats_list_singleton(s->out_csp), &cfg_out[0]->color_spaces); if (res < 0) return res; if (s->user_rng != AVCOL_RANGE_UNSPECIFIED) { - res = ff_formats_ref(ff_make_formats_list_singleton(s->user_rng), &outlink->incfg.color_ranges); + res = ff_formats_ref(ff_make_formats_list_singleton(s->user_rng), &cfg_out[0]->color_ranges); if (res < 0) return res; } + formats = ff_make_format_list(pix_fmts); if (!formats) return AVERROR(ENOMEM); if (s->user_format == AV_PIX_FMT_NONE) - return ff_set_common_formats(ctx, formats); - res = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, formats); + + res = ff_formats_ref(formats, &cfg_in[0]->formats); if (res < 0) return res; + formats = NULL; res = ff_add_format(&formats, s->user_format); if (res < 0) return res; - return ff_formats_ref(formats, &outlink->incfg.formats); + return ff_formats_ref(formats, &cfg_out[0]->formats); } static int config_props(AVFilterLink *outlink) @@ -1035,6 +1039,6 @@ const AVFilter ff_vf_colorspace = { .priv_class = &colorspace_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; From patchwork Fri Oct 4 08:42:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52025 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp261602vqg; Fri, 4 Oct 2024 01:54:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUYshdEk9pSV1WIz2fAyn0bVh50l3tZKho+8hmzn9K/Xx0zbapMcHxSu2YMG/2YEEqi6Vy/4yQB+IKrPbqyeGZc@gmail.com X-Google-Smtp-Source: AGHT+IFq+cVNXFqSbdXpGAqb+iRvRy9x0DGW75z4uXFWgwncwoY2O6bXb45VAE/j7rzsnS8mjzQw X-Received: by 2002:a17:907:d17:b0:a86:80ef:4fe5 with SMTP id a640c23a62f3a-a991bfef9d5mr195487866b.47.1728032054278; Fri, 04 Oct 2024 01:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728032054; cv=none; d=google.com; s=arc-20240605; b=MY8wXKxY6CDOuIeeRUjcs7qz95TKh+9L6Q2WOsJ2oUfMt2zmjbLQvxm9ayIIsEXIT/ 1CU4TogGwCcaHudAYGn9wxrmSm4Dmq8zsadE6mMGH6I4FI+1rXvzTarQW9x4BFIhcGL3 jQPEUKmTElEBjl+gfXq42qbSAOeoQn512N3WogQwS2HXbMZdMzwt8CkyVjxCsniSBOHU IMfkQyz2W7+IYLZdx6sPlJMNckkT5Ugy0W88zWslDn+z23Z81FNX3CeJQuH2j+ivcP1+ 9gGY0Ak0JFfKt6FYEJD+RnFMu5Ue2tlco9G+YdwdqnYCfT/r2pUIN9hTtVl1Qa6qGllL idSA== 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=sAfkOiO7cMvAovvmEU5JeHeb5m+7CUJifkfsgnB/oVU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=TStKYzRThpI1v4TcJkMEomGvBOmUJzbfqf6oTCAku/SLKr8fxg8YP/BYW/yVuqvetK MpFoVgYVHzKujE3U9uro9Nv+3UNFtmxjJRW9lYSVgs3SNO+fYC+N9DiD+pIG8Lxaww3S WcCdANxbqsfhgafFG3tqwsTB36TKGkX/ppxyhKOSsgsg/Dnn+6m3AslGxi5VwdBIRH99 /DzS6GgZ+A8RJQ1bOS6YqDnwWht5R/HDmJLEs7VNKQ5I3iU5f7yFx4xPyif55RlXy81A PAoU4AYB1Xrg9T6rD18XDsNWy3+8NyHRf3ifW+5CKp2ANtzuiE4BLZ8VZovUXQhGIWq7 UKWg==; 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=KSxnvzH5; 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-a9911023fb0si191319466b.676.2024.10.04.01.54.13; Fri, 04 Oct 2024 01:54:14 -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=KSxnvzH5; 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 B590168DBBF; Fri, 4 Oct 2024 11:43:18 +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 7567468DB08 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=KSxnvzH5; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id A586C4E14 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 trRnYgYCCE7D 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=N1z8AV9KpLjbgbmpsVGjbwLfx/o9mg4/2V9/MclnZ8U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KSxnvzH5vK9sLF/lxFkt5K4j0tzwYLv6Xsu0VNE8oRsDtSZP6uzs2yGWVgigR6+xC pqhmcG7pzZgG+niMHrj8sSVx0j5utLMnSp/+1Xj2ZTg8+N1orEWmm/M9Zc4yHfU2v9 1kVDzkUDeWMx3tXzpHOEqyk5a1fdqlM0uWgqO1xZPDJWWdLXSNFp6ljfEZkMxOuUKB fX6MXR+5rVpSmxoT/0k6WrcLOETMY0fSJyT3gNA+NWXbVf75rNhd+1ez4CQeP1Jwdu FOZ+rW2uEb1Ot7yUDyL3YB9XkLn45+P+0W1a7HMa1GTwq8wETKHvY7uuzfVH22gL6O FyQHwMN6U/Sow== 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 C8C604E16 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 AD0EA3A1A81 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:15 +0200 Message-ID: <20241004084230.27419-5-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 05/20] lavfi/vf_copy: 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: pdLWHBFW+fFi --- libavfilter/vf_copy.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c index 8158414dcf..87cb9e9bd2 100644 --- a/libavfilter/vf_copy.c +++ b/libavfilter/vf_copy.c @@ -28,9 +28,12 @@ #include "formats.h" #include "video.h" -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, AV_PIX_FMT_FLAG_HWACCEL)); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, + ff_formats_pixdesc_filter(0, AV_PIX_FMT_FLAG_HWACCEL)); } static int filter_frame(AVFilterLink *inlink, AVFrame *in) @@ -72,5 +75,5 @@ const AVFilter ff_vf_copy = { .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_copy_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; From patchwork Fri Oct 4 08:42:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52036 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp281613vqg; Fri, 4 Oct 2024 02:39:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTLoPkLSS1PD+YzB89wsLrzkRrqVyyNej8iXi/bM3Fskxfj7zv2F1BGaOgAi/E1BPePzMJ+rxZ+w+BZVQD7za4@gmail.com X-Google-Smtp-Source: AGHT+IHBrF0lu2vadQwIKeCbuHs6P5FQyBkVwoyEEWCVHqzQaAsjzZdYtPsPbvoHvW0NkX/BMCqD X-Received: by 2002:a05:6402:34d0:b0:5c5:cf0b:b515 with SMTP id 4fb4d7f45d1cf-5c8d2dfbf13mr1411667a12.1.1728034746211; Fri, 04 Oct 2024 02:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728034746; cv=none; d=google.com; s=arc-20240605; b=HK7xP9sL661VlU/GIvHWbET96IB+BYStKDXsa0ibvDf9qrsw8ETe84mjaYsOC5FmeR 8N0Y0jTQhtAxffng/Wqv/pfJoWzDR6vhmK40/4jnujHimcVtsVeDKFLVFFGliypvq3Xg puHUcoUHUTMhEqTYQtOVDlh7pbOmPW0hy5J8GR6KaPVnMIAY5E6SWs4/yaZuXGwUyQdn zRJHKMGE1eSN4gsoWKySDlF40MtHzpcmrGJfzKpDTSBrassyp4iWkFgKJdzt7l6f4T69 eGa8qhNtUzXufiOqsGNIl7Pl/MllnjJF53Xl68YwAVhKJf6Lvi5SVyLqMPiXUOB84Z2R 7N7w== 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=n2xB4N7eWTqERjBP7wWCz7usxzGRsh5itr2hvvG/XtQ=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=a5/45YJBGNCigX8IQbMNMJzfw4i3LEfW9ZWPM5KUhQPb861bXLsMP0V/e4qtEpLjb4 SXLqW1HmqFgNghWV+S22Yt7tQJrgH97LkJCASN4qpVh9cBzUDon2yfyW+GHskF5H7ebe 72TfGMaH3YkAh4l/Fvu3kbN2QRirCxc0AMhyV4xiecqqMNNHLklCDj+4HBcWxQZn1MiF 4e1SaNDbEMyqRmnhOn/cQUfAqWGudccjPGFP9XK/bYHM+a2wExiXrw3ieli92qAcC46Y 5lsr8Qs3hbhMLKj4TZRQSZHkWHX176H4zfxhds4tUU21frQjJ+UuvyJH0gJ8rNbfwj27 PL3A==; 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=NddcM54F; 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 4fb4d7f45d1cf-5c8ca3c629bsi2092228a12.25.2024.10.04.02.39.05; Fri, 04 Oct 2024 02:39:06 -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=NddcM54F; 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 7D97168DB29; Fri, 4 Oct 2024 11:43:04 +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 C6E0C68D9E9 for ; Fri, 4 Oct 2024 11:42:51 +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=NddcM54F; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 70E704E0F 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 ev7-l-QYQHK7 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=1uwHkr3DqH7JkIrN/Hdab3utHOMOIDOxuoS4Azrvh0M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NddcM54FcP63Ggf+NOlDVJGDJeOJSH9lmlyEO0SWzkR1ZviL+XyEA1oyDPNVfV8mr SVcoWDzsL2wNe1JN9AJ2NtYe25nQMSyjQkRLp9plhAjnZAcZ/wNkoVZvRi+jhxNhyd tqRu1nPpazOekFC2YnGETxkYR46yi+AiAdzBIdneJI9z3DUmJ2WXV9H71tcF7ZIj+C WkbNYm8C/4fU6bd7OhiAXe3TSfaMIwKyn0AzGulePkYhlSceTy7dCuvr0atThUfyvd Y13i69JWQdB8Dji5NMU6nJeAFsVktxEBK6SMRLyTRXn2pj+dNwiNSIdzxV7rBenYK1 q3cyXi9wSqShg== 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 D8D1D4E18 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 B7C853A1DFD 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:16 +0200 Message-ID: <20241004084230.27419-6-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 06/20] lavfi/vf_crop: 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: S8lY50GUJWp4 --- libavfilter/vf_crop.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 4742732b63..f3cbc83b8b 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -95,11 +95,14 @@ typedef struct CropContext { double var_values[VAR_VARS_NB]; } CropContext; -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM | FF_PIX_FMT_FLAG_SW_FLAT_SUB; - return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, reject_flags)); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, + ff_formats_pixdesc_filter(0, reject_flags)); } static av_cold void uninit(AVFilterContext *ctx) @@ -405,6 +408,6 @@ const AVFilter ff_vf_crop = { .uninit = uninit, FILTER_INPUTS(avfilter_vf_crop_inputs), FILTER_OUTPUTS(avfilter_vf_crop_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .process_command = process_command, }; From patchwork Fri Oct 4 08:42:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52024 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp261587vqg; Fri, 4 Oct 2024 01:54:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVgjZFd0Cb4FIASDzXOyQn7A6vYX0rrXpp/UU8fXASsW++Rt0QTTfF5UiOFiPD38eq/T0pk6C03wy28ZHHZEEaV@gmail.com X-Google-Smtp-Source: AGHT+IEiC4kOr7rCnlfB5HXow6SD9ziMaJxWdZ1uGkE4Doma04fcVJRScUCWYYRP4IM6YkJ1lE7o X-Received: by 2002:a17:907:e8e:b0:a86:851e:3a2b with SMTP id a640c23a62f3a-a991bd79ff2mr185766066b.29.1728032053473; Fri, 04 Oct 2024 01:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728032053; cv=none; d=google.com; s=arc-20240605; b=Y+5kgR19kqNMbnifDbszZcyvQ9Pdsg8t08l4LGZSr12U1cRB31FOjqLcBnfdQXeb3J 0IicbQ4rV6AGC4580ndUfn5Z+Kke7bUUzW3DJbwbC+jAgLyxM5LXK/fcSfBw1CubmwKr /OBOfwEXGcy3lsH+yMvl6cE7G2OCvrH3r9MmekIdeWqCiv0V1fb+dfJX9hyDPiFN8Pt7 lHCeTm0PHgdBhCPeQ5fZyeTbaYsZM2Nefaq70Kg5b1NoTy28PfQCyQwLC1JwLNuiTPXb k9jhymFOntqRzFnTRF6E3GPz/T8Ep+O1rRWtYY6X0lzWm88+2fkBWN+Vz87ijS8GgnQx pfSQ== 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=UwIIpq05snPf1OKiF6Px9ApgEPE/9ZRQAHf/LWhqhZ8=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=g6SQqTwelWhWjhH8mv6WqFAtW8X/AtoyRc82KCN5MsHmMx3Sk9uE8yf7brC6sC/63e VxWivM2gJr2YR+50S+i5LJiB1AyJfnD5QnmDgYuX1V3yGbJUVKZkHDad6wt2dKcBTg3H ncO4r1Nf6+obMIz1AHw2I8qVJHMsBwLVTMi1d/4TuObXWkWuFYuIZvr2SxUQX6RBsHRx 3e4T34ep/WLk7iB4zgONJG86mYOCfWHk0EmCZOi5IruYq/v4C4O90JRnjhAA3BBDLLNS B8QUHdFA/GKXq0+kdoDO3coptkorRRJXphW8+zir8cVbH9tSJugULI5dBlqa5vre6mee JDSA==; 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=BjtNPOHX; 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-a99110fd3b5si182889966b.923.2024.10.04.01.54.12; Fri, 04 Oct 2024 01:54:13 -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=BjtNPOHX; 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 33DF368DB91; Fri, 4 Oct 2024 11:43:14 +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 477A468DA61 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=BjtNPOHX; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id BFD5F4E2F 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 jagg5VrHNsjl 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=bjemylvpb/ej4Rm5Y489IsLyP1gAKKnNo3mLE7ZD7Rs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BjtNPOHXlJOx94QP8Tbn7E1SBLD7LsjY4zXsuPYfRF4f5gV6ZrXte0IYxeHqyOVfb KM3hLHouj4lMVx3zOs9nTWB0EreW0K7G8TDazlKumTbEQZ9blZ2/JkVlHa4jwmeRKs 33GDnBq83wHHoq3cS4DPMumxHlU6WRxiuuPjh/oG07lZ/ClnMNJwbV/uMZzWrH+vai ne0i95SULflzTTBT413l16ZxKeNY7rT7WnbEBU/gCuB9a+Ke9QDnokbJmBycnlhAnR Azao6KsSzADv8nSf35kTBU7fa70mnk5cVk/T9BRxK/lznUzlB8DkXAS7Mywel3qUTV K9hRGZrnJmB4w== 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 E1AC64E19 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 C28FB3A1E08 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:17 +0200 Message-ID: <20241004084230.27419-7-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 07/20] lavfi/vf_datascope: 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: ivRDLQRtsueY --- libavfilter/vf_datascope.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c index 7b4cb52ee8..a4f6c69bfd 100644 --- a/libavfilter/vf_datascope.c +++ b/libavfilter/vf_datascope.c @@ -77,9 +77,12 @@ static const AVOption datascope_options[] = { AVFILTER_DEFINE_CLASS(datascope); -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0)); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, + ff_draw_supported_pixel_formats(0)); } static void draw_text(FFDrawContext *draw, AVFrame *frame, FFDrawColor *color, @@ -455,7 +458,7 @@ const AVFilter ff_vf_datascope = { .priv_class = &datascope_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -735,7 +738,7 @@ const AVFilter ff_vf_pixscope = { .priv_class = &pixscope_class, FILTER_INPUTS(pixscope_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = pixscope_process_command, }; @@ -1134,7 +1137,7 @@ const AVFilter ff_vf_oscilloscope = { .uninit = oscilloscope_uninit, FILTER_INPUTS(oscilloscope_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = oscilloscope_process_command, }; 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, }; From patchwork Fri Oct 4 08:42:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52037 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp281615vqg; Fri, 4 Oct 2024 02:39:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVqt3SPlbCAoHHY83gwTd1cHr7pWRHjRsm7TiGrFAwoPiOqPqsZw+fF7v8DHmJfPNO8PCr4JUQ/44C8VqyNbk7l@gmail.com X-Google-Smtp-Source: AGHT+IFOIsNl5QFyTNVdj/fntiKVNK/ayMOEi1xmZ4Tn1xlGXYebMlJ7ZcDIsBT6X5CuCOXbwTTA X-Received: by 2002:a05:6512:1193:b0:536:a68e:86f0 with SMTP id 2adb3069b0e04-539ab88c48dmr1246544e87.27.1728034746347; Fri, 04 Oct 2024 02:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728034746; cv=none; d=google.com; s=arc-20240605; b=Jm5sZh87TWYEDyBQ0BkLl9AVIu08Fup4QSAahOdE7OT2XMSVbrhmwVhIfUB3Pdkn2+ S3scCtBV2W2gZpjdvwp4kbIeALNb4+aHwcD3aPLDDRJ2kX+CL5yrRO74N9IR5s6CtAVK ryORP/guznvz2ZQekEWExvPt4V4ox2mtdmScy1lJHDADaiJq5kCiAjIeUlBhTZjlJqGc DGXnBFSUB/7oFfMzObwI+U4Kwafav25jkuQABxc/FwFEHzr1Jk+6z8Rp4YVbxPlkyXdm eZHvz8roCC+Crx8hdI70lBCSbyKl6xDWvKYaWmyQlT8Tgov5J3h3bgzVau98cFeNZG4v CN0w== 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=StplDUfHoxCmlZsNvSYp9Elqr6U/YfuA7wEZBgv12gE=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=aFZTy8WG0UZPOToLI/Av0Bx0E2QfPE7rjNDUHE0vh3mot2VPTpWr17ELaqguj6aQSy hx8UsLFt+XSD3udQ4QAjBsjfKWcs0/xy7ADPHvL1PBf7p5+j8U+Jc7M2T7U3R5s0v+m6 LPT5MOzek1gJdGnfb3du/0dF1V+IJIFvIVZ+enGf2RDFwkwPhujYJFlYT0jjHEWkbsXc oLFXcTAka6yxu3V29VVBD0FKD4Ew2aVnhStCk25rrVnLaz+7aJJqBBrnuNVf1hIpK1IW KpaAsrOSFBf45rW6yKaaHQnyjvdBve/np+Jx4Ys2VMQfB13jmAURKA1oOHLJaeQqjKBm JWGg==; 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=WvLr5wC7; 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-539a82a8796si1079881e87.521.2024.10.04.02.39.05; Fri, 04 Oct 2024 02:39:06 -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=WvLr5wC7; 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 5B9BF68DBEE; Fri, 4 Oct 2024 11:43:20 +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 C1C4D68DB0F 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=WvLr5wC7; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id EE86F4E18 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 Z9sLP4D3zgm0 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=52wSfO/Gb8PEi6J3F1PgbJktvU9/sosyn+jYK19iOcA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WvLr5wC77C0SweiPFntxNpjgGGjOqk5GxwerFloNbdpvIlz7+7+Z6Ypc1xA5W7uhW x45SagT0IHimdzfPyqaSzxWJTye+WWXRhr8aoEBgObcdzrw5nrvycLplLGNqVM2dpB Y9+OjlE0sLTgsCZcTqVmPIZrf25aCzLG3b3zupGZlmYqR6qgcqk5Y1o93TxV4a0pOO YyA6HbBkHAfABHjjF9OpAXQ99RpwDFttG/hkaJPE6DNrWPmwsGc4C2K4fqjP3boKZ1 dE7qLIm6ejOa07Ac6LSzqIXCEA2Yut+SIvcYCGEtdi8zUOcxenqKOcQYrLMa68R0uk MQL80nzNGt0jQ== 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 E469C4E1A 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 D8FFB3A0F41 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:19 +0200 Message-ID: <20241004084230.27419-9-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 09/20] lavfi/vf_detelecine: 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: AgnlsjOE3dd+ --- libavfilter/vf_detelecine.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_detelecine.c b/libavfilter/vf_detelecine.c index 8eae7107c2..cc69194a19 100644 --- a/libavfilter/vf_detelecine.c +++ b/libavfilter/vf_detelecine.c @@ -122,13 +122,16 @@ 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) { int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_PAL | AV_PIX_FMT_FLAG_HWACCEL; - return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, reject_flags)); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, + ff_formats_pixdesc_filter(0, reject_flags)); } static int config_input(AVFilterLink *inlink) @@ -377,5 +380,5 @@ const AVFilter ff_vf_detelecine = { .uninit = uninit, FILTER_INPUTS(detelecine_inputs), FILTER_OUTPUTS(detelecine_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; From patchwork Fri Oct 4 08:42:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52021 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp257547vqg; Fri, 4 Oct 2024 01:43:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVFqygpOLGjr94E+FuSB7NxxaMdEvn3H9PkyLkJIqb2i1JaUimpIPxWS05ZzT1+GFu2QAkI2U2BBiPMhaN/NZIL@gmail.com X-Google-Smtp-Source: AGHT+IH2vHj7Lh81qgLtcaQLet2/VZ4LhQBxFR3uHc8Ejp/cFC+aMlv9oahHaOtBXjm4O/qnedFp X-Received: by 2002:a17:906:f589:b0:a8d:4829:3dca with SMTP id a640c23a62f3a-a991bd84bdamr79775866b.8.1728031422898; Fri, 04 Oct 2024 01:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728031422; cv=none; d=google.com; s=arc-20240605; b=TtK1EEm5grXwx/GXbY25XWCF58ZmoQ7gZpvgdyUUn+MxHK3z70rekm/tBLCxJ7rltw nuL75JUyjDIPdIw3kaEYiF1YHqtzG/zcaVFBwp4wce+1Jv/u5K64YBfjJPLP8tOJPZ1+ oPIEgT8M2hsH663nf4IPGpj+U2sY+q6RglCHo6D/BgtusgoMJ3uhBhmGm3q2mE8NdMIP 3wgBjaI9Uek5bth1bXKmrBIH330QPrhWpW54lSLtCezDeA3BD/DPVhWB+RqMzDpxvTy0 dr5O3Jlu53QSdbzUHLdMMNov/8baOUUzWcrZB14WBJ0OKN5GOm1iRKmi1bhPpOZFE9yH +h0g== 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=3UAAGIInO99G6yD7Nrm7r2P7M+Hv/w3Y2dZS4Ptfn0c=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=jfsl0loZLQIrOWxiwKQzp4h5zwJz366tGkfuGd+xDuWSCcL+pM2bpyD4hqQDpkMWXG EVpcVZDIecoHksomKFEEuB762uUYcOQNWmb7VpBLv4sQ8roPieF7GUFZId8HnxbqZMuW tt+KKuAZ/kM6PiAed8Mm3VWFL79Ce7sJQXdvP75CI/BQZk8Gc7qyeElxjy3otdiPCBKg WMg9kbZ3VYwSDDF5XZPBnAzmSvmPceia5nhGT/z8BQSLneRIBjKqR3cJEEM4k11Tl73B lRxw0Md5AdmUviHusFNIa5TzwUK4bhL8SfpGWVC2AdT30O3KWaMekfb3AO8faeWzb19u S6aA==; 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=pU60q5hv; 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-a99100ad327si206711166b.48.2024.10.04.01.43.42; Fri, 04 Oct 2024 01:43:42 -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=pU60q5hv; 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 A077C68DB08; Fri, 4 Oct 2024 11:43:01 +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 D60B668DA00 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=pU60q5hv; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 12A6F4E1A 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 zhoQWUSQp0qJ 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=1728031370; bh=xSzkn0FvNovVdZ/34oX2K3mRt6OsSsfvEjLfjgGQE9M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pU60q5hvQyEMjw+4QpigpmFqxKcK/owzuTpatT+l+KzSqE5rr3EtrlKglot6R98yl /pdEpkeSs48nYP7jIfNtXsLC1NlNcDOctND3azDSzetXotZaiAwwB92uR0Fb+5CJtU HiI8f+CsuBoQ7T0t/2PKr3zU4tjk/YsZ+5LxtH0gWBhz5cVCaBOXA9fRiQ+Bjbagqo yMCy+pQsrYYsc4ij6hzDacNgrAoDEZEwgNkeYsYgPd0sfm0MHgYz4AmplyXogqkJ+E TmFLCjrtXid8ktZD+AAFEdSc7Qi+8ljPvcQ0WNPNEMzkn8qm3ULziOvMYkEUFVcDZr qf/84xlDZD2jA== 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 028A94E1E 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 E3BB43A0139 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:20 +0200 Message-ID: <20241004084230.27419-10-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 10/20] lavfi/vf_drawtext: 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: faFmzyZYAiJr --- libavfilter/vf_drawtext.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 4c55a01155..2b0a21a4b4 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1077,9 +1077,12 @@ 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) { - return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0)); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, + ff_draw_supported_pixel_formats(0)); } static int glyph_enu_border_free(void *opaque, void *elem) @@ -1915,7 +1918,7 @@ const AVFilter ff_vf_drawtext = { .uninit = uninit, FILTER_INPUTS(avfilter_vf_drawtext_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .process_command = command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; 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, }; From patchwork Fri Oct 4 08:42:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52038 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp281631vqg; Fri, 4 Oct 2024 02:39:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXxwZRlghIWAUccDAtWnxDy/w/NW/LefrXbJ1AQ0Jys9ou1MxDpvgnsdwYXJjAL8FgXjR+wvlcG5R4MXTV/et3p@gmail.com X-Google-Smtp-Source: AGHT+IGU6HuUXAxe/7NsfKcjBxhozK+1tAY9tfVwMC6K6W40pto6qMUt/DkfV79LbtVM9qYzHK6h X-Received: by 2002:a05:6402:2685:b0:5c4:14db:4a03 with SMTP id 4fb4d7f45d1cf-5c8d2eb4e4amr613914a12.8.1728034747946; Fri, 04 Oct 2024 02:39:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728034747; cv=none; d=google.com; s=arc-20240605; b=R/VcaTVxGi+9AwMYIziJ+STqb7Y+MLwl6VNp5qeZGoU4frrp8BjnMXm512FzpmB7LP lrtAQ6KCUcH2QwoBj35+NrxaMst44WLHlY4HJ9dqrdk3NSsv2pxA/DfVVYhJI3RfV28T rlc39hwOp5lytV6n03+BkoePq8g/OvBtWWR9YGauNW+g8+skHfbjkqpby9jKapJrXtBu QSzXJwkU0SdDei60AXb+lM1pbeSigK0QbsQF0G3lOGKXvrd+l/ubMikhAWd3EWQBTIox lcwPIqjFvTIIDy5AnFMaJtPFCP9eo4bKePRqwwIfnbmvQLpMTryXo4WsZwuaYkWQ5lO6 V2Vw== 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=kvO5NAh9OPXAY3rzdU6oeA7Prgu3rJ8S8thr5516caU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=X3IgPzxlqnbyaFnc6vR5ahXfgJKB0AZsEJBqAVTeIZsVazMbJdP+HLvRmigfDi91i8 mIHsvU2R8cT1cipBPVdLQz60TsGltX8Nr6WV4zSY4NWgMWcV732bzw484apdMK11/WU7 cCEJ0y28qV2ItyUnDrGTgRoV773Em3Qh58pFy70XIMHStIzr9bNPgbMKKRQ6hXs05+/4 mJW+rfmicpF6c+XAGfhd7JCqt1yEt38gHU5KAVGIT36DvFAhvDPoEk5E2WStmxdY3zJs iajIMxgVX98MKMygDYkYe0oKBMMlG7nBG7MNg78aIsTZuOredY3kX5pyeqd7faRvv7dV v14A==; 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="csXsE/X8"; 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 4fb4d7f45d1cf-5c8ca47cc10si2079553a12.275.2024.10.04.02.39.06; Fri, 04 Oct 2024 02:39:07 -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="csXsE/X8"; 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 B56E068DB83; Fri, 4 Oct 2024 11:43:12 +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 2E1CF68DA3F 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=csXsE/X8; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 4038D4E1B 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 F-Iq9dB5UmN7 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=PxtuBkN2hDroLYKKKtWFMZ9furN3ZdMLlLoav4wkqrk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=csXsE/X8tQpOd8ZGM1go47tU+xttdZo/lArZtYl2aTU28/juHbs2OWB6Ihreavv7E M1uWcygyUPaaMpWiW2f2hGDEqih/7OqtJD+zT5KDEzEeIk/OmhgzO7XDzZDEu7IaR8 945aC4Yh2Q/vT8OjGhfbNajq0smRP5foB/4E9RrBERJVg4J1AfHBgyaSP+al1NVTfj AXOytKiQv5dHT7PsOFp6/9ULXPDEPDs7av46SGcIBJijqVies4MvNpSTZxYME/Rcfz 5nRrUSLdhzxnbnwDVnBqww7pJdvFmpWrzsBkNZ6vXGPAESth6CTxFHt+tNYl1yIKX8 m0GC8PkXDhg1Q== 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 115AB4E2A 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 0563E3A1A1B 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:22 +0200 Message-ID: <20241004084230.27419-12-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 12/20] lavfi/vf_elbg: 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: 4Bxnzg8QpN4z --- libavfilter/vf_elbg.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c index 453147ca33..5eb5ffed2f 100644 --- a/libavfilter/vf_elbg.c +++ b/libavfilter/vf_elbg.c @@ -85,9 +85,11 @@ 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) { - ELBGFilterContext *const elbg = ctx->priv; + const ELBGFilterContext *const elbg = ctx->priv; int ret; static const enum AVPixelFormat pix_fmts[] = { @@ -96,14 +98,14 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_NONE }; if (!elbg->pal8) { - return ff_set_common_formats_from_list(ctx, pix_fmts); + return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, pix_fmts); } else { static const enum AVPixelFormat pal8_fmt[] = { AV_PIX_FMT_PAL8, AV_PIX_FMT_NONE }; - if ((ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->inputs[0]->outcfg.formats)) < 0 || - (ret = ff_formats_ref(ff_make_format_list(pal8_fmt), &ctx->outputs[0]->incfg.formats)) < 0) + if ((ret = ff_formats_ref(ff_make_format_list(pix_fmts), &cfg_in[0]->formats)) < 0 || + (ret = ff_formats_ref(ff_make_format_list(pal8_fmt), &cfg_out[0]->formats)) < 0) return ret; } return 0; @@ -264,5 +266,5 @@ const AVFilter ff_vf_elbg = { .uninit = uninit, FILTER_INPUTS(elbg_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; From patchwork Fri Oct 4 08:42:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52044 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp310386vqg; Fri, 4 Oct 2024 03:39:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVn15UPfO4qyqJe6HcCR+YG4/MF7WqUy4znuf3/JZUnknu/0l8bhAODe1rQ51kFvfZuQ88GQp0EOdqEazKarunB@gmail.com X-Google-Smtp-Source: AGHT+IHOidaZpkLKzUlQkEKVXfCE/z3YNzua7O3jNqetj2Btvtt5pUCB68ZGzfQmj4C3J0/ZqouT X-Received: by 2002:a05:6402:5304:b0:5c8:9e36:cca8 with SMTP id 4fb4d7f45d1cf-5c8d2e3453bmr1338765a12.20.1728038348286; Fri, 04 Oct 2024 03:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728038348; cv=none; d=google.com; s=arc-20240605; b=ZaWwpBSi9T8Kgrblh1c+JpIGlwYtzMyEyfbVFdpFN6fXndrZsshFd7O69andGCygRd fuKubW6FH83fUYq2Ad5O8v+AioN/khl1Bk8GgZEbhqHyN7HJN6fcNMdo5xGxhfhjeaMs WPkIDMCvxnrSnebSSnf8B2Yb92WkuYj+rPd4J5J1lGCx9jKN1ipS36qBwKR/iUaLt0yQ HeT201p6SW3BedAjhsQEefUjCjKrnebKbAjtgdA+2wzFjw1Je6EIeUAlNTYwHPJ/ko+C NB1mjVi1FbDIQD2CvOtUfs7X/myn+mpX4gZmmiEYHKkwiX1kt6tBpQDimqB76KOThbGM gRaw== 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=+Xwh/S/iODagrnXpXBsmTgFqBkINEuyx8NynI0sUZX4=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=i4KsUOWtwTO01b6fdu3JV4g2Ajweb7YVTh7lb2yVVfp0SHNyWvseIvPi5vxQKH7Qvu HZmnXGY5xFA8Ykkfmm8N/VrgvcTOJ3fEZ169P10bfFlpQbIPiP4w7lAPPtrrpyTm7au0 y5Mkh2vIGqnKdJWVg2zM9ytwBKSozbKo1MYU5rWwH8KfXZLdneOjcmC56NzQIn9+cef/ 9FH/wTXQEjny3NPgWer7j4g7nQXr99me66nkZ6sOk8TtEmMz26shw+Ko1VKzjq8id3Y+ 21OjEr2jELU+DOmYmPGwySAAjuQW9DtJvSPQXkIx4rUzTlmoc8bxCwSONGCQzxuaZr1O 0ZPg==; 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=boRmn4Un; 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 4fb4d7f45d1cf-5c8ca4b5867si2210184a12.553.2024.10.04.03.39.07; Fri, 04 Oct 2024 03:39:08 -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=boRmn4Un; 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 E41F968DB2F; Fri, 4 Oct 2024 11:43:05 +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 2B5C268DA10 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=boRmn4Un; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 88D5F4E20 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 SJOOoJMDu5fF 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=z82z5O22kMv0ErBt4yyUPtGKTfKEWcdjfS0LztdUYzE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=boRmn4Unf5wPUJGNcicIzBFjunIrFWMKPhriCY0KBvEG/dZs7OpbOBXKwKL7PIaNB yXJGOzAYLA2Qw3d53ClrgE8zozqJkgdoGCAdgsI+T5nbE1JYRR7EVSJSbT+1al4I1x qgKWYkrSOgF43u3rNZaA9R7I33sq9B8C7GuE0ELNWjCFI0mJ59ILzg5R/RpGyGivO5 pFHUXfqg/Ll9/CM7JGG4IyIwUIms0itMQD/4wowtDUL2n/SwVEJoWXhw9FumpqM2M9 zQDFmgfYn2OHbvNNRmdsX96bqZsoXCdTI+TPaP4NLyZ3x/Sd0FEU7oKxkFm9SxmSaO 3/nxGOoD3ckeQ== 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 316204E2C 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 10C3C3A1A81 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:23 +0200 Message-ID: <20241004084230.27419-13-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 13/20] lavfi/vf_fade: 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: ptj9wPHcSAC8 --- libavfilter/vf_fade.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c index fb04c7ce32..39f16b0b3a 100644 --- a/libavfilter/vf_fade.c +++ b/libavfilter/vf_fade.c @@ -101,7 +101,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 FadeContext *s = ctx->priv; static const enum AVPixelFormat pix_fmts[] = { @@ -162,7 +164,7 @@ static int query_formats(AVFilterContext *ctx) else pixel_fmts = pix_fmts_rgb; } - return ff_set_common_formats_from_list(ctx, pixel_fmts); + return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, pixel_fmts); } const static enum AVPixelFormat studio_level_pix_fmts[] = { @@ -566,7 +568,7 @@ const AVFilter ff_vf_fade = { .priv_class = &fade_class, FILTER_INPUTS(avfilter_vf_fade_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; From patchwork Fri Oct 4 08:42:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52041 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp281700vqg; Fri, 4 Oct 2024 02:39:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW55VQIzzubKMwrvKbGBAQmDtJx1jLahK2Es5/d4vDElM1xviGHc/6U6VODfq96raZo3BzugRlvIzA5u9rcxajt@gmail.com X-Google-Smtp-Source: AGHT+IGPy7LWwXcKXDmuev17jWxPjXrYFBdZiDmvz+zjLfaMSfQ65N6QTrgIDWvm1CZmbgjDGPIj X-Received: by 2002:a17:907:948b:b0:a8b:6ee7:ba22 with SMTP id a640c23a62f3a-a991bd76bf8mr206911666b.39.1728034758301; Fri, 04 Oct 2024 02:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728034758; cv=none; d=google.com; s=arc-20240605; b=cNMI39eUo5Mdmw+5uXJGyCuxJ5c9yd0WtIyvzz6k46mdnnCfeerLSFoP+AD5o1FE/n hTZ1UzSz6F/tTlg13CfOvogUuLba7PGMVFFrYyz7MPUN0rzZgjyX0D4cEpL0zKU+oeLy dFmbNRCaX2+0KYkR52rO7NHpzxLp0uDg7GzoVSI3cDdBLXC4GUNz7RJ5aq5tmAs81fNr YWAJvxwPlOfF390JtIQbdRgXpIe4oxjji1I+eVB8+IHwb7SykPkxHTj9p82Y8pJj//hu 1lc7r2RqWC1iCxqLSSNMFZKYiRbks18zd41dhgfX82nFZojtfAgK/vCNAVqOclCcfArW CJFA== 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=xnvIv8TIXFUlsrJkBzVtSX8K61yU1cn5+Sfo4YMMqrI=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=CpIPUu5c0tGS+D7Hz/E3Oc9yZndU8OfuWlw/CPXW20ODbcWzwKjoZh2iCJOrMOgRVB R0RncoUk3NIFWdZeJqTYgYQGuW4g5Kws2yyOnN0kHlYZNIw1uFrvQ1FML7gQpZ/2okW/ Lijg6WtEvvTRtDwAKJ2NpJ0/4KwPdCSQkl/Aly3t0F93TWWslI9FMBXbzrdGRN2l/T2Z z53jphNWd7n1F4OB48E7ThaCEOttMEboCe2HVlTbEL4r6dXL799R666az5V8lfKiGSbe i5P+eLxHxHlkwRF3UEqioJVQc7wuQW4SLVcNl+DPxNmDQ4QXcFTLnejuqa4EMgrxHHt7 OsxQ==; 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=J4lVsKws; 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-a9911107160si201921666b.1033.2024.10.04.02.39.17; Fri, 04 Oct 2024 02:39:18 -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=J4lVsKws; 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 4800468DB35; Fri, 4 Oct 2024 11:43:07 +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 2AF8768DA00 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=J4lVsKws; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 582364E1E 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 Vonnvj1MF5EC 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=ROX9cn/RwBhlW34E+4wgArMUPHHc2Yl4OUkqMKRN6/c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=J4lVsKwss747IypPN7D2FwM2IRHJf4h6NCPt7fZ1+s96woYnYVejy9HzTwC+FnNnE vhHOQCn1hGgUYr5vU9l5Ol65/Dda3G3GOI8lvwvO2iE5QrRoYSOLJzgfFUBX/sYMmy mv01eS57J5SHxt3pFNT0YtBHxSgslRC9EJhfmp8EXV+i1hogb705/OV8/xkAJ7+DNW m8x6qdabhZXiN5uMX4u5xdyvXhKrijkEaYw8xvNJPEE2m8oXB4TfK0cyX82UwpH1jR inccsk2+9ll+OZrhBNwlMK+F2bSq1qTbBou4xIvoOcWvhNZNlEHzjfhbA4cw730/vz UT5Nunooq576Q== 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 26F714E2B 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 1B7E43A0139 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:24 +0200 Message-ID: <20241004084230.27419-14-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 14/20] lavfi/vf_feedback: 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: 5VLYzFiiuOCZ --- libavfilter/vf_feedback.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_feedback.c b/libavfilter/vf_feedback.c index ddc53cad27..0b701ed9ea 100644 --- a/libavfilter/vf_feedback.c +++ b/libavfilter/vf_feedback.c @@ -106,11 +106,14 @@ static int config_output(AVFilterLink *outlink) return 0; } -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, AV_PIX_FMT_FLAG_BITSTREAM | - AV_PIX_FMT_FLAG_HWACCEL | - AV_PIX_FMT_FLAG_PAL)); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, + ff_formats_pixdesc_filter(0, AV_PIX_FMT_FLAG_BITSTREAM | + AV_PIX_FMT_FLAG_HWACCEL | + AV_PIX_FMT_FLAG_PAL)); } static int activate(AVFilterContext *ctx) @@ -332,7 +335,7 @@ const AVFilter ff_vf_feedback = { .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; From patchwork Fri Oct 4 08:42:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52039 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp281686vqg; Fri, 4 Oct 2024 02:39:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVLYbpcTa+VoXCufCbdGyRpjuOXhgihr3alcKseLn8aGor7u9HtDhmGD8Dz8FpaAsTM0ss9zFF8CK+ONnaboPaB@gmail.com X-Google-Smtp-Source: AGHT+IHI1n10ZJvaWxujfVgeVm1TvNTm9wJ9E6lmweHYg/qy/9MUPmL2h33S6VMfGaIrwjkU9FTc X-Received: by 2002:a05:651c:506:b0:2ef:1d8d:2201 with SMTP id 38308e7fff4ca-2faf3c29208mr9376641fa.23.1728034755763; Fri, 04 Oct 2024 02:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728034755; cv=none; d=google.com; s=arc-20240605; b=GeGTVKYOJybtvvDNDwkznUsShJbQAjKvx1mXzo7hyQL1+CoZVnBpj/vd/zUn4uJwjB b7iBJ5oH5kdfz/6KYdcbN+rNj0dqc29l4ux4cW4aqjcTPW7SHjc6tzNF9YFBhJ8dSPoz qUolfkVgPDpv6KUK+6t7wdqoxPT+RKPx/bfftDJXikhDwC1i8my+rAh27su6L/bK0oWA /2hU+UUmMYsfJsR+25cx+YZlP1VCX/dOJYEYmqeOK18r+LP+/Ho23PliMQSOQgAYKO59 +oSfAms/lb/dCWexbhzmV+hmI0AVuVbfE75Hf2buRQ76MhFpm8aZVmxpU475qMIxRzUs nnww== 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=wZzkZLE3abocAEtBieiJ2vPfJjT41hfWSGKNDa/wjzc=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=QJSgvix4iWOQcA7g3p6x6HB4mvMO3VbhlIp0PhhBJYfxVCYBIdVO9/gGoVfTFWzpYv TCCM855DqVT6PmK1Ym3jluaGZjRyb2ZR9PnOUiWgPKKqiTW70IIJYjn/+xTM6eUJijKY 2L1vdHMz955fjvovWSnp/Nx0uoiUB2zzhNIICcrcCxcqPUbax2WiTRgizrjZ8p68NKnv 35g5SdFPMzZlZQDWcSAqgtol0Il5yunaZKqzXr8jNSCjUmunJhsR3VVU5o0bNXxGCPa6 ntdwjG2BvDcxHFNSJerSFgnjme7lEmgxp1eQpgqURvcycrkn7tAK1J6BMfEaoeFuywbv JNbg==; 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=bhuYVUPN; 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 38308e7fff4ca-2faecc4829dsi10477581fa.280.2024.10.04.02.39.15; Fri, 04 Oct 2024 02:39:15 -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=bhuYVUPN; 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 C45E768DBAD; Fri, 4 Oct 2024 11:43:16 +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 6B2CB68DA58 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=bhuYVUPN; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 769144E2E 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 1ZgaD5S_05wb 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=kAEiTigaC+LBcXU1NTx4yBVaRRnmT5K64qsbPrx4CzQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bhuYVUPNR5b3tMSDKQmEYwvwT676p7Kw9xzYHfeg5EPLSLoNJdwWBMYSuvL7I0vBY jlcRfqg3W6Lz/BtZnq+68CCyYk7j2HumZqvDWUjmtwcghanXcBlr//TjVWxF/LwmLe 9AW8t0tqAx2U9bcjcUmVMP3hX3XR6JpBHEjQMc8TNbFm4iQWcHOvdCRKw/pOkfsKZA A3+6yL0o4HJn+PhmDXlCqlT0I21ZBp9WD128k89jm4y5G6qqudKHeORf4UKZKYv9RC Ne8Vw5S6eWdYWc1RRXmKy2YvXnZ5OhQnWbjbrv3ne2qGYx8SholHHNu1yF60np3qJ7 CdVQGfI+vU+sQ== 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 31D4D4E2D 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 265713A0F41 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:25 +0200 Message-ID: <20241004084230.27419-15-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 15/20] lavfi/vf_fieldhint: 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: Fkltv0Q4J9wR --- libavfilter/vf_fieldhint.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c index 92e3c5c8b9..d1f05562c2 100644 --- a/libavfilter/vf_fieldhint.c +++ b/libavfilter/vf_fieldhint.c @@ -85,13 +85,16 @@ 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) { int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_HWACCEL | AV_PIX_FMT_FLAG_PAL; - return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, reject_flags)); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, + ff_formats_pixdesc_filter(0, reject_flags)); } static int config_input(AVFilterLink *inlink) @@ -329,5 +332,5 @@ const AVFilter ff_vf_fieldhint = { .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; From patchwork Fri Oct 4 08:42:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52022 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp257599vqg; Fri, 4 Oct 2024 01:43:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV9v/AA4odpXgZFcQl9vKx90h2f/pZWKtl+398jDfJvorEKs0ZcvwCtccRPHi8ma1QEO5XTn8pp3sTMxWqfMSdy@gmail.com X-Google-Smtp-Source: AGHT+IEttAL12ZLQ0iigmvzwpLpjpz4Z8kvpFDVyf4v97LRRUajl3dbd6aMp4Otv6US1+is++JS1 X-Received: by 2002:a05:6512:6c6:b0:539:94e2:a0ce with SMTP id 2adb3069b0e04-539ab9e7f85mr1203935e87.59.1728031432189; Fri, 04 Oct 2024 01:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728031432; cv=none; d=google.com; s=arc-20240605; b=ff7/18gdER5kf/VVnnMZOBlahVFupqQtn3sgZ+vMY+Zabn5K+dQOnAu61lx4zKCB2j hG5AeHfstoL+JYAFBlX8G6694TVTeDoB8QuOfpXyvpS5I1WN/EPEtqkQ3A/9ZPIqs58O 6wZngrE4yWOoRYssaG3pzQDCTU0IMjxxAadzTqGI3YpjDyNveAON8UQ1XAigH7JZHL/Q 1teoG7RVj/p90Lt+qBJ2mDT8CJReR7O7GXaLFqECdBnRwSIaDD4IIem6yFeIsvWngZNj 24p8hxXzTrTarSRW8jwRhlRBEPOFqx9uO7ZJUzt+8W9MQ0SkBN8p8ikxaKs8Pq+BOSjE fabg== 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=s01NvLosOxqw7ZH8r8QmO+Tuhd+Z5vSshhEvkLofI7U=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=InvKrA3jNUFKTeg+gkldCTHU3S1OSijhxjERdzKW0M2SEePqweUAZh6MIgqunvm/he FQYHPJrftLJeDxMjZTx4QYD9lfis9BU28BwZleaNoTuiZEQRTKkVjFW1h5mA7kUDJwk6 Ju1jhmA/ueSL/BEy1WiKmy+UuDulK7dNzL9T2samUvw5erP7sNTsJ7390Pzpj26qs386 wi0ySguuu6/6vL41wUx9e1EJAfXCOG8H1C6WEGdmqm55Sia0Of2GkINGHHcua1ZhJWQO zPQFweRsioLqMjkc5xEHn2eOgAQOaJ70x0GqD4YCWe6nvW+7T5QhJfFBSgaDSE+T/Ciu /1Eg==; 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=m0HO8+t3; 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 4fb4d7f45d1cf-5c8ca4bbeccsi2070550a12.614.2024.10.04.01.43.51; Fri, 04 Oct 2024 01:43:52 -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=m0HO8+t3; 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 75CCA68C74A; Fri, 4 Oct 2024 11:43:03 +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 F26AD68D9E2 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=m0HO8+t3; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id D6B534E29 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 CTVcIWToyg7O 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=BDIShC5W3VjAyiCow1ipDUcG8CMVFLvLnffsORhiC1Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=m0HO8+t3UavtZBtXa6dT8S9N72VDmb0DYqCI08XWeU5GuqwL3Qhfz0N1cr+c+2a1D F1TOK69iY+lSm1ImBGGq6ObskzALup4LQQxWhCRwL2eT84xOwZAV3RIjYePraIzBRO 87seVzqQDmnycLMj8uRS6+X69krsl0+U2XOC+wXw3qmaLfvhDc0jRE3ChuArUU/CNd nSO6HJ2fEIO1YgINBftXrh4JvlMVz747fO/GE2J+I2s/pqlaCCk9FYW+cS7raVuYNw DYE8bbbVTKDQL1FYAGmBuwnALjfjbbEYH70Taag+XiKlnT1lshl8h0dsgHknUCgk45 NDU38259kdqGA== 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 3CA364E2E 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 310E93A1A1B 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:26 +0200 Message-ID: <20241004084230.27419-16-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 16/20] lavfi/vf_fieldmatch: 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: EYi+wPWO04tB --- libavfilter/vf_fieldmatch.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c index 9198c894f9..c3ff909b1b 100644 --- a/libavfilter/vf_fieldmatch.c +++ b/libavfilter/vf_fieldmatch.c @@ -908,9 +908,11 @@ static int activate(AVFilterContext *ctx) } } -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - FieldMatchContext *fm = ctx->priv; + const FieldMatchContext *fm = ctx->priv; static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, @@ -939,17 +941,17 @@ static int query_formats(AVFilterContext *ctx) if (!fmts_list) return AVERROR(ENOMEM); if (!fm->ppsrc) { - return ff_set_common_formats(ctx, fmts_list); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, fmts_list); } - if ((ret = ff_formats_ref(fmts_list, &ctx->inputs[INPUT_MAIN]->outcfg.formats)) < 0) + if ((ret = ff_formats_ref(fmts_list, &cfg_in[INPUT_MAIN]->formats)) < 0) return ret; fmts_list = ff_make_format_list(unproc_pix_fmts); if (!fmts_list) return AVERROR(ENOMEM); - if ((ret = ff_formats_ref(fmts_list, &ctx->outputs[0]->incfg.formats)) < 0) + if ((ret = ff_formats_ref(fmts_list, &cfg_out[0]->formats)) < 0) return ret; - if ((ret = ff_formats_ref(fmts_list, &ctx->inputs[INPUT_CLEANSRC]->outcfg.formats)) < 0) + if ((ret = ff_formats_ref(fmts_list, &cfg_in[INPUT_CLEANSRC]->formats)) < 0) return ret; return 0; } @@ -1080,7 +1082,7 @@ const AVFilter ff_vf_fieldmatch = { .uninit = fieldmatch_uninit, .inputs = NULL, FILTER_OUTPUTS(fieldmatch_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .priv_class = &fieldmatch_class, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; From patchwork Fri Oct 4 08:42:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52040 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp281698vqg; Fri, 4 Oct 2024 02:39:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXTXP9o66fXMjitX8RsAZW9PdB/0T2Ha/5ECAPBfglkeaWlB/WemF/keLMmW6mJk39L8u6akgzGcLw+VPeeECxp@gmail.com X-Google-Smtp-Source: AGHT+IFaqEpHessdJ3hMv5PART52PIsPOBUPaA5vhwoai6oYXXqSPDE9pBwHh6oSwvgmDcghKkBh X-Received: by 2002:a05:6512:3b82:b0:536:5534:912f with SMTP id 2adb3069b0e04-539ab8c1b54mr1087195e87.50.1728034758090; Fri, 04 Oct 2024 02:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728034758; cv=none; d=google.com; s=arc-20240605; b=C16+i+wmLnBlnI+7fYSTjC6DFu6YR7mGQSmAsLSzWgxyQd0fjtBKIO+OgYrmnjMZ3a jZN93CC+fWqmGDzlHEg9TaSCsgOCe6XY1lgy/PASvWPma1kDR8UIHaZdRhYs9ESjjYea 5HJYXkL26pUqW2AzfbTH5tu9lf0pKhxHAW+oJGjt1npvBe/U2fpBmZTxxDrvNHUW4dRr MNWY82L2KUfy5n5awKDV+2JQCTsFsNOLg34ZpCgfrm/B1t/G9WYiq1V1fpTl478a3fh0 DuOLiHJGdn0+j/IWUd6/RhrY1+9VjVPynmzhOZnoMgS8IaqTJadb2ibl5pfpYAwjruGY L3/A== 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=jIz8bYIphJOeJ6RLKdGwATEyIvEtmneXpY4Mgq8v+sU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=LvWYrihKVrgKXuvaJn2iHAQJS5Img/UkSUomO5452eKJp1w3b68kVGo1CvLswwmm0N lKPfbyYukfOBiXL3yEb1F5TsmRqrE7M6D/tf1ItnFU2I4RDn9+R6l+rlez3qBZtCWW/+ FuwWy3YDCV4DZaAeXxp4dthFijS8sq/wvhfH9qOJciOC+15Fd1riB4ax5xg9Rmb6kOjV 2U0bBIk5+v3PPlY2FqfO9jpfXuAjBU48Ac9pwsfxSvXlLe4PcmKMuLWen8b50q4wzocP /dhffug+meYisLFsiJsyZEzALl03mr1X9BdvPOVjH7rfnemWzraDuUmY2TqzqsNAk4tO +GeA==; 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=GITXc8gZ; 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-539a82acf65si1104092e87.606.2024.10.04.02.39.17; Fri, 04 Oct 2024 02:39:18 -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=GITXc8gZ; 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 488AB68DB79; Fri, 4 Oct 2024 11:43:11 +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 4200B68DA5D 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=GITXc8gZ; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id EA5E74E2A 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 l8Z1tkMdJ5Ya 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=Jr3letybn0Lkd7YhwSOGdOmPq6/+X9Cr26WHr1wdAaY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GITXc8gZLjrtqFfcQAAM9PeQYh7HdTmJTE5lr+/83rhGfkqrqUfeOX8MTmPIgqFJW lYOuFfascKP5rtx+zf8V5bD9rGw21bffLhWLImP/NES4yQINGWtgWAqbJWbV7wZ0oX A/Hp5XaHdMO7uk4T+ExKGovA4v7JB3BJ/IZWzmSUlLeQb5i+aOre41cnxxH7/dA7xw +sCQlrllGrrv2Pt4Ep/9MfsCMFUQOQaPfKJ3anyACMFhjyg1As1Pik3Lqfw/fWSL/b +f74WyVdrmQ5ni6zI2QubjMZTbAzsznNWtpr62xYL7lbnaYBpUoMrxZCKp6hWARKDQ 0oc0M3UbraPPA== 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 478264E2F 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 3BC933A1DFD 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:27 +0200 Message-ID: <20241004084230.27419-17-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 17/20] lavfi/vf_fieldorder: 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: A67WxdK6yfkb --- libavfilter/vf_fieldorder.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index 46b7f4bb30..5b0c723e8d 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -38,7 +38,9 @@ typedef struct FieldOrderContext { int line_size[4]; ///< bytes of pixel data per line for each plane } FieldOrderContext; -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { const AVPixFmtDescriptor *desc = NULL; AVFilterFormats *formats; @@ -56,7 +58,7 @@ static int query_formats(AVFilterContext *ctx) (ret = ff_add_format(&formats, pix_fmt)) < 0) return ret; } - return ff_set_common_formats(ctx, formats); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, formats); } static int config_input(AVFilterLink *inlink) @@ -183,6 +185,6 @@ const AVFilter ff_vf_fieldorder = { .priv_class = &fieldorder_class, FILTER_INPUTS(avfilter_vf_fieldorder_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; From patchwork Fri Oct 4 08:42:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52030 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp268886vqg; Fri, 4 Oct 2024 02:09:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXzLDWnqsKZv3XPvi5Bwnn+s4AJm4g0N1rqA4rkC+fn1ugRyOIhHtKaFC+GurnXdxMfEyZLsftUaEKshUWrxGgt@gmail.com X-Google-Smtp-Source: AGHT+IEPR1aHrkFa1ZI5Dm6qu/r3SIGpkIaXN5FCr2XQNKwj2pD3vxQWo7GXBr4FAPsoOL3v77LS X-Received: by 2002:a05:6512:3d23:b0:52f:1b08:d2d8 with SMTP id 2adb3069b0e04-539ac1433e9mr683602e87.7.1728032952162; Fri, 04 Oct 2024 02:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728032952; cv=none; d=google.com; s=arc-20240605; b=Li/XanUtK0ipLPi+aBEyBrG4yrDM7X3QnqAcaaO+6fkNz4as3jQNe1QMlvYzl+RehY ooBNZ/ARDDDgZmqBjysEde8s3u2gsTswaKQvbPIJfcyAEXkfL9q6PHpshlqEAhHqPPHq EkaTESd5LZ3s/tAryapfwjPGzfB2eErEu13+9rzezr8rdTKuKg1pqmnoeZeZAQSXoFQv NV9bBtwd9K3kvoPoDGmJvJICPffv+KRtGZ3EPrjccjpdBP6UR12IXuWP3zxg1AJLFxzS fQ6twKDfPe/cXkEbCgPrEruo4Pj+sN/mnPzUwnLnBjtcxPToqMnTj3fQof0Qz+fou78o z9ug== 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=Zw6IceP1enkIWRNOVzMlgH5WFLv2ZEdeIP6jocb3Yv0=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=CmDXoMN6swQttUiZXrBC+o77PWoThAqMcvU7geD8j4ChAUlSgGWLgK8AMD9BvZIWi/ oJVgYOeu/uyDtFWW6TNNpm3X6VID3U/qTsxMaWDe6L9039mFVSvEMeSkLpjwXViM8WeH BbwaQaKNOrN9jbYLwWAkuXpBHWTiPbSbFvole8EKdNSH+EjMUkx0vLtsj/RTi5Xi1JHQ 0nG4T154gZXtgCzxtoCj5aXbJkzImQ3yBg+jPAOh4UE+C+tUVuyU3oj2gNVHlnf0rZas PZlEMGc1pRHDsSAkm9D0OMhB0sEDhNPM3zMyo6Rex8OEMHuZcfvNDrwiVmoxSB/SHr76 1/MQ==; 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=i4QRnfnL; 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-539a824e809si1096785e87.20.2024.10.04.02.09.11; Fri, 04 Oct 2024 02:09:12 -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=i4QRnfnL; 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 19CE068CFEA; Fri, 4 Oct 2024 11:43:10 +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 2FA8868DA58 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=i4QRnfnL; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 33A024E2B 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 P1pzba3dCFc2 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=MhcVU0fLr+TqPjbwG0wYbFKODWpmV9IqsPbx9bUsmO4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i4QRnfnLROber8hz5O0okvkPAnHK1p4t4V05AwsAoX0e32Q+ImJ2vWp6KOEjEpL8R GL32B77uG3TUXPB+UiimHX9GQ4deWs8Z32+MG9PNWqaZ4dE+8UdL6CSbIa191LIXYN FMTFrQXnJ26PTclTGj+WkdCtBrctLoSsGzeRF+QiFUsRotgV8jKKLWxQfQEpC7+FzZ JRk1XMMRFOSekQUyT14XRJgm+NLjjfhxRrPZyyVTpqL5qfE2wz0PWY5MU2yvVXF5ch 9WRjDYzCD3n5z3ltIA9eOxOxD9UBE6USWCX27QqPy1pikQdVRIF0ysANXfFIgZM8qK /l6sUQ3JdgObw== 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 52FC94E30 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 46EC83A0139 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:28 +0200 Message-ID: <20241004084230.27419-18-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 18/20] lavfi/vf_format: 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: oU7ozCu4xFgZ --- libavfilter/vf_format.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index da39625fec..9dbb174c42 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -149,14 +149,16 @@ 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) { FormatContext *s = ctx->priv; int ret; - if (s->formats && (ret = ff_set_common_formats(ctx, s->formats)) < 0 || - s->color_spaces && (ret = ff_set_common_color_spaces(ctx, s->color_spaces)) < 0 || - s->color_ranges && (ret = ff_set_common_color_ranges(ctx, s->color_ranges)) < 0) + if (s->formats && (ret = ff_set_common_formats2 (ctx, cfg_in, cfg_out, s->formats)) < 0 || + s->color_spaces && (ret = ff_set_common_color_spaces2(ctx, cfg_in, cfg_out, s->color_spaces)) < 0 || + s->color_ranges && (ret = ff_set_common_color_ranges2(ctx, cfg_in, cfg_out, s->color_ranges)) < 0) return ret; return 0; @@ -197,7 +199,7 @@ const AVFilter ff_vf_format = { FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; #endif /* CONFIG_FORMAT_FILTER */ @@ -217,6 +219,6 @@ const AVFilter ff_vf_noformat = { FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; #endif /* CONFIG_NOFORMAT_FILTER */ From patchwork Fri Oct 4 08:42:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52031 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp268962vqg; Fri, 4 Oct 2024 02:09:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUD7OXRTDIoLvcuQ2CqgV7PxAiDwdG/49064YpyEnR2sdAWWXpKB9x5K+WK5ODipu5+MmkJa5w/dFetgN/UkXiM@gmail.com X-Google-Smtp-Source: AGHT+IHxfGd2QhLwRCA1HFAU2Pj1HHAApd5jJrszVhovbq0vR+dtmuTYhEq0mej1lgqOAGoXhF38 X-Received: by 2002:a17:907:1c1b:b0:a7a:9f0f:ab18 with SMTP id a640c23a62f3a-a991bd4906bmr189575966b.20.1728032959006; Fri, 04 Oct 2024 02:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728032958; cv=none; d=google.com; s=arc-20240605; b=Y8OPDIJnESzMrnDbfKuu8AONtvfCtr8JHP9Vn3Cs6Rvv6lKIGO3yYUqFWxymjUKhWm 9F2bU7PJsWTAdmVrTrdOi5tc0yNVi3fEdOnFUrH5Q/MNztlf2pVMC8+s5tdZtYLxswl3 la0E4Cn6AZPwcXp3TFUqXVPf7K4J2R+ovKq1UNiM32tMUyk5eRLqgE8OTzJ/5XpePi22 0x0ntQ8egJ1GKrmleIy3DPp2uFAjaUTOK7M9OdDqwgy4IpmRA3wsnXzhULk1lVoAtrd5 38JVVvuZVPVRMGQXADz1lTPUO9ggj5nNKYZBqMXLMhu0CVygWFkWnX80F6+OYTRUtjdR FewQ== 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=l0Ttna15aySpguDdtTtCosHod+Tq54M9R8UPnKr35zo=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ZVQvsZ3utZ34FKdSzeL3Akh5wHEMC5UtWqCPErt0VLTYsVDFQU/HuiD4vBROWlftmq tH9OR7POupp1T80KcXLWiPTBdcXQxGlMMFy2KGAGhWq6A98/nDWXxDWXW/COccAk/9kN vg6KINiXsWYmBTmo3RAh+EFpugF24pQEExpLPAr5w16YDveNMCk8F1ozKm3kQMeRMfVe Ssg47+6UuSpNBb+N9C9Wbh/SgLHFegrJlvKxxsHQIOMPxGtLKWc6cYU1ihFNuB7DmiCW Z/hWqI/c8Ka12/AbyiJDb552McO3Wc88UWy2CNg8Wxi6FMUKwDL+k+ejwvFQtL50Mgxx 7sfg==; 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=mjr6ktmJ; 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-a9911104bbcsi188063266b.1015.2024.10.04.02.09.18; Fri, 04 Oct 2024 02:09:18 -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=mjr6ktmJ; 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 D8DEF68DBB5; Fri, 4 Oct 2024 11:43:17 +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 7163C68DA75 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=mjr6ktmJ; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 88D1D4E2D 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 ltJFhGMIlVEy 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=uTT1MmmZ32m87x7cU6fvQom8ko/YIMmqcAXefgboBRE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mjr6ktmJZGQIhMMKGwPwVdtqzkd1SDtLs3OUxE/eGHqhqMgxB8ZwgJuGHDwjT/W2W dsF/G4NGPfi7VQyFO3gsCybVbnm6wR1HXUCbOmBNbDWXlivvLaItTze0RLL6BnXJsF UsPqx7461dSi5NfSDlz4Ca2aGteAHQxWQbA0/g1bNr/ZEksK8oHAaz8qHVR/SRYitx b4UmyvBz8NwQGq0JLMYIrwgt06HquTxFu+wLcSBFmONYpQ0MSHbcAoRcfhmuw/55+0 F1Qzou2Lj9smWFOyzz6QytVfDgi6HWubYZo3L0L8gQ6Uy1McmQBZDePltRmLzkm567 +vbNhEv9XzKOQ== 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 6099D4E31 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 524033A0F02 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:29 +0200 Message-ID: <20241004084230.27419-19-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 19/20] lavfi/vf_hwmap: 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: 0egWXivYr3tv --- libavfilter/vf_hwmap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index e999605eb1..f32a566b74 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -37,14 +37,16 @@ typedef struct HWMapContext { int reverse; } HWMapContext; -static int hwmap_query_formats(AVFilterContext *avctx) +static int hwmap_query_formats(const AVFilterContext *avctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { int ret; if ((ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO), - &avctx->inputs[0]->outcfg.formats)) < 0 || + &cfg_in[0]->formats)) < 0 || (ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO), - &avctx->outputs[0]->incfg.formats)) < 0) + &cfg_out[0]->formats)) < 0) return ret; return 0; @@ -428,7 +430,7 @@ const AVFilter ff_vf_hwmap = { .priv_class = &hwmap_class, FILTER_INPUTS(hwmap_inputs), FILTER_OUTPUTS(hwmap_outputs), - FILTER_QUERY_FUNC(hwmap_query_formats), + FILTER_QUERY_FUNC2(hwmap_query_formats), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, .flags = AVFILTER_FLAG_HWDEVICE, }; 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, };