aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-11 23:56:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-11 23:57:11 +0200
commit9ca27df52fb4306a8e37c38d1ed9ab40c42a62dc (patch)
tree2da7168c9b3926d8a6886af3586fafeee41c5f4e /libavutil
parent5f298c679107c3607f6f54c1f38eeb1ba36900a9 (diff)
parent183b1c2268529bbb8389d572deb00083c49682dc (diff)
downloadffmpeg-9ca27df52fb4306a8e37c38d1ed9ab40c42a62dc.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: configure: Check for the math function rint TechSmith Screen Codec 2 decoder rtsp: Add listen mode rtsp: Make rtsp_open_transport_ctx() non-static rtsp: Move rtsp_read_close rtsp: Parse the mode=receive/record parameter in transport lines Conflicts: Changelog libavcodec/avcodec.h libavcodec/version.h libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/libm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/libm.h b/libavutil/libm.h
index 41b20f64c1..d36420bc9b 100644
--- a/libavutil/libm.h
+++ b/libavutil/libm.h
@@ -90,6 +90,13 @@ static av_always_inline av_const int isnan(float x)
#define log2f(x) ((float)log2(x))
#endif /* HAVE_LOG2F */
+#if !HAVE_RINT
+static inline double rint(double x)
+{
+ return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5);
+}
+#endif /* HAVE_RINT */
+
#if !HAVE_LRINT
static av_always_inline av_const long int lrint(double x)
{