History

avfilter/af_aiir: do not ignore k option for audio filtering

Previously it was used only for displaying frequency response.

Paul B Mahol committed 7 years ago

Commit 60e6db21 parent 81d3d7d1 file · +4 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_aiir.c+4−2
@@ -135,6 +135,7 @@ static int iir_ch_## name(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) · 134 unmodified lines
135 const int nb_b = s->iir[ch].nb_ab[1]; \135 const int nb_b = s->iir[ch].nb_ab[1]; \
136 const double *a = s->iir[ch].ab[0]; \136 const double *a = s->iir[ch].ab[0]; \
137 const double *b = s->iir[ch].ab[1]; \137 const double *b = s->iir[ch].ab[1]; \
138 const double g = s->iir[ch].g; \
138 int *clippings = &s->iir[ch].clippings; \139 int *clippings = &s->iir[ch].clippings; \
139 type *dst = (type *)out->extended_data[ch]; \140 type *dst = (type *)out->extended_data[ch]; \
140 int n; \141 int n; \
@@ -153,7 +154,7 @@ static int iir_ch_## name(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) · 12 unmodified lines
153 sample -= a[x] * oc[x]; \154 sample -= a[x] * oc[x]; \
154 \155 \
155 oc[0] = sample; \156 oc[0] = sample; \
156 sample *= og; \157 sample *= og * g; \
157 sample = sample * mix + ic[0] * (1. - mix); \158 sample = sample * mix + ic[0] * (1. - mix); \
158 if (need_clipping && sample < min) { \159 if (need_clipping && sample < min) { \
159 (*clippings)++; \160 (*clippings)++; \
@@ -186,6 +187,7 @@ static int iir_ch_serial_## name(AVFilterContext *ctx, void *arg, int ch, int nb · 26 unmodified lines
186 const type *src = (const type *)in->extended_data[ch]; \187 const type *src = (const type *)in->extended_data[ch]; \
187 type *dst = (type *)out->extended_data[ch]; \188 type *dst = (type *)out->extended_data[ch]; \
188 IIRChannel *iir = &s->iir[ch]; \189 IIRChannel *iir = &s->iir[ch]; \
190 const double g = iir->g; \
189 int *clippings = &iir->clippings; \191 int *clippings = &iir->clippings; \
190 int nb_biquads = (FFMAX(iir->nb_ab[0], iir->nb_ab[1]) + 1) / 2; \192 int nb_biquads = (FFMAX(iir->nb_ab[0], iir->nb_ab[1]) + 1) / 2; \
191 int n, i; \193 int n, i; \
@@ -209,7 +211,7 @@ static int iir_ch_serial_## name(AVFilterContext *ctx, void *arg, int ch, int nb · 17 unmodified lines
209 i1 = src[n]; \211 i1 = src[n]; \
210 o2 = o1; \212 o2 = o1; \
211 o1 = o0; \213 o1 = o0; \
212 o0 *= og; \214 o0 *= og * g; \
213 \215 \
214 o0 = o0 * mix + (1. - mix) * sample; \216 o0 = o0 * mix + (1. - mix) * sample; \
215 if (need_clipping && o0 < min) { \217 if (need_clipping && o0 < min) { \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t