1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Ganesh Ajjanagadde 2015-12-25 15:56:03 -08:00
parent 5979c740f5
commit c5b3c4c741

View File

@ -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
}