[FFmpeg-devel] [PATCH] avfilter/showcqt: add fontcolor option

Clément Bœsch u at pkh.me
Wed Aug 20 22:49:48 CEST 2014


On Wed, Aug 20, 2014 at 07:10:56AM +0700, Muhammad Faiz wrote:
[...]
> +static double r_func(void *p, double x)
> +{
> +    x = av_clipd(x, 0.0, 1.0);
> +    return (int)(x*255.0+0.5) << 16;

You can probably use lrint() here:
    return lrint(av_clipd(x, 0.0, 1.0) * 255.0) << 16;

[...]
> +    av_expr_free(fontcolor_expr);
>      av_expr_free(volume_expr);
>      av_expr_free(tlength_expr);

drop these 3 lines...

>      end_time = av_gettime_relative();
> @@ -482,6 +515,12 @@ static int config_output(AVFilterLink *outlink)
>      outlink->time_base = av_make_q(1, s->fps);
>      outlink->frame_rate = av_make_q(s->fps, 1);

>      return 0;

...drop this line as well...

> +
> +eval_error:

...and rename this to "out" or something more generic

> +    av_expr_free(fontcolor_expr);
> +    av_expr_free(volume_expr);
> +    av_expr_free(tlength_expr);
> +    return ret;
>  }
>  
[...]

Please bump libavfilter/version.h micro and I'll probably apply this
version.

Thanks

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140820/c92b2fb0/attachment.asc>


More information about the ffmpeg-devel mailing list