[FFmpeg-cvslog] avutil/libm: fix fminf() emulation build failure due to undefined FFMIN
Michael Niedermayer
git at videolan.org
Fri Jun 6 21:29:55 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jun 6 20:25:04 2014 +0200| [e374e77292840d3646c78bb908c6a6373e772431] | committer: Michael Niedermayer
avutil/libm: fix fminf() emulation build failure due to undefined FFMIN
Found-by: James Almer <jamrial at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e374e77292840d3646c78bb908c6a6373e772431
---
libavutil/libm.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavutil/libm.h b/libavutil/libm.h
index 13e6cfe..28d5df8 100644
--- a/libavutil/libm.h
+++ b/libavutil/libm.h
@@ -86,7 +86,9 @@ static av_always_inline float cbrtf(float x)
#undef fminf
static av_always_inline av_const float fminf(float x, float y)
{
- return FFMIN(x, y);
+ //Note, the NaN special case is needed for C spec compliance, it should be
+ //optimized away if the users compiler is configured to assume no NaN
+ return x > y ? y : (x == x ? x : y);
}
#endif
More information about the ffmpeg-cvslog
mailing list