[vlc-commits] direct3d11: clean the range adjustment when the source has less range than display
Steve Lhomme
git at videolan.org
Wed Jan 24 08:46:38 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jan 23 13:37:28 2018 +0100| [9cb9548798a41712c9ffb52c6626e136c6e5b62c] | committer: Jean-Baptiste Kempf
direct3d11: clean the range adjustment when the source has less range than display
Ref #19127
(cherry picked from commit a821690b95c6941e64ef00ca0e18e2ef54d52014)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=9cb9548798a41712c9ffb52c6626e136c6e5b62c
---
modules/video_output/win32/direct3d11.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 168e112a28..82e79304a3 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1860,11 +1860,16 @@ static HRESULT CompilePixelShader(vout_display_t *vd, const d3d_format_t *format
}
}
- int range_adjust = sys->display.colorspace->b_full_range;
+ int range_adjust = 0;
+ if (sys->display.colorspace->b_full_range) {
+ if (!src_full_range)
+ range_adjust = 1; /* raise the source to full range */
+ } else {
+ if (src_full_range)
+ range_adjust = -1; /* lower the source to studio range */
+ }
if (!IsRGBShader(format))
range_adjust--; /* the YUV->RGB conversion already output full range */
- if (src_full_range)
- range_adjust--;
if (range_adjust != 0)
{
More information about the vlc-commits
mailing list