[Mplayer-cvslog] CVS: main/postproc swscale.c,1.50,1.51 swscale_template.c,1.52,1.53

Michael Niedermayer michael at mplayer.dev.hu
Fri Dec 21 03:09:37 CET 2001


Update of /cvsroot/mplayer/main/postproc
In directory mplayer:/var/tmp.root/cvs-serv5282

Modified Files:
	swscale.c swscale_template.c 
Log Message:
minor bugfixes (noone noticed them)
a few more asserts


Index: swscale.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- swscale.c	6 Dec 2001 19:07:25 -0000	1.50
+++ swscale.c	21 Dec 2001 02:09:34 -0000	1.51
@@ -206,7 +206,7 @@
 			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];

Index: swscale_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale_template.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- swscale_template.c	6 Dec 2001 19:07:25 -0000	1.52
+++ swscale_template.c	21 Dec 2001 02:09:34 -0000	1.53
@@ -1558,8 +1558,8 @@
 			"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 @@
 		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 @@
 	__asm __volatile(EMMS:::"memory");
 #endif
 	firstTime=0;
-}
\ No newline at end of file
+}




More information about the MPlayer-cvslog mailing list