diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-25 09:20:27 -0800 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-25 09:25:20 -0800 |
commit | 5630ed5be64fef3fd70cb93a7623d46afa0c83e6 (patch) | |
tree | 89028189bc7da1871b7b580b3551b8667df6a4ac /libavutil/libm.h | |
parent | b218ad4628660be57bd845fe079e81582b0acd8a (diff) | |
download | ffmpeg-5630ed5be64fef3fd70cb93a7623d46afa0c83e6.tar.gz |
lavu/libm: misc, minor changes
Addition of comments marking the end of ifdef blocks, correction of an
incorrect (at double precision) M_LN2, removal of an unnecessary undef.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavutil/libm.h')
-rw-r--r-- | libavutil/libm.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/libavutil/libm.h b/libavutil/libm.h index 6f9ac1b349..ad7da060e8 100644 --- a/libavutil/libm.h +++ b/libavutil/libm.h @@ -38,31 +38,31 @@ #if !HAVE_ATANF #undef atanf #define atanf(x) ((float)atan(x)) -#endif +#endif /* HAVE_ATANF */ #if !HAVE_ATAN2F #undef atan2f #define atan2f(y, x) ((float)atan2(y, x)) -#endif +#endif /* HAVE_ATAN2F */ #if !HAVE_POWF #undef powf #define powf(x, y) ((float)pow(x, y)) -#endif +#endif /* HAVE_POWF */ #if !HAVE_CBRT static av_always_inline double cbrt(double x) { return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0); } -#endif +#endif /* HAVE_CBRT */ #if !HAVE_CBRTF static av_always_inline float cbrtf(float x) { return x < 0 ? -powf(-x, 1.0 / 3.0) : powf(x, 1.0 / 3.0); } -#endif +#endif /* HAVE_CBRTF */ #if !HAVE_COPYSIGN static av_always_inline double copysign(double x, double y) @@ -71,12 +71,12 @@ static av_always_inline double copysign(double x, double y) uint64_t vy = av_double2int(y); return av_int2double((vx & UINT64_C(0x7fffffffffffffff)) | (vy & UINT64_C(0x8000000000000000))); } -#endif +#endif /* HAVE_COPYSIGN */ #if !HAVE_COSF #undef cosf #define cosf(x) ((float)cos(x)) -#endif +#endif /* HAVE_COSF */ #if !HAVE_ERF static inline double ff_eval_poly(const double *coeff, int size, double x) { @@ -276,16 +276,16 @@ static inline double erf(double z) else return 1; } -#endif +#endif /* HAVE_ERF */ #if !HAVE_EXPF #undef expf #define expf(x) ((float)exp(x)) -#endif +#endif /* HAVE_EXPF */ #if !HAVE_EXP2 #undef exp2 -#define exp2(x) exp((x) * 0.693147180559945) +#define exp2(x) exp((x) * M_LN2) #endif /* HAVE_EXP2 */ #if !HAVE_EXP2F @@ -362,7 +362,6 @@ static av_always_inline av_const int avpriv_isnan(double x) #endif /* HAVE_ISNAN */ #if !HAVE_HYPOT -#undef hypot static inline av_const double hypot(double x, double y) { double ret, temp; @@ -387,7 +386,7 @@ static inline av_const double hypot(double x, double y) #if !HAVE_LDEXPF #undef ldexpf #define ldexpf(x, exp) ((float)ldexp(x, exp)) -#endif +#endif /* HAVE_LDEXPF */ #if !HAVE_LLRINT #undef llrint @@ -412,12 +411,12 @@ static inline av_const double hypot(double x, double y) #if !HAVE_LOG10F #undef log10f #define log10f(x) ((float)log10(x)) -#endif +#endif /* HAVE_LOG10F */ #if !HAVE_SINF #undef sinf #define sinf(x) ((float)sin(x)) -#endif +#endif /* HAVE_SINF */ #if !HAVE_RINT static inline double rint(double x) |