[vlc-devel] [PATCH 2/2] direct3d11: use proper values for the display and source brightness
Steve Lhomme
robux4 at videolabs.io
Fri Oct 27 10:11:52 CEST 2017
---
modules/video_output/win32/direct3d11.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index b5152b8a8f..f2e683466e 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -66,6 +66,10 @@ DEFINE_GUID(GUID_SWAPCHAIN_HEIGHT, 0x6ea976a0, 0x9d60, 0x4bb7, 0xa5, 0xa9, 0x7d,
static int Open(vlc_object_t *);
static void Close(vlc_object_t *);
+#define DEFAULT_BRIGHTNESS 100
+#define DEFAULT_SRGB_BRIGHTNESS 100
+#define MAX_PQ_BRIGHTNESS 10000
+
#define D3D11_HELP N_("Recommended video output for Windows 8 and later versions")
#define HW_BLENDING_TEXT N_("Use hardware blending support")
#define HW_BLENDING_LONGTEXT N_(\
@@ -394,9 +398,6 @@ const float ST2084_c1 = 3424.0 / 4096.0;\
const float ST2084_c2 = (2413.0 / 4096.0) * 32.0;\
const float ST2084_c3 = (2392.0 / 4096.0) * 32.0;"
-#define DEFAULT_BRIGHTNESS 80
-
-
static int Direct3D11MapPoolTexture(picture_t *picture)
{
picture_sys_t *p_sys = picture->p_sys;
@@ -1436,10 +1437,10 @@ done:
{
case TRANSFER_FUNC_LINEAR:
case TRANSFER_FUNC_SRGB:
- sys->display.luminance_peak = DEFAULT_BRIGHTNESS;
+ sys->display.luminance_peak = DEFAULT_SRGB_BRIGHTNESS;
break;
case TRANSFER_FUNC_SMPTE_ST2084:
- sys->display.luminance_peak = 10000;
+ sys->display.luminance_peak = MAX_PQ_BRIGHTNESS;
break;
/* there is no other output transfer on Windows */
default:
@@ -1777,7 +1778,7 @@ static HRESULT CompilePixelShader(vout_display_t *vd, const d3d_format_t *format
{
case TRANSFER_FUNC_SMPTE_ST2084:
/* TODO ajust this value using HDR metadata ? */
- src_luminance_peak = 7500;
+ src_luminance_peak = MAX_PQ_BRIGHTNESS;
break;
case TRANSFER_FUNC_HLG:
src_luminance_peak = 1000;
--
2.14.2
More information about the vlc-devel
mailing list