diff internal.h @ 600:198d4fd6541d libavutil

Add truncf() replacement function. Patch by Michael Kostylev <mik at it-1 dot ru>
author ramiro
date Sun, 11 Jan 2009 22:10:04 +0000
parents 730f5a534ed9
children 880c6441f56a
line wrap: on
line diff
--- a/internal.h	Sun Jan 11 21:03:42 2009 +0000
+++ b/internal.h	Sun Jan 11 22:10:04 2009 +0000
@@ -294,4 +294,11 @@
 }
 #endif /* HAVE_ROUNDF */
 
+#ifndef HAVE_TRUNCF
+static av_always_inline av_const float truncf(float x)
+{
+    return (x > 0) ? floor(x) : ceil(x);
+}
+#endif /* HAVE_TRUNCF */
+
 #endif /* AVUTIL_INTERNAL_H */