Go to the documentation of this file.
24 #define SAMPLE_FORMAT float
29 #define SAMPLE_FORMAT double
35 #define fn3(a,b) a##_##b
36 #define fn2(a,b) fn3(a,b)
37 #define fn(a) fn2(a, SAMPLE_FORMAT)
42 const int order =
s->order;
49 output =
s->fdsp->scalarproduct_float(delay,
tmp,
s->kernel_size);
51 output =
s->fdsp->scalarproduct_double(delay,
tmp,
s->kernel_size);
62 for (
int i = 0;
i <=
N;
i++)
65 for (
int i = 0;
i <
N;
i++) {
69 for (
int k =
i; k <
N; k++) {
86 for (
int j =
i + 1; j <
N; j++) {
89 for (
int k =
i + 1; k <
N; k++)
90 MA[j][k] -= MA[j][
i] * MA[
i][k];
99 for (
int j = 0; j <
N; j++) {
100 for (
int i = 0;
i <
N;
i++) {
103 for (
int k = 0; k <
i; k++)
104 IA[
i][j] -= MA[
i][k] *
IA[k][j];
107 for (
int i =
N - 1;
i >= 0;
i--) {
108 for (
int k =
i + 1; k <
N; k++)
109 IA[
i][j] -= MA[
i][k] *
IA[k][j];
111 IA[
i][j] /= MA[
i][
i];
118 ftype *dcoeffs = (
ftype *)
s->dcoeffs->extended_data[ch];
119 ftype *coeffs = (
ftype *)
s->coeffs->extended_data[ch];
120 ftype *delay = (
ftype *)
s->delay->extended_data[ch];
121 ftype **itmpmp = (
ftype **)&
s->itmpmp[
s->projection * ch];
122 ftype **tmpmp = (
ftype **)&
s->tmpmp[
s->projection * ch];
128 int *
p = (
int *)
s->p->extended_data[ch];
129 int *
offset = (
int *)
s->offset->extended_data[ch];
130 const int projection =
s->projection;
132 const int order =
s->order;
133 const int length = projection + order;
135 const ftype tol = 0.00001f;
144 for (
int i = 0;
i < projection;
i++) {
145 const int iprojection =
i * projection;
147 for (
int j =
i; j < projection; j++) {
149 for (
int k = 0; k < order; k++)
151 tmpm[iprojection + j] = sum;
153 tmpm[j * projection +
i] = sum;
156 tmpm[iprojection +
i] +=
delta;
162 for (
int i = 0;
i < projection;
i++) {
164 for (
int j = 0; j < projection; j++)
165 sum += itmpmp[
i][j] * e[j +
offset[1]];
169 for (
int i = 0;
i < order;
i++) {
171 for (
int j = 0; j < projection; j++)
176 for (
int i = 0;
i < order;
i++)
177 coeffs[
i] = coeffs[
i + order] = coeffs[
i] + mu * dcoeffs[
i];
180 offset[1] = projection - 1;
185 switch (
s->output_mode) {
199 const int start = (
out->ch_layout.nb_channels * jobnr) / nb_jobs;
200 const int end = (
out->ch_layout.nb_channels * (jobnr+1)) / nb_jobs;
202 for (
int c = start;
c < end;
c++) {
204 const ftype *desired = (
const ftype *)
s->frame[1]->extended_data[
c];
207 for (
int n = 0; n <
out->nb_samples; n++) {
209 if (
ctx->is_disabled)
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(AudioAPContext *s, ftype sample, ftype *delay, ftype *coeffs, ftype *tmp, int *offset)
static ftype fn() process_sample(AudioAPContext *s, ftype input, ftype desired, int ch)
static __device__ float fabs(float a)
static int fn() lup_decompose(ftype **MA, const int N, const ftype tol, int *P)
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
static void fn() lup_invert(ftype *const *MA, const int *P, const int N, ftype **IA)
static int fn() filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
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)
#define FFSWAP(type, a, b)
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p