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 9AAD2475E7 for ; Mon, 13 Nov 2023 15:32:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3E8E168CCF9; Mon, 13 Nov 2023 17:32:46 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B2BC268CC74 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 41F0A4B527; Mon, 13 Nov 2023 16:32:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1699889559; bh=SP8lKYiaMKtNjKTZmr8BdEc3qUHxydSNM63PUgWvdQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lhZIJG93bGQFoALRibZfeWUD9ggZJpfqaSOTGg85g8dt2PMmGyvJWbzbDaWToOtrh vdf5czQ5d0PzN2ZpRfqVLxLJZBKFn0LOgZmXVX4jdheyrnams5oHg6lazl3mIuu24E h+g39JEsqL0pAsuqHgtu0JBwBSzA+5RTYP5Ho54Y= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Mon, 13 Nov 2023 16:32:34 +0100 Message-ID: <20231113153234.8812-3-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 3/3] swscale/utils: don't early return in yuv alpha blendaway 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 If changing YUV range after init results in the special converter no longer being picked, then we need the rest of the init function to have been hit. Fixes: cedf589c09c567b72bf4c1a58db53d94622567e1 --- libswscale/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 7ce86f83ea..294b0b5ace 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1721,7 +1721,9 @@ static av_cold int sws_init_single_context(SwsContext *c, SwsFilter *srcFilter, av_log(c, AV_LOG_INFO, "alpha blendaway %s -> %s special converter is available\n", av_get_pix_fmt_name(srcFormat), av_get_pix_fmt_name(dstFormat)); - return 0; + + if (isAnyRGB(dstFormat)) + return 0; } /* unscaled special cases */ -- 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".