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 70E54471DD for ; Sat, 28 Oct 2023 14:45:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5F82168CBAD; Sat, 28 Oct 2023 17:44:44 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DD31B68C96A for ; 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 A12BE4B8AC; 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=uC4zSuPuu4RJxcCGYos+Sdc/5fAP8LQ8KM/YAShXyOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fK2UmXJjuri9EQmyeSqqDb+2sPlWDJvMH2dMWZ+kp1ja/+F+ExaXyAK80ELtUH7Zd ZQ2DEvrQgsjei+XP1OKD+Z2Yal6nWl4FOztwGQVL7UYQsbvlHvN/TtTvGRXa6QGQVa /rLc0bMhsVul8CFdZ6JNRAHBaOm8cONf4rBelcgU= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Sat, 28 Oct 2023 16:41:10 +0200 Message-ID: <20231028144430.60538-4-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 03/10] 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 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 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".