vlc/vlc-3.0 | branch: master | Steve Lhomme <[email protected]> | Fri Oct 12 
15:56:07 2018 +0200| [1b9c58472e4711cce14ea2a53fb2ac1ccf812fcf] | committer: 
Steve Lhomme

d3d11_shaders: clip linear values

Converting BT2020 to BT709 can create colors outside of the possible range

(cherry picked from commit e06d0df978fc72927bb6a9285927d893556656ca)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=1b9c58472e4711cce14ea2a53fb2ac1ccf812fcf
---

 modules/video_output/win32/d3d11_shaders.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/video_output/win32/d3d11_shaders.c 
b/modules/video_output/win32/d3d11_shaders.c
index 8b9d197416..306a9fe01d 100644
--- a/modules/video_output/win32/d3d11_shaders.c
+++ b/modules/video_output/win32/d3d11_shaders.c
@@ -98,6 +98,7 @@ static const char* globPixelShaderDefault = "\
   }\n\
   \n\
   inline float3 linearToDisplay(float3 rgb) {\n\
+     rgb = max(min(rgb, 1), 0);\n\
       %s;\n\
   }\n\
   \n\

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to