summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-09-26 23:37:28 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-09-26 23:37:28 +0000
commit54324550b832375f9323ffddc864f6c4b6394140 (patch)
treeda8edf8b66b79f819c8ac254e7027fac9d0033bd /postproc
parent7af75e6c65027c12a5fbd6755fadda985b6be886 (diff)
downloadffmpeg-streaming-54324550b832375f9323ffddc864f6c4b6394140.zip
ffmpeg-streaming-54324550b832375f9323ffddc864f6c4b6394140.tar.gz
srcSliceY % 4 != 0 fix
Originally committed as revision 10953 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc')
-rw-r--r--postproc/swscale.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index b0dac62..25f94e0 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)<<c->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))
OpenPOWER on IntegriCloud