summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2010-02-15 00:48:28 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2010-02-15 00:48:28 (GMT)
commit3cc41dc8cd0c3d1e0540f3f3e975d62a4dc89e9b (patch)
tree478922c52edba2de0704b72792394806254cb6fd /src/multimedia
parent9bca64fc5eee598f97eba1052f1db250c5c7e43b (diff)
downloadQt-3cc41dc8cd0c3d1e0540f3f3e975d62a4dc89e9b.zip
Qt-3cc41dc8cd0c3d1e0540f3f3e975d62a4dc89e9b.tar.gz
Qt-3cc41dc8cd0c3d1e0540f3f3e975d62a4dc89e9b.tar.bz2
Fix hue rotation in QPainterVideoSurface.
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/base/qpaintervideosurface.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/multimedia/base/qpaintervideosurface.cpp b/src/multimedia/base/qpaintervideosurface.cpp
index 533ddee..f097db8 100644
--- a/src/multimedia/base/qpaintervideosurface.cpp
+++ b/src/multimedia/base/qpaintervideosurface.cpp
@@ -368,17 +368,17 @@ void QVideoSurfaceGLPainter::updateColors(int brightness, int contrast, int hue,
const qreal cosH = qCos(M_PI * h);
const qreal sinH = qSin(M_PI * h);
- const qreal h11 = -0.4728 * cosH + 0.7954 * sinH + 1.4728;
- const qreal h21 = -0.9253 * cosH - 0.0118 * sinH + 0.9523;
- const qreal h31 = 0.4525 * cosH + 0.8072 * sinH - 0.4524;
+ const qreal h11 = 0.787 * cosH - 0.213 * sinH + 0.213;
+ const qreal h21 = -0.213 * cosH + 0.143 * sinH + 0.213;
+ const qreal h31 = -0.213 * cosH - 0.787 * sinH + 0.213;
- const qreal h12 = 1.4728 * cosH - 1.3728 * sinH - 1.4728;
- const qreal h22 = 1.9253 * cosH + 0.5891 * sinH - 0.9253;
- const qreal h32 = -0.4525 * cosH - 1.9619 * sinH + 0.4525;
+ const qreal h12 = -0.715 * cosH - 0.715 * sinH + 0.715;
+ const qreal h22 = 0.285 * cosH + 0.140 * sinH + 0.715;
+ const qreal h32 = -0.715 * cosH + 0.715 * sinH + 0.715;
- const qreal h13 = 1.4728 * cosH - 0.2181 * sinH - 1.4728;
- const qreal h23 = 0.9253 * cosH + 1.1665 * sinH - 0.9253;
- const qreal h33 = 0.5475 * cosH - 1.3846 * sinH + 0.4525;
+ const qreal h13 = -0.072 * cosH + 0.928 * sinH + 0.072;
+ const qreal h23 = -0.072 * cosH - 0.283 * sinH + 0.072;
+ const qreal h33 = 0.928 * cosH + 0.072 * sinH + 0.072;
const qreal sr = (1.0 - s) * 0.3086;
const qreal sg = (1.0 - s) * 0.6094;