changeset 35102:d0909b13984f

gl_common: fix wrong gl_type for uyvy and yuy2 in little endian Patch by Xidorn Quan, quanxunzhen gmail
author cehoyos
date Fri, 14 Sep 2012 14:18:14 +0000
parents 3e1a4184b70e
children 5076387577f7
files libvo/gl_common.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/gl_common.c	Fri Sep 14 14:16:08 2012 +0000
+++ b/libvo/gl_common.c	Fri Sep 14 14:18:14 2012 +0000
@@ -311,7 +311,11 @@
       *gl_texfmt = GL_RGB;
       *bpp = 16;
       *gl_format = GL_YCBCR_422_APPLE;
+#if HAVE_BIGENDIAN
       *gl_type = fmt == IMGFMT_YUY2 ? GL_UNSIGNED_SHORT_8_8 : GL_UNSIGNED_SHORT_8_8_REV;
+#else
+      *gl_type = fmt == IMGFMT_UYVY ? GL_UNSIGNED_SHORT_8_8 : GL_UNSIGNED_SHORT_8_8_REV;
+#endif
       break;
 #if 0
     // we do not support palettized formats, although the format the