# HG changeset patch # User reimar # Date 1368732031 0 # Node ID 927dedf22ddef85319b8c3554cf2d236c7015d8d # Parent 00a9c3937ea1a16cf96c54aed5ac064ac3b4ad73 Support 16-bit YUV on OpenGL ES. diff -r 00a9c3937ea1 -r 927dedf22dde libvo/gl_common.c --- a/libvo/gl_common.c Thu May 16 18:22:53 2013 +0000 +++ b/libvo/gl_common.c Thu May 16 19:20:31 2013 +0000 @@ -595,7 +595,8 @@ else hqtexfmt = GL_RGB16; use_depth_l16 = !!strstr(allexts, "GL_EXT_shadow") || - !!strstr(allexts, "GL_ARB_shadow"); + !!strstr(allexts, "GL_ARB_shadow") || + !!strstr(allexts, "GL_OES_depth_texture"); free(allexts); } @@ -635,8 +636,8 @@ // ensure we get enough bits GLint bits = 0; mpglGetTexLevelParameteriv(target, 0, GL_TEXTURE_LUMINANCE_SIZE, &bits); - if (bits > 0 && bits < 14 && (use_depth_l16 || HAVE_BIGENDIAN)) { - fmt = GL_DEPTH_COMPONENT16; + if (bits >= 0 && bits < 14 && (use_depth_l16 || HAVE_BIGENDIAN)) { + fmt = GL_DEPTH_COMPONENT; format = GL_DEPTH_COMPONENT; if (!use_depth_l16) { // if we cannot get 16 bit anyway, we can fall back