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/fmt-conversion.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'video/fmt-conversion.c') diff --git a/video/fmt-conversion.c b/video/fmt-conversion.c index eb6b31cc71..dc278054f3 100644 --- a/video/fmt-conversion.c +++ b/video/fmt-conversion.c @@ -113,6 +113,10 @@ static const struct { {IMGFMT_BGR0, AV_PIX_FMT_BGRA}, #endif +#ifdef AV_PIX_FMT_YA16 + {IMGFMT_YA16, AV_PIX_FMT_YA16}, +#endif + {IMGFMT_VDPAU, AV_PIX_FMT_VDPAU}, #if HAVE_VDA_HWACCEL {IMGFMT_VDA, AV_PIX_FMT_VDA}, -- cgit v1.2.3