srcSliceY % 4 != 0 fix

Originally committed as revision 10953 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
This commit is contained in:
Michael Niedermayer 2003-09-26 23:37:28 +00:00
parent 7af75e6c65
commit 54324550b8
1 changed files with 4 additions and 1 deletions

View File

@ -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));
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))