FFmpeg
af_afreqshift.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) Paul B Mahol
3  * Copyright (c) Laurent de Soras, 2005
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
23 #include "libavutil/ffmath.h"
24 #include "libavutil/opt.h"
25 #include "avfilter.h"
26 #include "audio.h"
27 #include "formats.h"
28 
29 #define MAX_NB_COEFFS 16
30 
31 typedef struct AFreqShift {
32  const AVClass *class;
33 
34  double shift;
35  double level;
36  int nb_coeffs;
38 
39  double cd[MAX_NB_COEFFS * 2];
40  float cf[MAX_NB_COEFFS * 2];
41 
42  int64_t in_samples;
43 
46 
48  int channel,
49  AVFrame *in, AVFrame *out);
50 } AFreqShift;
51 
53 {
54  static const enum AVSampleFormat sample_fmts[] = {
58  };
60  if (ret < 0)
61  return ret;
62 
64  if (ret < 0)
65  return ret;
66 
68 }
69 
70 #define PFILTER(name, type, sin, cos, cc) \
71 static void pfilter_channel_## name(AVFilterContext *ctx, \
72  int ch, \
73  AVFrame *in, AVFrame *out) \
74 { \
75  AFreqShift *s = ctx->priv; \
76  const int nb_samples = in->nb_samples; \
77  const type *src = (const type *)in->extended_data[ch]; \
78  type *dst = (type *)out->extended_data[ch]; \
79  type *i1 = (type *)s->i1->extended_data[ch]; \
80  type *o1 = (type *)s->o1->extended_data[ch]; \
81  type *i2 = (type *)s->i2->extended_data[ch]; \
82  type *o2 = (type *)s->o2->extended_data[ch]; \
83  const type *c = s->cc; \
84  const type level = s->level; \
85  type shift = s->shift * M_PI; \
86  type cos_theta = cos(shift); \
87  type sin_theta = sin(shift); \
88  \
89  for (int n = 0; n < nb_samples; n++) { \
90  type xn1 = src[n], xn2 = src[n]; \
91  type I, Q; \
92  \
93  for (int j = 0; j < s->nb_coeffs; j++) { \
94  I = c[j] * (xn1 + o2[j]) - i2[j]; \
95  i2[j] = i1[j]; \
96  i1[j] = xn1; \
97  o2[j] = o1[j]; \
98  o1[j] = I; \
99  xn1 = I; \
100  } \
101  \
102  for (int j = s->nb_coeffs; j < s->nb_coeffs*2; j++) { \
103  Q = c[j] * (xn2 + o2[j]) - i2[j]; \
104  i2[j] = i1[j]; \
105  i1[j] = xn2; \
106  o2[j] = o1[j]; \
107  o1[j] = Q; \
108  xn2 = Q; \
109  } \
110  Q = o2[s->nb_coeffs * 2 - 1]; \
111  \
112  dst[n] = (I * cos_theta - Q * sin_theta) * level; \
113  } \
114 }
115 
116 PFILTER(flt, float, sin, cos, cf)
117 PFILTER(dbl, double, sin, cos, cd)
118 
119 #define FFILTER(name, type, sin, cos, fmod, cc) \
120 static void ffilter_channel_## name(AVFilterContext *ctx, \
121  int ch, \
122  AVFrame *in, AVFrame *out) \
123 { \
124  AFreqShift *s = ctx->priv; \
125  const int nb_samples = in->nb_samples; \
126  const type *src = (const type *)in->extended_data[ch]; \
127  type *dst = (type *)out->extended_data[ch]; \
128  type *i1 = (type *)s->i1->extended_data[ch]; \
129  type *o1 = (type *)s->o1->extended_data[ch]; \
130  type *i2 = (type *)s->i2->extended_data[ch]; \
131  type *o2 = (type *)s->o2->extended_data[ch]; \
132  const type *c = s->cc; \
133  const type level = s->level; \
134  type ts = 1. / in->sample_rate; \
135  type shift = s->shift; \
136  int64_t N = s->in_samples; \
137  \
138  for (int n = 0; n < nb_samples; n++) { \
139  type xn1 = src[n], xn2 = src[n]; \
140  type I, Q, theta; \
141  \
142  for (int j = 0; j < s->nb_coeffs; j++) { \
143  I = c[j] * (xn1 + o2[j]) - i2[j]; \
144  i2[j] = i1[j]; \
145  i1[j] = xn1; \
146  o2[j] = o1[j]; \
147  o1[j] = I; \
148  xn1 = I; \
149  } \
150  \
151  for (int j = s->nb_coeffs; j < s->nb_coeffs*2; j++) { \
152  Q = c[j] * (xn2 + o2[j]) - i2[j]; \
153  i2[j] = i1[j]; \
154  i1[j] = xn2; \
155  o2[j] = o1[j]; \
156  o1[j] = Q; \
157  xn2 = Q; \
158  } \
159  Q = o2[s->nb_coeffs * 2 - 1]; \
160  \
161  theta = 2. * M_PI * fmod(shift * (N + n) * ts, 1.); \
162  dst[n] = (I * cos(theta) - Q * sin(theta)) * level; \
163  } \
164 }
165 
166 FFILTER(flt, float, sinf, cosf, fmodf, cf)
167 FFILTER(dbl, double, sin, cos, fmod, cd)
168 
169 static void compute_transition_param(double *K, double *Q, double transition)
170 {
171  double kksqrt, e, e2, e4, k, q;
172 
173  k = tan((1. - transition * 2.) * M_PI / 4.);
174  k *= k;
175  kksqrt = pow(1 - k * k, 0.25);
176  e = 0.5 * (1. - kksqrt) / (1. + kksqrt);
177  e2 = e * e;
178  e4 = e2 * e2;
179  q = e * (1. + e4 * (2. + e4 * (15. + 150. * e4)));
180 
181  *Q = q;
182  *K = k;
183 }
184 
185 static double ipowp(double x, int64_t n)
186 {
187  double z = 1.;
188 
189  while (n != 0) {
190  if (n & 1)
191  z *= x;
192  n >>= 1;
193  x *= x;
194  }
195 
196  return z;
197 }
198 
199 static double compute_acc_num(double q, int order, int c)
200 {
201  int64_t i = 0;
202  int j = 1;
203  double acc = 0.;
204  double q_ii1;
205 
206  do {
207  q_ii1 = ipowp(q, i * (i + 1));
208  q_ii1 *= sin((i * 2 + 1) * c * M_PI / order) * j;
209  acc += q_ii1;
210 
211  j = -j;
212  i++;
213  } while (fabs(q_ii1) > 1e-100);
214 
215  return acc;
216 }
217 
218 static double compute_acc_den(double q, int order, int c)
219 {
220  int64_t i = 1;
221  int j = -1;
222  double acc = 0.;
223  double q_i2;
224 
225  do {
226  q_i2 = ipowp(q, i * i);
227  q_i2 *= cos(i * 2 * c * M_PI / order) * j;
228  acc += q_i2;
229 
230  j = -j;
231  i++;
232  } while (fabs(q_i2) > 1e-100);
233 
234  return acc;
235 }
236 
237 static double compute_coef(int index, double k, double q, int order)
238 {
239  const int c = index + 1;
240  const double num = compute_acc_num(q, order, c) * pow(q, 0.25);
241  const double den = compute_acc_den(q, order, c) + 0.5;
242  const double ww = num / den;
243  const double wwsq = ww * ww;
244 
245  const double x = sqrt((1 - wwsq * k) * (1 - wwsq / k)) / (1 + wwsq);
246  const double coef = (1 - x) / (1 + x);
247 
248  return coef;
249 }
250 
251 static void compute_coefs(double *coef_arrd, float *coef_arrf, int nbr_coefs, double transition)
252 {
253  const int order = nbr_coefs * 2 + 1;
254  double k, q;
255 
256  compute_transition_param(&k, &q, transition);
257 
258  for (int n = 0; n < nbr_coefs; n++) {
259  const int idx = (n / 2) + (n & 1) * nbr_coefs / 2;
260 
261  coef_arrd[idx] = compute_coef(n, k, q, order);
262  coef_arrf[idx] = coef_arrd[idx];
263  }
264 }
265 
267 {
268  AVFilterContext *ctx = inlink->dst;
269  AFreqShift *s = ctx->priv;
270 
271  if (s->old_nb_coeffs != s->nb_coeffs)
272  compute_coefs(s->cd, s->cf, s->nb_coeffs * 2, 2. * 20. / inlink->sample_rate);
273  s->old_nb_coeffs = s->nb_coeffs;
274 
279  if (!s->i1 || !s->o1 || !s->i2 || !s->o2)
280  return AVERROR(ENOMEM);
281 
282  if (inlink->format == AV_SAMPLE_FMT_DBLP) {
283  if (!strcmp(ctx->filter->name, "afreqshift"))
284  s->filter_channel = ffilter_channel_dbl;
285  else
286  s->filter_channel = pfilter_channel_dbl;
287  } else {
288  if (!strcmp(ctx->filter->name, "afreqshift"))
289  s->filter_channel = ffilter_channel_flt;
290  else
291  s->filter_channel = pfilter_channel_flt;
292  }
293 
294  return 0;
295 }
296 
297 typedef struct ThreadData {
298  AVFrame *in, *out;
299 } ThreadData;
300 
301 static int filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
302 {
303  AFreqShift *s = ctx->priv;
304  ThreadData *td = arg;
305  AVFrame *out = td->out;
306  AVFrame *in = td->in;
307  const int start = (in->channels * jobnr) / nb_jobs;
308  const int end = (in->channels * (jobnr+1)) / nb_jobs;
309 
310  for (int ch = start; ch < end; ch++)
311  s->filter_channel(ctx, ch, in, out);
312 
313  return 0;
314 }
315 
317 {
318  AVFilterContext *ctx = inlink->dst;
319  AVFilterLink *outlink = ctx->outputs[0];
320  AFreqShift *s = ctx->priv;
321  AVFrame *out;
322  ThreadData td;
323 
324  if (s->old_nb_coeffs != s->nb_coeffs)
325  compute_coefs(s->cd, s->cf, s->nb_coeffs * 2, 2. * 20. / inlink->sample_rate);
326  s->old_nb_coeffs = s->nb_coeffs;
327 
328  if (av_frame_is_writable(in)) {
329  out = in;
330  } else {
331  out = ff_get_audio_buffer(outlink, in->nb_samples);
332  if (!out) {
333  av_frame_free(&in);
334  return AVERROR(ENOMEM);
335  }
337  }
338 
339  td.in = in; td.out = out;
342 
343  s->in_samples += in->nb_samples;
344 
345  if (out != in)
346  av_frame_free(&in);
347  return ff_filter_frame(outlink, out);
348 }
349 
351 {
352  AFreqShift *s = ctx->priv;
353 
354  av_frame_free(&s->i1);
355  av_frame_free(&s->o1);
356  av_frame_free(&s->i2);
357  av_frame_free(&s->o2);
358 }
359 
360 #define OFFSET(x) offsetof(AFreqShift, x)
361 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
362 
363 static const AVOption afreqshift_options[] = {
364  { "shift", "set frequency shift", OFFSET(shift), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -INT_MAX, INT_MAX, FLAGS },
365  { "level", "set output level", OFFSET(level), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.0, 1.0, FLAGS },
366  { "order", "set filter order", OFFSET(nb_coeffs),AV_OPT_TYPE_INT, {.i64=8}, 1, MAX_NB_COEFFS, FLAGS },
367  { NULL }
368 };
369 
370 AVFILTER_DEFINE_CLASS(afreqshift);
371 
372 static const AVFilterPad inputs[] = {
373  {
374  .name = "default",
375  .type = AVMEDIA_TYPE_AUDIO,
376  .filter_frame = filter_frame,
377  .config_props = config_input,
378  },
379 };
380 
381 static const AVFilterPad outputs[] = {
382  {
383  .name = "default",
384  .type = AVMEDIA_TYPE_AUDIO,
385  },
386 };
387 
389  .name = "afreqshift",
390  .description = NULL_IF_CONFIG_SMALL("Apply frequency shifting to input audio."),
391  .query_formats = query_formats,
392  .priv_size = sizeof(AFreqShift),
393  .priv_class = &afreqshift_class,
394  .uninit = uninit,
397  .process_command = ff_filter_process_command,
400 };
401 
402 static const AVOption aphaseshift_options[] = {
403  { "shift", "set phase shift", OFFSET(shift), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -1.0, 1.0, FLAGS },
404  { "level", "set output level",OFFSET(level), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.0, 1.0, FLAGS },
405  { "order", "set filter order",OFFSET(nb_coeffs), AV_OPT_TYPE_INT,{.i64=8}, 1, MAX_NB_COEFFS, FLAGS },
406  { NULL }
407 };
408 
409 AVFILTER_DEFINE_CLASS(aphaseshift);
410 
412  .name = "aphaseshift",
413  .description = NULL_IF_CONFIG_SMALL("Apply phase shifting to input audio."),
414  .query_formats = query_formats,
415  .priv_size = sizeof(AFreqShift),
416  .priv_class = &aphaseshift_class,
417  .uninit = uninit,
420  .process_command = ff_filter_process_command,
423 };
ff_get_audio_buffer
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
Definition: audio.c:88
AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
td
#define td
Definition: regdef.h:70
level
uint8_t level
Definition: svq3.c:204
acc
int acc
Definition: yuv2rgb.c:554
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
opt.h
out
FILE * out
Definition: movenc.c:54
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1019
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
AFreqShift::old_nb_coeffs
int old_nb_coeffs
Definition: af_afreqshift.c:37
inlink
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
Definition: filter_design.txt:212
filter_channels
static int filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: af_afreqshift.c:301
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:112
inputs
static const AVFilterPad inputs[]
Definition: af_afreqshift.c:372
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:303
index
fg index
Definition: ffmpeg_filter.c:168
AVOption
AVOption.
Definition: opt.h:247
AFreqShift::cd
double cd[MAX_NB_COEFFS *2]
Definition: af_afreqshift.c:39
ff_set_common_all_samplerates
int ff_set_common_all_samplerates(AVFilterContext *ctx)
Equivalent to ff_set_common_samplerates(ctx, ff_all_samplerates())
Definition: formats.c:682
MAX_NB_COEFFS
#define MAX_NB_COEFFS
Definition: af_afreqshift.c:29
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:153
ThreadData::out
AVFrame * out
Definition: af_adeclick.c:492
formats.h
cosf
#define cosf(x)
Definition: libm.h:78
aphaseshift_options
static const AVOption aphaseshift_options[]
Definition: af_afreqshift.c:402
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_afreqshift.c:316
ff_af_aphaseshift
const AVFilter ff_af_aphaseshift
Definition: af_afreqshift.c:411
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:50
av_cold
#define av_cold
Definition: attributes.h:90
compute_acc_den
static double compute_acc_den(double q, int order, int c)
Definition: af_afreqshift.c:218
AFreqShift::cf
float cf[MAX_NB_COEFFS *2]
Definition: af_afreqshift.c:40
PFILTER
#define PFILTER(name, type, sin, cos, cc)
Definition: af_afreqshift.c:70
s
#define s(width, name)
Definition: cbs_vp9.c:257
AFreqShift
Definition: af_afreqshift.c:31
AVFrame::channels
int channels
number of audio channels, only used for audio.
Definition: frame.h:592
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:226
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
ff_set_common_formats_from_list
int ff_set_common_formats_from_list(AVFilterContext *ctx, const int *fmts)
Equivalent to ff_set_common_formats(ctx, ff_make_format_list(fmts))
Definition: formats.c:698
ctx
AVFormatContext * ctx
Definition: movenc.c:48
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:152
arg
const char * arg
Definition: jacosubdec.c:67
compute_transition_param
static void compute_transition_param(double *K, double *Q, double transition)
Definition: af_afreqshift.c:169
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
fabs
static __device__ float fabs(float a)
Definition: cuda_runtime.h:182
NULL
#define NULL
Definition: coverity.c:32
av_frame_copy_props
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:537
ipowp
static double ipowp(double x, int64_t n)
Definition: af_afreqshift.c:185
OFFSET
#define OFFSET(x)
Definition: af_afreqshift.c:360
AFreqShift::shift
double shift
Definition: af_afreqshift.c:34
sinf
#define sinf(x)
Definition: libm.h:419
AFreqShift::i2
AVFrame * i2
Definition: af_afreqshift.c:45
ff_set_common_all_channel_counts
int ff_set_common_all_channel_counts(AVFilterContext *ctx)
Equivalent to ff_set_common_channel_layouts(ctx, ff_all_channel_counts())
Definition: formats.c:664
AFreqShift::level
double level
Definition: af_afreqshift.c:35
c
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
Definition: undefined.txt:32
FFILTER
#define FFILTER(name, type, sin, cos, fmod, cc)
Definition: af_afreqshift.c:119
compute_acc_num
static double compute_acc_num(double q, int order, int c)
Definition: af_afreqshift.c:199
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
av_frame_is_writable
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
Definition: frame.c:473
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_afreqshift.c:266
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:883
AFreqShift::nb_coeffs
int nb_coeffs
Definition: af_afreqshift.c:36
M_PI
#define M_PI
Definition: mathematics.h:52
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_afreqshift.c:350
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:130
AVFrame::nb_samples
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:369
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:271
AFreqShift::o1
AVFrame * o1
Definition: af_afreqshift.c:44
ff_filter_get_nb_threads
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:804
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
ThreadData
Used for passing data between threads.
Definition: dsddec.c:67
AFreqShift::in_samples
int64_t in_samples
Definition: af_afreqshift.c:42
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
ff_af_afreqshift
const AVFilter ff_af_afreqshift
Definition: af_afreqshift.c:388
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:56
compute_coefs
static void compute_coefs(double *coef_arrd, float *coef_arrf, int nbr_coefs, double transition)
Definition: af_afreqshift.c:251
AVFilter
Filter definition.
Definition: avfilter.h:149
afreqshift_options
static const AVOption afreqshift_options[]
Definition: af_afreqshift.c:363
ret
ret
Definition: filter_design.txt:187
AFreqShift::filter_channel
void(* filter_channel)(AVFilterContext *ctx, int channel, AVFrame *in, AVFrame *out)
Definition: af_afreqshift.c:47
AFreqShift::o2
AVFrame * o2
Definition: af_afreqshift.c:45
outputs
static const AVFilterPad outputs[]
Definition: af_afreqshift.c:381
channel_layout.h
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
avfilter.h
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:70
ffmath.h
AVFilterContext
An instance of a filter.
Definition: avfilter.h:346
shift
static int shift(int a, int b)
Definition: sonic.c:83
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:121
audio.h
FLAGS
#define FLAGS
Definition: af_afreqshift.c:361
ThreadData::in
AVFrame * in
Definition: af_adecorrelate.c:171
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:153
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_afreqshift.c:52
ff_filter_execute
static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition: internal.h:143
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(afreqshift)
compute_coef
static double compute_coef(int index, double k, double q, int order)
Definition: af_afreqshift.c:237
channel
channel
Definition: ebur128.h:39
AFreqShift::i1
AVFrame * i1
Definition: af_afreqshift.c:44