mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
def3c83e1b
commit
641cb77f50
|
@ -409,7 +409,7 @@ static av_cold int init(AVFilterContext *ctx)
|
||||||
memset(idet->history, UNDETERMINED, HIST_SIZE);
|
memset(idet->history, UNDETERMINED, HIST_SIZE);
|
||||||
|
|
||||||
if( idet->half_life > 0 )
|
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
|
else
|
||||||
idet->decay_coefficient = PRECISION;
|
idet->decay_coefficient = PRECISION;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue