summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-07 03:39:30 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-07 03:39:30 +0000
commit37892b081974cd5a7305587155a10aaf9a6bc893 (patch)
tree2a6c7e69fd24ccf0f790e33695b84af7a3c55ce7 /postproc
parentcdddc55548e8353d901afc5fcd0d9be8997a831c (diff)
downloadmpv-37892b081974cd5a7305587155a10aaf9a6bc893.tar.bz2
mpv-37892b081974cd5a7305587155a10aaf9a6bc893.tar.xz
fixing green line at right side bug (reported by Nick Kurshev <nickols_k@mail.ru>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4564 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r--postproc/swscale.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index 1bd237d91c..9f0e25b9bb 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -671,8 +671,8 @@ static inline void initFilter(int16_t **outFilter, int16_t **filterPos, int *out
asm volatile("emms\n\t"::: "memory"); //FIXME this shouldnt be required but it IS (even for non mmx versions)
#endif
+ // Note the +1 is for the MMXscaler which reads over the end
*filterPos = (int16_t*)memalign(8, (dstW+1)*sizeof(int16_t));
- (*filterPos)[dstW]=0; // the MMX scaler will read over the end
if(ABS(xInc - 0x10000) <10) // unscaled
{
@@ -963,6 +963,13 @@ static inline void initFilter(int16_t **outFilter, int16_t **filterPos, int *out
(*outFilter)[i*(*outFilterSize) + j]= (int)(filter[i*filterSize + j]*scale);
}
}
+
+ (*filterPos)[dstW]= (*filterPos)[dstW-1]; // the MMX scaler will read over the end
+ for(i=0; i<*outFilterSize; i++)
+ {
+ int j= dstW*(*outFilterSize);
+ (*outFilter)[j + i]= (*outFilter)[j + i - (*outFilterSize)];
+ }
free(filter);
}