[vlc-devel] [PATCH] direct3d11: adjust the max luminance when tone mapping to SDR
Steve Lhomme
robux4 at videolabs.io
Fri Oct 27 11:51:44 CEST 2017
The content never reaches 10000 nits also the max luminance in files is often
bogus, HDR TVs don't actually use them but use a hardcoded value instead.
When the display is in HDR mode, let it deal with the luminance. Otherwise
use a value of 5000 that gives a good result with most HDR10 content.
---
modules/video_output/win32/direct3d11.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index f2e683466e..2ff3040422 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1777,8 +1777,12 @@ static HRESULT CompilePixelShader(vout_display_t *vd, const d3d_format_t *format
switch (transfer)
{
case TRANSFER_FUNC_SMPTE_ST2084:
- /* TODO ajust this value using HDR metadata ? */
- src_luminance_peak = MAX_PQ_BRIGHTNESS;
+ if (sys->display.colorspace->transfer == TRANSFER_FUNC_SMPTE_ST2084)
+ /* the display will take care of the meta data if there are some */
+ src_luminance_peak = MAX_PQ_BRIGHTNESS;
+ else
+ /* TODO adjust this value during playback using HDR metadata ? */
+ src_luminance_peak = 5000;
break;
case TRANSFER_FUNC_HLG:
src_luminance_peak = 1000;
--
2.14.2
More information about the vlc-devel
mailing list