[vlc-commits] direct3d11: handle BT.470 M and BG transfer functions and luminance

Steve Lhomme git at videolan.org
Fri Oct 27 10:33:50 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Wed Oct 25 18:38:07 2017 +0200| [d37a77de43ab0769e92b5c9ec5a7fb7346abdc82] | committer: Jean-Baptiste Kempf

direct3d11: handle BT.470 M and BG transfer functions and luminance

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d37a77de43ab0769e92b5c9ec5a7fb7346abdc82
---

 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 8e8bcb0aae..6d02f5beb4 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1869,6 +1869,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;
@@ -1907,10 +1909,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;



More information about the vlc-commits mailing list