From dbda0fb631edcb60887629b296a102c12a5cf121 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 29 Jul 2006 18:24:27 +0000 Subject: optimize and simplify memcpy usage, use mem2agpcpy_pic git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19247 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_directx.c | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index 582002e50b..cb36d18e4d 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -1124,11 +1124,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y ) // 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 -- cgit v1.2.3