From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D855B475E5 for ; Mon, 13 Nov 2023 15:33:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A18C868CD03; Mon, 13 Nov 2023 17:32:48 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B983068CCEA for ; Mon, 13 Nov 2023 17:32:39 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 01A2349B46; Mon, 13 Nov 2023 16:32:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1699889559; bh=Hmwl2kUulVnvDWz0U0sQuL2mLaCWxkVZEg6EGLzOT9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DCphhWs3TGa5EssDRVYd9K4e2TO3ggeUIELiaTj2kKHwhuOkKnuQURe4xzEU3VHPv Cv0F+lzBH06t0efhz7l4IYhMaiA/qWNJEgYH5Jw0bVKFqHCQckQ8NP59Mr8nVS4nr1 3VKj7IResU3UE1ywPKYucODWq4kuPYdwJBP7XgCc= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Mon, 13 Nov 2023 16:32:33 +0100 Message-ID: <20231113153234.8812-2-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231113153234.8812-1-ffmpeg@haasn.xyz> References: <20231113153234.8812-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] swscale/utils: correctly return from sws_init_single_context 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 Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas Before cedf589, this function would return early return on RGB and float formats, as well as when range was equal. While this commit intentionally removed the early return for same-range YUV conversions, it missed that RGB and float formats that have an unscaled converter should always early return, no matter what the source range was set to. Fixes: cedf589c09c567b72bf4c1a58db53d94622567e1 --- libswscale/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libswscale/utils.c b/libswscale/utils.c index ec822ff5d9..7ce86f83ea 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1733,6 +1733,9 @@ static av_cold int sws_init_single_context(SwsContext *c, SwsFilter *srcFilter, av_log(c, AV_LOG_INFO, "unscaled %s -> %s special converter is available\n", av_get_pix_fmt_name(srcFormat), av_get_pix_fmt_name(dstFormat)); + + if (isAnyRGB(dstFormat) || isFloat(srcFormat) || isFloat(dstFormat)) + return 0; } } -- 2.42.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".