# HG changeset patch # User reimar # Date 1154197467 0 # Node ID 8298ac25902e1148997cb34bb378c11235da6405 # Parent 832945beef9fd802da6bebcf01c85484f22b3207 optimize and simplify memcpy usage, use mem2agpcpy_pic diff -r 832945beef9f -r 8298ac25902e libvo/vo_directx.c --- a/libvo/vo_directx.c Sat Jul 29 16:33:22 2006 +0000 +++ b/libvo/vo_directx.c Sat Jul 29 18:24:27 2006 +0000 @@ -1124,11 +1124,7 @@ // copy Y d=image+dstride*y+x; s=src[0]; - for(i=0;iplanes[0]; - for(i=0;istride[0]; - d+=dstride; - } + mem2agpcpy_pic(d,s,w,h,dstride,mpi->stride[0]); w/=4;h/=4;x/=4;y/=4; // copy V d=image+dstride*image_height + dstride*y/4+x; s=mpi->planes[2]; - for(i=0;istride[1]; - d+=dstride/4; - } + mem2agpcpy_pic(d,s,w,h,dstride/4,mpi->stride[1]); // copy U d=image+dstride*image_height + dstride*image_height/16 + dstride/4*y+x; s=mpi->planes[1]; - for(i=0;istride[2]; - d+=dstride/4; - } + mem2agpcpy_pic(d,s,w,h,dstride/4,mpi->stride[2]); } } else //packed