summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoris Verria <doris.verria@qt.io>2023-04-25 23:19:10 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-04-26 08:52:40 +0000
commitae1d4d599e153292825af2b020c2ce23d9f5e4d1 (patch)
tree4943b49f68ffd594a91c44c12e1915b52189b3dc
parent4cf3e7fb7a87d6f9117f4bcde4b0816ca5369e67 (diff)
downloadqtmultimedia-ae1d4d599e153292825af2b020c2ce23d9f5e4d1.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 Change-Id: If58c7df8a9ad4d975a2ac0c90cd3692232210995 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit bd1487b17d0806a79cc74b911008a533e1ec3036) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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: