You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavfi/af_dynaudnorm: replace round by lrint
lrint is at least as fast, uses a superior rounding mode, and avoids an implicit cast. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
@@ -135,7 +135,7 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
|
|
||||||
static inline int frame_size(int sample_rate, int frame_len_msec)
|
static inline int frame_size(int sample_rate, int frame_len_msec)
|
||||||
{
|
{
|
||||||
const int frame_size = round((double)sample_rate * (frame_len_msec / 1000.0));
|
const int frame_size = lrint((double)sample_rate * (frame_len_msec / 1000.0));
|
||||||
return frame_size + (frame_size % 2);
|
return frame_size + (frame_size % 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user