From 2c7488fe913a19254c2a92e20032a6181f62e1cf Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 11 May 2011 06:59:51 +0000 Subject: vo_gl: Request GL_LUMINANCE16 for 16-bit YUV input Request GL_LUMINANCE16 as internal format for > 8 bit YUV formats. Have yet to find a system that actually provides that though. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33453 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.c | 4 ++-- libvo/gl_common.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'libvo') diff --git a/libvo/gl_common.c b/libvo/gl_common.c index f98e6afa4c..cee413d3b3 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -183,7 +183,7 @@ static const struct gl_name_map_struct gl_name_map[] = { MAP(GL_R3_G3_B2), MAP(GL_RGB4), MAP(GL_RGB5), MAP(GL_RGB8), MAP(GL_RGB10), MAP(GL_RGB12), MAP(GL_RGB16), MAP(GL_RGBA2), MAP(GL_RGBA4), MAP(GL_RGB5_A1), MAP(GL_RGBA8), MAP(GL_RGB10_A2), - MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8), + MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8), MAP(GL_LUMINANCE16), // format MAP(GL_RGB), MAP(GL_RGBA), MAP(GL_RED), MAP(GL_GREEN), MAP(GL_BLUE), @@ -282,7 +282,7 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt, break; case IMGFMT_420P16: supported = 0; // no native YUV support - *gl_texfmt = 1; + *gl_texfmt = GL_LUMINANCE16; *bpp = 16; *gl_format = GL_LUMINANCE; *gl_type = GL_UNSIGNED_SHORT; diff --git a/libvo/gl_common.h b/libvo/gl_common.h index ddf0856956..fa0cffaf74 100644 --- a/libvo/gl_common.h +++ b/libvo/gl_common.h @@ -266,6 +266,9 @@ #ifndef GL_FLOAT_RGB32_NV #define GL_FLOAT_RGB32_NV 0x8889 #endif +#ifndef GL_LUMINANCE16 +#define GL_LUMINANCE16 0x8042 +#endif #ifndef GL_UNPACK_CLIENT_STORAGE_APPLE #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 #endif -- cgit v1.2.3