changeset 284:1ddac77b0d43

fixed the bespitch*y*x bug
author arpi_esp
date Wed, 04 Apr 2001 21:42:28 +0000
parents d11e4b9b86e4
children 5cb4fdc94146
files libvo/mga_common.c
diffstat 1 files changed, 11 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/mga_common.c	Wed Apr 04 20:55:03 2001 +0000
+++ b/libvo/mga_common.c	Wed Apr 04 21:42:28 2001 +0000
@@ -55,21 +55,20 @@
 	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 @@
 			dest[2*w+1] = src2[w];
 		}
 		dest += bespitch;
-        src += stride[1];
-        src2+= stride[2];
+                src += stride[1];
+                src2+= stride[2];
 	}
 }