[MPlayer-cvslog] CVS: main/libvo gl_common.c, 1.21, 1.22 vo_gl.c, 1.97, 1.98

Reimar Döffinger CVS syncmail at mplayerhq.hu
Tue Sep 13 17:56:35 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv3658

Modified Files:
	gl_common.c vo_gl.c 
Log Message:
Improved glFindFormat


Index: gl_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- gl_common.c	12 Sep 2005 15:15:28 -0000	1.21
+++ gl_common.c	13 Sep 2005 15:56:32 -0000	1.22
@@ -94,9 +94,9 @@
   return "Unknown format!";
 }
 
-#undef TEXTUREFORMAT_ALWAYS
 //! always return this format as internal texture format in glFindFormat
 #define TEXTUREFORMAT_ALWAYS GL_RGB8
+#undef TEXTUREFORMAT_ALWAYS
 
 /**
  * \brief find the OpenGL settings coresponding to format.
@@ -113,6 +113,7 @@
 int glFindFormat(uint32_t fmt, uint32_t *bpp, GLint *gl_texfmt,
                   GLenum *gl_format, GLenum *gl_type)
 {
+  int supported = 1;
   int dummy1;
   GLenum dummy2;
   GLint dummy3;
@@ -133,6 +134,8 @@
       *gl_format = GL_RGBA;
       *gl_type = GL_UNSIGNED_BYTE;
       break;
+    case IMGFMT_YV12:
+      supported = 0; // no native YV12 support
     case IMGFMT_Y800:
     case IMGFMT_Y8:
       *gl_texfmt = 1;
@@ -187,12 +190,12 @@
       *gl_texfmt = 4;
       *gl_format = GL_RGBA;
       *gl_type = GL_UNSIGNED_BYTE;
-      return 0;
+      supported = 0;
   }
 #ifdef TEXTUREFORMAT_ALWAYS
   *gl_texfmt = TEXTUREFORMAT_ALWAYS;
 #endif
-  return 1;
+  return supported;
 }
 
 static void *setNull(const GLubyte *s) {

Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- vo_gl.c	11 Sep 2005 17:45:12 -0000	1.97
+++ vo_gl.c	13 Sep 2005 15:56:32 -0000	1.98
@@ -187,10 +187,9 @@
 static int 
 config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
 {
-	int tmp;
 	image_height = height;
 	image_width = width;
-	glFindFormat(format, &tmp, &gl_texfmt, &gl_format, &gl_type);
+	glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type);
 
 	int_pause = 0;
 




More information about the MPlayer-cvslog mailing list