[FFmpeg-devel] [PATCH 04/12] lavfi/vf_drawtext: replace round by llrint

Ganesh Ajjanagadde gajjanagadde at gmail.com
Mon Dec 21 17:32:40 CET 2015


On Fri, Dec 18, 2015 at 9:45 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> llrint is at least as fast, and better accuracy wise.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavfilter/vf_drawtext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> index fc77be4..d5770ad 100644
> --- a/libavfilter/vf_drawtext.c
> +++ b/libavfilter/vf_drawtext.c
> @@ -812,7 +812,7 @@ static int func_pts(AVFilterContext *ctx, AVBPrint *bp,
>          if (isnan(pts)) {
>              av_bprintf(bp, " ??:??:??.???");
>          } else {
> -            int64_t ms = round(pts * 1000);
> +            int64_t ms = llrint(pts * 1000);
>              char sign = ' ';
>              if (ms < 0) {
>                  sign = '-';
> --
> 2.6.4
>

pushed


More information about the ffmpeg-devel mailing list