git.videolan.org
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Provide a fallback version of the libm function trunc
[ffmpeg.git]
/
libavutil
/
libm.h
diff --git
a/libavutil/libm.h
b/libavutil/libm.h
index
704bcf9
..
783f3cd
100644
(file)
--- a/
libavutil/libm.h
+++ b/
libavutil/libm.h
@@
-86,6
+86,13
@@
static av_always_inline av_const float roundf(float x)
}
#endif /* HAVE_ROUNDF */
+#if !HAVE_TRUNC
+static av_always_inline av_const double trunc(double x)
+{
+ return (x > 0) ? floor(x) : ceil(x);
+}
+#endif /* HAVE_TRUNC */
+
#if !HAVE_TRUNCF
static av_always_inline av_const float truncf(float x)
{