From b65c548b7d65d84e4d025c9f4ab771ad1c588bc1 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 12 Apr 2015 03:34:38 +0200 Subject: [PATCH] vo_opengl: fix source-shader + XYZ input --- video/out/gl_video.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/video/out/gl_video.c b/video/out/gl_video.c index b007b25bf2..add26caefa 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1429,6 +1429,11 @@ static void pass_read_video(struct gl_video *p) // Custom source shaders are required to output at the full range p->use_full_range = shader != NULL; + if (p->image_desc.flags & MP_IMGFLAG_XYZ) { + cmul = 1.0; + p->use_full_range = true; + } + // Special case for non-planar content if (p->plane_count == 1) { if (shader) { @@ -1546,8 +1551,6 @@ static void pass_convert_yuv(struct gl_video *p) // Pre-colormatrix input gamma correction if (p->image_desc.flags & MP_IMGFLAG_XYZ) { cparams.colorspace = MP_CSP_XYZ; - cparams.input_bits = 8; - cparams.texture_bits = 8; // Pre-colormatrix input gamma correction. Note that this results in // linear light