From cc80597f6347f54a81c6a430119ff6a10e2c31ed Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 26 Sep 2003 23:37:28 +0000 Subject: srcSliceY % 4 != 0 fix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10953 b3059339-0415-0410-9bf9-f77b7e298cf2 --- postproc/swscale.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'postproc/swscale.c') diff --git a/postproc/swscale.c b/postproc/swscale.c index b0dac620b4..25f94e02ca 100644 --- a/postproc/swscale.c +++ b/postproc/swscale.c @@ -1928,7 +1928,10 @@ 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)<chrSrcVSubSample)); - nextSlice&= ~3; // Slices start at boundaries which are divisable through 4 + 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 if(c->vLumFilterPos[i ] + c->vLumBufSize < nextSlice) c->vLumBufSize= nextSlice - c->vLumFilterPos[i ]; if(c->vChrFilterPos[chrI] + c->vChrBufSize < (nextSlice>>c->chrSrcVSubSample)) -- cgit v1.2.3