changeset 11213:b45214b33cb7

minimum slice size fix (fixes 422P 1 line per slice, used by huffyuv)
author michael
date Wed, 22 Oct 2003 00:19:20 +0000
parents c2bae64647fe
children c292ff78614f
files postproc/swscale.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/postproc/swscale.c	Tue Oct 21 22:54:32 2003 +0000
+++ b/postproc/swscale.c	Wed Oct 22 00:19:20 2003 +0000
@@ -1963,10 +1963,9 @@
 		int chrI= i*c->chrDstH / dstH;
 		int nextSlice= MAX(c->vLumFilterPos[i   ] + c->vLumFilterSize - 1,
 				 ((c->vChrFilterPos[chrI] + c->vChrFilterSize - 1)<<c->chrSrcVSubSample));
-		if(c->chrSrcVSubSample > 1) 
-		    nextSlice&= ~3; // Slices start at boundaries which are divisable through 4
-		else
-		    nextSlice&= ~1; // Slices start at boundaries which are divisable through 2
+
+		nextSlice>>= c->chrSrcVSubSample;
+		nextSlice<<= c->chrSrcVSubSample;
 		if(c->vLumFilterPos[i   ] + c->vLumBufSize < nextSlice)
 			c->vLumBufSize= nextSlice - c->vLumFilterPos[i   ];
 		if(c->vChrFilterPos[chrI] + c->vChrBufSize < (nextSlice>>c->chrSrcVSubSample))