changeset 33606:959708d3e6f5

Second GL_YCBCR_MESA format is YVYU, not YUY2.
author reimar
date Tue, 21 Jun 2011 19:44:24 +0000
parents f242acd22d93
children a761fc66ddc7
files libvo/gl_common.c libvo/vo_gl.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/gl_common.c	Tue Jun 21 19:34:00 2011 +0000
+++ b/libvo/gl_common.c	Tue Jun 21 19:44:24 2011 +0000
@@ -296,7 +296,9 @@
       *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;
--- a/libvo/vo_gl.c	Tue Jun 21 19:34:00 2011 +0000
+++ b/libvo/vo_gl.c	Tue Jun 21 19:44:24 2011 +0000
@@ -1093,7 +1093,7 @@
     // 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))