Mercurial > mplayer.hg
changeset 35895:b4047109a8bd
Try to fix performance for -vo gl on OSX with planar YUV.
author | reimar |
---|---|
date | Sun, 17 Mar 2013 17:42:53 +0000 |
parents | ae62be3d8de2 |
children | 0553bd41eb78 |
files | libvo/vo_gl.c |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_gl.c Sun Mar 17 10:50:41 2013 +0000 +++ b/libvo/vo_gl.c Sun Mar 17 17:42:53 2013 +0000 @@ -712,6 +712,16 @@ is_yuv |= (xs << 8) | (ys << 16); glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type); + if (glctx.type == GLTYPE_OSX && vo_doublebuffering && !is_yuv) { + // doublebuffering causes issues when e.g. drawing yuy2 or rgb textures + // (nothing is draw) unless using glfinish which makes things slow. + // This is possibly because we do not actually request a double-buffered + // context. + // However single-buffering causes slowdown and artefacts when + // drawing planar formats. Mostly tested on PPC MacMini + mp_msg(MSGT_VO, MSGL_INFO, "[gl] -double not supported on OSX for interleaved formats, switching to -nodouble\n"); + vo_doublebuffering = 0; + } vo_flipped = !!(flags & VOFLAG_FLIPPING); if (create_window(d_width, d_height, flags, title) < 0) @@ -1390,14 +1400,6 @@ // rare feature, not worth creating a window to detect use_ycbcr = 0; } - if (glctx.type == GLTYPE_OSX && vo_doublebuffering) { - // doublebuffering causes issues when e.g. drawing yuy2 textures - // (nothing is draw) unless using glfinish which makes things slow. - // This is possibly because we do not actually request a double-buffered - // context. - mp_msg(MSGT_VO, MSGL_INFO, "[gl] -double not supported on OSX, switching to -nodouble\n"); - vo_doublebuffering = 0; - } if (many_fmts) mp_msg(MSGT_VO, MSGL_INFO, "[gl] using extended formats. " "Use -vo gl:nomanyfmts if playback fails.\n");