# HG changeset patch # User michael # Date 1066781960 0 # Node ID b45214b33cb7e3bd15d31a28b655aed22f2d071b # Parent c2bae64647febb45ece3dd00261645ccf1b7aca3 minimum slice size fix (fixes 422P 1 line per slice, used by huffyuv) diff -r c2bae64647fe -r b45214b33cb7 postproc/swscale.c --- 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)<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))