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 0805C469E8
	for <ffmpegdev@gitmailbox.com>; Tue, 31 Oct 2023 14:55:07 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D2FFA68CD25;
	Tue, 31 Oct 2023 16:55:01 +0200 (EET)
Received: from haasn.dev (haasn.dev [78.46.187.166])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8070268CAFD
 for <ffmpeg-devel@ffmpeg.org>; Tue, 31 Oct 2023 16:54:55 +0200 (EET)
Received: from haasn.dev (unknown [10.30.0.2])
 by haasn.dev (Postfix) with ESMTP id 196E24B023;
 Tue, 31 Oct 2023 15:54:55 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail;
 t=1698764095; bh=uC4zSuPuu4RJxcCGYos+Sdc/5fAP8LQ8KM/YAShXyOE=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=awaoONSvQ+1MWbIEh5ilw23Y8MMaHNQe/BMFR+gzBxV7xTvhgZ6EHYfG4CZvK/QPR
 GpkLsm0fdQ8doN3lcXyzYwkv5/MXD0ZJ2yfllFIZLERuCCXS9FlLtfYX0AVcH7b/8g
 pjl5HM2mI3Jx/zRkgRHiJxzgp3CwOcFLXtSrYMBo=
From: Niklas Haas <ffmpeg@haasn.xyz>
To: ffmpeg-devel@ffmpeg.org
Date: Tue, 31 Oct 2023 15:54:45 +0100
Message-ID: <20231031145450.94975-3-ffmpeg@haasn.xyz>
X-Mailer: git-send-email 2.42.0
In-Reply-To: <20231031145450.94975-1-ffmpeg@haasn.xyz>
References: <20231031145450.94975-1-ffmpeg@haasn.xyz>
MIME-Version: 1.0
Subject: [FFmpeg-devel] [PATCH v3 3/8] swscale/yuv2rgb: fix
 sws_getCoefficients for colorspace=0
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/20231031145450.94975-3-ffmpeg@haasn.xyz/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

From: Niklas Haas <git@haasn.dev>

The documentation states that invalid entries default to SWS_CS_DEFAULT.
A value of 0 is not a valid SWS_CS_*, yet the code incorrectly
hard-codes it to BT.709 coefficients instead of SWS_CS_DEFAULT.
---
 libswscale/yuv2rgb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index 9c3f5e23c6..0a84b662f9 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -46,7 +46,7 @@
  * where Y = cr * R + cg * G + cb * B and cr + cg + cb = 1.
  */
 const int32_t ff_yuv2rgb_coeffs[11][4] = {
-    { 117489, 138438, 13975, 34925 }, /* no sequence_display_extension */
+    { 104597, 132201, 25675, 53279 }, /* no sequence_display_extension */
     { 117489, 138438, 13975, 34925 }, /* ITU-R Rec. 709 (1990) */
     { 104597, 132201, 25675, 53279 }, /* unspecified */
     { 104597, 132201, 25675, 53279 }, /* reserved */
-- 
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".