]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_idet.c
lavfi/vf_idet: replace round and cast by lrint
[ffmpeg] / libavfilter / vf_idet.c
index e4fe6cbe7f4b262bf737a0045aec3856168448ab..60ec23a05da9bef1f977d8345a82299a8a4f660b 100644 (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;