History

avfilter/af_biquads: reduce double type usage

Paul B Mahol committed 3 years ago

Commit 6f1c82f1 parent 29190271 file · +370 −345Browse files

Unified · Split

libavfilter/af_biquads.c+370−345
@@ -109,14 +109,6 @@ enum TransformType { · 108 unmodified lines
109109 NB_TTYPE,
110110 };
111111
112−typedef struct ChanCache {
113− double i1, i2;
114− double o1, o2;
115− double ri1, ri2;
116− double ro1, ro2;
117− int clippings;
118−} ChanCache;
119−
120112 typedef struct BiquadsContext {
121113 const AVClass *class;
122114
@@ -139,24 +131,26 @@ typedef struct BiquadsContext { · 16 unmodified lines
139131 int normalize;
140132 int order;
141133
142− double a0, a1, a2;
143− double b0, b1, b2;
134+ double a_double[3];
135+ double b_double[3];
136+
137+ float a_float[3];
138+ float b_float[3];
144139
145− double oa0, oa1, oa2;
146− double ob0, ob1, ob2;
140+ double oa[3];
141+ double ob[3];
147142
148143 AVFrame *block[3];
149144
150− ChanCache *cache;
145+ int *clip;
146+ AVFrame *cache[2];
151147 int block_align;
152148
153149 int64_t pts;
154150 int nb_samples;
155151
156152 void (*filter)(struct BiquadsContext *s, const void *ibuf, void *obuf, int len,
157− double *i1, double *i2, double *o1, double *o2,
158− double b0, double b1, double b2, double a0, double a1, double a2, int *clippings,
159− int disabled);
153+ void *cache, int *clip, int disabled);
160154 } BiquadsContext;
161155
162156 static int query_formats(AVFilterContext *ctx)
@@ -202,27 +196,26 @@ static int query_formats(AVFilterContext *ctx) · 39 unmodified lines
202196 return ff_set_common_all_samplerates(ctx);
203197 }
204198
205−#define BIQUAD_FILTER(name, type, min, max, need_clipping) \
199+#define BIQUAD_FILTER(name, type, ftype, min, max, need_clipping) \
206200 static void biquad_## name (BiquadsContext *s, \
207201 const void *input, void *output, int len, \
208− double *in1, double *in2, \
209− double *out1, double *out2, \
210− double b0, double b1, double b2, \
211− double a0, double a1, double a2, int *clippings, \
212− int disabled) \
202+ void *cache, int *clippings, int disabled) \
213203 { \
214204 const type *ibuf = input; \
215205 type *obuf = output; \
216− double i1 = *in1; \
217− double i2 = *in2; \
218− double o1 = *out1; \
219− double o2 = *out2; \
220− double wet = s->mix; \
221− double dry = 1. - wet; \
222− double out; \
206+ ftype *fcache = cache; \
207+ ftype i1 = fcache[0], i2 = fcache[1], o1 = fcache[2], o2 = fcache[3]; \
208+ ftype *a = s->a_##ftype; \
209+ ftype *b = s->b_##ftype; \
210+ ftype a1 = -a[1]; \
211+ ftype a2 = -a[2]; \
212+ ftype b0 = b[0]; \
213+ ftype b1 = b[1]; \
214+ ftype b2 = b[2]; \
215+ ftype wet = s->mix; \
216+ ftype dry = 1. - wet; \
217+ ftype out; \
223218 int i; \
224− a1 = -a1; \
225− a2 = -a2; \
226219 \
227220 for (i = 0; i+1 < len; i++) { \
228221 o2 = i2 * b2 + i1 * b1 + ibuf[i] * b0 + o2 * a2 + o1 * a1; \
@@ -256,7 +249,7 @@ static void biquad_## name (BiquadsContext *s, \ · 27 unmodified lines
256249 } \
257250 } \
258251 if (i < len) { \
259− double o0 = ibuf[i] * b0 + i1 * b1 + i2 * b2 + o1 * a1 + o2 * a2; \
252+ ftype o0 = ibuf[i] * b0 + i1 * b1 + i2 * b2 + o1 * a1 + o2 * a2; \
260253 i2 = i1; \
261254 i1 = ibuf[i]; \
262255 o2 = o1; \
@@ -274,36 +267,37 @@ static void biquad_## name (BiquadsContext *s, \ · 11 unmodified lines
274267 obuf[i] = out; \
275268 } \
276269 } \
277− *in1 = i1; \
278− *in2 = i2; \
279− *out1 = o1; \
280− *out2 = o2; \
270+ fcache[0] = i1; \
271+ fcache[1] = i2; \
272+ fcache[2] = o1; \
273+ fcache[3] = o2; \
281274 }
282275
283−BIQUAD_FILTER(s16, int16_t, INT16_MIN, INT16_MAX, 1)
284−BIQUAD_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1)
285−BIQUAD_FILTER(flt, float, -1., 1., 0)
286−BIQUAD_FILTER(dbl, double, -1., 1., 0)
276+BIQUAD_FILTER(s16, int16_t, float, INT16_MIN, INT16_MAX, 1)
277+BIQUAD_FILTER(s32, int32_t, double, INT32_MIN, INT32_MAX, 1)
278+BIQUAD_FILTER(flt, float, float, -1.f, 1.f, 0)
279+BIQUAD_FILTER(dbl, double, double, -1., 1., 0)
287280
288−#define BIQUAD_DII_FILTER(name, type, min, max, need_clipping) \
281+#define BIQUAD_DII_FILTER(name, type, ftype, min, max, need_clipping) \
289282 static void biquad_dii_## name (BiquadsContext *s, \
290283 const void *input, void *output, int len, \
291− double *z1, double *z2, \
292− double *unused1, double *unused2, \
293− double b0, double b1, double b2, \
294− double a0, double a1, double a2, int *clippings, \
295− int disabled) \
284+ void *cache, int *clippings, int disabled) \
296285 { \
297286 const type *ibuf = input; \
298287 type *obuf = output; \
299− double w1 = *z1; \
300− double w2 = *z2; \
301− double wet = s->mix; \
302− double dry = 1. - wet; \
303− double in, out, w0; \
304− \
305− a1 = -a1; \
306− a2 = -a2; \
288+ ftype *fcache = cache; \
289+ ftype *a = s->a_##ftype; \
290+ ftype *b = s->b_##ftype; \
291+ ftype a1 = -a[1]; \
292+ ftype a2 = -a[2]; \
293+ ftype b0 = b[0]; \
294+ ftype b1 = b[1]; \
295+ ftype b2 = b[2]; \
296+ ftype w1 = fcache[0]; \
297+ ftype w2 = fcache[1]; \
298+ ftype wet = s->mix; \
299+ ftype dry = 1. - wet; \
300+ ftype in, out, w0; \
307301 \
308302 for (int i = 0; i < len; i++) { \
309303 in = ibuf[i]; \
@@ -324,39 +318,40 @@ static void biquad_dii_## name (BiquadsContext *s, \ · 14 unmodified lines
324318 obuf[i] = out; \
325319 } \
326320 } \
327− *z1 = w1; \
328− *z2 = w2; \
321+ fcache[0] = w1; \
322+ fcache[1] = w2; \
329323 }
330324
331−BIQUAD_DII_FILTER(s16, int16_t, INT16_MIN, INT16_MAX, 1)
332−BIQUAD_DII_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1)
333−BIQUAD_DII_FILTER(flt, float, -1., 1., 0)
334−BIQUAD_DII_FILTER(dbl, double, -1., 1., 0)
325+BIQUAD_DII_FILTER(s16, int16_t, float, INT16_MIN, INT16_MAX, 1)
326+BIQUAD_DII_FILTER(s32, int32_t, double, INT32_MIN, INT32_MAX, 1)
327+BIQUAD_DII_FILTER(flt, float, float, -1.f, 1.f, 0)
328+BIQUAD_DII_FILTER(dbl, double, double, -1., 1., 0)
335329
336−#define BIQUAD_TDI_FILTER(name, type, min, max, need_clipping) \
330+#define BIQUAD_TDI_FILTER(name, type, ftype, min, max, need_clipping) \
337331 static void biquad_tdi_## name (BiquadsContext *s, \
338332 const void *input, void *output, int len, \
339− double *z1, double *z2, \
340− double *z3, double *z4, \
341− double b0, double b1, double b2, \
342− double a0, double a1, double a2, int *clippings, \
343− int disabled) \
333+ void *cache, int *clippings, int disabled) \
344334 { \
345335 const type *ibuf = input; \
346336 type *obuf = output; \
347− double s1 = *z1; \
348− double s2 = *z2; \
349− double s3 = *z3; \
350− double s4 = *z4; \
351− double wet = s->mix; \
352− double dry = 1. - wet; \
353− double in, out; \
354− \
355− a1 = -a1; \
356− a2 = -a2; \
337+ ftype *fcache = cache; \
338+ ftype *a = s->a_##ftype; \
339+ ftype *b = s->b_##ftype; \
340+ ftype a1 = -a[1]; \
341+ ftype a2 = -a[2]; \
342+ ftype b0 = b[0]; \
343+ ftype b1 = b[1]; \
344+ ftype b2 = b[2]; \
345+ ftype s1 = fcache[0]; \
346+ ftype s2 = fcache[1]; \
347+ ftype s3 = fcache[2]; \
348+ ftype s4 = fcache[3]; \
349+ ftype wet = s->mix; \
350+ ftype dry = 1. - wet; \
351+ ftype in, out; \
357352 \
358353 for (int i = 0; i < len; i++) { \
359− double t1, t2, t3, t4; \
354+ ftype t1, t2, t3, t4; \
360355 in = ibuf[i] + s1; \
361356 t1 = in * a1 + s2; \
362357 t2 = in * a2; \
@@ -378,36 +373,37 @@ static void biquad_tdi_## name (BiquadsContext *s, \ · 15 unmodified lines
378373 } \
379374 } \
380375 \
381− *z1 = s1; \
382− *z2 = s2; \
383− *z3 = s3; \
384− *z4 = s4; \
376+ fcache[0] = s1; \
377+ fcache[1] = s2; \
378+ fcache[2] = s3; \
379+ fcache[3] = s4; \
385380 }
386381
387−BIQUAD_TDI_FILTER(s16, int16_t, INT16_MIN, INT16_MAX, 1)
388−BIQUAD_TDI_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1)
389−BIQUAD_TDI_FILTER(flt, float, -1., 1., 0)
390−BIQUAD_TDI_FILTER(dbl, double, -1., 1., 0)
382+BIQUAD_TDI_FILTER(s16, int16_t, float, INT16_MIN, INT16_MAX, 1)
383+BIQUAD_TDI_FILTER(s32, int32_t, double, INT32_MIN, INT32_MAX, 1)
384+BIQUAD_TDI_FILTER(flt, float, float, -1.f, 1.f, 0)
385+BIQUAD_TDI_FILTER(dbl, double, double, -1., 1., 0)
391386
392−#define BIQUAD_TDII_FILTER(name, type, min, max, need_clipping) \
387+#define BIQUAD_TDII_FILTER(name, type, ftype, min, max, need_clipping) \
393388 static void biquad_tdii_## name (BiquadsContext *s, \
394389 const void *input, void *output, int len, \
395− double *z1, double *z2, \
396− double *unused1, double *unused2, \
397− double b0, double b1, double b2, \
398− double a0, double a1, double a2, int *clippings, \
399− int disabled) \
390+ void *cache, int *clippings, int disabled) \
400391 { \
401392 const type *ibuf = input; \
402393 type *obuf = output; \
403− double w1 = *z1; \
404− double w2 = *z2; \
405− double wet = s->mix; \
406− double dry = 1. - wet; \
407− double in, out; \
408− \
409− a1 = -a1; \
410− a2 = -a2; \
394+ ftype *fcache = cache; \
395+ ftype *a = s->a_##ftype; \
396+ ftype *b = s->b_##ftype; \
397+ ftype a1 = -a[1]; \
398+ ftype a2 = -a[2]; \
399+ ftype b0 = b[0]; \
400+ ftype b1 = b[1]; \
401+ ftype b2 = b[2]; \
402+ ftype w1 = fcache[0]; \
403+ ftype w2 = fcache[1]; \
404+ ftype wet = s->mix; \
405+ ftype dry = 1. - wet; \
406+ ftype in, out; \
411407 \
412408 for (int i = 0; i < len; i++) { \
413409 in = ibuf[i]; \
@@ -427,33 +423,36 @@ static void biquad_tdii_## name (BiquadsContext *s, \ · 13 unmodified lines
427423 obuf[i] = out; \
428424 } \
429425 } \
430− *z1 = w1; \
431− *z2 = w2; \
426+ fcache[0] = w1; \
427+ fcache[1] = w2; \
432428 }
433429
434−BIQUAD_TDII_FILTER(s16, int16_t, INT16_MIN, INT16_MAX, 1)
435−BIQUAD_TDII_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1)
436−BIQUAD_TDII_FILTER(flt, float, -1., 1., 0)
437−BIQUAD_TDII_FILTER(dbl, double, -1., 1., 0)
430+BIQUAD_TDII_FILTER(s16, int16_t, float, INT16_MIN, INT16_MAX, 1)
431+BIQUAD_TDII_FILTER(s32, int32_t, double, INT32_MIN, INT32_MAX, 1)
432+BIQUAD_TDII_FILTER(flt, float, float, -1.f, 1.f, 0)
433+BIQUAD_TDII_FILTER(dbl, double, double, -1., 1., 0)
438434
439−#define BIQUAD_LATT_FILTER(name, type, min, max, need_clipping) \
435+#define BIQUAD_LATT_FILTER(name, type, ftype, min, max, need_clipping) \
440436 static void biquad_latt_## name (BiquadsContext *s, \
441437 const void *input, void *output, int len, \
442− double *z1, double *z2, \
443− double *unused1, double *unused2, \
444− double v0, double v1, double v2, \
445− double unused, double k0, double k1, \
446− int *clippings, \
447− int disabled) \
438+ void *cache, int *clippings, int disabled) \
448439 { \
449440 const type *ibuf = input; \
450441 type *obuf = output; \
451− double s0 = *z1; \
452− double s1 = *z2; \
453− double wet = s->mix; \
454− double dry = 1. - wet; \
455− double in, out; \
456− double t0, t1; \
442+ ftype *fcache = cache; \
443+ ftype *a = s->a_##ftype; \
444+ ftype *b = s->b_##ftype; \
445+ ftype k0 = a[1]; \
446+ ftype k1 = a[2]; \
447+ ftype v0 = b[0]; \
448+ ftype v1 = b[1]; \
449+ ftype v2 = b[2]; \
450+ ftype s0 = fcache[0]; \
451+ ftype s1 = fcache[1]; \
452+ ftype wet = s->mix; \
453+ ftype dry = 1. - wet; \
454+ ftype in, out; \
455+ ftype t0, t1; \
457456 \
458457 for (int i = 0; i < len; i++) { \
459458 out = 0.; \
@@ -483,32 +482,36 @@ static void biquad_latt_## name (BiquadsContext *s, \ · 23 unmodified lines
483482 obuf[i] = out; \
484483 } \
485484 } \
486− *z1 = s0; \
487− *z2 = s1; \
485+ fcache[0] = s0; \
486+ fcache[1] = s1; \
488487 }
489488
490−BIQUAD_LATT_FILTER(s16, int16_t, INT16_MIN, INT16_MAX, 1)
491−BIQUAD_LATT_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1)
492−BIQUAD_LATT_FILTER(flt, float, -1., 1., 0)
493−BIQUAD_LATT_FILTER(dbl, double, -1., 1., 0)
489+BIQUAD_LATT_FILTER(s16, int16_t, float, INT16_MIN, INT16_MAX, 1)
490+BIQUAD_LATT_FILTER(s32, int32_t, double, INT32_MIN, INT32_MAX, 1)
491+BIQUAD_LATT_FILTER(flt, float, float, -1.f, 1.f, 0)
492+BIQUAD_LATT_FILTER(dbl, double, double, -1., 1., 0)
494493
495−#define BIQUAD_SVF_FILTER(name, type, min, max, need_clipping) \
494+#define BIQUAD_SVF_FILTER(name, type, ftype, min, max, need_clipping) \
496495 static void biquad_svf_## name (BiquadsContext *s, \
497496 const void *input, void *output, int len, \
498− double *y0, double *y1, \
499− double *unused1, double *unused2, \
500− double b0, double b1, double b2, \
501− double a0, double a1, double a2, int *clippings, \
502− int disabled) \
497+ void *cache, int *clippings, int disabled) \
503498 { \
504499 const type *ibuf = input; \
505500 type *obuf = output; \
506− double s0 = *y0; \
507− double s1 = *y1; \
508− double wet = s->mix; \
509− double dry = 1. - wet; \
510− double in, out; \
511− double t0, t1; \
501+ ftype *fcache = cache; \
502+ ftype *a = s->a_##ftype; \
503+ ftype *b = s->b_##ftype; \
504+ ftype a1 = a[1]; \
505+ ftype a2 = a[2]; \
506+ ftype b0 = b[0]; \
507+ ftype b1 = b[1]; \
508+ ftype b2 = b[2]; \
509+ ftype s0 = fcache[0]; \
510+ ftype s1 = fcache[1]; \
511+ ftype wet = s->mix; \
512+ ftype dry = 1. - wet; \
513+ ftype in, out; \
514+ ftype t0, t1; \
512515 \
513516 for (int i = 0; i < len; i++) { \
514517 in = ibuf[i]; \
@@ -531,41 +534,46 @@ static void biquad_svf_## name (BiquadsContext *s, \ · 16 unmodified lines
531534 obuf[i] = out; \
532535 } \
533536 } \
534− *y0 = s0; \
535− *y1 = s1; \
537+ fcache[0] = s0; \
538+ fcache[1] = s1; \
536539 }
537540
538−BIQUAD_SVF_FILTER(s16, int16_t, INT16_MIN, INT16_MAX, 1)
539−BIQUAD_SVF_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1)
540−BIQUAD_SVF_FILTER(flt, float, -1., 1., 0)
541−BIQUAD_SVF_FILTER(dbl, double, -1., 1., 0)
541+BIQUAD_SVF_FILTER(s16, int16_t, float, INT16_MIN, INT16_MAX, 1)
542+BIQUAD_SVF_FILTER(s32, int32_t, double, INT32_MIN, INT32_MAX, 1)
543+BIQUAD_SVF_FILTER(flt, float, float, -1.f, 1.f, 0)
544+BIQUAD_SVF_FILTER(dbl, double, double, -1., 1., 0)
542545
543−#define BIQUAD_ZDF_FILTER(name, type, min, max, need_clipping) \
546+#define BIQUAD_ZDF_FILTER(name, type, ftype, min, max, need_clipping, two) \
544547 static void biquad_zdf_## name (BiquadsContext *s, \
545548 const void *input, void *output, int len, \
546− double *y0, double *y1, \
547− double *unused1, double *unused2, \
548− double m0, double m1, double m2, \
549− double a0, double a1, double a2, int *clippings, \
550− int disabled) \
549+ void *cache, int *clippings, int disabled) \
551550 { \
552551 const type *ibuf = input; \
553552 type *obuf = output; \
554− double b0 = *y0; \
555− double b1 = *y1; \
556− double wet = s->mix; \
557− double dry = 1. - wet; \
558− double out; \
553+ ftype *fcache = cache; \
554+ ftype *a = s->a_##ftype; \
555+ ftype *b = s->b_##ftype; \
556+ ftype m0 = b[0]; \
557+ ftype m1 = b[1]; \
558+ ftype m2 = b[2]; \
559+ ftype a0 = a[0]; \
560+ ftype a1 = a[1]; \
561+ ftype a2 = a[2]; \
562+ ftype b0 = fcache[0]; \
563+ ftype b1 = fcache[1]; \
564+ ftype wet = s->mix; \
565+ ftype dry = 1. - wet; \
566+ ftype out; \
559567 \
560568 for (int i = 0; i < len; i++) { \
561− const double in = ibuf[i]; \
562− const double v0 = in; \
563− const double v3 = v0 - b1; \
564− const double v1 = a0 * b0 + a1 * v3; \
565− const double v2 = b1 + a1 * b0 + a2 * v3; \
569+ const ftype in = ibuf[i]; \
570+ const ftype v0 = in; \
571+ const ftype v3 = v0 - b1; \
572+ const ftype v1 = a0 * b0 + a1 * v3; \
573+ const ftype v2 = b1 + a1 * b0 + a2 * v3; \
566574 \
567− b0 = 2. * v1 - b0; \
568− b1 = 2. * v2 - b1; \
575+ b0 = two * v1 - b0; \
576+ b1 = two * v2 - b1; \
569577 \
570578 out = m0 * v0 + m1 * v1 + m2 * v2; \
571579 out = out * wet + in * dry; \
@@ -581,30 +589,30 @@ static void biquad_zdf_## name (BiquadsContext *s, \ · 9 unmodified lines
581589 obuf[i] = out; \
582590 } \
583591 } \
584− *y0 = b0; \
585− *y1 = b1; \
592+ fcache[0] = b0; \
593+ fcache[1] = b1; \
586594 }
587595
588−BIQUAD_ZDF_FILTER(s16, int16_t, INT16_MIN, INT16_MAX, 1)
589−BIQUAD_ZDF_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1)
590−BIQUAD_ZDF_FILTER(flt, float, -1., 1., 0)
591−BIQUAD_ZDF_FILTER(dbl, double, -1., 1., 0)
596+BIQUAD_ZDF_FILTER(s16, int16_t, float, INT16_MIN, INT16_MAX, 1, 2.f)
597+BIQUAD_ZDF_FILTER(s32, int32_t, double, INT32_MIN, INT32_MAX, 1, 2.0)
598+BIQUAD_ZDF_FILTER(flt, float, float, -1.f, 1.f, 0, 2.f)
599+BIQUAD_ZDF_FILTER(dbl, double, double, -1., 1., 0, 2.0)
592600
593601 static void convert_dir2latt(BiquadsContext *s)
594602 {
595603 double k0, k1, v0, v1, v2;
596604
597− k1 = s->a2;
598− k0 = s->a1 / (1. + k1);
599− v2 = s->b2;
600− v1 = s->b1 - v2 * s->a1;
601− v0 = s->b0 - v1 * k0 - v2 * k1;
602−
603− s->a1 = k0;
604− s->a2 = k1;
605− s->b0 = v0;
606− s->b1 = v1;
607− s->b2 = v2;
605+ k1 = s->a_double[2];
606+ k0 = s->a_double[1] / (1. + k1);
607+ v2 = s->b_double[2];
608+ v1 = s->b_double[1] - v2 * s->a_double[1];
609+ v0 = s->b_double[0] - v1 * k0 - v2 * k1;
610+
611+ s->a_double[1] = k0;
612+ s->a_double[2] = k1;
613+ s->b_double[0] = v0;
614+ s->b_double[1] = v1;
615+ s->b_double[2] = v2;
608616 }
609617
610618 static void convert_dir2svf(BiquadsContext *s)
@@ -612,17 +620,17 @@ static void convert_dir2svf(BiquadsContext *s) · 1 unmodified line
612620 double a[2];
613621 double b[3];
614622
615− a[0] = -s->a1;
616− a[1] = -s->a2;
617− b[0] = s->b1 - s->a1 * s->b0;
618− b[1] = s->b2 - s->a2 * s->b0;
619− b[2] = s->b0;
620−
621− s->a1 = a[0];
622− s->a2 = a[1];
623− s->b0 = b[0];
624− s->b1 = b[1];
625− s->b2 = b[2];
623+ a[0] = -s->a_double[1];
624+ a[1] = -s->a_double[2];
625+ b[0] = s->b_double[1] - s->a_double[1] * s->b_double[0];
626+ b[1] = s->b_double[2] - s->a_double[2] * s->b_double[0];
627+ b[2] = s->b_double[0];
628+
629+ s->a_double[1] = a[0];
630+ s->a_double[2] = a[1];
631+ s->b_double[0] = b[0];
632+ s->b_double[1] = b[1];
633+ s->b_double[2] = b[2];
626634 }
627635
628636 static double convert_width2qfactor(double width,
@@ -669,12 +677,12 @@ static void convert_dir2zdf(BiquadsContext *s, int sample_rate) · 40 unmodified lines
669677
670678 switch (s->filter_type) {
671679 case biquad:
672− a[0] = s->oa0;
673− a[1] = s->oa1;
674− a[2] = s->oa2;
675− m[0] = s->ob0;
676− m[1] = s->ob1;
677− m[2] = s->ob2;
680+ a[0] = s->oa[0];
681+ a[1] = s->oa[1];
682+ a[2] = s->oa[2];
683+ m[0] = s->ob[0];
684+ m[1] = s->ob[1];
685+ m[2] = s->ob[2];
678686 break;
679687 case equalizer:
680688 A = ff_exp10(s->gain / 40.);
@@ -776,12 +784,12 @@ static void convert_dir2zdf(BiquadsContext *s, int sample_rate) · 95 unmodified lines
776784 av_assert0(0);
777785 }
778786
779− s->a0 = a[0];
780− s->a1 = a[1];
781− s->a2 = a[2];
782− s->b0 = m[0];
783− s->b1 = m[1];
784− s->b2 = m[2];
787+ s->a_double[0] = a[0];
788+ s->a_double[1] = a[1];
789+ s->a_double[2] = a[2];
790+ s->b_double[0] = m[0];
791+ s->b_double[1] = m[1];
792+ s->b_double[2] = m[2];
785793 }
786794
787795 static int config_filter(AVFilterLink *outlink, int reset)
@@ -831,20 +839,20 @@ static int config_filter(AVFilterLink *outlink, int reset) · 43 unmodified lines
831839
832840 switch (s->filter_type) {
833841 case biquad:
834− s->a0 = s->oa0;
835− s->a1 = s->oa1;
836− s->a2 = s->oa2;
837− s->b0 = s->ob0;
838− s->b1 = s->ob1;
839− s->b2 = s->ob2;
842+ s->a_double[0] = s->oa[0];
843+ s->a_double[1] = s->oa[1];
844+ s->a_double[2] = s->oa[2];
845+ s->b_double[0] = s->ob[0];
846+ s->b_double[1] = s->ob[1];
847+ s->b_double[2] = s->ob[2];
840848 break;
841849 case equalizer:
842− s->a0 = 1 + alpha / A;
843− s->a1 = -2 * cos(w0);
844− s->a2 = 1 - alpha / A;
845− s->b0 = 1 + alpha * A;
846− s->b1 = -2 * cos(w0);
847− s->b2 = 1 - alpha * A;
850+ s->a_double[0] = 1 + alpha / A;
851+ s->a_double[1] = -2 * cos(w0);
852+ s->a_double[2] = 1 - alpha / A;
853+ s->b_double[0] = 1 + alpha * A;
854+ s->b_double[1] = -2 * cos(w0);
855+ s->b_double[2] = 1 - alpha * A;
848856 break;
849857 case bass:
850858 beta = sqrt((A * A + 1) - (A - 1) * (A - 1));
@@ -858,19 +866,19 @@ static int config_filter(AVFilterLink *outlink, int reset) · 7 unmodified lines
858866 double beta0 = ((1 + A) + (1 - A) * alpha1) * 0.5;
859867 double beta1 = ((1 - A) + (1 + A) * alpha1) * 0.5;
860868
861− s->a0 = 1 + ro * alpha1;
862− s->a1 = -ro - alpha1;
863− s->a2 = 0;
864− s->b0 = beta0 + ro * beta1;
865− s->b1 = -beta1 - ro * beta0;
866− s->b2 = 0;
869+ s->a_double[0] = 1 + ro * alpha1;
870+ s->a_double[1] = -ro - alpha1;
871+ s->a_double[2] = 0;
872+ s->b_double[0] = beta0 + ro * beta1;
873+ s->b_double[1] = -beta1 - ro * beta0;
874+ s->b_double[2] = 0;
867875 } else {
868− s->a0 = (A + 1) + (A - 1) * cos(w0) + beta * alpha;
869− s->a1 = -2 * ((A - 1) + (A + 1) * cos(w0));
870− s->a2 = (A + 1) + (A - 1) * cos(w0) - beta * alpha;
871− s->b0 = A * ((A + 1) - (A - 1) * cos(w0) + beta * alpha);
872− s->b1 = 2 * A * ((A - 1) - (A + 1) * cos(w0));
873− s->b2 = A * ((A + 1) - (A - 1) * cos(w0) - beta * alpha);
876+ s->a_double[0] = (A + 1) + (A - 1) * cos(w0) + beta * alpha;
877+ s->a_double[1] = -2 * ((A - 1) + (A + 1) * cos(w0));
878+ s->a_double[2] = (A + 1) + (A - 1) * cos(w0) - beta * alpha;
879+ s->b_double[0] = A * ((A + 1) - (A - 1) * cos(w0) + beta * alpha);
880+ s->b_double[1] = 2 * A * ((A - 1) - (A + 1) * cos(w0));
881+ s->b_double[2] = A * ((A + 1) - (A - 1) * cos(w0) - beta * alpha);
874882 }
875883 break;
876884 case treble:
@@ -884,97 +892,97 @@ static int config_filter(AVFilterLink *outlink, int reset) · 7 unmodified lines
884892 double beta0 = ((1 + A) + (1 - A) * alpha1) * 0.5;
885893 double beta1 = ((1 - A) + (1 + A) * alpha1) * 0.5;
886894
887− s->a0 = 1 + ro * alpha1;
888− s->a1 = ro + alpha1;
889− s->a2 = 0;
890− s->b0 = beta0 + ro * beta1;
891− s->b1 = beta1 + ro * beta0;
892− s->b2 = 0;
895+ s->a_double[0] = 1 + ro * alpha1;
896+ s->a_double[1] = ro + alpha1;
897+ s->a_double[2] = 0;
898+ s->b_double[0] = beta0 + ro * beta1;
899+ s->b_double[1] = beta1 + ro * beta0;
900+ s->b_double[2] = 0;
893901 } else {
894− s->a0 = (A + 1) - (A - 1) * cos(w0) + beta * alpha;
895− s->a1 = 2 * ((A - 1) - (A + 1) * cos(w0));
896− s->a2 = (A + 1) - (A - 1) * cos(w0) - beta * alpha;
897− s->b0 = A * ((A + 1) + (A - 1) * cos(w0) + beta * alpha);
898− s->b1 =-2 * A * ((A - 1) + (A + 1) * cos(w0));
899− s->b2 = A * ((A + 1) + (A - 1) * cos(w0) - beta * alpha);
902+ s->a_double[0] = (A + 1) - (A - 1) * cos(w0) + beta * alpha;
903+ s->a_double[1] = 2 * ((A - 1) - (A + 1) * cos(w0));
904+ s->a_double[2] = (A + 1) - (A - 1) * cos(w0) - beta * alpha;
905+ s->b_double[0] = A * ((A + 1) + (A - 1) * cos(w0) + beta * alpha);
906+ s->b_double[1] =-2 * A * ((A - 1) + (A + 1) * cos(w0));
907+ s->b_double[2] = A * ((A + 1) + (A - 1) * cos(w0) - beta * alpha);
900908 }
901909 break;
902910 case bandpass:
903911 if (s->csg) {
904− s->a0 = 1 + alpha;
905− s->a1 = -2 * cos(w0);
906− s->a2 = 1 - alpha;
907− s->b0 = sin(w0) / 2;
908− s->b1 = 0;
909− s->b2 = -sin(w0) / 2;
912+ s->a_double[0] = 1 + alpha;
913+ s->a_double[1] = -2 * cos(w0);
914+ s->a_double[2] = 1 - alpha;
915+ s->b_double[0] = sin(w0) / 2;
916+ s->b_double[1] = 0;
917+ s->b_double[2] = -sin(w0) / 2;
910918 } else {
911− s->a0 = 1 + alpha;
912− s->a1 = -2 * cos(w0);
913− s->a2 = 1 - alpha;
914− s->b0 = alpha;
915− s->b1 = 0;
916− s->b2 = -alpha;
919+ s->a_double[0] = 1 + alpha;
920+ s->a_double[1] = -2 * cos(w0);
921+ s->a_double[2] = 1 - alpha;
922+ s->b_double[0] = alpha;
923+ s->b_double[1] = 0;
924+ s->b_double[2] = -alpha;
917925 }
918926 break;
919927 case bandreject:
920− s->a0 = 1 + alpha;
921− s->a1 = -2 * cos(w0);
922− s->a2 = 1 - alpha;
923− s->b0 = 1;
924− s->b1 = -2 * cos(w0);
925− s->b2 = 1;
928+ s->a_double[0] = 1 + alpha;
929+ s->a_double[1] = -2 * cos(w0);
930+ s->a_double[2] = 1 - alpha;
931+ s->b_double[0] = 1;
932+ s->b_double[1] = -2 * cos(w0);
933+ s->b_double[2] = 1;
926934 break;
927935 case lowpass:
928936 if (s->poles == 1) {
929− s->a0 = 1;
930− s->a1 = -exp(-w0);
931− s->a2 = 0;
932− s->b0 = 1 + s->a1;
933− s->b1 = 0;
934− s->b2 = 0;
937+ s->a_double[0] = 1;
938+ s->a_double[1] = -exp(-w0);
939+ s->a_double[2] = 0;
940+ s->b_double[0] = 1 + s->a_double[1];
941+ s->b_double[1] = 0;
942+ s->b_double[2] = 0;
935943 } else {
936− s->a0 = 1 + alpha;
937− s->a1 = -2 * cos(w0);
938− s->a2 = 1 - alpha;
939− s->b0 = (1 - cos(w0)) / 2;
940− s->b1 = 1 - cos(w0);
941− s->b2 = (1 - cos(w0)) / 2;
944+ s->a_double[0] = 1 + alpha;
945+ s->a_double[1] = -2 * cos(w0);
946+ s->a_double[2] = 1 - alpha;
947+ s->b_double[0] = (1 - cos(w0)) / 2;
948+ s->b_double[1] = 1 - cos(w0);
949+ s->b_double[2] = (1 - cos(w0)) / 2;
942950 }
943951 break;
944952 case highpass:
945953 if (s->poles == 1) {
946− s->a0 = 1;
947− s->a1 = -exp(-w0);
948− s->a2 = 0;
949− s->b0 = (1 - s->a1) / 2;
950− s->b1 = -s->b0;
951− s->b2 = 0;
954+ s->a_double[0] = 1;
955+ s->a_double[1] = -exp(-w0);
956+ s->a_double[2] = 0;
957+ s->b_double[0] = (1 - s->a_double[1]) / 2;
958+ s->b_double[1] = -s->b_double[0];
959+ s->b_double[2] = 0;
952960 } else {
953− s->a0 = 1 + alpha;
954− s->a1 = -2 * cos(w0);
955− s->a2 = 1 - alpha;
956− s->b0 = (1 + cos(w0)) / 2;
957− s->b1 = -(1 + cos(w0));
958− s->b2 = (1 + cos(w0)) / 2;
961+ s->a_double[0] = 1 + alpha;
962+ s->a_double[1] = -2 * cos(w0);
963+ s->a_double[2] = 1 - alpha;
964+ s->b_double[0] = (1 + cos(w0)) / 2;
965+ s->b_double[1] = -(1 + cos(w0));
966+ s->b_double[2] = (1 + cos(w0)) / 2;
959967 }
960968 break;
961969 case allpass:
962970 switch (s->order) {
963971 case 1:
964− s->a0 = 1.;
965− s->a1 = -(1. - K) / (1. + K);
966− s->a2 = 0.;
967− s->b0 = s->a1;
968− s->b1 = s->a0;
969− s->b2 = 0.;
972+ s->a_double[0] = 1.;
973+ s->a_double[1] = -(1. - K) / (1. + K);
974+ s->a_double[2] = 0.;
975+ s->b_double[0] = s->a_double[1];
976+ s->b_double[1] = s->a_double[0];
977+ s->b_double[2] = 0.;
970978 break;
971979 case 2:
972− s->a0 = 1 + alpha;
973− s->a1 = -2 * cos(w0);
974− s->a2 = 1 - alpha;
975− s->b0 = 1 - alpha;
976− s->b1 = -2 * cos(w0);
977− s->b2 = 1 + alpha;
980+ s->a_double[0] = 1 + alpha;
981+ s->a_double[1] = -2 * cos(w0);
982+ s->a_double[2] = 1 - alpha;
983+ s->b_double[0] = 1 - alpha;
984+ s->b_double[1] = -2 * cos(w0);
985+ s->b_double[2] = 1 + alpha;
978986 break;
979987 }
980988 break;
@@ -982,40 +990,55 @@ static int config_filter(AVFilterLink *outlink, int reset) · 1 unmodified line
982990 av_assert0(0);
983991 }
984992
985− av_log(ctx, AV_LOG_VERBOSE, "a=%f %f %f:b=%f %f %f\n", s->a0, s->a1, s->a2, s->b0, s->b1, s->b2);
993+ av_log(ctx, AV_LOG_VERBOSE, "a=%f %f %f:b=%f %f %f\n",
994+ s->a_double[0], s->a_double[1], s->a_double[2],
995+ s->b_double[0], s->b_double[1], s->b_double[2]);
986996
987− s->a1 /= s->a0;
988− s->a2 /= s->a0;
989− s->b0 /= s->a0;
990− s->b1 /= s->a0;
991− s->b2 /= s->a0;
992− s->a0 /= s->a0;
997+ s->a_double[1] /= s->a_double[0];
998+ s->a_double[2] /= s->a_double[0];
999+ s->b_double[0] /= s->a_double[0];
1000+ s->b_double[1] /= s->a_double[0];
1001+ s->b_double[2] /= s->a_double[0];
1002+ s->a_double[0] /= s->a_double[0];
9931003
994− if (s->normalize && fabs(s->b0 + s->b1 + s->b2) > 1e-6) {
995− double factor = (s->a0 + s->a1 + s->a2) / (s->b0 + s->b1 + s->b2);
1004+ if (s->normalize && fabs(s->b_double[0] + s->b_double[1] + s->b_double[2]) > 1e-6) {
1005+ double factor = (s->a_double[0] + s->a_double[1] + s->a_double[2]) /
1006+ (s->b_double[0] + s->b_double[1] + s->b_double[2]);
9961007
997− s->b0 *= factor;
998− s->b1 *= factor;
999− s->b2 *= factor;
1008+ s->b_double[0] *= factor;
1009+ s->b_double[1] *= factor;
1010+ s->b_double[2] *= factor;
10001011 }
10011012
10021013 switch (s->filter_type) {
10031014 case tiltshelf:
1004− s->b0 /= A;
1005− s->b1 /= A;
1006− s->b2 /= A;
1015+ s->b_double[0] /= A;
1016+ s->b_double[1] /= A;
1017+ s->b_double[2] /= A;
10071018 break;
10081019 }
10091020
1010− s->cache = av_realloc_f(s->cache, sizeof(ChanCache), inlink->ch_layout.nb_channels);
1011− if (!s->cache)
1021+ if (!s->cache[0])
1022+ s->cache[0] = ff_get_audio_buffer(outlink, 4 * sizeof(double));
1023+ if (!s->clip)
1024+ s->clip = av_calloc(outlink->ch_layout.nb_channels, sizeof(*s->clip));
1025+ if (!s->cache[0] || !s->clip)
10121026 return AVERROR(ENOMEM);
1013− if (reset)
1014− memset(s->cache, 0, sizeof(ChanCache) * inlink->ch_layout.nb_channels);
1027+ if (reset) {
1028+ av_samples_set_silence(s->cache[0]->extended_data, 0, s->cache[0]->nb_samples,
1029+ s->cache[0]->ch_layout.nb_channels, s->cache[0]->format);
1030+ }
10151031
10161032 if (reset && s->block_samples > 0) {
1033+ if (!s->cache[1])
1034+ s->cache[1] = ff_get_audio_buffer(outlink, 4 * sizeof(double));
1035+ if (!s->cache[1])
1036+ return AVERROR(ENOMEM);
1037+ av_samples_set_silence(s->cache[1]->extended_data, 0, s->cache[1]->nb_samples,
1038+ s->cache[1]->ch_layout.nb_channels, s->cache[1]->format);
10171039 for (int i = 0; i < 3; i++) {
1018− s->block[i] = ff_get_audio_buffer(outlink, s->block_samples * 2);
1040+ if (!s->block[i])
1041+ s->block[i] = ff_get_audio_buffer(outlink, s->block_samples * 2);
10191042 if (!s->block[i])
10201043 return AVERROR(ENOMEM);
10211044 av_samples_set_silence(s->block[i]->extended_data, 0, s->block_samples * 2,
@@ -1145,16 +1168,23 @@ static int config_filter(AVFilterLink *outlink, int reset) · 123 unmodified lines
11451168 break;
11461169 default:
11471170 av_assert0(0);
1148− }
1171+ }
1172+
1173+ s->block_align = av_get_bytes_per_sample(inlink->format);
11491174
1150− s->block_align = av_get_bytes_per_sample(inlink->format);
1175+ if (s->transform_type == LATT)
1176+ convert_dir2latt(s);
1177+ else if (s->transform_type == SVF)
1178+ convert_dir2svf(s);
1179+ else if (s->transform_type == ZDF)
1180+ convert_dir2zdf(s, inlink->sample_rate);
11511181
1152− if (s->transform_type == LATT)
1153− convert_dir2latt(s);
1154− else if (s->transform_type == SVF)
1155− convert_dir2svf(s);
1156− else if (s->transform_type == ZDF)
1157− convert_dir2zdf(s, inlink->sample_rate);
1182+ s->a_float[0] = s->a_double[0];
1183+ s->a_float[1] = s->a_double[1];
1184+ s->a_float[2] = s->a_double[2];
1185+ s->b_float[0] = s->b_double[0];
1186+ s->b_float[1] = s->b_double[1];
1187+ s->b_float[2] = s->b_double[2];
11581188
11591189 return 0;
11601190 }
@@ -1227,8 +1257,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job · 66 unmodified lines
12271257
12281258 if (!s->block_samples) {
12291259 s->filter(s, buf->extended_data[ch], out_buf->extended_data[ch], buf->nb_samples,
1230− &s->cache[ch].i1, &s->cache[ch].i2, &s->cache[ch].o1, &s->cache[ch].o2,
1231− s->b0, s->b1, s->b2, s->a0, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
1260+ s->cache[0]->extended_data[ch], s->clip+ch, ctx->is_disabled);
12321261 } else if (td->eof) {
12331262 memcpy(out_buf->extended_data[ch], s->block[1]->extended_data[ch] + s->block_align * s->block_samples,
12341263 s->nb_samples * s->block_align);
@@ -1238,25 +1267,19 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job · 3 unmodified lines
12381267 memset(s->block[0]->extended_data[ch] + s->block_align * (s->block_samples + buf->nb_samples),
12391268 0, (s->block_samples - buf->nb_samples) * s->block_align);
12401269 s->filter(s, s->block[0]->extended_data[ch], s->block[1]->extended_data[ch], s->block_samples,
1241− &s->cache[ch].i1, &s->cache[ch].i2, &s->cache[ch].o1, &s->cache[ch].o2,
1242− s->b0, s->b1, s->b2, s->a0, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
1243− s->cache[ch].ri1 = s->cache[ch].i1;
1244− s->cache[ch].ri2 = s->cache[ch].i2;
1245− s->cache[ch].ro1 = s->cache[ch].o1;
1246− s->cache[ch].ro2 = s->cache[ch].o2;
1270+ s->cache[0]->extended_data[ch], s->clip+ch, ctx->is_disabled);
1271+ av_samples_copy(s->cache[1]->extended_data, s->cache[0]->extended_data, 0, 0,
1272+ s->cache[0]->nb_samples, s->cache[0]->ch_layout.nb_channels,
1273+ s->cache[0]->format);
12471274 s->filter(s, s->block[0]->extended_data[ch] + s->block_samples * s->block_align,
12481275 s->block[1]->extended_data[ch] + s->block_samples * s->block_align,
1249− s->block_samples,
1250− &s->cache[ch].ri1, &s->cache[ch].ri2, &s->cache[ch].ro1, &s->cache[ch].ro2,
1251− s->b0, s->b1, s->b2, s->a0, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
1276+ s->block_samples, s->cache[1]->extended_data[ch], s->clip+ch,
1277+ ctx->is_disabled);
12521278 reverse_samples(s->block[2], s->block[1], ch, 0, 0, 2 * s->block_samples);
1253− s->cache[ch].ri1 = 0.;
1254− s->cache[ch].ri2 = 0.;
1255− s->cache[ch].ro1 = 0.;
1256− s->cache[ch].ro2 = 0.;
1279+ av_samples_set_silence(s->cache[1]->extended_data, 0, s->cache[1]->nb_samples,
1280+ s->cache[1]->ch_layout.nb_channels, s->cache[1]->format);
12571281 s->filter(s, s->block[2]->extended_data[ch], s->block[2]->extended_data[ch], 2 * s->block_samples,
1258− &s->cache[ch].ri1, &s->cache[ch].ri2, &s->cache[ch].ro1, &s->cache[ch].ro2,
1259− s->b0, s->b1, s->b2, s->a0, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
1282+ s->cache[1]->extended_data[ch], s->clip+ch, ctx->is_disabled);
12601283 reverse_samples(s->block[1], s->block[2], ch, 0, 0, 2 * s->block_samples);
12611284 memcpy(out_buf->extended_data[ch], s->block[1]->extended_data[ch],
12621285 s->block_samples * s->block_align);
@@ -1309,10 +1332,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf, int eof) · 46 unmodified lines
13091332 FFMIN(outlink->ch_layout.nb_channels, ff_filter_get_nb_threads(ctx)));
13101333
13111334 for (ch = 0; ch < outlink->ch_layout.nb_channels; ch++) {
1312− if (s->cache[ch].clippings > 0)
1335+ if (s->clip[ch] > 0)
13131336 av_log(ctx, AV_LOG_WARNING, "Channel %d clipping %d times. Please reduce gain.\n",
1314− ch, s->cache[ch].clippings);
1315− s->cache[ch].clippings = 0;
1337+ ch, s->clip[ch]);
1338+ s->clip[ch] = 0;
13161339 }
13171340
13181341 if (s->block_samples > 0) {
@@ -1402,7 +1425,9 @@ static av_cold void uninit(AVFilterContext *ctx) · 83 unmodified lines
14021425
14031426 for (int i = 0; i < 3; i++)
14041427 av_frame_free(&s->block[i]);
1405− av_freep(&s->cache);
1428+ av_frame_free(&s->cache[0]);
1429+ av_frame_free(&s->cache[1]);
1430+ av_freep(&s->clip);
14061431 av_channel_layout_uninit(&s->ch_layout);
14071432 }
14081433
@@ -1657,12 +1682,12 @@ DEFINE_BIQUAD_FILTER(allpass, "Apply a two-pole all-pass filter."); · 248 unmodified lines
16571682 #endif /* CONFIG_ALLPASS_FILTER */
16581683 #if CONFIG_BIQUAD_FILTER
16591684 static const AVOption biquad_options[] = {
1660− {"a0", NULL, OFFSET(oa0), AV_OPT_TYPE_DOUBLE, {.dbl=1}, INT32_MIN, INT32_MAX, FLAGS},
1661− {"a1", NULL, OFFSET(oa1), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1662− {"a2", NULL, OFFSET(oa2), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1663− {"b0", NULL, OFFSET(ob0), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1664− {"b1", NULL, OFFSET(ob1), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1665− {"b2", NULL, OFFSET(ob2), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1685+ {"a0", NULL, OFFSET(oa[0]), AV_OPT_TYPE_DOUBLE, {.dbl=1}, INT32_MIN, INT32_MAX, FLAGS},
1686+ {"a1", NULL, OFFSET(oa[1]), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1687+ {"a2", NULL, OFFSET(oa[2]), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1688+ {"b0", NULL, OFFSET(ob[0]), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1689+ {"b1", NULL, OFFSET(ob[1]), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
1690+ {"b2", NULL, OFFSET(ob[2]), AV_OPT_TYPE_DOUBLE, {.dbl=0}, INT32_MIN, INT32_MAX, FLAGS},
16661691 MIX_CHANNELS_NORMALIZE_OPTION(1, "all", 0),
16671692 TRANSFORM_OPTION(DI),
16681693 PRECISION_OPTION(-1),

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