For systems with broken libms. Tested with NAN, -NAN, INFINITY, -INFINITY, +/-x for regular double x and combinations of these.
Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com> --- configure | 2 +- libavutil/libm.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 123d1df..7917386 100755 --- a/configure +++ b/configure @@ -2852,7 +2852,7 @@ cropdetect_filter_deps="gpl" delogo_filter_deps="gpl" deshake_filter_select="pixelutils" drawtext_filter_deps="libfreetype" -dynaudnorm_filter_deps="copysign erf" +dynaudnorm_filter_deps="erf" ebur128_filter_deps="gpl" eq_filter_deps="gpl" fftfilt_filter_deps="avcodec" diff --git a/libavutil/libm.h b/libavutil/libm.h index 6d8bd68..637de19 100644 --- a/libavutil/libm.h +++ b/libavutil/libm.h @@ -62,6 +62,15 @@ static av_always_inline float cbrtf(float x) } #endif +#if !HAVE_COPYSIGN +static av_always_inline double copysign(double x, double y) +{ + uint64_t vx = av_double2int(x); + uint64_t vy = av_double2int(y); + return av_int2double((vx & 0x7fffffffffffffff) | (vy & 0x8000000000000000)); +} +#endif + #if !HAVE_COSF #undef cosf #define cosf(x) ((float)cos(x)) -- 2.6.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel