[SCM] libav/experimental: srcSliceY % 4 != 0 fix

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:37:40 UTC 2013


The following commit has been merged in the experimental branch:
commit 54324550b832375f9323ffddc864f6c4b6394140
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Fri Sep 26 23:37:28 2003 +0000

    srcSliceY % 4 != 0 fix
    
    Originally committed as revision 10953 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

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

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list