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)
45 const int order =
s->order;
53 output =
s->fdsp->scalarproduct_float(delay,
tmp,
s->kernel_size);
55 output =
s->fdsp->scalarproduct_double(delay,
tmp,
s->kernel_size);
66 ftype *coeffs = (
ftype *)
s->coeffs->extended_data[ch];
67 ftype *delay = (
ftype *)
s->delay->extended_data[ch];
68 ftype *gains = (
ftype *)
s->gains->extended_data[ch];
73 int *offsetp = (
int *)
s->offset->extended_data[ch];
74 const int kernel_size =
s->kernel_size;
75 const int order =
s->order;
76 const ftype lambda =
s->lambda;
87 const int ikernel_size =
i * kernel_size;
91 u[
i] += p[ikernel_size + k] * delay[
pos];
98 for (
int i = 0;
i < order;
i++) {
99 const int ikernel_size =
i * kernel_size;
102 coeffs[
i] = coeffs[order +
i] = coeffs[
i] + gains[
i] * e;
105 tmp[
i] += p[ikernel_size + k] * delay[
pos];
108 for (
int i = 0;
i < order;
i++) {
109 const int ikernel_size =
i * kernel_size;
111 for (
int k = 0; k < order; k++)
112 dp[ikernel_size + k] = gains[
i] *
tmp[k];
115 for (
int i = 0;
i < order;
i++) {
116 const int ikernel_size =
i * kernel_size;
118 for (
int k = 0; k < order; k++)
119 p[ikernel_size + k] = (p[ikernel_size + k] - (dp[ikernel_size + k] + dp[kernel_size * k +
i]) *
HALF) * lambda;
122 switch (
s->output_mode) {
136 const int start = (
out->ch_layout.nb_channels * jobnr) / nb_jobs;
137 const int end = (
out->ch_layout.nb_channels * (jobnr+1)) / nb_jobs;
139 for (
int c = start;
c < end;
c++) {
141 const ftype *desired = (
const ftype *)
s->frame[1]->extended_data[
c];
144 for (
int n = 0; n <
out->nb_samples; n++) {
146 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)