[FFmpeg-cvslog] r31185 - in trunk/libswscale: swscale.c utils.c

stefano subversion
Thu May 20 00:49:04 CEST 2010


Author: stefano
Date: Thu May 20 00:49:04 2010
New Revision: 31185

Log:
Remove PI definition and use M_PI instead.

M_PI is defined by the included file libavutil/mathematics.h.

Modified:
   trunk/libswscale/swscale.c
   trunk/libswscale/utils.c

Modified: trunk/libswscale/swscale.c
==============================================================================
--- trunk/libswscale/swscale.c	Wed May 19 19:58:17 2010	(r31184)
+++ trunk/libswscale/swscale.c	Thu May 20 00:49:04 2010	(r31185)
@@ -63,6 +63,7 @@ untested special converters
 #include "libavutil/intreadwrite.h"
 #include "libavutil/x86_cpu.h"
 #include "libavutil/avutil.h"
+#include "libavutil/mathematics.h"
 #include "libavutil/bswap.h"
 #include "libavutil/pixdesc.h"
 
@@ -77,12 +78,6 @@ untested special converters
 
 #define FAST_BGR2YV12 // use 7 bit coefficients instead of 15 bit
 
-#ifdef M_PI
-#define PI M_PI
-#else
-#define PI 3.14159265358979323846
-#endif
-
 #define isPacked(x)         (       \
            (x)==PIX_FMT_PAL8        \
         || (x)==PIX_FMT_YUYV422     \

Modified: trunk/libswscale/utils.c
==============================================================================
--- trunk/libswscale/utils.c	Wed May 19 19:58:17 2010	(r31184)
+++ trunk/libswscale/utils.c	Thu May 20 00:49:04 2010	(r31185)
@@ -287,7 +287,7 @@ static int initFilter(int16_t **outFilte
                 }
 /*                else if (flags & SWS_X) {
                     double p= param ? param*0.01 : 0.3;
-                    coeff = d ? sin(d*PI)/(d*PI) : 1.0;
+                    coeff = d ? sin(d*M_PI)/(d*M_PI) : 1.0;
                     coeff*= pow(2.0, - p*d*d);
                 }*/
                 else if (flags & SWS_X) {



More information about the ffmpeg-cvslog mailing list