Commit c5b3c4c7 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde

lavc/snowenc: replace rint by lrint

avoids float to int cast.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
parent 5979c740
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
*/ */
#include "libavutil/intmath.h" #include "libavutil/intmath.h"
#include "libavutil/libm.h"
#include "libavutil/log.h" #include "libavutil/log.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "avcodec.h" #include "avcodec.h"
...@@ -1470,7 +1471,7 @@ static void update_last_header_values(SnowContext *s){ ...@@ -1470,7 +1471,7 @@ static void update_last_header_values(SnowContext *s){
} }
static int qscale2qlog(int qscale){ 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 + 61*QROOT/8; ///< 64 > 60
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment