changeset 5311:91c8ffdd4721

fixed U/V swapping for direct rendering, and 3rd plane offset calculation when height!=0
author arpi
date Sun, 24 Mar 2002 18:19:14 +0000
parents 1aaba2495aac
children 211c0f1ec065
files libvo/vo_xv.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xv.c	Sun Mar 24 18:01:08 2002 +0000
+++ b/libvo/vo_xv.c	Sun Mar 24 18:19:14 2002 +0000
@@ -716,8 +716,9 @@
     if(mpi->width==image_width){
        if(mpi->flags&MP_IMGFLAG_PLANAR){
 	   mpi->planes[0]=xvimage[current_buf]->data;
-	   mpi->planes[1]=xvimage[current_buf]->data+image_width*image_height;
-	   mpi->planes[2]=xvimage[current_buf]->data+image_width*image_height*5/4;
+	   mpi->planes[2]=xvimage[current_buf]->data+image_width*image_height;
+//	   mpi->planes[1]=xvimage[current_buf]->data+image_width*image_height*5/4;
+	   mpi->planes[1]=mpi->planes[2]+(image_width>>1)*(image_height>>1);
 	   mpi->stride[0]=image_width;
 	   mpi->stride[1]=mpi->stride[2]=image_width/2;
        } else {