# HG changeset patch # User ramiro # Date 1231711804 0 # Node ID 198d4fd6541da8b56c3dd3dce493e829c6c3e1b2 # Parent 49da89abe282d5226519af575d6b7857e325f3e1 Add truncf() replacement function. Patch by Michael Kostylev diff -r 49da89abe282 -r 198d4fd6541d internal.h --- 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 */