summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2011-05-11 06:59:51 +0000
committerUoti Urpala <uau@mplayer2.org>2011-06-29 10:49:52 +0300
commit2c7488fe913a19254c2a92e20032a6181f62e1cf (patch)
tree217357a9b5e39b30b1f594ce03a43f174f052f02 /libvo
parent57f48fc1bf96504d169d82d2a27c1f1ad82ca2d1 (diff)
downloadmpv-2c7488fe913a19254c2a92e20032a6181f62e1cf.tar.bz2
mpv-2c7488fe913a19254c2a92e20032a6181f62e1cf.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/gl_common.c4
-rw-r--r--libvo/gl_common.h3
2 files changed, 5 insertions, 2 deletions
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