From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTP id D80C74796B
	for <ffmpegdev@gitmailbox.com>; Sat, 28 Oct 2023 14:45:00 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 578BE68CBAA;
	Sat, 28 Oct 2023 17:44:43 +0300 (EEST)
Received: from haasn.dev (haasn.dev [78.46.187.166])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AFA1368C96A
 for <ffmpeg-devel@ffmpeg.org>; Sat, 28 Oct 2023 17:44:35 +0300 (EEST)
Received: from haasn.dev (unknown [10.30.0.2])
 by haasn.dev (Postfix) with ESMTP id 6527648D04;
 Sat, 28 Oct 2023 16:44:35 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail;
 t=1698504275; bh=FtLuwViaguikU25UXM+4Y3gxeFPCCg+XFLVpu+tlnyA=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=VhESeKRJCuQTwNjWCENyy4WqibEONQVN9Sz37UCzOhTvSv5TQDxmWSHSpsZzbURwn
 HU11AeKSKAtwBhZHmPH2k6FBcvvHcgnHh5RsjCh9vj612W0pPP5GkeQdqWBwCGJg6/
 Im16uUSts4+pLgEMANrPa122XxN0/BDLWaIBGbuw=
From: Niklas Haas <ffmpeg@haasn.xyz>
To: ffmpeg-devel@ffmpeg.org
Date: Sat, 28 Oct 2023 16:41:09 +0200
Message-ID: <20231028144430.60538-3-ffmpeg@haasn.xyz>
X-Mailer: git-send-email 2.42.0
In-Reply-To: <20231028144430.60538-1-ffmpeg@haasn.xyz>
References: <20231028144430.60538-1-ffmpeg@haasn.xyz>
MIME-Version: 1.0
Subject: [FFmpeg-devel] [PATCH v2 02/10] swscale: don't omit
 ff_sws_init_range_convert for high-bit
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Niklas Haas <git@haasn.dev>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20231028144430.60538-3-ffmpeg@haasn.xyz/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

From: Niklas Haas <git@haasn.dev>

This was a complete hack seemingly designed to work around a different
bug, which was fixed in the previous commit. As such, there is no more
reason not to do this, as it simply breaks changing color range in
sws_setColorspaceDetails for no reason.
---
 libswscale/utils.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 0a55657800..ec822ff5d9 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1049,9 +1049,7 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
     c->srcRange   = srcRange;
     c->dstRange   = dstRange;
 
-    //The srcBpc check is possibly wrong but we seem to lack a definitive reference to test this
-    //and what we have in ticket 2939 looks better with this check
-    if (need_reinit && (c->srcBpc == 8 || !isYUV(c->srcFormat)))
+    if (need_reinit)
         ff_sws_init_range_convert(c);
 
     c->dstFormatBpp = av_get_bits_per_pixel(desc_dst);
-- 
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".