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, };