[FFmpeg-cvslog] r14725 - trunk/libavutil/mathematics.h
aurel
subversion
Wed Aug 13 12:04:59 CEST 2008
Author: aurel
Date: Wed Aug 13 12:04:59 2008
New Revision: 14725
Log:
define some math constants so as not to depend on _XOPEN_SOURCE
Modified:
trunk/libavutil/mathematics.h
Modified: trunk/libavutil/mathematics.h
==============================================================================
--- trunk/libavutil/mathematics.h (original)
+++ trunk/libavutil/mathematics.h Wed Aug 13 12:04:59 2008
@@ -22,8 +22,22 @@
#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
More information about the ffmpeg-cvslog
mailing list