X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Faf_sidechaincompress.c;h=40ffca6dc314f9a2fa0af64eda6c1cac703789f3;hb=f825883eeb50a9cc8b668a846abe15979ca0ab9e;hp=afae9bef17fdfe9ca07b13b8ce10bba08f5e584f;hpb=59361d8c9d319098e3c96db2ac600030467212be;p=ffmpeg diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c index afae9bef17f..40ffca6dc31 100644 --- a/libavfilter/af_sidechaincompress.c +++ b/libavfilter/af_sidechaincompress.c @@ -90,14 +90,14 @@ static av_cold int init(AVFilterContext *ctx) return 0; } -static inline float hermite_interpolation(float x, float x0, float x1, - float p0, float p1, - float m0, float m1) +static inline double hermite_interpolation(double x, double x0, double x1, + double p0, double p1, + double m0, double m1) { - float width = x1 - x0; - float t = (x - x0) / width; - float t2, t3; - float ct0, ct1, ct2, ct3; + double width = x1 - x0; + double t = (x - x0) / width; + double t2, t3; + double ct0, ct1, ct2, ct3; m0 *= width; m1 *= width; @@ -257,7 +257,7 @@ static int query_formats(AVFilterContext *ctx) ff_channel_layouts_ref(layouts, &ctx->outputs[0]->in_channel_layouts); for (i = 0; i < 2; i++) { - layouts = ff_all_channel_layouts(); + layouts = ff_all_channel_counts(); if (!layouts) return AVERROR(ENOMEM); ff_channel_layouts_ref(layouts, &ctx->inputs[i]->out_channel_layouts); @@ -294,8 +294,8 @@ static int config_output(AVFilterLink *outlink) outlink->channel_layout = ctx->inputs[0]->channel_layout; outlink->channels = ctx->inputs[0]->channels; - s->attack_coeff = FFMIN(1.f, 1.f / (s->attack * outlink->sample_rate / 4000.f)); - s->release_coeff = FFMIN(1.f, 1.f / (s->release * outlink->sample_rate / 4000.f)); + s->attack_coeff = FFMIN(1., 1. / (s->attack * outlink->sample_rate / 4000.)); + s->release_coeff = FFMIN(1., 1. / (s->release * outlink->sample_rate / 4000.)); return 0; }