summaryrefslogtreecommitdiff
path: root/libavcodec/texturedsp.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-25 13:22:00 -0800
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-26 20:29:22 -0800
commite09edc62cdadf33d265ee00f0f98a2891517ee71 (patch)
tree0c6ab60b5c7b83c6d4d7214a1e12dfc69d99fb43 /libavcodec/texturedsp.c
parent3e2e303e4b0f56e8be8bebcd2db71c69ea128e47 (diff)
lavc/texturedsp: replace rint by lrint
avoids float to int cast. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/texturedsp.c')
-rw-r--r--libavcodec/texturedsp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c
index f32d1b3a55..c5e6cc6270 100644
--- a/libavcodec/texturedsp.c
+++ b/libavcodec/texturedsp.c
@@ -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;