FFmpeg
Loading...
Searching...
No Matches
af_adelay.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013 Paul B Mahol
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "libavutil/avstring.h"
22#include "libavutil/mem.h"
23#include "libavutil/opt.h"
24#include "libavutil/samplefmt.h"
25#include "avfilter.h"
26#include "audio.h"
27#include "filters.h"
28
29typedef struct ChanDelay {
32 size_t index;
33 unsigned int samples_size;
34 uint8_t *samples;
35} ChanDelay;
36
37typedef struct AudioDelayContext {
38 const AVClass *class;
39 int all;
40 char *delays;
48 int eof;
49
51
52 void (*delay_channel)(ChanDelay *d, int nb_samples,
53 const uint8_t *src, uint8_t *dst);
56
57#define OFFSET(x) offsetof(AudioDelayContext, x)
58#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
59
60static const AVOption adelay_options[] = {
61 { "delays", "set list of delays for each channel", OFFSET(delays), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, A | AV_OPT_FLAG_RUNTIME_PARAM },
62 { "all", "use last available delay for remained channels", OFFSET(all), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, A },
63 { NULL }
64};
65
67
68#define DELAY(name, type, fill) \
69static void delay_channel_## name ##p(ChanDelay *d, int nb_samples, \
70 const uint8_t *ssrc, uint8_t *ddst) \
71{ \
72 const type *src = (type *)ssrc; \
73 type *dst = (type *)ddst; \
74 type *samples = (type *)d->samples; \
75 \
76 while (nb_samples) { \
77 if (d->delay_index < d->delay) { \
78 const int len = FFMIN(nb_samples, d->delay - d->delay_index); \
79 \
80 memcpy(&samples[d->delay_index], src, len * sizeof(type)); \
81 memset(dst, fill, len * sizeof(type)); \
82 d->delay_index += len; \
83 src += len; \
84 dst += len; \
85 nb_samples -= len; \
86 } else { \
87 *dst = samples[d->index]; \
88 samples[d->index] = *src; \
89 nb_samples--; \
90 d->index++; \
91 src++, dst++; \
92 d->index = d->index >= d->delay ? 0 : d->index; \
93 } \
94 } \
95}
96
97DELAY(u8, uint8_t, 0x80)
98DELAY(s16, int16_t, 0)
99DELAY(s32, int32_t, 0)
100DELAY(flt, float, 0)
101DELAY(dbl, double, 0)
102
103#define CHANGE_DELAY(name, type, fill) \
104static int resize_samples_## name ##p(ChanDelay *d, int64_t new_delay) \
105{ \
106 type *samples; \
107 \
108 if (new_delay == d->delay) { \
109 return 0; \
110 } \
111 \
112 if (new_delay == 0) { \
113 av_freep(&d->samples); \
114 d->samples_size = 0; \
115 d->delay = 0; \
116 d->index = 0; \
117 d->delay_index = 0; \
118 return 0; \
119 } \
120 \
121 if (new_delay > SIZE_MAX / sizeof(type)) { \
122 return AVERROR(ENOMEM); \
123 } \
124 \
125 samples = (type *) d->samples; \
126 if (new_delay > d->delay) { \
127 samples = (type *) av_fast_realloc(d->samples, &d->samples_size, new_delay * sizeof(type)); \
128 if (!samples) { \
129 return AVERROR(ENOMEM); \
130 } \
131 } \
132 \
133 if (new_delay < d->delay) { \
134 const size_t newest_end = d->delay_index < d->delay ? d->delay_index : d->index; \
135 if (newest_end >= new_delay) { \
136 memmove(samples, &samples[newest_end - new_delay], new_delay * sizeof(type)); \
137 d->index = 0; \
138 d->delay_index = new_delay; \
139 } else if (d->delay_index >= d->delay) { \
140 memmove(&samples[d->index], &samples[d->index+(d->delay-new_delay)], \
141 (new_delay - d->index) * sizeof(type)); \
142 d->delay_index -= d->delay - new_delay; \
143 } \
144 } else { \
145 size_t block_size; \
146 if (d->delay_index >= d->delay) { \
147 block_size = (d->delay - d->index) * sizeof(type); \
148 memmove(&samples[d->index+(new_delay - d->delay)], &samples[d->index], block_size); \
149 d->delay_index = new_delay; \
150 block_size = (new_delay - d->delay) * sizeof(type); \
151 memset(&samples[d->index], fill, block_size); \
152 } \
153 } \
154 d->delay = new_delay; \
155 d->samples = (void *) samples; \
156 return 0; \
157}
158
159CHANGE_DELAY(u8, uint8_t, 0x80)
160CHANGE_DELAY(s16, int16_t, 0)
161CHANGE_DELAY(s32, int32_t, 0)
162CHANGE_DELAY(flt, float, 0)
163CHANGE_DELAY(dbl, double, 0)
164
165static int parse_delays(char *p, char **saveptr, int64_t *result, AVFilterContext *ctx, int sample_rate) {
166 double delay, div;
167 char *arg;
168 char suffix;
169
170 if (!(arg = av_strtok(p, "|", saveptr)))
171 return 1;
172
173 suffix = arg[strlen(arg) - 1];
174 if (suffix != 'S') {
175 double delay_samples;
176
177 div = suffix == 's' ? 1.0 : 1000.0;
178 if (av_sscanf(arg, "%lf", &delay) != 1) {
179 av_log(ctx, AV_LOG_ERROR, "Invalid syntax for delay.\n");
180 return AVERROR(EINVAL);
181 }
182 delay_samples = delay * sample_rate / div;
183 if (!isfinite(delay_samples) || delay_samples < -0x1p63 || delay_samples >= 0x1p63) {
184 av_log(ctx, AV_LOG_ERROR, "Delay is out of range.\n");
185 return AVERROR(EINVAL);
186 }
187 *result = delay_samples;
188 } else {
189 char type;
190
191 if (av_sscanf(arg, "%"SCNd64"%c", result, &type) != 2 || type != 'S') {
192 av_log(ctx, AV_LOG_ERROR, "Invalid syntax for delay.\n");
193 return AVERROR(EINVAL);
194 }
195 }
196
197 if (*result < 0) {
198 av_log(ctx, AV_LOG_ERROR, "Delay must be non negative number.\n");
199 return AVERROR(EINVAL);
200 }
201 return 0;
202}
203
204static int config_input(AVFilterLink *inlink)
205{
206 AVFilterContext *ctx = inlink->dst;
207 AudioDelayContext *s = ctx->priv;
208 char *p, *saveptr = NULL;
209 int i;
210
211 s->next_pts = AV_NOPTS_VALUE;
212 s->chandelay = av_calloc(inlink->ch_layout.nb_channels, sizeof(*s->chandelay));
213 if (!s->chandelay)
214 return AVERROR(ENOMEM);
215 s->nb_delays = inlink->ch_layout.nb_channels;
216 s->block_align = av_get_bytes_per_sample(inlink->format);
217
218 p = s->delays;
219 for (i = 0; i < s->nb_delays; i++) {
220 ChanDelay *d = &s->chandelay[i];
221 int ret;
222
223 ret = parse_delays(p, &saveptr, &d->delay, ctx, inlink->sample_rate);
224 if (ret == 1)
225 break;
226 else if (ret < 0)
227 return ret;
228 p = NULL;
229 }
230
231 if (s->all && i) {
232 for (int j = i; j < s->nb_delays; j++)
233 s->chandelay[j].delay = s->chandelay[i-1].delay;
234 }
235
236 s->padding = s->chandelay[0].delay;
237 for (i = 1; i < s->nb_delays; i++) {
238 ChanDelay *d = &s->chandelay[i];
239
240 s->padding = FFMIN(s->padding, d->delay);
241 }
242
243 if (s->padding) {
244 for (i = 0; i < s->nb_delays; i++) {
245 ChanDelay *d = &s->chandelay[i];
246
247 d->delay -= s->padding;
248 }
249
250 s->offset = av_rescale_q(s->padding,
251 av_make_q(1, inlink->sample_rate),
252 inlink->time_base);
253 }
254
255 for (i = 0; i < s->nb_delays; i++) {
256 ChanDelay *d = &s->chandelay[i];
257
258 if (!d->delay)
259 continue;
260
261 if (d->delay > SIZE_MAX) {
262 av_log(ctx, AV_LOG_ERROR, "Requested delay is too big.\n");
263 return AVERROR(EINVAL);
264 }
265
266 d->samples = av_malloc_array(d->delay, s->block_align);
267 if (!d->samples)
268 return AVERROR(ENOMEM);
269 d->samples_size = d->delay * s->block_align;
270
271 s->max_delay = FFMAX(s->max_delay, d->delay);
272 }
273
274 switch (inlink->format) {
275 case AV_SAMPLE_FMT_U8P : s->delay_channel = delay_channel_u8p ;
276 s->resize_channel_samples = resize_samples_u8p; break;
277 case AV_SAMPLE_FMT_S16P: s->delay_channel = delay_channel_s16p;
278 s->resize_channel_samples = resize_samples_s16p; break;
279 case AV_SAMPLE_FMT_S32P: s->delay_channel = delay_channel_s32p;
280 s->resize_channel_samples = resize_samples_s32p; break;
281 case AV_SAMPLE_FMT_FLTP: s->delay_channel = delay_channel_fltp;
282 s->resize_channel_samples = resize_samples_fltp; break;
283 case AV_SAMPLE_FMT_DBLP: s->delay_channel = delay_channel_dblp;
284 s->resize_channel_samples = resize_samples_dblp; break;
285 }
286
287 return 0;
288}
289
290static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
291 char *res, int res_len, int flags)
292{
293 int ret = AVERROR(ENOSYS);
294 AVFilterLink *inlink = ctx->inputs[0];
295 AudioDelayContext *s = ctx->priv;
296
297 if (!strcmp(cmd, "delays")) {
298 int64_t delay;
299 char *p, *saveptr = NULL;
300 int64_t all_delay = -1;
301 int64_t max_delay = 0;
302 char *args_cpy = av_strdup(args);
303 if (args_cpy == NULL) {
304 return AVERROR(ENOMEM);
305 }
306
307 ret = 0;
308 p = args_cpy;
309
310 if (!strncmp(args, "all:", 4)) {
311 p = &args_cpy[4];
312 ret = parse_delays(p, &saveptr, &all_delay, ctx, inlink->sample_rate);
313 if (ret == 1)
314 ret = AVERROR(EINVAL);
315 else if (ret == 0)
316 delay = all_delay;
317 }
318
319 if (!ret) {
320 for (int i = 0; i < s->nb_delays; i++) {
321 ChanDelay *d = &s->chandelay[i];
322
323 if (all_delay < 0) {
324 ret = parse_delays(p, &saveptr, &delay, ctx, inlink->sample_rate);
325 if (ret != 0) {
326 ret = 0;
327 break;
328 }
329 p = NULL;
330 }
331
332 ret = s->resize_channel_samples(d, delay);
333 if (ret)
334 break;
335 max_delay = FFMAX(max_delay, d->delay);
336 }
337 s->max_delay = FFMAX(s->max_delay, max_delay);
338 }
339 av_freep(&args_cpy);
340 }
341 return ret;
342}
343
345{
346 AVFilterContext *ctx = inlink->dst;
347 AVFilterLink *outlink = ctx->outputs[0];
348 AudioDelayContext *s = ctx->priv;
349 AVFrame *out_frame;
350 int i;
351
352 if (ctx->is_disabled || !s->delays) {
353 s->input = NULL;
354 return ff_filter_frame(outlink, frame);
355 }
356
357 s->next_pts = av_rescale_q(frame->pts, inlink->time_base, outlink->time_base);
358
359 out_frame = ff_get_audio_buffer(outlink, frame->nb_samples);
360 if (!out_frame) {
361 s->input = NULL;
363 return AVERROR(ENOMEM);
364 }
365 av_frame_copy_props(out_frame, frame);
366
367 for (i = 0; i < s->nb_delays; i++) {
368 ChanDelay *d = &s->chandelay[i];
369 const uint8_t *src = frame->extended_data[i];
370 uint8_t *dst = out_frame->extended_data[i];
371
372 if (!d->delay)
373 memcpy(dst, src, frame->nb_samples * s->block_align);
374 else
375 s->delay_channel(d, frame->nb_samples, src, dst);
376 }
377
378 out_frame->pts = s->next_pts + s->offset;
379 out_frame->duration = av_rescale_q(out_frame->nb_samples, (AVRational){1, outlink->sample_rate}, outlink->time_base);
380 s->next_pts += out_frame->duration;
382 s->input = NULL;
383 return ff_filter_frame(outlink, out_frame);
384}
385
387{
388 AVFilterLink *inlink = ctx->inputs[0];
389 AVFilterLink *outlink = ctx->outputs[0];
390 AudioDelayContext *s = ctx->priv;
391 AVFrame *frame = NULL;
392 int ret, status;
393 int64_t pts;
394
395 FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink);
396
397 if (!s->input) {
398 ret = ff_inlink_consume_frame(inlink, &s->input);
399 if (ret < 0)
400 return ret;
401 }
402
403 if (ff_inlink_acknowledge_status(inlink, &status, &pts)) {
404 if (status == AVERROR_EOF)
405 s->eof = 1;
406 }
407
408 if (s->next_pts == AV_NOPTS_VALUE && pts != AV_NOPTS_VALUE)
409 s->next_pts = av_rescale_q(pts, inlink->time_base, outlink->time_base);
410
411 if (s->padding) {
412 int nb_samples = FFMIN(s->padding, 2048);
413
414 frame = ff_get_audio_buffer(outlink, nb_samples);
415 if (!frame)
416 return AVERROR(ENOMEM);
417 s->padding -= nb_samples;
418
419 av_samples_set_silence(frame->extended_data, 0,
420 frame->nb_samples,
421 outlink->ch_layout.nb_channels,
422 frame->format);
423
424 frame->duration = av_rescale_q(frame->nb_samples,
425 (AVRational){1, outlink->sample_rate},
426 outlink->time_base);
427 frame->pts = s->next_pts;
428 s->next_pts += frame->duration;
429
430 return ff_filter_frame(outlink, frame);
431 }
432
433 if (s->input)
434 return filter_frame(inlink, s->input);
435
436 if (s->eof && s->max_delay) {
437 int nb_samples = FFMIN(s->max_delay, 2048);
438
439 frame = ff_get_audio_buffer(outlink, nb_samples);
440 if (!frame)
441 return AVERROR(ENOMEM);
442 s->max_delay -= nb_samples;
443
444 av_samples_set_silence(frame->extended_data, 0,
445 frame->nb_samples,
446 outlink->ch_layout.nb_channels,
447 frame->format);
448
449 frame->duration = av_rescale_q(frame->nb_samples,
450 (AVRational){1, outlink->sample_rate},
451 outlink->time_base);
452 frame->pts = s->next_pts;
453 s->next_pts += frame->duration;
454 return filter_frame(inlink, frame);
455 }
456
457 if (s->eof && s->max_delay == 0) {
458 ff_outlink_set_status(outlink, AVERROR_EOF, s->next_pts);
459 return 0;
460 }
461
462 if (!s->eof)
463 FF_FILTER_FORWARD_WANTED(outlink, inlink);
464
465 return FFERROR_NOT_READY;
466}
467
469{
470 AudioDelayContext *s = ctx->priv;
471
472 if (s->chandelay) {
473 for (int i = 0; i < s->nb_delays; i++)
474 av_freep(&s->chandelay[i].samples);
475 }
476 av_freep(&s->chandelay);
477}
478
479static const AVFilterPad adelay_inputs[] = {
480 {
481 .name = "default",
482 .type = AVMEDIA_TYPE_AUDIO,
483 .config_props = config_input,
484 },
485};
486
488 .p.name = "adelay",
489 .p.description = NULL_IF_CONFIG_SMALL("Delay one or more audio channels."),
490 .p.priv_class = &adelay_class,
492 .priv_size = sizeof(AudioDelayContext),
494 .uninit = uninit,
499 .process_command = process_command,
500};
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:97
static int config_input(AVFilterLink *inlink)
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
#define DELAY(name, type, fill)
Definition af_adelay.c:68
static const AVOption adelay_options[]
Definition af_adelay.c:60
static const AVFilterPad adelay_inputs[]
Definition af_adelay.c:479
const FFFilter ff_af_adelay
Definition af_adelay.c:487
static int config_input(AVFilterLink *inlink)
Definition af_adelay.c:204
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition af_adelay.c:344
#define CHANGE_DELAY(name, type, fill)
Definition af_adelay.c:103
static int parse_delays(char *p, char **saveptr, int64_t *result, AVFilterContext *ctx, int sample_rate)
Definition af_adelay.c:165
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition af_adelay.c:290
static int activate(AVFilterContext *ctx)
Definition af_adelay.c:386
static av_cold void uninit(AVFilterContext *ctx)
Definition af_adelay.c:468
#define OFFSET(x)
Definition af_adelay.c:57
static AVFormatContext * ctx
#define A(x)
Definition vpx_arith.h:28
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
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
Definition audio.c:74
int32_t
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:1507
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition avfilter.c:1112
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:1560
Main libavfilter public API header.
int av_sscanf(const char *string, const char *format,...)
Definition avsscanf.c:932
#define flags(name, subs,...)
Definition cbs_h264.c:74
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define s(width, name)
Definition cbs_vp9.c:198
#define NULL
Definition coverity.c:32
long long int64_t
Definition coverity.c:34
static AVFrame * frame
int ret
Definition ffplay.c:391
#define AV_OPT_FLAG_RUNTIME_PARAM
A generic parameter which can be set by the user at runtime.
Definition opt.h:376
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition opt.h:326
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition opt.h:275
#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:210
#define AVERROR_EOF
End of file.
Definition error.h:57
#define AVERROR(e)
Definition error.h:45
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition frame.c:65
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition frame.c:603
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition log.h:210
static AVRational av_make_q(int num, int den)
Create an AVRational.
Definition rational.h:71
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
Return number of bytes per sample.
Definition samplefmt.c:109
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition samplefmt.h:66
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition samplefmt.h:64
@ AV_SAMPLE_FMT_U8P
unsigned 8 bits, planar
Definition samplefmt.h:63
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
Definition samplefmt.h:65
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition samplefmt.h:67
int av_samples_set_silence(uint8_t *const *audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Fill an audio buffer with silence.
Definition samplefmt.c:247
char * av_strtok(char *s, const char *delim, char **saveptr)
Split the string into several tokens which can be accessed by successive calls to av_strtok().
Definition avstring.c:179
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition avutil.h:247
enum MPFType type
Definition jpegmpfenc.c:55
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int activate(AVBitStreamFilterContext *ctx)
const char * arg
Definition jacosubdec.c:66
#define FILTER_INPUTS(array)
Definition filters.h:279
#define FILTER_OUTPUTS(array)
Definition filters.h:280
#define FILTER_SAMPLEFMTS(...)
Definition filters.h:267
#define FF_FILTER_FORWARD_WANTED(outlink, inlink)
Forward the frame_wanted_out flag from an output link to an input link.
Definition filters.h:744
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:679
#define FFERROR_NOT_READY
Filters implementation helper functions and internal structures.
Definition filters.h:34
#define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink)
Forward the status on an output link to an input link.
Definition filters.h:689
#define AVFILTER_DEFINE_CLASS(fname)
Definition filters.h:493
#define av_cold
Definition attributes.h:117
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:98
#define FFMIN(a, b)
Definition macros.h:49
#define FFMAX(a, b)
Definition macros.h:47
void * av_calloc(size_t nmemb, size_t size)
Definition mem.c:370
Memory handling functions.
#define av_strdup(s)
Definition ops_static.c:55
AVOptions.
int nb_channels
Number of channels in this layout.
Describe the class of an AVClass context structure.
Definition log.h:76
An instance of a filter.
Definition avfilter.h:279
A filter pad used for either input or output.
Definition filters.h:40
This structure describes decoded (raw) audio or video data.
Definition frame.h:479
int nb_samples
number of audio samples (per channel) described by this frame
Definition frame.h:559
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
Definition frame.h:581
int64_t duration
Duration of the frame, in the same units as pts.
Definition frame.h:830
uint8_t ** extended_data
pointers to the data planes/channels.
Definition frame.h:540
AVOption.
Definition opt.h:428
Rational number (pair of numerator and denominator).
Definition rational.h:58
ChanDelay * chandelay
Definition af_adelay.c:41
int(* resize_channel_samples)(ChanDelay *d, int64_t new_delay)
Definition af_adelay.c:54
AVFrame * input
Definition af_adelay.c:50
int64_t max_delay
Definition af_adelay.c:45
void(* delay_channel)(ChanDelay *d, int nb_samples, const uint8_t *src, uint8_t *dst)
Definition af_adelay.c:52
size_t delay_index
Definition af_adelay.c:31
int64_t delay
Definition af_adelay.c:30
size_t index
Definition af_adelay.c:32
unsigned int samples_size
Definition af_adelay.c:33
uint8_t * samples
Definition af_adelay.c:34
#define av_malloc_array(a, b)
#define av_freep(p)
#define av_log(a,...)
#define src
Definition vp8dsp.c:248
static int64_t pts