Revision 627690b5

View differences:

postproc/swscale.c
206 206
			int u=0;
207 207
			int v=0;
208 208
			int j;
209
			for(j=0; j<lumFilterSize; j++)
209
			for(j=0; j<chrFilterSize; j++)
210 210
			{
211 211
				u += chrSrc[j][i] * chrFilter[j];
212 212
				v += chrSrc[j][i + 2048] * chrFilter[j];
postproc/swscale_template.c
1558 1558
			"addl $4, %0			\n\t"
1559 1559
			" jnc 1b			\n\t"
1560 1560

  
1561
			: "+r" (counter)
1562
			: "r" (filter), "m" (filterPos), "m" (dst), "m"(src+filterSize),
1561
			: "+r" (counter), "+r" (filter)
1562
			: "m" (filterPos), "m" (dst), "m"(src+filterSize),
1563 1563
			  "m" (src), "r" (filterSize*2)
1564 1564
			: "%ebx", "%eax", "%ecx"
1565 1565
		);
......
2339 2339
		for(i=0; i<vLumBufSize; i++) memset(lumPixBuf[i], 0, 4000);
2340 2340
		for(i=0; i<vChrBufSize; i++) memset(chrPixBuf[i], 64, 8000);
2341 2341

  
2342
		ASSERT(chrDstH<=dstH)
2343
		ASSERT(vLumFilterSize*dstH*4<16000)
2344
		ASSERT(vChrFilterSize*chrDstH*4<16000)
2342 2345
#ifdef HAVE_MMX
2343 2346
		// pack filter data for mmx code
2344 2347
		for(i=0; i<vLumFilterSize*dstH; i++)
2345 2348
			lumMmxFilter[4*i]=lumMmxFilter[4*i+1]=lumMmxFilter[4*i+2]=lumMmxFilter[4*i+3]=
2346 2349
				vLumFilter[i];
2347

  
2348 2350
		for(i=0; i<vChrFilterSize*chrDstH; i++)
2349 2351
			chrMmxFilter[4*i]=chrMmxFilter[4*i+1]=chrMmxFilter[4*i+2]=chrMmxFilter[4*i+3]=
2350 2352
				vChrFilter[i];
......
2598 2600
	__asm __volatile(EMMS:::"memory");
2599 2601
#endif
2600 2602
	firstTime=0;
2601
}
2603
}

Also available in: Unified diff