diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-16 13:03:59 -0500 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-19 09:33:32 -0800 |
commit | 641cb77f501a7fa1410ab53da4923b1bebc2e690 (patch) | |
tree | 3417cc6ede26bfd50190da4e56906e6934775b86 | |
parent | def3c83e1b85cc17cade257cbf3b1fb84e61f788 (diff) | |
download | ffmpeg-641cb77f501a7fa1410ab53da4923b1bebc2e690.tar.gz |
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>
-rw-r--r-- | libavfilter/vf_idet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index e4fe6cbe7f..60ec23a05d 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -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; |