From a0caadd512a6f531fd01638570883e629f9dc6e5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 21 Jan 2015 19:29:18 +0100 Subject: vo_opengl: handle grayscale input better, add YA16 support Simply clamp off the U/V components in the colormatrix, instead of doing something special in the shader. Also, since YA8/YA16 gave a plane_bits value of 16/32, and a colormatrix calculation overflowed with 32, add a component_bits field to the image format descriptor, which for YA8/YA16 returns 8/16 (the wrong value had no bad consequences otherwise). --- video/csputils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'video/csputils.h') diff --git a/video/csputils.h b/video/csputils.h index 3f61721b12..f973117751 100644 --- a/video/csputils.h +++ b/video/csputils.h @@ -116,6 +116,8 @@ struct mp_csp_params { float rgamma; float ggamma; float bgamma; + // discard U/V components + bool gray; // texture_bits/input_bits is for rescaling fixed point input to range [0,1] int texture_bits; int input_bits; -- cgit v1.2.3