Browse Source

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>
tags/n3.0
Ganesh Ajjanagadde 10 years ago
parent
commit
641cb77f50
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/vf_idet.c

+ 1
- 1
libavfilter/vf_idet.c 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;



Loading…
Cancel
Save