Go to the documentation of this file.
25 #define SAMPLE_FORMAT float
31 #define SAMPLE_FORMAT double
38 #define fn3(a,b) a##_##b
39 #define fn2(a,b) fn3(a,b)
40 #define fn(a) fn2(a, SAMPLE_FORMAT)
43 static double scalarproduct_double(
const double *v1,
const double *v2,
int len)
47 for (
int i = 0;
i <
len;
i++)
57 const int order =
s->order;
65 output =
s->fdsp->scalarproduct_float(delay,
tmp,
s->kernel_size);
67 output = scalarproduct_double(delay,
tmp,
s->kernel_size);
78 ftype *coeffs = (
ftype *)
s->coeffs->extended_data[ch];
79 ftype *delay = (
ftype *)
s->delay->extended_data[ch];
80 ftype *gains = (
ftype *)
s->gains->extended_data[ch];
85 int *offsetp = (
int *)
s->offset->extended_data[ch];
86 const int kernel_size =
s->kernel_size;
87 const int order =
s->order;
88 const ftype lambda =
s->lambda;
99 const int ikernel_size =
i * kernel_size;
103 u[
i] += p[ikernel_size + k] * delay[
pos];
110 for (
int i = 0;
i < order;
i++) {
111 const int ikernel_size =
i * kernel_size;
114 coeffs[
i] = coeffs[order +
i] = coeffs[
i] + gains[
i] * e;
117 tmp[
i] += p[ikernel_size + k] * delay[
pos];
120 for (
int i = 0;
i < order;
i++) {
121 const int ikernel_size =
i * kernel_size;
123 for (
int k = 0; k < order; k++)
124 dp[ikernel_size + k] = gains[
i] *
tmp[k];
127 for (
int i = 0;
i < order;
i++) {
128 const int ikernel_size =
i * kernel_size;
130 for (
int k = 0; k < order; k++)
131 p[ikernel_size + k] = (p[ikernel_size + k] - (dp[ikernel_size + k] + dp[kernel_size * k +
i]) *
HALF) * lambda;
134 switch (
s->output_mode) {
148 const int start = (
out->ch_layout.nb_channels * jobnr) / nb_jobs;
149 const int end = (
out->ch_layout.nb_channels * (jobnr+1)) / nb_jobs;
151 for (
int c = start;
c < end;
c++) {
153 const ftype *desired = (
const ftype *)
s->frame[1]->extended_data[
c];
156 for (
int n = 0; n <
out->nb_samples; n++) {
158 if (
ctx->is_disabled)
#define u(width, name, range_min, range_max)
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
This structure describes decoded (raw) audio or video data.
static ftype fn() fir_sample(AudioRLSContext *s, ftype sample, ftype *delay, ftype *coeffs, ftype *tmp, int *offset)
static ftype fn() process_sample(AudioRLSContext *s, ftype input, ftype desired, int ch)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
#define i(width, name, range_min, range_max)
static int fn() filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)