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/opt.h"
22 #include "avfilter.h"
23 #include "audio.h"
24 #include "filters.h"
25 #include "formats.h"
26 
27 typedef struct CrossfeedContext {
28  const AVClass *class;
29 
30  double range;
31  double strength;
32  double slope;
33  double level_in;
34  double level_out;
37 
38  double a0, a1, a2;
39  double b0, b1, b2;
40 
41  double w1, w2;
42 
43  int64_t pts;
45 
46  double *mid;
47  double *side[3];
49 
51 {
54  int ret;
55 
56  if ((ret = ff_add_format (&formats, AV_SAMPLE_FMT_DBL )) < 0 ||
57  (ret = ff_set_common_formats (ctx , formats )) < 0 ||
61  return ret;
62 
63  return 0;
64 }
65 
67 {
68  AVFilterContext *ctx = inlink->dst;
69  CrossfeedContext *s = ctx->priv;
70  double A = ff_exp10(s->strength * -30 / 40);
71  double w0 = 2 * M_PI * (1. - s->range) * 2100 / inlink->sample_rate;
72  double alpha;
73 
74  alpha = sin(w0) / 2 * sqrt((A + 1 / A) * (1 / s->slope - 1) + 2);
75 
76  s->a0 = (A + 1) + (A - 1) * cos(w0) + 2 * sqrt(A) * alpha;
77  s->a1 = -2 * ((A - 1) + (A + 1) * cos(w0));
78  s->a2 = (A + 1) + (A - 1) * cos(w0) - 2 * sqrt(A) * alpha;
79  s->b0 = A * ((A + 1) - (A - 1) * cos(w0) + 2 * sqrt(A) * alpha);
80  s->b1 = 2 * A * ((A - 1) - (A + 1) * cos(w0));
81  s->b2 = A * ((A + 1) - (A - 1) * cos(w0) - 2 * sqrt(A) * alpha);
82 
83  s->a1 /= s->a0;
84  s->a2 /= s->a0;
85  s->b0 /= s->a0;
86  s->b1 /= s->a0;
87  s->b2 /= s->a0;
88 
89  if (s->block_samples == 0 && s->block_size > 0) {
90  s->block_samples = s->block_size;
91  s->mid = av_calloc(s->block_samples * 2, sizeof(*s->mid));
92  for (int i = 0; i < 3; i++) {
93  s->side[i] = av_calloc(s->block_samples * 2, sizeof(*s->side[0]));
94  if (!s->side[i])
95  return AVERROR(ENOMEM);
96  }
97  }
98 
99  return 0;
100 }
101 
102 static void reverse_samples(double *dst, const double *src,
103  int nb_samples)
104 {
105  for (int i = 0, j = nb_samples - 1; i < nb_samples; i++, j--)
106  dst[i] = src[j];
107 }
108 
109 static void filter_samples(double *dst, const double *src,
110  int nb_samples,
111  double b0, double b1, double b2,
112  double a1, double a2,
113  double *sw1, double *sw2)
114 {
115  double w1 = *sw1;
116  double w2 = *sw2;
117 
118  for (int n = 0; n < nb_samples; n++) {
119  double side = src[n];
120  double oside = side * b0 + w1;
121 
122  w1 = b1 * side + w2 + a1 * oside;
123  w2 = b2 * side + a2 * oside;
124 
125  dst[n] = oside;
126  }
127 
128  *sw1 = w1;
129  *sw2 = w2;
130 }
131 
132 static int filter_frame(AVFilterLink *inlink, AVFrame *in, int eof)
133 {
134  AVFilterContext *ctx = inlink->dst;
135  AVFilterLink *outlink = ctx->outputs[0];
136  CrossfeedContext *s = ctx->priv;
137  const double *src = (const double *)in->data[0];
138  const double level_in = s->level_in;
139  const double level_out = s->level_out;
140  const double b0 = s->b0;
141  const double b1 = s->b1;
142  const double b2 = s->b2;
143  const double a1 = -s->a1;
144  const double a2 = -s->a2;
145  AVFrame *out;
146  int drop = 0;
147  double *dst;
148 
149  if (av_frame_is_writable(in) && s->block_samples == 0) {
150  out = in;
151  } else {
152  out = ff_get_audio_buffer(outlink, s->block_samples > 0 ? s->block_samples : in->nb_samples);
153  if (!out) {
154  av_frame_free(&in);
155  return AVERROR(ENOMEM);
156  }
158  }
159  dst = (double *)out->data[0];
160 
161  if (s->block_samples > 0 && s->pts == AV_NOPTS_VALUE)
162  drop = 1;
163 
164  if (s->block_samples == 0) {
165  double w1 = s->w1;
166  double w2 = s->w2;
167 
168  for (int n = 0; n < out->nb_samples; n++, src += 2, dst += 2) {
169  double mid = (src[0] + src[1]) * level_in * .5;
170  double side = (src[0] - src[1]) * level_in * .5;
171  double oside = side * b0 + w1;
172 
173  w1 = b1 * side + w2 + a1 * oside;
174  w2 = b2 * side + a2 * oside;
175 
176  if (ctx->is_disabled) {
177  dst[0] = src[0];
178  dst[1] = src[1];
179  } else {
180  dst[0] = (mid + oside) * level_out;
181  dst[1] = (mid - oside) * level_out;
182  }
183  }
184 
185  s->w1 = w1;
186  s->w2 = w2;
187  } else if (eof) {
188  const double *src = (const double *)in->data[0];
189  double *ssrc = s->side[1] + s->block_samples;
190  double *msrc = s->mid;
191 
192  for (int n = 0; n < out->nb_samples; n++, src += 2, dst += 2) {
193  if (ctx->is_disabled) {
194  dst[0] = src[0];
195  dst[1] = src[1];
196  } else {
197  dst[0] = (msrc[n] + ssrc[n]) * level_out;
198  dst[1] = (msrc[n] - ssrc[n]) * level_out;
199  }
200  }
201  } else {
202  double *mdst = s->mid + s->block_samples;
203  double *sdst = s->side[0] + s->block_samples;
204  double *ssrc = s->side[0];
205  double *msrc = s->mid;
206  double w1 = s->w1;
207  double w2 = s->w2;
208 
209  for (int n = 0; n < out->nb_samples; n++, src += 2) {
210  mdst[n] = (src[0] + src[1]) * level_in * .5;
211  sdst[n] = (src[0] - src[1]) * level_in * .5;
212  }
213 
214  sdst = s->side[1];
215  filter_samples(sdst, ssrc, s->block_samples,
216  b0, b1, b2, a1, a2,
217  &w1, &w2);
218  s->w1 = w1;
219  s->w2 = w2;
220 
221  ssrc = s->side[0] + s->block_samples;
222  sdst = s->side[1] + s->block_samples;
223  filter_samples(sdst, ssrc, s->block_samples,
224  b0, b1, b2, a1, a2,
225  &w1, &w2);
226 
227  reverse_samples(s->side[2], s->side[1], s->block_samples * 2);
228  w1 = w2 = 0.;
229  filter_samples(s->side[2], s->side[2], s->block_samples * 2,
230  b0, b1, b2, a1, a2,
231  &w1, &w2);
232 
233  reverse_samples(s->side[1], s->side[2], s->block_samples * 2);
234 
235  src = (const double *)in->data[0];
236  ssrc = s->side[1];
237  for (int n = 0; n < out->nb_samples; n++, src += 2, dst += 2) {
238  if (ctx->is_disabled) {
239  dst[0] = src[0];
240  dst[1] = src[1];
241  } else {
242  dst[0] = (msrc[n] + ssrc[n]) * level_out;
243  dst[1] = (msrc[n] - ssrc[n]) * level_out;
244  }
245  }
246 
247  memmove(s->mid, s->mid + s->block_samples,
248  s->block_samples * sizeof(*s->mid));
249  memmove(s->side[0], s->side[0] + s->block_samples,
250  s->block_samples * sizeof(*s->side[0]));
251  }
252 
253  if (s->block_samples > 0) {
254  int nb_samples = in->nb_samples;
255  int64_t pts = in->pts;
256 
257  out->pts = s->pts;
258  out->nb_samples = s->nb_samples;
259  s->pts = pts;
260  s->nb_samples = nb_samples;
261  }
262 
263  if (out != in)
264  av_frame_free(&in);
265  if (!drop) {
266  return ff_filter_frame(outlink, out);
267  } else {
268  av_frame_free(&out);
270  return 0;
271  }
272 }
273 
275 {
276  AVFilterLink *inlink = ctx->inputs[0];
277  AVFilterLink *outlink = ctx->outputs[0];
278  CrossfeedContext *s = ctx->priv;
279  AVFrame *in = NULL;
280  int64_t pts;
281  int status;
282  int ret;
283 
285 
286  if (s->block_samples > 0) {
287  ret = ff_inlink_consume_samples(inlink, s->block_samples, s->block_samples, &in);
288  } else {
290  }
291  if (ret < 0)
292  return ret;
293  if (ret > 0)
294  return filter_frame(inlink, in, 0);
295 
296  if (s->block_samples > 0 && ff_inlink_queued_samples(inlink) >= s->block_samples) {
298  return 0;
299  }
300 
302  if (s->block_samples > 0) {
303  AVFrame *in = ff_get_audio_buffer(outlink, s->block_samples);
304  if (!in)
305  return AVERROR(ENOMEM);
306 
307  ret = filter_frame(inlink, in, 1);
308  }
309 
310  ff_outlink_set_status(outlink, status, pts);
311 
312  return ret;
313  }
314 
316 
317  return FFERROR_NOT_READY;
318 }
319 
320 static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
321  char *res, int res_len, int flags)
322 {
323  int ret;
324 
325  ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
326  if (ret < 0)
327  return ret;
328 
329  return config_input(ctx->inputs[0]);
330 }
331 
333 {
334  CrossfeedContext *s = ctx->priv;
335 
336  av_freep(&s->mid);
337  for (int i = 0; i < 3; i++)
338  av_freep(&s->side[i]);
339 }
340 
341 #define OFFSET(x) offsetof(CrossfeedContext, x)
342 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
343 #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
344 
345 static const AVOption crossfeed_options[] = {
346  { "strength", "set crossfeed strength", OFFSET(strength), AV_OPT_TYPE_DOUBLE, {.dbl=.2}, 0, 1, FLAGS },
347  { "range", "set soundstage wideness", OFFSET(range), AV_OPT_TYPE_DOUBLE, {.dbl=.5}, 0, 1, FLAGS },
348  { "slope", "set curve slope", OFFSET(slope), AV_OPT_TYPE_DOUBLE, {.dbl=.5}, .01, 1, FLAGS },
349  { "level_in", "set level in", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=.9}, 0, 1, FLAGS },
350  { "level_out", "set level out", OFFSET(level_out), AV_OPT_TYPE_DOUBLE, {.dbl=1.}, 0, 1, FLAGS },
351  { "block_size", "set the block size", OFFSET(block_size),AV_OPT_TYPE_INT, {.i64=0}, 0, 32768, AF },
352  { NULL }
353 };
354 
355 AVFILTER_DEFINE_CLASS(crossfeed);
356 
357 static const AVFilterPad inputs[] = {
358  {
359  .name = "default",
360  .type = AVMEDIA_TYPE_AUDIO,
361  .config_props = config_input,
362  },
363 };
364 
365 static const AVFilterPad outputs[] = {
366  {
367  .name = "default",
368  .type = AVMEDIA_TYPE_AUDIO,
369  },
370 };
371 
373  .name = "crossfeed",
374  .description = NULL_IF_CONFIG_SMALL("Apply headphone crossfeed filter."),
375  .priv_size = sizeof(CrossfeedContext),
376  .priv_class = &crossfeed_class,
377  .activate = activate,
378  .uninit = uninit,
383  .process_command = process_command,
384 };
formats
formats
Definition: signature.h:48
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:100
AVFilterChannelLayouts
A list of supported channel layouts.
Definition: formats.h:85
status
they must not be accessed directly The fifo field contains the frames that are queued in the input for processing by the filter The status_in and status_out fields contains the queued status(EOF or error) of the link
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:38
CrossfeedContext::strength
double strength
Definition: af_crossfeed.c:31
out
FILE * out
Definition: movenc.c:54
activate
static int activate(AVFilterContext *ctx)
Definition: af_crossfeed.c:274
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:999
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:102
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:320
inputs
static const AVFilterPad inputs[]
Definition: af_crossfeed.c:357
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:343
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:116
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:325
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_crossfeed.c:66
AVFrame::pts
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
Definition: frame.h:432
CrossfeedContext
Definition: af_crossfeed.c:27
AVOption
AVOption.
Definition: opt.h:251
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:167
CrossfeedContext::w1
double w1
Definition: af_crossfeed.c:41
CrossfeedContext::level_in
double level_in
Definition: af_crossfeed.c:33
CrossfeedContext::b1
double b1
Definition: af_crossfeed.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:739
crossfeed_options
static const AVOption crossfeed_options[]
Definition: af_crossfeed.c:345
CrossfeedContext::block_size
int block_size
Definition: af_crossfeed.c:36
AV_CHANNEL_LAYOUT_STEREO
#define AV_CHANNEL_LAYOUT_STEREO
Definition: channel_layout.h:354
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:175
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:199
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:109
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:346
AVFilterFormats
A list of supported formats for one end of a filter link.
Definition: formats.h:64
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:1394
b1
static double b1(void *priv, double x, double y)
Definition: vf_xfade.c:1771
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(crossfeed)
pts
static int64_t pts
Definition: transcode_aac.c:654
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:49
FLAGS
#define FLAGS
Definition: af_crossfeed.c:342
a1
#define a1
Definition: regdef.h:47
CrossfeedContext::mid
double * mid
Definition: af_crossfeed.c:46
CrossfeedContext::w2
double w2
Definition: af_crossfeed.c:41
ff_af_crossfeed
const AVFilter ff_af_crossfeed
Definition: af_crossfeed.c:372
CrossfeedContext::a2
double a2
Definition: af_crossfeed.c:38
av_cold
#define av_cold
Definition: attributes.h:90
ff_set_common_formats
int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
A helper for query_formats() which sets all links to the same list of formats.
Definition: formats.c:749
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:189
s
#define s(width, name)
Definition: cbs_vp9.c:256
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:227
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
filters.h
ctx
AVFormatContext * ctx
Definition: movenc.c:48
CrossfeedContext::b2
double b2
Definition: af_crossfeed.c:39
CrossfeedContext::nb_samples
int nb_samples
Definition: af_crossfeed.c:44
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:190
if
if(ret)
Definition: filter_design.txt:179
CrossfeedContext::a0
double a0
Definition: af_crossfeed.c:38
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
CrossfeedContext::block_samples
int block_samples
Definition: af_crossfeed.c:35
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:1413
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:603
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in, int eof)
Definition: af_crossfeed.c:132
ff_add_format
int ff_add_format(AVFilterFormats **avff, int64_t fmt)
Add fmt to the list of media formats contained in *avff.
Definition: formats.c:449
outputs
static const AVFilterPad outputs[]
Definition: af_crossfeed.c:365
CrossfeedContext::range
double range
Definition: af_crossfeed.c:30
ff_add_channel_layout
int ff_add_channel_layout(AVFilterChannelLayouts **l, const AVChannelLayout *channel_layout)
Definition: formats.c:466
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:1348
CrossfeedContext::pts
int64_t pts
Definition: af_crossfeed.c:43
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
AVChannelLayout
An AVChannelLayout holds information about the channel layout of audio data.
Definition: channel_layout.h:290
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
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:533
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:863
b2
static double b2(void *priv, double x, double y)
Definition: vf_xfade.c:1772
FF_FILTER_FORWARD_WANTED
FF_FILTER_FORWARD_WANTED(outlink, inlink)
M_PI
#define M_PI
Definition: mathematics.h:52
layout
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 layout
Definition: filter_design.txt:18
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_crossfeed.c:50
AVFrame::nb_samples
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:405
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
CrossfeedContext::level_out
double level_out
Definition: af_crossfeed.c:34
a2
#define a2
Definition: regdef.h:48
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_crossfeed.c:332
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:55
ff_inlink_queued_samples
int ff_inlink_queued_samples(AVFilterLink *link)
Definition: avfilter.c:1373
av_calloc
void * av_calloc(size_t nmemb, size_t size)
Definition: mem.c:272
AVFilter
Filter definition.
Definition: avfilter.h:171
ret
ret
Definition: filter_design.txt:187
channel_layout.h
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
CrossfeedContext::side
double * side[3]
Definition: af_crossfeed.c:47
avfilter.h
ffmath.h
CrossfeedContext::slope
double slope
Definition: af_crossfeed.c:32
AVFilterContext
An instance of a filter.
Definition: avfilter.h:408
audio.h
OFFSET
#define OFFSET(x)
Definition: af_crossfeed.c:341
CrossfeedContext::b0
double b0
Definition: af_crossfeed.c:39
alpha
static const int16_t alpha[]
Definition: ilbcdata.h:55
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:191
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
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:160
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
b0
static double b0(void *priv, double x, double y)
Definition: vf_xfade.c:1770
AV_SAMPLE_FMT_DBL
@ AV_SAMPLE_FMT_DBL
double
Definition: samplefmt.h:61
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:191
ff_set_common_channel_layouts
int ff_set_common_channel_layouts(AVFilterContext *ctx, AVFilterChannelLayouts *channel_layouts)
Helpers for query_formats() which set all free audio links to the same list of channel layouts/sample...
Definition: formats.c:708