[vlc-devel] [PATCH] direct3d11: handle BT.470 M and BG transfer functions and luminance
Steve Lhomme
robux4 at videolabs.io
Wed Oct 25 18:38:07 CEST 2017
---
modules/video_output/win32/direct3d11.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 0b24a06f3e..273946fc5a 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1780,6 +1780,8 @@ static HRESULT CompilePixelShader(vout_display_t *vd, const d3d_format_t *format
case TRANSFER_FUNC_HLG:
src_luminance_peak = 1000;
break;
+ case TRANSFER_FUNC_BT470_BG:
+ case TRANSFER_FUNC_BT470_M:
case TRANSFER_FUNC_BT709:
case TRANSFER_FUNC_SRGB:
src_luminance_peak = DEFAULT_BRIGHTNESS;
@@ -1818,10 +1820,15 @@ static HRESULT CompilePixelShader(vout_display_t *vd, const d3d_format_t *format
psz_src_transform = "return pow(rgb, 1.0 / 0.45)";
src_transfer = TRANSFER_FUNC_LINEAR;
break;
+ case TRANSFER_FUNC_BT470_M:
case TRANSFER_FUNC_SRGB:
psz_src_transform = "return pow(rgb, 2.2)";
src_transfer = TRANSFER_FUNC_LINEAR;
break;
+ case TRANSFER_FUNC_BT470_BG:
+ psz_src_transform = "return pow(rgb, 2.8)";
+ src_transfer = TRANSFER_FUNC_LINEAR;
+ break;
default:
msg_Dbg(vd, "unhandled source transfer %d", transfer);
src_transfer = transfer;
--
2.14.2
More information about the vlc-devel
mailing list