[MPlayer-cvslog] r35989 - trunk/libvo/vo_gl.c
reimar
subversion at mplayerhq.hu
Sun Mar 17 18:42:54 CET 2013
Author: reimar
Date: Sun Mar 17 18:42:53 2013
New Revision: 35989
Log:
Try to fix performance for -vo gl on OSX with planar YUV.
Modified:
trunk/libvo/vo_gl.c
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c Sun Mar 17 11:50:41 2013 (r35988)
+++ trunk/libvo/vo_gl.c Sun Mar 17 18:42:53 2013 (r35989)
@@ -712,6 +712,16 @@ config(uint32_t width, uint32_t height,
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 @@ static int preinit_internal(const char *
// 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");
More information about the MPlayer-cvslog
mailing list