changeset 5268:6280f4ac324f

Fix swapped uv planes when playing yv12 data with direct rendering
author ksorim
date Sat, 23 Mar 2002 10:24:51 +0000
parents e5f57c576c48
children 74eb4d388495
files libvo/vo_sdl.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_sdl.c	Sat Mar 23 10:09:39 2002 +0000
+++ b/libvo/vo_sdl.c	Sat Mar 23 10:24:51 2002 +0000
@@ -1637,11 +1637,11 @@
     if(mpi->type == MP_IMGTYPE_STATIC || mpi->type == MP_IMGTYPE_TEMP) {
         if(priv->format == IMGFMT_YV12 || priv->format == SDL_IYUV_OVERLAY) {
             mpi->planes[0] = priv->overlay->pixels[0] + priv->y*priv->overlay->pitches[0];
-            mpi->planes[1] = priv->overlay->pixels[1] + priv->y*priv->overlay->pitches[1]/2;
-            mpi->planes[2] = priv->overlay->pixels[2] + priv->y*priv->overlay->pitches[2]/2;
+            mpi->planes[2] = priv->overlay->pixels[1] + priv->y*priv->overlay->pitches[1]/2;
+            mpi->planes[1] = priv->overlay->pixels[2] + priv->y*priv->overlay->pitches[2]/2;
             mpi->stride[0] = priv->overlay->pitches[0];
-            mpi->stride[1] = priv->overlay->pitches[1];
-            mpi->stride[2] = priv->overlay->pitches[2];
+            mpi->stride[2] = priv->overlay->pitches[1];
+            mpi->stride[1] = priv->overlay->pitches[2];
         }
         else if(IMGFMT_IS_RGB(priv->format) || IMGFMT_IS_BGR(priv->format)) {
             if(priv->dblit) {