[FFmpeg-cvslog] lavc/texturedsp: replace rint by lrint

Ganesh Ajjanagadde git at videolan.org
Sun Dec 27 05:31:12 CET 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Fri Dec 25 13:22:00 2015 -0800| [e09edc62cdadf33d265ee00f0f98a2891517ee71] | committer: Ganesh Ajjanagadde

lavc/texturedsp: replace rint by lrint

avoids float to int cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e09edc62cdadf33d265ee00f0f98a2891517ee71
---

 libavcodec/texturedsp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c
index f32d1b3..c5e6cc6 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;



More information about the ffmpeg-cvslog mailing list