[vlc-commits] d3d11_shaders: only compensate the YUV->RGB range conversion when it happens

Steve Lhomme git at videolan.org
Fri Oct 23 13:02:27 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Oct 22 15:47:17 2020 +0200| [8ac460e8c6ac138470d02186d9a1a690e82a0e8f] | committer: Steve Lhomme

d3d11_shaders: only compensate the YUV->RGB range conversion when it happens

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

 modules/video_output/win32/d3d11_shaders.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/win32/d3d11_shaders.c b/modules/video_output/win32/d3d11_shaders.c
index 8f718b933c..2e98bddd9c 100644
--- a/modules/video_output/win32/d3d11_shaders.c
+++ b/modules/video_output/win32/d3d11_shaders.c
@@ -564,7 +564,7 @@ HRESULT (D3D11_CompilePixelShader)(vlc_object_t *o, const d3d11_shaders_t *shade
         if (src_full_range)
             range_adjust = -1; /* lower the source to studio range */
     }
-    if (!IsRGBShader(quad->textureFormat) && !src_full_range)
+    if (!IsRGBShader(quad->textureFormat) && !src_full_range && IsRGBShader(display->pixelFormat))
         range_adjust--; /* the YUV->RGB conversion already output full range */
 
     if (range_adjust != 0)



More information about the vlc-commits mailing list