[MPlayer-cvslog] r33694 - in trunk/libvo: gl_common.c vo_gl.c

reimar subversion at mplayerhq.hu
Tue Jun 21 21:44:24 CEST 2011


Author: reimar
Date: Tue Jun 21 21:44:24 2011
New Revision: 33694

Log:
Second GL_YCBCR_MESA format is YVYU, not YUY2.

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

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Tue Jun 21 21:34:00 2011	(r33693)
+++ trunk/libvo/gl_common.c	Tue Jun 21 21:44:24 2011	(r33694)
@@ -296,7 +296,9 @@ int glFindFormat(uint32_t fmt, int *bpp,
       *gl_type = GL_UNSIGNED_BYTE;
       break;
     case IMGFMT_UYVY:
-    case IMGFMT_YUY2:
+    // IMGFMT_YUY2 would be more logical for the _REV format,
+    // but gives clearly swapped colors.
+    case IMGFMT_YVYU:
       *gl_texfmt = GL_YCBCR_MESA;
       *bpp = 16;
       *gl_format = GL_YCBCR_MESA;

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Tue Jun 21 21:34:00 2011	(r33693)
+++ trunk/libvo/vo_gl.c	Tue Jun 21 21:44:24 2011	(r33694)
@@ -1093,7 +1093,7 @@ query_format(uint32_t format)
     // ideally MPlayer should be fixed instead not to use Y800 when it has the choice
     if (!use_yuv && (format == IMGFMT_Y8 || format == IMGFMT_Y800))
         return 0;
-    if (!use_ycbcr && (format == IMGFMT_UYVY || format == IMGFMT_YUY2))
+    if (!use_ycbcr && (format == IMGFMT_UYVY || format == IMGFMT_YVYU))
         return 0;
     if (many_fmts &&
          glFindFormat(format, NULL, NULL, NULL, NULL))


More information about the MPlayer-cvslog mailing list