[vlc-commits] direct3d11: fix the dynamic luminance for some sources
Steve Lhomme
git at videolan.org
Thu Feb 8 16:33:22 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at 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)
{
More information about the vlc-commits
mailing list