diff postproc/swscale_template.c @ 4290:1f8ceb12284d

general convolution filtering of the source picture dynamic memory allocation for the buffers (needed for the filter stuff)
author michael
date Mon, 21 Jan 2002 03:56:47 +0000
parents 9199d15cb4e0
children 67c56df76a44
line wrap: on
line diff
--- a/postproc/swscale_template.c	Sun Jan 20 21:39:56 2002 +0000
+++ b/postproc/swscale_template.c	Mon Jan 21 03:56:47 2002 +0000
@@ -1935,13 +1935,10 @@
 		const int lastLumSrcY= firstLumSrcY + vLumFilterSize -1; // Last line needed as input
 		const int lastChrSrcY= firstChrSrcY + vChrFilterSize -1; // Last line needed as input
 
-		if(flags&SWS_FAST_BILINEAR)
-		{
-			//handle holes
-			if(firstLumSrcY > lastInLumBuf) lastInLumBuf= firstLumSrcY-1;
-			if(firstChrSrcY > lastInChrBuf) lastInChrBuf= firstChrSrcY-1;
-		}
-
+		//handle holes (FAST_BILINEAR & weird filters)
+		if(firstLumSrcY > lastInLumBuf) lastInLumBuf= firstLumSrcY-1;
+		if(firstChrSrcY > lastInChrBuf) lastInChrBuf= firstChrSrcY-1;
+//printf("%d %d %d\n", firstChrSrcY, lastInChrBuf, vChrBufSize);
 		ASSERT(firstLumSrcY >= lastInLumBuf - vLumBufSize + 1)
 		ASSERT(firstChrSrcY >= lastInChrBuf - vChrBufSize + 1)
 
@@ -1953,6 +1950,7 @@
 			{
 				uint8_t *s= src[0]+(lastInLumBuf + 1 - srcSliceY)*srcStride[0];
 				lumBufIndex++;
+//				printf("%d %d %d %d\n", lumBufIndex, vLumBufSize, lastInLumBuf,  lastLumSrcY);
 				ASSERT(lumBufIndex < 2*vLumBufSize)
 				ASSERT(lastInLumBuf + 1 - srcSliceY < srcSliceH)
 				ASSERT(lastInLumBuf + 1 - srcSliceY >= 0)