lavfi/vf_idet: replace round and cast by lrint

lrint is faster and conveys the intent better here. It is safe as long int has
at least 32 bits.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
Ganesh Ajjanagadde 2015-12-16 13:03:59 -05:00
parent def3c83e1b
commit 641cb77f50
1 changed files with 1 additions and 1 deletions

View File

@ -409,7 +409,7 @@ static av_cold int init(AVFilterContext *ctx)
memset(idet->history, UNDETERMINED, HIST_SIZE);
if( idet->half_life > 0 )
idet->decay_coefficient = (uint64_t) round( PRECISION * exp2(-1.0 / idet->half_life) );
idet->decay_coefficient = lrint( PRECISION * exp2(-1.0 / idet->half_life) );
else
idet->decay_coefficient = PRECISION;