mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 18:05:21 +00:00
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
This commit is contained in:
parent
cedee1dc72
commit
950003b0c3
@ -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;
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user