changeset 24938:328a5d99203e

Fix previous incorrect commit, +/- has higher precedence than shifts.
author diego
date Sun, 04 Nov 2007 13:41:07 +0000
parents bab766409997
children 6a2d9f2a19af
files libvo/vo_directfb2.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_directfb2.c	Sun Nov 04 12:34:46 2007 +0000
+++ b/libvo/vo_directfb2.c	Sun Nov 04 13:41:07 2007 +0000
@@ -1186,8 +1186,8 @@
        if (!frame) {
             if(mpi->flags&MP_IMGFLAG_PLANAR){
 		mpi->planes[0]= dst + yoffset * pitch + xoffset;
-		mpi->planes[1]+= ((yoffset * pitch) >> 2) + (xoffset >> 1);
-		mpi->planes[2]+= ((yoffset * pitch) >> 2) + (xoffset >> 1);
+		mpi->planes[1]+= (yoffset * pitch) >> (2 + xoffset) >> 1;
+		mpi->planes[2]+= (yoffset * pitch) >> (2 + xoffset) >> 1;
 	    } else {
 		mpi->planes[0]=dst + yoffset * pitch + xoffset * (mpi->bpp >> 3);
 	    }