[MPlayer-dev-eng] [PATCH] yuv support for vo_gl

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Sep 8 18:59:15 CEST 2005


On Thu, Sep 08, 2005 at 06:51:53PM +0200, Reimar D?ffinger wrote:
> On Fri, Aug 19, 2005 at 10:29:17PM +0200, Reimar D?ffinger wrote:
> > here is a patch (against latest CVS) I'd like you to test. I does RGB->YUV
> > conversion via register combiners.
> > Two disadvantages: 1) It is not completely correct (the image is
> > brighter than with software scaler)
> > 2) It only works for nVidia cards (I think) and crashes with everything
> > else.
> > For me it was slower than software conversion when using -dr, probably
> > because the support for luminance textures is lousy.
> > Please report your experiences.
> 
> Ok, new version that can also use a fragment program.
> -vo gl:yuv=1 for register combiners
> -vo gl:yuv=2 for fragment program conversion.
> 
> The fragment program might at a later date be modified to e.g. gamma
> correction, or OS-independent brightness, contrast, hue and saturation.
> Suggestions welcome.

aaargh!!!.
-------------- next part --------------
Index: libvo/gl_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.c,v
retrieving revision 1.17
diff -u -r1.17 gl_common.c
--- libvo/gl_common.c	25 Aug 2005 12:45:57 -0000	1.17
+++ libvo/gl_common.c	8 Sep 2005 16:45:15 -0000
@@ -18,6 +18,8 @@
 void (APIENTRY *ActiveTexture)(GLenum);
 void (APIENTRY *BindTexture)(GLenum, GLuint);
 void (APIENTRY *MultiTexCoord2f)(GLenum, GLfloat, GLfloat);
+void (APIENTRY *GenPrograms)(GLsizei, GLuint *);
+void (APIENTRY *DeletePrograms)(GLsizei, const GLuint *);
 void (APIENTRY *BindProgram)(GLenum, GLuint);
 void (APIENTRY *ProgramString)(GLenum, GLenum, GLsizei, const GLvoid *);
 void (APIENTRY *ProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat,
@@ -246,6 +248,16 @@
   MultiTexCoord2f = getProcAddress("glMultiTexCoord2f");
   if (!MultiTexCoord2f)
     MultiTexCoord2f = getProcAddress("glMultiTexCoord2fARB");
+  GenPrograms = getProcAddress("glGenPrograms");
+  if (!GenPrograms)
+    GenPrograms = getProcAddress("glGenProgramsARB");
+  if (!GenPrograms)
+    GenPrograms = getProcAddress("glGenProgramsNV");
+  DeletePrograms = getProcAddress("glDeletePrograms");
+  if (!DeletePrograms)
+    DeletePrograms = getProcAddress("glDeleteProgramsARB");
+  if (!DeletePrograms)
+    DeletePrograms = getProcAddress("glDeleteProgramsNV");
   BindProgram = getProcAddress("glBindProgram");
   if (!BindProgram)
     BindProgram = getProcAddress("glBindProgramARB");
@@ -366,6 +378,80 @@
 }
 
 /**
+ * \brief Setup register combiners for YUV to RGB conversion.
+ */
+void glSetupYUVCombiners() {
+  GLfloat ucoef[] = { 0, -0.344, 1.770, 0 };
+  GLfloat vcoef[] = { 1.403, -0.714, 0, 0 };
+  int i;
+  glGetIntegerv(GL_MAX_GENERAL_COMBINERS_NV, &i);
+  if (i < 2)
+    mp_msg(MSGT_VO, MSGL_WARN,
+           "[gl] 2 general combiners needed for YUV support (found %i)\n", i);
+  glGetIntegerv (GL_MAX_TEXTURE_UNITS, &i);
+  if (i < 3)
+    mp_msg(MSGT_VO, MSGL_FATAL,
+           "[gl] 3 texture units needed for YUV support (found %i)\n", i);
+  // coefficient (probably) must be in [0,1] range, so here comes the trick
+  // first put them in [-0.5, 0.5] range, then add 0.5
+  // can be undone with the HALF_BIAS and SCALE_BY_FOUR arguments
+  // for CombinerInput and CombinerOutput
+  for (i = 0; i < 4; i++) {
+    ucoef[i] = ucoef[i] * 0.25 + 0.5;
+    vcoef[i] = vcoef[i] * 0.25 + 0.5;
+  }
+  CombinerParameterfv(GL_CONSTANT_COLOR0_NV, ucoef);
+  CombinerParameterfv(GL_CONSTANT_COLOR1_NV, vcoef);
+
+  // UV first, like this green component can't overflow
+  CombinerInput(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_A_NV,
+                GL_TEXTURE1, GL_HALF_BIAS_NORMAL_NV, GL_RGB);
+  CombinerInput(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_B_NV,
+                GL_CONSTANT_COLOR0_NV, GL_HALF_BIAS_NORMAL_NV, GL_RGB);
+  CombinerInput(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_C_NV,
+                GL_TEXTURE2, GL_HALF_BIAS_NORMAL_NV, GL_RGB);
+  CombinerInput(GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_D_NV,
+                GL_CONSTANT_COLOR1_NV, GL_HALF_BIAS_NORMAL_NV, GL_RGB);
+  CombinerOutput(GL_COMBINER0_NV, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV,
+                 GL_SPARE0_NV, GL_SCALE_BY_FOUR_NV, GL_NONE, GL_FALSE,
+                 GL_FALSE, GL_FALSE);
+
+  // stage 2
+  CombinerInput(GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_A_NV, GL_SPARE0_NV,
+                GL_SIGNED_IDENTITY_NV, GL_RGB);
+  CombinerInput(GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_B_NV, GL_ZERO,
+                 GL_UNSIGNED_INVERT_NV, GL_RGB);
+  CombinerInput(GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_C_NV,
+                GL_TEXTURE0, GL_SIGNED_IDENTITY_NV, GL_RGB);
+  CombinerInput(GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_D_NV, GL_ZERO,
+                GL_UNSIGNED_INVERT_NV, GL_RGB);
+  CombinerOutput(GL_COMBINER1_NV, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV,
+                 GL_SPARE0_NV, GL_NONE, GL_NONE, GL_FALSE,
+                 GL_FALSE, GL_FALSE);
+
+  // leave final combiner stage in default mode
+  CombinerParameteri(GL_NUM_GENERAL_COMBINERS_NV, 2);
+}
+
+static const char *yuv_prog =
+  "!!ARBfp1.0\n"
+  "TEMP res, u, v;"
+  "TEX res, fragment.texcoord[0], texture[0], 2D;"
+  "TEX u, fragment.texcoord[2], texture[2], 2D;"
+  "SUB u, u, {0.5, 0.5, 0.5};" // u = u - 128 / 255
+  "TEX v, fragment.texcoord[1], texture[1], 2D;"
+  "SUB v, v, {0.5, 0.5, 0.5};" // y = y - 128 / 255
+  "MAD res, res, 1.164, -0.073;" // res = 1.164 * (res - 16 / 255)
+  "MAD res, u, {2.018, -0.391, 0}, res;"
+  "MAD result.color, v, {0, -0.813, 1.596}, res;"
+  "END";
+
+void glSetupYUVFragprog() {
+  ProgramString(GL_FRAGMENT_PROGRAM, GL_PROGRAM_FORMAT_ASCII,
+                strlen(yuv_prog), yuv_prog);
+}
+
+/**
  * \brief draw a texture part at given 2D coordinates
  * \param x screen top coordinate
  * \param y screen left coordinate
@@ -381,18 +467,36 @@
  */
 void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
                GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th,
-               int sx, int sy, int rect_tex) {
+               int sx, int sy, int rect_tex, int is_yv12) {
+  GLfloat tx2 = tx / 2, ty2 = ty / 2, tw2 = tw / 2, th2 = th / 2;
   if (!rect_tex) {
     tx /= sx; ty /= sy; tw /= sx; th /= sy;
+    tx2 = tx, ty2 = ty, tw2 = tw, th2 = th;
   }
   glBegin(GL_QUADS);
   glTexCoord2f(tx, ty);
+  if (is_yv12) {
+    MultiTexCoord2f(GL_TEXTURE1, tx2, ty2);
+    MultiTexCoord2f(GL_TEXTURE2, tx2, ty2);
+  }
   glVertex2f(x, y);
   glTexCoord2f(tx, ty + th);
+  if (is_yv12) {
+    MultiTexCoord2f(GL_TEXTURE1, tx2, ty2 + th2);
+    MultiTexCoord2f(GL_TEXTURE2, tx2, ty2 + th2);
+  }
   glVertex2f(x, y + h);
   glTexCoord2f(tx + tw, ty + th);
+  if (is_yv12) {
+    MultiTexCoord2f(GL_TEXTURE1, tx2 + tw2, ty2 + th2);
+    MultiTexCoord2f(GL_TEXTURE2, tx2 + tw2, ty2 + th2);
+  }
   glVertex2f(x + w, y + h);
   glTexCoord2f(tx + tw, ty);
+  if (is_yv12) {
+    MultiTexCoord2f(GL_TEXTURE1, tx2 + tw2, ty2);
+    MultiTexCoord2f(GL_TEXTURE2, tx2 + tw2, ty2);
+  }
   glVertex2f(x + w, y);
   glEnd();
 }
Index: libvo/gl_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.h,v
retrieving revision 1.14
diff -u -r1.14 gl_common.h
--- libvo/gl_common.h	25 Aug 2005 12:45:57 -0000	1.14
+++ libvo/gl_common.h	8 Sep 2005 16:45:15 -0000
@@ -17,6 +17,69 @@
 #include "x11_common.h"
 #endif
 
+// conditionally define all extension defines used
+// vendor specific extensions should be marked as such
+// (e.g. _NV), _ARB is not used to ease readability.
+#ifndef GL_MAX_GENERAL_COMBINERS_NV
+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
+#endif
+#ifndef GL_NUM_GENERAL_COMBINERS_NV
+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
+#endif
+#ifndef GL_CONSTANT_COLOR0_NV
+#define GL_CONSTANT_COLOR0_NV 0x852A
+#endif
+#ifndef GL_CONSTANT_COLOR1_NV
+#define GL_CONSTANT_COLOR1_NV 0x852B
+#endif
+#ifndef GL_COMBINER0_NV
+#define GL_COMBINER0_NV 0x8550
+#endif
+#ifndef GL_COMBINER1_NV
+#define GL_COMBINER1_NV 0x8551
+#endif
+#ifndef GL_VARIABLE_A_NV
+#define GL_VARIABLE_A_NV 0x8523
+#endif
+#ifndef GL_VARIABLE_B_NV
+#define GL_VARIABLE_B_NV 0x8524
+#endif
+#ifndef GL_VARIABLE_C_NV
+#define GL_VARIABLE_C_NV 0x8525
+#endif
+#ifndef GL_VARIABLE_D_NV
+#define GL_VARIABLE_D_NV 0x8526
+#endif
+#ifndef GL_UNSIGNED_INVERT_NV
+#define GL_UNSIGNED_INVERT_NV 0x8537
+#endif
+#ifndef GL_HALF_BIAS_NORMAL_NV
+#define GL_HALF_BIAS_NORMAL_NV 0x853A
+#endif
+#ifndef GL_SIGNED_IDENTITY_NV
+#define GL_SIGNED_IDENTITY_NV 0x853C
+#endif
+#ifndef GL_SCALE_BY_FOUR_NV
+#define GL_SCALE_BY_FOUR_NV 0x853F
+#endif
+#ifndef GL_DISCARD_NV
+#define GL_DISCARD_NV 0x8530
+#endif
+#ifndef GL_SPARE0_NV
+#define GL_SPARE0_NV 0x852E
+#endif
+#ifndef GL_MAX_TEXTURE_UNITS
+#define GL_MAX_TEXTURE_UNITS 0x84E2
+#endif
+#ifndef GL_TEXTURE0
+#define GL_TEXTURE0 0x84C0
+#endif
+#ifndef GL_TEXTURE1
+#define GL_TEXTURE1 0x84C1
+#endif
+#ifndef GL_TEXTURE2
+#define GL_TEXTURE2 0x84C2
+#endif
 #ifndef GL_TEXTURE_RECTANGLE
 #define GL_TEXTURE_RECTANGLE 0x84F5
 #endif
@@ -56,6 +119,15 @@
 #ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV
 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
 #endif
+#ifndef GL_FRAGMENT_PROGRAM
+#define GL_FRAGMENT_PROGRAM 0x8804
+#endif
+#ifndef GL_PROGRAM_FORMAT_ASCII
+#define GL_PROGRAM_FORMAT_ASCII 0x8875
+#endif
+#ifndef GL_PROGRAM_ERROR_POSITION
+#define GL_PROGRAM_ERROR_POSITION 0x864B
+#endif
 
 void glAdjustAlignment(int stride);
 
@@ -64,6 +136,8 @@
 int glFindFormat(uint32_t format, uint32_t *bpp, GLint *gl_texfmt,
                   GLenum *gl_format, GLenum *gl_type);
 int glFmt2bpp(GLenum format, GLenum type);
+void glSetupYUVCombiners();
+void glSetupYUVFragprog();
 void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
                       int w, int h, char val);
 void glUploadTex(GLenum target, GLenum format, GLenum type,
@@ -71,7 +145,7 @@
                  int x, int y, int w, int h, int slice);
 void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
                GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th,
-               int sx, int sy, int rect_tex);
+               int sx, int sy, int rect_tex, int is_yv12);
 
 //! could not set new window, will continue drawing into the old one.
 #define SET_WINDOW_FAILED -1
@@ -104,6 +178,8 @@
 extern void (APIENTRY *ActiveTexture)(GLenum);
 extern void (APIENTRY *BindTexture)(GLenum, GLuint);
 extern void (APIENTRY *MultiTexCoord2f)(GLenum, GLfloat, GLfloat);
+extern void (APIENTRY *GenPrograms)(GLsizei, GLuint *);
+extern void (APIENTRY *DeletePrograms)(GLsizei, const GLuint *);
 extern void (APIENTRY *BindProgram)(GLenum, GLuint);
 extern void (APIENTRY *ProgramString)(GLenum, GLenum, GLsizei, const GLvoid *);
 extern void (APIENTRY *ProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat,
Index: libvo/vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.93
diff -u -r1.93 vo_gl.c
--- libvo/vo_gl.c	5 Sep 2005 10:08:04 -0000	1.93
+++ libvo/vo_gl.c	8 Sep 2005 16:45:24 -0000
@@ -56,10 +56,12 @@
 static int osdtexCnt = 0;
 
 static int use_aspect;
+static int use_yuv;
 static int use_rectangle;
 static int err_shown;
 static uint32_t image_width;
 static uint32_t image_height;
+static uint32_t image_format;
 static int many_fmts;
 static int use_glFinish;
 static int swap_interval;
@@ -69,6 +71,8 @@
 static GLenum gl_type;
 static GLint gl_buffer;
 static int gl_buffersize;
+static GLint fragprog;
+static GLuint uvtexs[2];
 
 static int int_pause;
 
@@ -141,6 +145,29 @@
   mp_msg(MSGT_VO, MSGL_V, "[gl] Creating %dx%d texture...\n",
           texture_width, texture_height);
 
+  if (image_format == IMGFMT_YV12) {
+    fragprog = 0;
+    if (use_yuv == 1)
+      glSetupYUVCombiners();
+    else {
+      DeletePrograms(1, &fragprog);
+      GenPrograms(1, &fragprog);
+      BindProgram(GL_FRAGMENT_PROGRAM, fragprog);
+      glSetupYUVFragprog();
+    }
+    glDeleteTextures(2, uvtexs);
+    glGenTextures(2, uvtexs);
+    ActiveTexture(GL_TEXTURE1);
+    BindTexture(gl_target, uvtexs[0]);
+    glCreateClearTex(gl_target, gl_texfmt, GL_LINEAR,
+                     texture_width / 2, texture_height / 2, 128);
+    ActiveTexture(GL_TEXTURE2);
+    BindTexture(gl_target, uvtexs[1]);
+    glCreateClearTex(gl_target, gl_texfmt, GL_LINEAR,
+                     texture_width / 2, texture_height / 2, 128);
+    ActiveTexture(GL_TEXTURE0);
+    BindTexture(gl_target, 0);
+  }
   glCreateClearTex(gl_target, gl_texfmt, GL_LINEAR,
                    texture_width, texture_height, 0);
 
@@ -166,7 +193,13 @@
 	int tmp;
 	image_height = height;
 	image_width = width;
+	image_format = format;
 	glFindFormat(format, &tmp, &gl_texfmt, &gl_format, &gl_type);
+	if (format == IMGFMT_YV12) {
+	  gl_texfmt = GL_LUMINANCE8;
+	  gl_format = GL_LUMINANCE;
+	  gl_type = GL_UNSIGNED_BYTE;
+	}
 
 	int_pause = 0;
 
@@ -349,12 +382,12 @@
   // render alpha
   glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
   BindTexture(gl_target, osdatex[osdtexCnt]);
-  glDrawTex(x0, y0, w, h, 0, 0, w, h, sx, sy, use_rectangle == 1);
+  glDrawTex(x0, y0, w, h, 0, 0, w, h, sx, sy, use_rectangle == 1, 0);
 #endif
   // render OSD
   glBlendFunc (GL_ONE, GL_ONE);
   BindTexture(gl_target, osdtex[osdtexCnt]);
-  glDrawTex(x0, y0, w, h, 0, 0, w, h, sx, sy, use_rectangle == 1);
+  glDrawTex(x0, y0, w, h, 0, 0, w, h, sx, sy, use_rectangle == 1, 0);
   glEndList();
 
   osdtexCnt++;
@@ -388,9 +421,32 @@
 //  glBindTexture(GL_TEXTURE_2D, texture_id);
 
   glColor3f(1,1,1);
+  if (image_format == IMGFMT_YV12) {
+    ActiveTexture(GL_TEXTURE1);
+    glEnable(gl_target);
+    ActiveTexture(GL_TEXTURE2);
+    glEnable(gl_target);
+    ActiveTexture(GL_TEXTURE0);
+    if (use_yuv == 1)
+      glEnable(GL_REGISTER_COMBINERS_NV);
+    else
+      glEnable(GL_FRAGMENT_PROGRAM);
+  }
   glDrawTex(0, 0, texture_width, texture_height,
             0, 0, texture_width, texture_height,
-            texture_width, texture_height, use_rectangle == 1);
+            texture_width, texture_height,
+            use_rectangle == 1, image_format == IMGFMT_YV12);
+  if (image_format == IMGFMT_YV12) {
+    if (use_yuv == 1)
+      glDisable(GL_REGISTER_COMBINERS_NV);
+    else
+      glDisable(GL_FRAGMENT_PROGRAM);
+    ActiveTexture(GL_TEXTURE2);
+    glDisable(gl_target);
+    ActiveTexture(GL_TEXTURE1);
+    glDisable(gl_target);
+    ActiveTexture(GL_TEXTURE0);
+  }
 
   if (osdtexCnt > 0) {
     // set special rendering parameters
@@ -426,6 +482,17 @@
 //static inline uint32_t draw_slice_x11(uint8_t *src[], uint32_t slice_num)
 static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
 {
+  glUploadTex(gl_target, gl_format, gl_type, src[0], stride[0],
+              x, y, w, h, slice_height);
+  if (image_format == IMGFMT_YV12) {
+    ActiveTexture(GL_TEXTURE1);
+    glUploadTex(gl_target, gl_format, gl_type, src[1], stride[1],
+                x / 2, y / 2, w / 2, h / 2, slice_height);
+    ActiveTexture(GL_TEXTURE2);
+    glUploadTex(gl_target, gl_format, gl_type, src[2], stride[2],
+                x / 2, y / 2, w / 2, h / 2, slice_height);
+    ActiveTexture(GL_TEXTURE0);
+  }
 	return 0;
 }
 
@@ -459,6 +526,15 @@
     err_shown = 1;
     return VO_FALSE;
   }
+  if (mpi->imgfmt == IMGFMT_YV12) {
+    // YV12
+    mpi->flags |= MP_IMGFLAG_COMMON_STRIDE | MP_IMGFLAG_COMMON_PLANE;
+    mpi->stride[0] = mpi->width;
+    mpi->planes[1] = mpi->planes[0] + mpi->stride[0] * mpi->height;
+    mpi->stride[1] = mpi->width >> 1;
+    mpi->planes[2] = mpi->planes[1] + mpi->stride[1] * (mpi->height >> 1);
+    mpi->stride[2] = mpi->width >> 1;
+  }
   mpi->flags |= MP_IMGFLAG_DIRECT;
   return VO_TRUE;
 }
@@ -476,6 +552,17 @@
   }
   glUploadTex(gl_target, gl_format, gl_type, data, mpi->stride[0],
               mpi->x, mpi->y, mpi->w, mpi->h, slice);
+  if (mpi->imgfmt == IMGFMT_YV12) {
+    data += mpi->planes[1] - mpi->planes[0];
+    ActiveTexture(GL_TEXTURE1);
+    glUploadTex(gl_target, gl_format, gl_type, data, mpi->stride[1],
+                mpi->x / 2, mpi->y / 2, mpi->w / 2, mpi->h / 2, slice);
+    data += mpi->planes[2] - mpi->planes[1];
+    ActiveTexture(GL_TEXTURE2);
+    glUploadTex(gl_target, gl_format, gl_type, data, mpi->stride[2],
+                mpi->x / 2, mpi->y / 2, mpi->w / 2, mpi->h / 2, slice);
+    ActiveTexture(GL_TEXTURE0);
+  }
   if (mpi->flags & MP_IMGFLAG_DIRECT)
     BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
   return VO_TRUE;
@@ -496,6 +583,8 @@
       caps |= VFCAP_OSD;
     if ((format == IMGFMT_RGB24) || (format == IMGFMT_RGBA))
         return caps;
+    if (use_yuv && format == IMGFMT_YV12)
+        return caps;
     if (many_fmts &&
          glFindFormat(format, NULL, NULL, NULL, NULL))
         return caps;
@@ -522,6 +611,7 @@
   {"aspect",       OPT_ARG_BOOL, &use_aspect,   NULL},
   {"slice-height", OPT_ARG_INT,  &slice_height, (opt_test_f)int_non_neg},
   {"rectangle",    OPT_ARG_INT,  &use_rectangle,(opt_test_f)int_non_neg},
+  {"yuv",          OPT_ARG_INT,  &use_yuv,      (opt_test_f)int_non_neg},
   {"glfinish",     OPT_ARG_BOOL, &use_glFinish, NULL},
   {"swapinterval", OPT_ARG_INT,  &swap_interval,NULL},
   {NULL}
@@ -534,6 +624,7 @@
     use_osd = 1;
     scaled_osd = 0;
     use_aspect = 1;
+    use_yuv = 0;
     use_rectangle = 0;
     use_glFinish = 0;
     swap_interval = 1;
Index: libvo/vo_gl2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
retrieving revision 1.75
diff -u -r1.75 vo_gl2.c
--- libvo/vo_gl2.c	25 Aug 2005 12:45:57 -0000	1.75
+++ libvo/vo_gl2.c	8 Sep 2005 16:45:26 -0000
@@ -484,7 +484,7 @@
 
       glDrawTex(square->fx, square->fy, square->fw, square->fh,
                 0, 0, texture_width, texture_height,
-                texture_width, texture_height, 0);
+                texture_width, texture_height, 0, 0);
       square++;
     } /* for all texnumx */
   } /* for all texnumy */


More information about the MPlayer-dev-eng mailing list