lavc/texturedsp: replace rint by lrint
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Fri, 25 Dec 2015 21:22:00 +0000 (13:22 -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/texturedsp.c

index f32d1b3..c5e6cc6 100644 (file)
@@ -28,6 +28,7 @@
 #include "libavutil/attributes.h"
 #include "libavutil/common.h"
 #include "libavutil/intreadwrite.h"
+#include "libavutil/libm.h"
 
 #include "texturedsp.h"
 
@@ -528,7 +529,7 @@ static inline void rgtc2_block_internal(uint8_t *dst, ptrdiff_t stride,
 
             int d = (255 * 255 - r * r - g * g) / 2;
             if (d > 0)
-                b = rint(sqrtf(d));
+                b = lrint(sqrtf(d));
 
             p[0] = r;
             p[1] = g;