summaryrefslogtreecommitdiffstats
path: root/libavutil/libm.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-24 12:53:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-24 12:53:26 +0200
commit2dbc93455c148bbd051549a7ed5c88fb08c853c5 (patch)
tree41461a4365556582fe991c06ed4624d4767ef05d /libavutil/libm.h
parentcccb45751e93142d71be78f6bb90bbfb50ee13be (diff)
parent80521c1997a23e148edf89e11b939ab8646297ca (diff)
downloadffmpeg-streaming-2dbc93455c148bbd051549a7ed5c88fb08c853c5.zip
ffmpeg-streaming-2dbc93455c148bbd051549a7ed5c88fb08c853c5.tar.gz
Merge commit '80521c1997a23e148edf89e11b939ab8646297ca'
* commit '80521c1997a23e148edf89e11b939ab8646297ca': build: allow targets to specify extra objects to link with executables swscale: avoid pointless use of compound literals libm: add fallbacks for various single-precision functions network: use getservbyport() only if available network: add fallbacks for INADDR_LOOPBACK and INET_ADDRSTRLEN Include sys/time.h before sys/resource.h Conflicts: Makefile configure libavutil/libm.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/libm.h')
-rw-r--r--libavutil/libm.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/libavutil/libm.h b/libavutil/libm.h
index d36420b..bfcc21c 100644
--- a/libavutil/libm.h
+++ b/libavutil/libm.h
@@ -33,6 +33,21 @@
#include "libavutil/mips/libm_mips.h"
#endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM*/
+#if !HAVE_ATANF
+#undef atanf
+#define atanf(x) ((float)atan(x))
+#endif
+
+#if !HAVE_ATAN2F
+#undef atan2f
+#define atan2f(y, x) ((float)atan2(y, x))
+#endif
+
+#if !HAVE_POWF
+#undef powf
+#define powf(x, y) ((float)pow(x, y))
+#endif
+
#if !HAVE_CBRTF
static av_always_inline float cbrtf(float x)
{
@@ -40,6 +55,16 @@ static av_always_inline float cbrtf(float x)
}
#endif
+#if !HAVE_COSF
+#undef cosf
+#define cosf(x) ((float)cos(x))
+#endif
+
+#if !HAVE_EXPF
+#undef expf
+#define expf(x) ((float)exp(x))
+#endif
+
#if !HAVE_EXP2
#undef exp2
#define exp2(x) exp((x) * 0.693147180559945)
@@ -70,6 +95,11 @@ static av_always_inline av_const int isnan(float x)
}
#endif /* HAVE_ISNAN */
+#if !HAVE_LDEXPF
+#undef ldexpf
+#define ldexpf(x, exp) ((float)ldexp(x, exp))
+#endif
+
#if !HAVE_LLRINT
#undef llrint
#define llrint(x) ((long long)rint(x))
@@ -90,6 +120,16 @@ static av_always_inline av_const int isnan(float x)
#define log2f(x) ((float)log2(x))
#endif /* HAVE_LOG2F */
+#if !HAVE_LOG10F
+#undef log10f
+#define log10f(x) ((float)log10(x))
+#endif
+
+#if !HAVE_SINF
+#undef sinf
+#define sinf(x) ((float)sin(x))
+#endif
+
#if !HAVE_RINT
static inline double rint(double x)
{
OpenPOWER on IntegriCloud