summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-10-22 00:19:20 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-10-22 00:19:20 +0000
commitb23fa77744a602701d486a2a6d4c50601f513008 (patch)
treec60f153b16581582ac69a9d9d56f4793d90bc118 /postproc
parentb515f955ffb77bce11063200f37b52334db6dcda (diff)
downloadmpv-b23fa77744a602701d486a2a6d4c50601f513008.tar.bz2
mpv-b23fa77744a602701d486a2a6d4c50601f513008.tar.xz
minimum slice size fix (fixes 422P 1 line per slice, used by huffyuv)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11214 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-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))