avfilter/af_biquads: minor simplification by using ff_exp10()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 31 Dec 2018 20:12:42 +0000 (21:12 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 1 Jan 2019 20:11:47 +0000 (21:11 +0100)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/af_biquads.c

index ae5e1c6..86cd10d 100644 (file)
@@ -63,6 +63,7 @@
  */
 
 #include "libavutil/avassert.h"
+#include "libavutil/ffmath.h"
 #include "libavutil/opt.h"
 #include "audio.h"
 #include "avfilter.h"
@@ -245,7 +246,7 @@ static int config_filter(AVFilterLink *outlink, int reset)
     AVFilterContext *ctx    = outlink->src;
     BiquadsContext *s       = ctx->priv;
     AVFilterLink *inlink    = ctx->inputs[0];
-    double A = exp(s->gain / 40 * log(10.));
+    double A = ff_exp10(s->gain / 40);
     double w0 = 2 * M_PI * s->frequency / inlink->sample_rate;
     double alpha, beta;