summaryrefslogtreecommitdiffstats
path: root/libvo/mga_common.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-04 21:42:28 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-04 21:42:28 +0000
commit37f71ec19bf8614cf3484478942096d47328fff9 (patch)
tree1135440f35a56890172fe62d439c702200e765e4 /libvo/mga_common.c
parent7788de24940573dcfa8875f616b939443a3bbc2e (diff)
downloadmpv-37f71ec19bf8614cf3484478942096d47328fff9.tar.bz2
mpv-37f71ec19bf8614cf3484478942096d47328fff9.tar.xz
fixed the bespitch*y*x bug
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@285 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/mga_common.c')
-rw-r--r--libvo/mga_common.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 3bdaf8271e..4a97da69d0 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -55,21 +55,20 @@ draw_slice_g200(uint8_t *image[], int stride[], int width,int height,int x,int y
uint8_t *dest;
uint32_t bespitch,h,w;
- bespitch = (mga_vid_config.src_width + 31) & ~31;
+ bespitch = (mga_vid_config.src_width + 31) & ~31;
- dest = vid_data + bespitch * y * x;
+ dest = vid_data + bespitch*y + x;
src = image[0];
- for(h=0; h < height; h++)
- {
- memcpy(dest, src, width);
- src += stride[0];
- dest += bespitch;
- }
+ for(h=0; h < height; h++)
+ {
+ memcpy(dest, src, width);
+ src += stride[0];
+ dest += bespitch;
+ }
width/=2;height/=2;x/=2;y/=2;
- dest = vid_data + bespitch * mga_vid_config.src_height +
- bespitch * y + 2*x;
+ dest = vid_data + bespitch*mga_vid_config.src_height + bespitch*y + 2*x;
src = image[1];
src2 = image[2];
for(h=0; h < height; h++)
@@ -80,8 +79,8 @@ draw_slice_g200(uint8_t *image[], int stride[], int width,int height,int x,int y
dest[2*w+1] = src2[w];
}
dest += bespitch;
- src += stride[1];
- src2+= stride[2];
+ src += stride[1];
+ src2+= stride[2];
}
}