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:
parent
5979c740f5
commit
c5b3c4c741
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user