Commit d7aade4f authored by Steve Lhomme's avatar 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.
parent 1c9a6491
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment