aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-25 15:54:16 -0800
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-26 20:29:22 -0800
commit5979c740f5a933b18fd6dfe470b06d54eafe84e8 (patch)
tree734665a6ea9249dd80394344627a60c1eb3f8d54
parente09edc62cdadf33d265ee00f0f98a2891517ee71 (diff)
downloadffmpeg-5979c740f5a933b18fd6dfe470b06d54eafe84e8.tar.gz
lavc/dds: replace rint by lrint
avoids float to int cast. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-rw-r--r--libavcodec/dds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index d473fd14cf..9577b67f0f 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -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;