aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2001-12-21 02:09:34 +0000
committerMichael Niedermayer <michaelni@gmx.at>2001-12-21 02:09:34 +0000
commit627690b5a2899571d213380210ab3c4118270144 (patch)
tree9547618294172867e0a9d63878143774eb7a750b
parentaa21f0c389d739f613d56c389e7ffe6b2dac6829 (diff)
downloadffmpeg-627690b5a2899571d213380210ab3c4118270144.tar.gz
minor bugfixes (noone noticed them)
a few more asserts Originally committed as revision 3642 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
-rw-r--r--postproc/swscale.c2
-rw-r--r--postproc/swscale_template.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index d81fa6b37f..5c734c6a64 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -206,7 +206,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt
int u=0;
int v=0;
int j;
- for(j=0; j<lumFilterSize; j++)
+ for(j=0; j<chrFilterSize; j++)
{
u += chrSrc[j][i] * chrFilter[j];
v += chrSrc[j][i + 2048] * chrFilter[j];
diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c
index 17102370c9..4e106d6e98 100644
--- a/postproc/swscale_template.c
+++ b/postproc/swscale_template.c
@@ -1558,8 +1558,8 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW
"addl $4, %0 \n\t"
" jnc 1b \n\t"
- : "+r" (counter)
- : "r" (filter), "m" (filterPos), "m" (dst), "m"(src+filterSize),
+ : "+r" (counter), "+r" (filter)
+ : "m" (filterPos), "m" (dst), "m"(src+filterSize),
"m" (src), "r" (filterSize*2)
: "%ebx", "%eax", "%ecx"
);
@@ -2339,12 +2339,14 @@ else chrYInc= lumYInc>>1, chrDstH= dstH;
for(i=0; i<vLumBufSize; i++) memset(lumPixBuf[i], 0, 4000);
for(i=0; i<vChrBufSize; i++) memset(chrPixBuf[i], 64, 8000);
+ ASSERT(chrDstH<=dstH)
+ ASSERT(vLumFilterSize*dstH*4<16000)
+ ASSERT(vChrFilterSize*chrDstH*4<16000)
#ifdef HAVE_MMX
// pack filter data for mmx code
for(i=0; i<vLumFilterSize*dstH; i++)
lumMmxFilter[4*i]=lumMmxFilter[4*i+1]=lumMmxFilter[4*i+2]=lumMmxFilter[4*i+3]=
vLumFilter[i];
-
for(i=0; i<vChrFilterSize*chrDstH; i++)
chrMmxFilter[4*i]=chrMmxFilter[4*i+1]=chrMmxFilter[4*i+2]=chrMmxFilter[4*i+3]=
vChrFilter[i];
@@ -2598,4 +2600,4 @@ else chrYInc= lumYInc>>1, chrDstH= dstH;
__asm __volatile(EMMS:::"memory");
#endif
firstTime=0;
-} \ No newline at end of file
+}