summaryrefslogtreecommitdiff
path: root/postproc/swscale.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-10-22 00:19:20 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-10-22 00:19:20 +0000
commitc4f1e443e7865e051b886bbf7b7d4631b4c87561 (patch)
treef07e70226a87dd2c7a0addbb088372373d75da0c /postproc/swscale.c
parentb465449eb7acaa06034bca4cc494440f7ea93ef6 (diff)
minimum slice size fix (fixes 422P 1 line per slice, used by huffyuv)
Originally committed as revision 11214 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale.c')
-rw-r--r--postproc/swscale.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index d46e6167dc..508bf01497 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -1963,10 +1963,9 @@ SwsContext *sws_getContext(int srcW, int srcH, int origSrcFormat, int dstW, int
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))