[FFmpeg-devel] [PATCH 09/12] lavfi/af_dynaudnorm: replace round by lrint
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Mon Dec 21 17:34:51 CET 2015
On Fri, Dec 18, 2015 at 9:45 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> lrint is at least as fast, and is more accurate.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
> libavfilter/af_dynaudnorm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c
> index 5f412f5..6401595 100644
> --- a/libavfilter/af_dynaudnorm.c
> +++ b/libavfilter/af_dynaudnorm.c
> @@ -135,7 +135,7 @@ static int query_formats(AVFilterContext *ctx)
>
> 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);
> }
>
> --
> 2.6.4
>
pushed
More information about the ffmpeg-devel
mailing list