changeset 20163:9f6255b3187e

Rename ABS macro to FFABS.
author diego
date Wed, 11 Oct 2006 23:18:34 +0000
parents 7dd05cf681a9
children b064d49b08f9
files libswscale/swscale.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Wed Oct 11 22:06:47 2006 +0000
+++ b/libswscale/swscale.c	Wed Oct 11 23:18:34 2006 +0000
@@ -603,8 +603,8 @@
 					+ (last_new[y][i] - in3)*f/256;\
 				int new= old> 128 ? 255 : 0;\
 \
-				error_new+= ABS(last_new[y][i] - new);\
-				error_in3+= ABS(last_in3[y][i] - in3);\
+				error_new+= FFABS(last_new[y][i] - new);\
+				error_in3+= FFABS(last_in3[y][i] - in3);\
 				f= error_new - error_in3*4;\
 				if(f<0) f=0;\
 				if(f>256) f=256;\
@@ -919,7 +919,7 @@
 	// Note the +1 is for the MMXscaler which reads over the end
 	*filterPos = av_malloc((dstW+1)*sizeof(int16_t));
 
-	if(ABS(xInc - 0x10000) <10) // unscaled
+	if(FFABS(xInc - 0x10000) <10) // unscaled
 	{
 		int i;
 		filterSize= 1;
@@ -969,7 +969,7 @@
 				//Bilinear upscale / linear interpolate / Area averaging
 				for(j=0; j<filterSize; j++)
 				{
-					double d= ABS((xx<<16) - xDstInSrc)/(double)(1<<16);
+					double d= FFABS((xx<<16) - xDstInSrc)/(double)(1<<16);
 					double coeff= 1.0 - d;
 					if(coeff<0) coeff=0;
 					filter[i*filterSize + j]= coeff;
@@ -1013,7 +1013,7 @@
 			(*filterPos)[i]= xx;
 			for(j=0; j<filterSize; j++)
 			{
-				double d= ABS(xx - xDstInSrc)/filterSizeInSrc*sizeFactor;
+				double d= FFABS(xx - xDstInSrc)/filterSizeInSrc*sizeFactor;
 				double coeff;
 				if(flags & SWS_BICUBIC)
 				{
@@ -1138,7 +1138,7 @@
 		for(j=0; j<filter2Size; j++)
 		{
 			int k;
-			cutOff += ABS(filter2[i*filter2Size]);
+			cutOff += FFABS(filter2[i*filter2Size]);
 
 			if(cutOff > SWS_MAX_REDUCE_CUTOFF) break;
 
@@ -1156,7 +1156,7 @@
 		/* count near zeros on the right */
 		for(j=filter2Size-1; j>0; j--)
 		{
-			cutOff += ABS(filter2[i*filter2Size + j]);
+			cutOff += FFABS(filter2[i*filter2Size + j]);
 
 			if(cutOff > SWS_MAX_REDUCE_CUTOFF) break;
 			min--;
@@ -1678,8 +1678,8 @@
 			int length=0;
 
 			/* universal length finder */
-			while(length+c->srcW <= ABS(dstStride[0]) 
-			   && length+c->srcW <= ABS(srcStride[0])) length+= c->srcW;
+			while(length+c->srcW <= FFABS(dstStride[0]) 
+			   && length+c->srcW <= FFABS(srcStride[0])) length+= c->srcW;
 			ASSERT(length!=0);
 
 			for(i=0; i<srcSliceH; i++)
@@ -2559,7 +2559,7 @@
 
 /* shift left / or right if "shift" is negative */
 static SwsVector *sws_getShiftedVec(SwsVector *a, int shift){
-	int length= a->length + ABS(shift)*2;
+	int length= a->length + FFABS(shift)*2;
 	double *coeff= av_malloc(length*sizeof(double));
 	int i;
 	SwsVector *vec= av_malloc(sizeof(SwsVector));