From 950003b0c376a4e5444f0449f719a19125725296 Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 21 Jun 2011 19:44:24 +0000 Subject: vo_gl: fix YUY2/YVYU colorspace mixup Second GL_YCBCR_MESA format is YVYU, not YUY2. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33694 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.c | 4 +++- libvo/vo_gl.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libvo/gl_common.c b/libvo/gl_common.c index cee413d3b3..eb12d79a74 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -297,7 +297,9 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt, *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; diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index f23d44ba64..24a10a9d94 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -1109,7 +1109,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)) -- cgit v1.2.3