summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoris Verria <doris.verria@qt.io>2023-04-25 23:19:10 +0200
committerDoris Verria <doris.verria@qt.io>2023-04-26 10:14:52 +0200
commitbd1487b17d0806a79cc74b911008a533e1ec3036 (patch)
treee7c2935e8a8f5bbe410942dfe77c8344f8b27cc1
parentab6e93144a1153e0b53c9470bbd17956944e2d01 (diff)
downloadqtmultimedia-bd1487b17d0806a79cc74b911008a533e1ec3036.tar.gz
QVideoTextureHelper: Fix color matrix calculation
The color matrix for BT709 video (limited) range, had a small mistake. From calculations based on the BT709 standard and for video range (16 - 235) values, the conversion equations are: R = Y * 1.1644 + V * 1.7928 + (-248.100994) G = Y * 1.1644 + U * -0.2132 + V * -0.5329 + 76.878080 B = Y * 1.1644 + U * 2.1124 + (-289.017566) So there was a missplacement between two of the coeficients in the matrix. Fixes: QTBUG-108083 Pick-to: 6.5 6.2 Change-Id: If58c7df8a9ad4d975a2ac0c90cd3692232210995 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
-rw-r--r--src/multimedia/video/qvideotexturehelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multimedia/video/qvideotexturehelper.cpp b/src/multimedia/video/qvideotexturehelper.cpp
index 7cb1e1a6e..3675e157f 100644
--- a/src/multimedia/video/qvideotexturehelper.cpp
+++ b/src/multimedia/video/qvideotexturehelper.cpp
@@ -398,7 +398,7 @@ static QMatrix4x4 colorMatrix(const QVideoFrameFormat &format)
0.0f, 0.000f, 0.000f, 1.0000f);
return QMatrix4x4(
1.1644f, 0.000f, 1.7928f, -0.9731f,
- 1.1644f, -0.5329f, -0.2132f, 0.3015f,
+ 1.1644f, -0.2132f, -0.5329f, 0.3015f,
1.1644f, 2.1124f, 0.000f, -1.1335f,
0.0f, 0.000f, 0.000f, 1.0000f);
case QVideoFrameFormat::ColorSpace_BT2020: