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
This commit is contained in:
rfelker 2002-12-18 07:34:32 +00:00
parent 7094fe599b
commit dba1874d20
1 changed files with 6 additions and 6 deletions

View File

@ -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 *s;
uint8_t *d; uint8_t *d;
uint32_t i=0; uint32_t i=0, uvstride=dstride/2;
// copy Y // copy Y
d=image+dstride*y+x; 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++){ for(i=0;i<h;i++){
memcpy(d,s,w); memcpy(d,s,w);
s+=stride[0]; s+=stride[0];
d+=stride[0]; d+=dstride;
} }
w/=2;h/=2;x/=2;y/=2; w/=2;h/=2;x/=2;y/=2;
// copy U // 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]; if(swap)s=src[2];
else s=src[1]; else s=src[1];
for(i=0;i<h;i++){ for(i=0;i<h;i++){
memcpy(d,s,w); memcpy(d,s,w);
s+=stride[1]; s+=stride[1];
d+=stride[1]; d+=uvstride;
} }
// copy V // 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]; if(swap)s=src[1];
else s=src[2]; else s=src[2];
for(i=0;i<h;i++){ for(i=0;i<h;i++){
memcpy(d,s,w); memcpy(d,s,w);
s+=stride[2]; s+=stride[2];
d+=stride[2]; d+=uvstride;
} }
return 0; return 0;
} }