aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-10-28 15:46:51 +0200
committerNiklas Haas <git@haasn.dev>2023-11-09 12:53:35 +0100
commit736284e7b98cebadbc5b248f1080950c207bb5a2 (patch)
treeee55cd20bb7362dfe01837b28336e857b2749de9 /libswscale
parentd043e5c54c3f8e98be1a4bc1bcb76407af0e8ac7 (diff)
downloadffmpeg-736284e7b98cebadbc5b248f1080950c207bb5a2.tar.gz
swscale/yuv2rgb: fix sws_getCoefficients for colorspace=0
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.
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/yuv2rgb.c2
1 files changed, 1 insertions, 1 deletions
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 */