lavc/dds: replace rint by lrint
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Fri, 25 Dec 2015 23:54:16 +0000 (15:54 -0800)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Sun, 27 Dec 2015 04:29:22 +0000 (20:29 -0800)
avoids float to int cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavcodec/dds.c

index d473fd1..9577b67 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <stdint.h>
 
+#include "libavutil/libm.h"
 #include "libavutil/imgutils.h"
 
 #include "avcodec.h"
@@ -508,7 +509,7 @@ static void run_postproc(AVCodecContext *avctx, AVFrame *frame)
 
             int d = (255 * 255 - x * x - y * y) / 2;
             if (d > 0)
-                z = rint(sqrtf(d));
+                z = lrint(sqrtf(d));
 
             src[0] = x;
             src[1] = y;