FFmpeg
af_crossfeed.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
20 #include "libavutil/ffmath.h"
21 #include "libavutil/mem.h"
22 #include "libavutil/opt.h"
23 #include "avfilter.h"
24 #include "audio.h"
25 #include "filters.h"
26 #include "formats.h"
27 
28 typedef struct CrossfeedContext {
29  const AVClass *class;
30 
31  double range;
32  double strength;
33  double slope;
34  double level_in;
35  double level_out;
38 
39  double a0, a1, a2;
40  double b0, b1, b2;
41 
42  double w1, w2;
43 
46 
47  double *mid;
48  double *side[3];
50 
51 static int query_formats(const AVFilterContext *ctx,
52  AVFilterFormatsConfig **cfg_in,
53  AVFilterFormatsConfig **cfg_out)
54 {
55  static const enum AVSampleFormat formats[] = {
58  };
59  static const AVChannelLayout layouts[] = {
61  { .nb_channels = 0 },
62  };
63 
64  int ret;
65 
66  ret = ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, formats);
67  if (ret < 0)
68  return ret;
69 
71  if (ret < 0)
72  return ret;
73 
74  return 0;
75 }
76 
78 {
79  AVFilterContext *ctx = inlink->dst;
80  CrossfeedContext *s = ctx->priv;
81  double A = ff_exp10(s->strength * -30 / 40);
82  double w0 = 2 * M_PI * (1. - s->range) * 2100 / inlink->sample_rate;
83  double alpha;
84 
85  alpha = sin(w0) / 2 * sqrt((A + 1 / A) * (1 / s->slope - 1) + 2);
86 
87  s->a0 = (A + 1) + (A - 1) * cos(w0) + 2 * sqrt(A) * alpha;
88  s->a1 = -2 * ((A - 1) + (A + 1) * cos(w0));
89  s->a2 = (A + 1) + (A - 1) * cos(w0) - 2 * sqrt(A) * alpha;
90  s->b0 = A * ((A + 1) - (A - 1) * cos(w0) + 2 * sqrt(A) * alpha);
91  s->b1 = 2 * A * ((A - 1) - (A + 1) * cos(w0));
92  s->b2 = A * ((A + 1) - (A - 1) * cos(w0) - 2 * sqrt(A) * alpha);
93 
94  s->a1 /= s->a0;
95  s->a2 /= s->a0;
96  s->b0 /= s->a0;
97  s->b1 /= s->a0;
98  s->b2 /= s->a0;
99 
100  if (s->block_samples == 0 && s->block_size > 0) {
101  s->block_samples = s->block_size;
102  s->mid = av_calloc(s->block_samples * 2, sizeof(*s->mid));
103  for (int i = 0; i < 3; i++) {
104  s->side[i] = av_calloc(s->block_samples * 2, sizeof(*s->side[0]));
105  if (!s->side[i])
106  return AVERROR(ENOMEM);
107  }
108  }
109 
110  return 0;
111 }
112 
113 static void reverse_samples(double *dst, const double *src,
114  int nb_samples)
115 {
116  for (int i = 0, j = nb_samples - 1; i < nb_samples; i++, j--)
117  dst[i] = src[j];
118 }
119 
120 static void filter_samples(double *dst, const double *src,
121  int nb_samples,
122  double b0, double b1, double b2,
123  double a1, double a2,
124  double *sw1, double *sw2)
125 {
126  double w1 = *sw1;
127  double w2 = *sw2;
128 
129  for (int n = 0; n < nb_samples; n++) {
130  double side = src[n];
131  double oside = side * b0 + w1;
132 
133  w1 = b1 * side + w2 + a1 * oside;
134  w2 = b2 * side + a2 * oside;
135 
136  dst[n] = oside;
137  }
138 
139  *sw1 = w1;
140  *sw2 = w2;
141 }
142 
143 static int filter_frame(AVFilterLink *inlink, AVFrame *in, int eof)
144 {
145  AVFilterContext *ctx = inlink->dst;
146  AVFilterLink *outlink = ctx->outputs[0];
147  CrossfeedContext *s = ctx->priv;
148  const double *src = (const double *)in->data[0];
149  const double level_in = s->level_in;
150  const double level_out = s->level_out;
151  const double b0 = s->b0;
152  const double b1 = s->b1;
153  const double b2 = s->b2;
154  const double a1 = -s->a1;
155  const double a2 = -s->a2;
156  AVFrame *out;
157  int drop = 0;
158  double *dst;
159 
160  if (av_frame_is_writable(in) && s->block_samples == 0) {
161  out = in;
162  } else {
163  out = ff_get_audio_buffer(outlink, s->block_samples > 0 ? s->block_samples : in->nb_samples);
164  if (!out) {
165  av_frame_free(&in);
166  return AVERROR(ENOMEM);
167  }
169  }
170  dst = (double *)out->data[0];
171 
172  if (s->block_samples > 0 && s->pts == AV_NOPTS_VALUE)
173  drop = 1;
174 
175  if (s->block_samples == 0) {
176  double w1 = s->w1;
177  double w2 = s->w2;
178 
179  for (int n = 0; n < out->nb_samples; n++, src += 2, dst += 2) {
180  double mid = (src[0] + src[1]) * level_in * .5;
181  double side = (src[0] - src[1]) * level_in * .5;
182  double oside = side * b0 + w1;
183 
184  w1 = b1 * side + w2 + a1 * oside;
185  w2 = b2 * side + a2 * oside;
186 
187  if (ctx->is_disabled) {
188  dst[0] = src[0];
189  dst[1] = src[1];
190  } else {
191  dst[0] = (mid + oside) * level_out;
192  dst[1] = (mid - oside) * level_out;
193  }
194  }
195 
196  s->w1 = w1;
197  s->w2 = w2;
198  } else if (eof) {
199  const double *src = (const double *)in->data[0];
200  double *ssrc = s->side[1] + s->block_samples;
201  double *msrc = s->mid;
202 
203  for (int n = 0; n < out->nb_samples; n++, src += 2, dst += 2) {
204  if (ctx->is_disabled) {
205  dst[0] = src[0];
206  dst[1] = src[1];
207  } else {
208  dst[0] = (msrc[n] + ssrc[n]) * level_out;
209  dst[1] = (msrc[n] - ssrc[n]) * level_out;
210  }
211  }
212  } else {
213  double *mdst = s->mid + s->block_samples;
214  double *sdst = s->side[0] + s->block_samples;
215  double *ssrc = s->side[0];
216  double *msrc = s->mid;
217  double w1 = s->w1;
218  double w2 = s->w2;
219 
220  for (int n = 0; n < out->nb_samples; n++, src += 2) {
221  mdst[n] = (src[0] + src[1]) * level_in * .5;
222  sdst[n] = (src[0] - src[1]) * level_in * .5;
223  }
224 
225  sdst = s->side[1];
226  filter_samples(sdst, ssrc, s->block_samples,
227  b0, b1, b2, a1, a2,
228  &w1, &w2);
229  s->w1 = w1;
230  s->w2 = w2;
231 
232  ssrc = s->side[0] + s->block_samples;
233  sdst = s->side[1] + s->block_samples;
234  filter_samples(sdst, ssrc, s->block_samples,
235  b0, b1, b2, a1, a2,
236  &w1, &w2);
237 
238  reverse_samples(s->side[2], s->side[1], s->block_samples * 2);
239  w1 = w2 = 0.;
240  filter_samples(s->side[2], s->side[2], s->block_samples * 2,
241  b0, b1, b2, a1, a2,
242  &w1, &w2);
243 
244  reverse_samples(s->side[1], s->side[2], s->block_samples * 2);
245 
246  src = (const double *)in->data[0];
247  ssrc = s->side[1];
248  for (int n = 0; n < out->nb_samples; n++, src += 2, dst += 2) {
249  if (ctx->is_disabled) {
250  dst[0] = src[0];
251  dst[1] = src[1];
252  } else {
253  dst[0] = (msrc[n] + ssrc[n]) * level_out;
254  dst[1] = (msrc[n] - ssrc[n]) * level_out;
255  }
256  }
257 
258  memmove(s->mid, s->mid + s->block_samples,
259  s->block_samples * sizeof(*s->mid));
260  memmove(s->side[0], s->side[0] + s->block_samples,
261  s->block_samples * sizeof(*s->side[0]));
262  }
263 
264  if (s->block_samples > 0) {
265  int nb_samples = in->nb_samples;
266  int64_t pts = in->pts;
267 
268  out->pts = s->pts;
269  out->nb_samples = s->nb_samples;
270  s->pts = pts;
271  s->nb_samples = nb_samples;
272  }
273 
274  if (out != in)
275  av_frame_free(&in);
276  if (!drop) {
277  return ff_filter_frame(outlink, out);
278  } else {
279  av_frame_free(&out);
281  return 0;
282  }
283 }
284 
286 {
287  AVFilterLink *inlink = ctx->inputs[0];
288  AVFilterLink *outlink = ctx->outputs[0];
289  CrossfeedContext *s = ctx->priv;
290  AVFrame *in = NULL;
291  int64_t pts;
292  int status;
293  int ret;
294 
296 
297  if (s->block_samples > 0) {
298  ret = ff_inlink_consume_samples(inlink, s->block_samples, s->block_samples, &in);
299  } else {
301  }
302  if (ret < 0)
303  return ret;
304  if (ret > 0)
305  return filter_frame(inlink, in, 0);
306 
307  if (s->block_samples > 0 && ff_inlink_queued_samples(inlink) >= s->block_samples) {
309  return 0;
310  }
311 
313  if (s->block_samples > 0) {
314  AVFrame *in = ff_get_audio_buffer(outlink, s->block_samples);
315  if (!in)
316  return AVERROR(ENOMEM);
317 
318  ret = filter_frame(inlink, in, 1);
319  }
320 
321  ff_outlink_set_status(outlink, status, pts);
322 
323  return ret;
324  }
325 
327 
328  return FFERROR_NOT_READY;
329 }
330 
331 static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
332  char *res, int res_len, int flags)
333 {
334  int ret;
335 
336  ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
337  if (ret < 0)
338  return ret;
339 
340  return config_input(ctx->inputs[0]);
341 }
342 
344 {
345  CrossfeedContext *s = ctx->priv;
346 
347  av_freep(&s->mid);
348  for (int i = 0; i < 3; i++)
349  av_freep(&s->side[i]);
350 }
351 
352 #define OFFSET(x) offsetof(CrossfeedContext, x)
353 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
354 #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
355 
356 static const AVOption crossfeed_options[] = {
357  { "strength", "set crossfeed strength", OFFSET(strength), AV_OPT_TYPE_DOUBLE, {.dbl=.2}, 0, 1, FLAGS },
358  { "range", "set soundstage wideness", OFFSET(range), AV_OPT_TYPE_DOUBLE, {.dbl=.5}, 0, 1, FLAGS },
359  { "slope", "set curve slope", OFFSET(slope), AV_OPT_TYPE_DOUBLE, {.dbl=.5}, .01, 1, FLAGS },
360  { "level_in", "set level in", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=.9}, 0, 1, FLAGS },
361  { "level_out", "set level out", OFFSET(level_out), AV_OPT_TYPE_DOUBLE, {.dbl=1.}, 0, 1, FLAGS },
362  { "block_size", "set the block size", OFFSET(block_size),AV_OPT_TYPE_INT, {.i64=0}, 0, 32768, AF },
363  { NULL }
364 };
365 
366 AVFILTER_DEFINE_CLASS(crossfeed);
367 
368 static const AVFilterPad inputs[] = {
369  {
370  .name = "default",
371  .type = AVMEDIA_TYPE_AUDIO,
372  .config_props = config_input,
373  },
374 };
375 
377  .name = "crossfeed",
378  .description = NULL_IF_CONFIG_SMALL("Apply headphone crossfeed filter."),
379  .priv_size = sizeof(CrossfeedContext),
380  .priv_class = &crossfeed_class,
381  .activate = activate,
382  .uninit = uninit,
387  .process_command = process_command,
388 };
formats
formats
Definition: signature.h:47
A
#define A(x)
Definition: vpx_arith.h:28
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:98
ff_exp10
static av_always_inline double ff_exp10(double x)
Compute 10^x for floating point values.
Definition: ffmath.h:42
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
CrossfeedContext::a1
double a1
Definition: af_crossfeed.c:39
CrossfeedContext::strength
double strength
Definition: af_crossfeed.c:32
out
FILE * out
Definition: movenc.c:55
AV_CHANNEL_LAYOUT_STEREO
#define AV_CHANNEL_LAYOUT_STEREO
Definition: channel_layout.h:393
activate
static int activate(AVFilterContext *ctx)
Definition: af_crossfeed.c:285
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1062
layouts
enum MovChannelLayoutTag * layouts
Definition: mov_chan.c:335
FFERROR_NOT_READY
return FFERROR_NOT_READY
Definition: filter_design.txt:204
reverse_samples
static void reverse_samples(double *dst, const double *src, int nb_samples)
Definition: af_crossfeed.c:113
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_crossfeed.c:331
int64_t
long long int64_t
Definition: coverity.c:34
inputs
static const AVFilterPad inputs[]
Definition: af_crossfeed.c:368
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
AF
#define AF
Definition: af_crossfeed.c:354
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:162
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:389
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_crossfeed.c:77
AVFrame::pts
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
Definition: frame.h:501
CrossfeedContext
Definition: af_crossfeed.c:28
AVOption
AVOption.
Definition: opt.h:429
CrossfeedContext::w1
double w1
Definition: af_crossfeed.c:42
CrossfeedContext::level_in
double level_in
Definition: af_crossfeed.c:34
ff_set_common_channel_layouts_from_list2
int ff_set_common_channel_layouts_from_list2(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out, const AVChannelLayout *fmts)
Definition: formats.c:920
CrossfeedContext::b1
double b1
Definition: af_crossfeed.c:40
crossfeed_options
static const AVOption crossfeed_options[]
Definition: af_crossfeed.c:356
CrossfeedContext::block_size
int block_size
Definition: af_crossfeed.c:37
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:205
FF_FILTER_FORWARD_STATUS_BACK
#define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink)
Forward the status on an output link to an input link.
Definition: filters.h:434
filter_samples
static void filter_samples(double *dst, const double *src, int nb_samples, double b0, double b1, double b2, double a1, double a2, double *sw1, double *sw2)
Definition: af_crossfeed.c:120
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:410
formats.h
ff_inlink_consume_frame
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
Take a frame from the link's FIFO and update the link's stats.
Definition: avfilter.c:1491
b1
static double b1(void *priv, double x, double y)
Definition: vf_xfade.c:2034
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(crossfeed)
pts
static int64_t pts
Definition: transcode_aac.c:644
a2
static double a2(void *priv, double x, double y)
Definition: vf_xfade.c:2030
AVFilterPad
A filter pad used for either input or output.
Definition: filters.h:38
FLAGS
#define FLAGS
Definition: af_crossfeed.c:353
CrossfeedContext::mid
double * mid
Definition: af_crossfeed.c:47
CrossfeedContext::w2
double w2
Definition: af_crossfeed.c:42
ff_af_crossfeed
const AVFilter ff_af_crossfeed
Definition: af_crossfeed.c:376
CrossfeedContext::a2
double a2
Definition: af_crossfeed.c:39
av_cold
#define av_cold
Definition: attributes.h:90
ff_outlink_set_status
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
Definition: filters.h:424
s
#define s(width, name)
Definition: cbs_vp9.c:198
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
Definition: opt.h:267
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
filters.h
ctx
AVFormatContext * ctx
Definition: movenc.c:49
CrossfeedContext::b2
double b2
Definition: af_crossfeed.c:40
CrossfeedContext::nb_samples
int nb_samples
Definition: af_crossfeed.c:45
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
if
if(ret)
Definition: filter_design.txt:179
CrossfeedContext::a0
double a0
Definition: af_crossfeed.c:39
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:75
CrossfeedContext::block_samples
int block_samples
Definition: af_crossfeed.c:36
ff_inlink_consume_samples
int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, AVFrame **rframe)
Take samples from the link's FIFO and update the link's stats.
Definition: avfilter.c:1511
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:713
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in, int eof)
Definition: af_crossfeed.c:143
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:34
CrossfeedContext::range
double range
Definition: af_crossfeed.c:31
ff_inlink_acknowledge_status
int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)
Test and acknowledge the change of status on the link.
Definition: avfilter.c:1438
AVFilterFormatsConfig
Lists of formats / etc.
Definition: avfilter.h:111
CrossfeedContext::pts
int64_t pts
Definition: af_crossfeed.c:44
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:94
AVChannelLayout
An AVChannelLayout holds information about the channel layout of audio data.
Definition: channel_layout.h:317
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:83
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AV_NOPTS_VALUE
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:248
av_frame_is_writable
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
Definition: frame.c:649
range
enum AVColorRange range
Definition: mediacodec_wrapper.c:2464
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:901
b2
static double b2(void *priv, double x, double y)
Definition: vf_xfade.c:2035
FF_FILTER_FORWARD_WANTED
FF_FILTER_FORWARD_WANTED(outlink, inlink)
M_PI
#define M_PI
Definition: mathematics.h:67
AVFrame::nb_samples
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:469
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
CrossfeedContext::level_out
double level_out
Definition: af_crossfeed.c:35
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_crossfeed.c:343
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
AVFilterPad::name
const char * name
Pad name.
Definition: filters.h:44
ff_inlink_queued_samples
int ff_inlink_queued_samples(AVFilterLink *link)
Definition: avfilter.c:1466
av_calloc
void * av_calloc(size_t nmemb, size_t size)
Definition: mem.c:264
AVFilter
Filter definition.
Definition: avfilter.h:201
ret
ret
Definition: filter_design.txt:187
status
ov_status_e status
Definition: dnn_backend_openvino.c:100
ff_set_common_formats_from_list2
int ff_set_common_formats_from_list2(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out, const int *fmts)
Definition: formats.c:1016
channel_layout.h
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
CrossfeedContext::side
double * side[3]
Definition: af_crossfeed.c:48
avfilter.h
ffmath.h
CrossfeedContext::slope
double slope
Definition: af_crossfeed.c:33
AVFilterContext
An instance of a filter.
Definition: avfilter.h:457
mem.h
audio.h
OFFSET
#define OFFSET(x)
Definition: af_crossfeed.c:352
CrossfeedContext::b0
double b0
Definition: af_crossfeed.c:40
alpha
static const int16_t alpha[]
Definition: ilbcdata.h:55
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: af_crossfeed.c:51
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:190
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:482
b0
static double b0(void *priv, double x, double y)
Definition: vf_xfade.c:2033
a1
static double a1(void *priv, double x, double y)
Definition: vf_xfade.c:2029
AV_SAMPLE_FMT_DBL
@ AV_SAMPLE_FMT_DBL
double
Definition: samplefmt.h:61
src
#define src
Definition: vp8dsp.c:248
ff_filter_set_ready
void ff_filter_set_ready(AVFilterContext *filter, unsigned priority)
Mark a filter ready and schedule it for activation.
Definition: avfilter.c:239