[vlc-commits] direct3d11: add support for transfer conversion for BT.709 and sRGB sources

Steve Lhomme git at videolan.org
Tue Mar 21 18:36:59 CET 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Mar 15 17:55:27 2017 +0100| [19d919b746ffb32c3062db3bfcd89001ffb3be54] | committer: Hugo Beauzée-Luyssen

direct3d11: add support for transfer conversion for BT.709 and sRGB sources

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 modules/video_output/win32/direct3d11.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index bec852d..fc48eba 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1649,6 +1649,14 @@ static HRESULT CompilePixelShader(vout_display_t *vd, const d3d_format_t *format
                     return rgb / 6.0";
             src_transfer = TRANSFER_FUNC_LINEAR;
             break;
+        case TRANSFER_FUNC_BT709:
+            psz_src_transform = "return pow(rgb, 1.0 / 0.45)";
+            src_transfer = TRANSFER_FUNC_LINEAR;
+            break;
+        case TRANSFER_FUNC_SRGB:
+            psz_src_transform = "return pow(rgb, 2.2)";
+            src_transfer = TRANSFER_FUNC_LINEAR;
+            break;
         default:
             src_transfer = transfer;
             break;



More information about the vlc-commits mailing list