[vlc-commits] direct3d11: don' t saturate the BT.709 RGB values before BT.2020 transformation

Steve Lhomme git at videolan.org
Tue Aug 2 10:54:55 CEST 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Aug  1 11:48:05 2016 +0200| [2a2d9cf1a72d08cad738610ba4611b2ab0253061] | committer: Jean-Baptiste Kempf

direct3d11: don't saturate the BT.709 RGB values before BT.2020 transformation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2a2d9cf1a72d08cad738610ba4611b2ab0253061
---

 modules/video_output/win32/direct3d11.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index c8a05fa..925fba4 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -291,9 +291,9 @@ static const char *globPixelShaderBiplanarYUV_BT2020_2RGB = "\
     yuv.x  = 1.164383561643836 * (yuv.x-0.0625);\
     yuv.y  = yuv.y - 0.5;\
     yuv.z  = yuv.z - 0.5;\
-    rgba.x = saturate(yuv.x + 1.792741071428571 * yuv.z);\
-    rgba.y = saturate(yuv.x - 0.532909328559444 * yuv.z - 0.21324861427373 * yuv.y);\
-    rgba.z = saturate(yuv.x + 2.112401785714286 * yuv.y);\
+    rgba.x = yuv.x + 1.792741071428571 * yuv.z;\
+    rgba.y = yuv.x - 0.532909328559444 * yuv.z - 0.21324861427373 * yuv.y;\
+    rgba.z = yuv.x + 2.112401785714286 * yuv.y;\
     rgba.x = saturate( 1.661 * rgba.x - 0.588 * rgba.y - 0.073 * rgba.z);\
     rgba.y = saturate(-0.125 * rgba.x + 1.133 * rgba.y - 0.008 * rgba.z);\
     rgba.z = saturate(-0.018 * rgba.x - 0.101 * rgba.y + 1.119 * rgba.z);\



More information about the vlc-commits mailing list