diff options
author | Stephen Hutchinson <qyot27@gmail.com> | 2012-11-27 04:39:09 -0500 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-12-03 21:08:51 +0100 |
commit | c082240c62cb8855e55c0dbe88b8591458599ce9 (patch) | |
tree | 78dd20bfc585fb710857b39474b6ef20d2e8f1de /video/fmt-conversion.c | |
parent | 54ce8af6e0dbf41d9463ca38a5fdc33bd6ed913f (diff) | |
download | mpv-c082240c62cb8855e55c0dbe88b8591458599ce9.tar.bz2 mpv-c082240c62cb8855e55c0dbe88b8591458599ce9.tar.xz |
video: add support for 12 and 14 bit YUV pixel formats
Based on a patch by qyot27. Add the missing parts in mp_get_chroma_shift(),
which allow allocation of such images, and which make vo_opengl
automatically accept the new formats. Change the IMGFMT_IS_YUVP16_LE/BE
macros to properly report IMGFMT_444P14 as supported: this pixel format
has the highest numerical bit width identifier (0x55), which is not
covered by the mask ~0xfc. Remove 1 bit from the mask (makes it 0xf8) so
that IMGFMT_IS_YUVP16(IMGFMT_444P14) is 1. This is slightly risky, as
the organization of the image format IDs (actually FourCCs + mplayer
internal IDs) is messy at best, but it should be ok.
Diffstat (limited to 'video/fmt-conversion.c')
-rw-r--r-- | video/fmt-conversion.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/video/fmt-conversion.c b/video/fmt-conversion.c index 736af8701c..cd223fd525 100644 --- a/video/fmt-conversion.c +++ b/video/fmt-conversion.c @@ -82,12 +82,24 @@ static const struct { {IMGFMT_420P9_BE, PIX_FMT_YUV420P9BE}, {IMGFMT_420P10_LE, PIX_FMT_YUV420P10LE}, {IMGFMT_420P10_BE, PIX_FMT_YUV420P10BE}, + {IMGFMT_420P12_LE, PIX_FMT_YUV420P12LE}, + {IMGFMT_420P12_BE, PIX_FMT_YUV420P12BE}, + {IMGFMT_420P14_LE, PIX_FMT_YUV420P14LE}, + {IMGFMT_420P14_BE, PIX_FMT_YUV420P14BE}, {IMGFMT_422P10_LE, PIX_FMT_YUV422P10LE}, {IMGFMT_422P10_BE, PIX_FMT_YUV422P10BE}, + {IMGFMT_422P12_LE, PIX_FMT_YUV422P12LE}, + {IMGFMT_422P12_BE, PIX_FMT_YUV422P12BE}, + {IMGFMT_422P14_LE, PIX_FMT_YUV422P14LE}, + {IMGFMT_422P14_BE, PIX_FMT_YUV422P14BE}, {IMGFMT_444P9_BE , PIX_FMT_YUV444P9BE}, {IMGFMT_444P9_LE , PIX_FMT_YUV444P9LE}, {IMGFMT_444P10_BE, PIX_FMT_YUV444P10BE}, {IMGFMT_444P10_LE, PIX_FMT_YUV444P10LE}, + {IMGFMT_444P12_BE, PIX_FMT_YUV444P12BE}, + {IMGFMT_444P12_LE, PIX_FMT_YUV444P12LE}, + {IMGFMT_444P14_BE, PIX_FMT_YUV444P14BE}, + {IMGFMT_444P14_LE, PIX_FMT_YUV444P14LE}, {IMGFMT_422P16_LE, PIX_FMT_YUV422P16LE}, {IMGFMT_422P16_BE, PIX_FMT_YUV422P16BE}, {IMGFMT_422P9_LE, PIX_FMT_YUV422P9LE}, |