vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Thu Feb  8 16:30:45 
2018 +0100| [d7aade4fd1a3b59c816ddecb572691dc7eeb30f7] | committer: Steve Lhomme

direct3d11: fix the dynamic luminance for some sources

It should be it thousand nits but sometimes it's much smaller
(Sony HDR sample for example).
UHD Blu-Ray have the proper values.

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

 modules/video_output/win32/direct3d11.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/win32/direct3d11.c 
b/modules/video_output/win32/direct3d11.c
index c3b8f6d95a..1ac0765627 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1190,7 +1190,10 @@ static void Prepare(vout_display_t *vd, picture_t 
*picture, subpicture_t *subpic
 
     if (picture->format.mastering.max_luminance)
     {
-        UpdateQuadLuminanceScale(vd, &sys->picQuad, (float) 
picture->format.mastering.max_luminance / sys->display.luminance_peak);
+        if ( picture->format.mastering.max_luminance < 10000)
+            UpdateQuadLuminanceScale(vd, &sys->picQuad, (float) 
picture->format.mastering.max_luminance / sys->display.luminance_peak);
+        else
+            UpdateQuadLuminanceScale(vd, &sys->picQuad, (float) 
picture->format.mastering.max_luminance / (1000 * sys->display.luminance_peak));
 
         if (sys->dxgiswapChain4)
         {

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to