Remove PI definition and use M_PI instead.
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 19 May 2010 22:49:04 +0000 (22:49 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 19 May 2010 22:49:04 +0000 (22:49 +0000)
M_PI is defined by the included file libavutil/mathematics.h.

Originally committed as revision 31185 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/swscale.c
libswscale/utils.c

index 2b02dd3..8868f5b 100644 (file)
@@ -63,6 +63,7 @@ untested special converters
 #include "libavutil/intreadwrite.h"
 #include "libavutil/x86_cpu.h"
 #include "libavutil/avutil.h"
 #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"
 
 #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
 
 
 #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     \
 #define isPacked(x)         (       \
            (x)==PIX_FMT_PAL8        \
         || (x)==PIX_FMT_YUYV422     \
index d7a6ea2..5dad43b 100644 (file)
@@ -287,7 +287,7 @@ static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSi
                 }
 /*                else if (flags & SWS_X) {
                     double p= param ? param*0.01 : 0.3;
                 }
 /*                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) {
                     coeff*= pow(2.0, - p*d*d);
                 }*/
                 else if (flags & SWS_X) {