[Mplayer-cvslog] CVS: main/postproc swscale.c,1.103,1.104 swscale_template.c,1.86,1.87

Michael Niedermayer michael at mplayerhq.hu
Tue Jul 9 19:01:55 CEST 2002


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

Modified Files:
	swscale.c swscale_template.c 
Log Message:
fixing sinc filter (seems the problem was caused by rounding in pmulhw -> solution use shorter filter, its long and slow enough anyway)
some typos
some warning fixes


Index: swscale.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- swscale.c	4 Jul 2002 13:08:36 -0000	1.103
+++ swscale.c	9 Jul 2002 17:01:52 -0000	1.104
@@ -1079,10 +1079,13 @@
 		else if(flags&SWS_AREA)		sizeFactor= 1.0; //downscale only, for upscale it is bilinear
 		else if(flags&SWS_GAUSS)	sizeFactor= 8.0;   // infinite ;)
 		else if(flags&SWS_LANCZOS)	sizeFactor= param ? 2.0*param : 6.0;
-		else if(flags&SWS_SINC)		sizeFactor= 100.0; // infinite ;)
+		else if(flags&SWS_SINC)		sizeFactor= 20.0; // infinite ;)
 		else if(flags&SWS_SPLINE)	sizeFactor= 20.0;  // infinite ;)
 		else if(flags&SWS_BILINEAR)	sizeFactor= 2.0;
-		else ASSERT(0)
+		else {
+			sizeFactor= 0.0; //GCC warning killer
+			ASSERT(0)
+		}
 		
 		if(xInc1 <= 1.0)	filterSizeInSrc= sizeFactor; // upscale
 		else			filterSizeInSrc= sizeFactor*srcW / (double)dstW;
@@ -1164,7 +1167,10 @@
 					double p=-2.196152422706632;
 					coeff = getSplineCoeff(1.0, 0.0, p, -p-1.0, d);
 				}
-				else ASSERT(0)
+				else {
+					coeff= 0.0; //GCC warning killer
+					ASSERT(0)
+				}
 
 				filter[i*filterSize + j]= coeff;
 				xx++;
@@ -1318,7 +1324,7 @@
 			sum+= filter[i*filterSize + j];
 		}
 		scale/= sum;
-		for(j=0; j<filterSize; j++)
+		for(j=0; j<*outFilterSize; j++)
 		{
 			(*outFilter)[i*(*outFilterSize) + j]= (int)(filter[i*filterSize + j]*scale);
 		}

Index: swscale_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale_template.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- swscale_template.c	30 Jun 2002 20:32:42 -0000	1.86
+++ swscale_template.c	9 Jul 2002 17:01:52 -0000	1.87
@@ -112,8 +112,8 @@
 		".balign 16			\n\t"\
 		"1:				\n\t"\
 		"movl %1, %%edx			\n\t" /* -chrFilterSize */\
-		"movl %3, %%ebx			\n\t" /* chrMmxFilter+lumFilterSize */\
-		"movl %7, %%ecx			\n\t" /* chrSrc+lumFilterSize */\
+		"movl %3, %%ebx			\n\t" /* chrMmxFilter+chrFilterSize */\
+		"movl %7, %%ecx			\n\t" /* chrSrc+chrFilterSize */\
 		"pxor %%mm3, %%mm3		\n\t"\
 		"pxor %%mm4, %%mm4		\n\t"\
 		"2:				\n\t"\




More information about the MPlayer-cvslog mailing list