Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-26 02:56:03 +0300
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-27 07:29:22 +0300
commitc5b3c4c7417170fb0a5da1e64e1c5dee761c4ff5 (patch)
treed99f105d0ef366ccae4e96c337b57355e82964e4 /libavcodec/snowenc.c
parent5979c740f5a933b18fd6dfe470b06d54eafe84e8 (diff)
lavc/snowenc: replace rint by lrint
avoids float to int cast. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r--libavcodec/snowenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 90b64394e2..26a8383967 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -19,6 +19,7 @@
*/
#include "libavutil/intmath.h"
+#include "libavutil/libm.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "avcodec.h"
@@ -1470,7 +1471,7 @@ static void update_last_header_values(SnowContext *s){
}
static int qscale2qlog(int qscale){
- return rint(QROOT*log2(qscale / (float)FF_QP2LAMBDA))
+ return lrint(QROOT*log2(qscale / (float)FF_QP2LAMBDA))
+ 61*QROOT/8; ///< 64 > 60
}