Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com> --- libavcodec/cos_tablegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/cos_tablegen.c b/libavcodec/cos_tablegen.c index dbd0cc0..332216c 100644 --- a/libavcodec/cos_tablegen.c +++ b/libavcodec/cos_tablegen.c @@ -24,6 +24,7 @@ #include <string.h> #include <math.h> +#include "libavutil/libm.h" #include "libavutil/mathematics.h" #define BITS 16 @@ -40,10 +41,9 @@ static int clip_f15(int v) static void printval(double val, int fixed) { if (fixed) { - /* lrint() isn't always available, so round and cast manually. */ double new_val = val * (double) (1 << 15); - new_val = new_val >= 0 ? floor(new_val + 0.5) : ceil(new_val - 0.5); + new_val = rint(new_val); printf(" "FIXEDFMT",", clip_f15((long int) new_val)); } else { -- 2.6.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel