]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
define some math constants so as not to depend on _XOPEN_SOURCE
authoraurel <aurel@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 13 Aug 2008 10:04:59 +0000 (10:04 +0000)
committeraurel <aurel@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 13 Aug 2008 10:04:59 +0000 (10:04 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14725 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavutil/mathematics.h

index a9dfe7eccf0b4af6cc5b5b45e996d35fcf2455e1..244baca0207b124f8a7a60e21f30a1e08d07e570 100644 (file)
 #define FFMPEG_MATHEMATICS_H
 
 #include <stdint.h>
+#include <math.h>
 #include "rational.h"
 
+#ifndef M_E
+#define M_E            2.7182818284590452354   /* e */
+#endif
+#ifndef M_LN2
+#define M_LN2          0.69314718055994530942  /* log_e 2 */
+#endif
+#ifndef M_LN10
+#define M_LN10         2.30258509299404568402  /* log_e 10 */
+#endif
+#ifndef M_SQRT1_2
+#define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */
+#endif
+
 enum AVRounding {
     AV_ROUND_ZERO     = 0, ///< round toward zero
     AV_ROUND_INF      = 1, ///< round away from zero