61 const int order =
s->order;
62 const ftype leakage =
s->leakage;
65 ftype sum, output, e, norm,
b;
68 delay[
offset + order] = input;
74 sum =
s->fdsp->scalarproduct_float(delay, delay,
s->kernel_size);
76 sum =
s->fdsp->scalarproduct_double(delay, delay,
s->kernel_size);
86 s->fdsp->vector_fmul_scalar(coeffs, coeffs,
a,
s->kernel_size);
87 s->fdsp->vector_fmac_scalar(coeffs,
tmp,
b,
s->kernel_size);
89 s->fdsp->vector_dmul_scalar(coeffs, coeffs,
a,
s->kernel_size);
90 s->fdsp->vector_dmac_scalar(coeffs,
tmp,
b,
s->kernel_size);
93 memcpy(coeffs + order, coeffs, order *
sizeof(
ftype));
95 switch (
s->output_mode) {
96 case IN_MODE: output = input;
break;
98 case OUT_MODE: output = desired - output;
break;
99 case NOISE_MODE: output = input - output;
break;
109 const int start =
ff_slice_pos(
out->ch_layout.nb_channels, jobnr, nb_jobs);
110 const int end =
ff_slice_pos(
out->ch_layout.nb_channels, jobnr + 1, nb_jobs);
112 for (
int c = start;
c < end;
c++) {
113 const ftype *input = (
const ftype *)
s->frame[0]->extended_data[
c];
114 const ftype *desired = (
const ftype *)
s->frame[1]->extended_data[
c];
118 int *
offset = (
int *)
s->offset->extended_data[
c];
121 for (
int n = 0; n <
out->nb_samples; n++) {
123 if (
ctx->is_disabled)
124 output[n] = input[n];
static ftype fn fir_sample(AudioAPContext *s, ftype sample, ftype *delay, ftype *coeffs, ftype *tmp, int *offset)
static int ff_slice_pos(int total, int jobnr, int nb_jobs)
Compute the boundary index for a slice when work of size total is split into nb_jobs slices.