summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-12-05 15:36:54 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-12-05 15:36:54 +0000
commit0ca415447d33c75469724e16aba6385fd80691db (patch)
treeb022be1f39ce9081657b36d27e7f9463bd569d2b /libvo/gl_common.c
parent403cf73c9742e574f59e9a2f87b904a4bd4ec3fe (diff)
downloadmpv-0ca415447d33c75469724e16aba6385fd80691db.tar.bz2
mpv-0ca415447d33c75469724e16aba6385fd80691db.tar.xz
Add support for YCBCR MESA texture format to vo_gl.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28093 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index eeb19feb54..4ff2a86320 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -212,6 +212,13 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt,
*gl_format = GL_LUMINANCE;
*gl_type = GL_UNSIGNED_BYTE;
break;
+ case IMGFMT_UYVY:
+ case IMGFMT_YUY2:
+ *gl_texfmt = GL_YCBCR_MESA;
+ *bpp = 16;
+ *gl_format = GL_YCBCR_MESA;
+ *gl_type = fmt == IMGFMT_UYVY ? GL_UNSIGNED_SHORT_8_8 : GL_UNSIGNED_SHORT_8_8_REV;
+ break;
#if 0
// we do not support palettized formats, although the format the
// swscale produces works
@@ -484,6 +491,8 @@ int glFmt2bpp(GLenum format, GLenum type) {
case GL_LUMINANCE:
case GL_ALPHA:
return component_size;
+ case GL_YCBCR_MESA:
+ return 2;
case GL_RGB:
case GL_BGR:
return 3 * component_size;