You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +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:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user