diff options
author | rfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-18 07:34:32 +0000 |
---|---|---|
committer | rfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-18 07:34:32 +0000 |
commit | dba1874d20b4cca42c6728d325002cfff3d31fda (patch) | |
tree | a314f58482d275536b102f502bb18651d81ea4d2 | |
parent | 7094fe599b501acf7e7de2e40437038de7177926 (diff) |
1000l! I have no idea how this code worked at all before. I guess no
one tests win32 much anyway... :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8491 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libvo/vo_directx.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index c5be5e3a01..f711b902f7 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -996,7 +996,7 @@ static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y { uint8_t *s; uint8_t *d; - uint32_t i=0; + uint32_t i=0, uvstride=dstride/2; // copy Y d=image+dstride*y+x; @@ -1004,29 +1004,29 @@ static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y for(i=0;i<h;i++){ memcpy(d,s,w); s+=stride[0]; - d+=stride[0]; + d+=dstride; } w/=2;h/=2;x/=2;y/=2; // copy U - d=image+image_width*image_height + dstride*y/2+x; + d=image+dstride*image_height + uvstride*y+x; if(swap)s=src[2]; else s=src[1]; for(i=0;i<h;i++){ memcpy(d,s,w); s+=stride[1]; - d+=stride[1]; + d+=uvstride; } // copy V - d=image+image_width*image_height +image_width*image_height/4 + dstride*y/2+x; + d=image+dstride*image_height +uvstride*(image_height/2) + uvstride*y+x; if(swap)s=src[1]; else s=src[2]; for(i=0;i<h;i++){ memcpy(d,s,w); s+=stride[2]; - d+=stride[2]; + d+=uvstride; } return 0; } |