[MPlayer-cvslog] r33453 - in trunk/libvo: gl_common.c gl_common.h

reimar subversion at mplayerhq.hu
Wed May 11 08:59:51 CEST 2011


Author: reimar
Date: Wed May 11 08:59:51 2011
New Revision: 33453

Log:
Request GL_LUMINANCE16 as internal format for > 8 bit YUV formats.
Have yet to find a system that actually provides that though.

Modified:
   trunk/libvo/gl_common.c
   trunk/libvo/gl_common.h

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Tue May 10 19:51:39 2011	(r33452)
+++ trunk/libvo/gl_common.c	Wed May 11 08:59:51 2011	(r33453)
@@ -182,7 +182,7 @@ static const struct gl_name_map_struct g
   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),
@@ -281,7 +281,7 @@ int glFindFormat(uint32_t fmt, int *bpp,
       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;

Modified: trunk/libvo/gl_common.h
==============================================================================
--- trunk/libvo/gl_common.h	Tue May 10 19:51:39 2011	(r33452)
+++ trunk/libvo/gl_common.h	Wed May 11 08:59:51 2011	(r33453)
@@ -264,6 +264,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


More information about the MPlayer-cvslog mailing list