[FFmpeg-devel] [PATCH] avfilter: add superequalizer filter

Moritz Barsnick barsnick at gmx.net
Mon Jun 19 15:38:37 EEST 2017


On Sat, Jun 17, 2017 at 18:00:01 +0200, Paul B Mahol wrote:
> + * This file is part of FFmpeg.
> + *

No copyright at all? (Not that I know better or care.)

> +static float alpha(float a)
> +{
> +    if (a <= 21)
> +        return 0;
> +    if (a <= 50)
> +        return .5842 * pow(a - 21,0.4) + 0.07886 * (a - 21);
> +    return .1102 * (a - 8.7);

I didn't try to compile this with the corresponding compiler warnings,
but I believe this is a typical float -> double promotion, as "8.7"
without an 'f' (8.7f) is a double. And unless you need the precision of
a double calculation, that's a big hit on softfloat hardware. (I'm not
sure it matters for ffmpeg, but ffmpeg *does* compile on armv5tejl for
example). So when mixing float variables with doubles, do add 'f'.
(Probably in other places as well.)

> +    .description   = NULL_IF_CONFIG_SMALL("Apply 18-th band equalization filter."),

18-th band? Not 18-band? It looks like it has 18 bands... (Or at least
"18th band", no dash.)

Cheers,
Moritz


More information about the ffmpeg-devel mailing list