diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-07-13 12:25:54 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-07-13 12:29:52 +0200 |
commit | 60e6db2f5bf6136ae4b603c3e5ee6697d47b1ef1 (patch) | |
tree | 76c5745f35c2018c319d1163a5204d0c7404ff61 /libavfilter | |
parent | 81d3d7dd44acc7ae7c57e99176d1d428fb40c353 (diff) | |
download | ffmpeg-streaming-60e6db2f5bf6136ae4b603c3e5ee6697d47b1ef1.zip ffmpeg-streaming-60e6db2f5bf6136ae4b603c3e5ee6697d47b1ef1.tar.gz |
avfilter/af_aiir: do not ignore k option for audio filtering
Previously it was used only for displaying frequency response.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_aiir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c index 5a3b9e8..b23aa3c 100644 --- a/libavfilter/af_aiir.c +++ b/libavfilter/af_aiir.c @@ -135,6 +135,7 @@ static int iir_ch_## name(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) const int nb_b = s->iir[ch].nb_ab[1]; \ const double *a = s->iir[ch].ab[0]; \ const double *b = s->iir[ch].ab[1]; \ + const double g = s->iir[ch].g; \ int *clippings = &s->iir[ch].clippings; \ type *dst = (type *)out->extended_data[ch]; \ int n; \ @@ -153,7 +154,7 @@ static int iir_ch_## name(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) sample -= a[x] * oc[x]; \ \ oc[0] = sample; \ - sample *= og; \ + sample *= og * g; \ sample = sample * mix + ic[0] * (1. - mix); \ if (need_clipping && sample < min) { \ (*clippings)++; \ @@ -186,6 +187,7 @@ static int iir_ch_serial_## name(AVFilterContext *ctx, void *arg, int ch, int nb const type *src = (const type *)in->extended_data[ch]; \ type *dst = (type *)out->extended_data[ch]; \ IIRChannel *iir = &s->iir[ch]; \ + const double g = iir->g; \ int *clippings = &iir->clippings; \ int nb_biquads = (FFMAX(iir->nb_ab[0], iir->nb_ab[1]) + 1) / 2; \ int n, i; \ @@ -209,7 +211,7 @@ static int iir_ch_serial_## name(AVFilterContext *ctx, void *arg, int ch, int nb i1 = src[n]; \ o2 = o1; \ o1 = o0; \ - o0 *= og; \ + o0 *= og * g; \ \ o0 = o0 * mix + (1. - mix) * sample; \ if (need_clipping && o0 < min) { \ |