This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: qv4l2: fix SMPTE-2084 processing
Author:  Hans Verkuil <hans.verk...@cisco.com>
Date:    Wed Jul 26 20:32:42 2017 +0200

A factor of 100 was missing: I forgot to take into account that SMPTE-2084,
being an HDR transfer function, maps values to the range of 0-10000 cd/m^2
luminance. Other transfer functions only go to 100 cd/m^2.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>

 utils/qv4l2/capture-win-gl.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=06273a34de574ed2c89e9a655012ce4ee1136f9e
diff --git a/utils/qv4l2/capture-win-gl.cpp b/utils/qv4l2/capture-win-gl.cpp
index e818a3afa2f8..65100e26f0ee 100644
--- a/utils/qv4l2/capture-win-gl.cpp
+++ b/utils/qv4l2/capture-win-gl.cpp
@@ -794,9 +794,11 @@ QString CaptureWinGLEngine::codeTransformToLinear()
                               "   r = pow(max(r, 0.0), m2);"
                               "   g = pow(max(g, 0.0), m2);"
                               "   b = pow(max(b, 0.0), m2);"
-                              "   r = pow(max(r - c1, 0.0) / (c2 - c3 * r), 
m1);"
-                              "   g = pow(max(g - c1, 0.0) / (c2 - c3 * g), 
m1);"
-                              "   b = pow(max(b - c1, 0.0) / (c2 - c3 * b), 
m1);");
+                              // The factor 100 is because SMPTE-2084 maps to 
0-10000 cd/m^2
+                              // whereas other transfer functions map to 0-100 
cd/m^2.
+                              "   r = pow(max(r - c1, 0.0) / (c2 - c3 * r), 
m1) * 100.0;"
+                              "   g = pow(max(g - c1, 0.0) / (c2 - c3 * g), 
m1) * 100.0;"
+                              "   b = pow(max(b - c1, 0.0) / (c2 - c3 * b), 
m1) * 100.0;");
        case V4L2_XFER_FUNC_NONE:
                return "";
        case V4L2_XFER_FUNC_709:

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to