diff options
author | wm4 <wm4@nowhere> | 2015-01-21 19:29:18 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-21 19:29:18 +0100 |
commit | a0caadd512a6f531fd01638570883e629f9dc6e5 (patch) | |
tree | 9023c03a9229b1ef2e7c5fee0aea778fbf0c2edc /video/fmt-conversion.c | |
parent | 30ca30c0a16a7ee034d9e05280ba221427d48ba1 (diff) | |
download | mpv-a0caadd512a6f531fd01638570883e629f9dc6e5.tar.bz2 mpv-a0caadd512a6f531fd01638570883e629f9dc6e5.tar.xz |
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).
Diffstat (limited to 'video/fmt-conversion.c')
-rw-r--r-- | video/fmt-conversion.c | 4 |
1 files changed, 4 insertions, 0 deletions
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}, |