changeset 941:1e4ab5fdfca1 libavcodec

cleaning corners of green dirt ;)
author michael
date Sun, 29 Dec 2002 23:31:52 +0000
parents ef769ec24115
children c237f5db1c22
files libpostproc/postprocess_template.c
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpostproc/postprocess_template.c	Sun Dec 29 22:35:46 2002 +0000
+++ b/libpostproc/postprocess_template.c	Sun Dec 29 23:31:52 2002 +0000
@@ -2824,7 +2824,15 @@
 			dstBlock+=8;
 			srcBlock+=8;
 		}
-		memcpy(dst, tempDst + 9*dstStride, copyAhead*dstStride );
+		if(width==dstStride)
+			memcpy(dst, tempDst + 9*dstStride, copyAhead*dstStride);
+		else
+		{
+			for(i=0; i<copyAhead; i++)
+			{
+				memcpy(dst + i*dstStride, tempDst + (9+i)*dstStride, width);
+			}
+		}
 	}
 
 //printf("\n");
@@ -3050,7 +3058,15 @@
 		if(y+15 >= height)
 		{
 			uint8_t *dstBlock= &(dst[y*dstStride]);
-			memcpy(dstBlock, tempDst + dstStride, dstStride*(height-y) );
+			if(width==dstStride)
+				memcpy(dstBlock, tempDst + dstStride, dstStride*(height-y));
+			else
+			{
+				for(i=0; i<height-y; i++)
+				{
+					memcpy(dstBlock + i*dstStride, tempDst + (i+1)*dstStride, width);
+				}
+			}
 		}
 /*
 		for(x=0; x<width; x+=32)