videobalance: Check for HAVE_RINT instead
authorDavid Schleef <ds@schleef.org>
Thu, 30 Dec 2010 22:30:27 +0000 (14:30 -0800)
committerDavid Schleef <ds@schleef.org>
Thu, 30 Dec 2010 22:34:43 +0000 (14:34 -0800)
Also change M_PI to G_PI for giggles.

gst/videofilter/gstvideobalance.c

index 379330b..136acae 100644 (file)
 #include <gst/controller/gstcontroller.h>
 #include <gst/interfaces/colorbalance.h>
 
-#ifndef M_PI
-#define M_PI  3.14159265358979323846
-#endif
-
-#ifdef G_OS_WIN32
+#ifndef HAVE_RINT
 #define rint(x) (floor((x)+0.5))
 #endif
 
@@ -170,8 +166,8 @@ gst_video_balance_update_tables (GstVideoBalance * vb)
     vb->tabley[i] = rint (y);
   }
 
-  hue_cos = cos (M_PI * vb->hue);
-  hue_sin = sin (M_PI * vb->hue);
+  hue_cos = cos (G_PI * vb->hue);
+  hue_sin = sin (G_PI * vb->hue);
 
   /* U/V lookup tables are 2D, since we need both U/V for each table
    * separately. */