FFmpeg  4.4.8
af_crystalizer.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 The FFmpeg Project
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 
22 #include "libavutil/opt.h"
23 #include "avfilter.h"
24 #include "filters.h"
25 #include "audio.h"
26 #include "formats.h"
27 
28 typedef struct CrystalizerContext {
29  const AVClass *class;
30  float mult;
31  int clip;
33  int (*filter)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
35 
36 #define OFFSET(x) offsetof(CrystalizerContext, x)
37 #define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
38 
39 static const AVOption crystalizer_options[] = {
40  { "i", "set intensity", OFFSET(mult), AV_OPT_TYPE_FLOAT, {.dbl=2.0},-10, 10, A },
41  { "c", "enable clipping", OFFSET(clip), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, A },
42  { NULL }
43 };
44 
45 AVFILTER_DEFINE_CLASS(crystalizer);
46 
48 {
51  static const enum AVSampleFormat sample_fmts[] = {
55  };
56  int ret;
57 
59  if (!formats)
60  return AVERROR(ENOMEM);
62  if (ret < 0)
63  return ret;
64 
66  if (!layouts)
67  return AVERROR(ENOMEM);
68 
70  if (ret < 0)
71  return ret;
72 
75 }
76 
77 typedef struct ThreadData {
78  void **d;
79  void **p;
80  const void **s;
81  int nb_samples;
82  int channels;
83  float mult;
84  int clip;
85 } ThreadData;
86 
87 static int filter_flt(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
88 {
89  ThreadData *td = arg;
90  void **d = td->d;
91  void **p = td->p;
92  const void **s = td->s;
93  const int nb_samples = td->nb_samples;
94  const int channels = td->channels;
95  const float mult = td->mult;
96  const int clip = td->clip;
97  const int start = ff_slice_pos(channels, jobnr, nb_jobs);
98  const int end = ff_slice_pos(channels, jobnr + 1, nb_jobs);
99  float *prv = p[0];
100  int n, c;
101 
102  for (c = start; c < end; c++) {
103  const float *src = s[0];
104  float *dst = d[0];
105 
106  for (n = 0; n < nb_samples; n++) {
107  float current = src[c];
108  dst[c] = current + (current - prv[c]) * mult;
109  prv[c] = current;
110  if (clip) {
111  dst[c] = av_clipf(dst[c], -1, 1);
112  }
113 
114  dst += channels;
115  src += channels;
116  }
117  }
118 
119  return 0;
120 }
121 
122 static int filter_dbl(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
123 {
124  ThreadData *td = arg;
125  void **d = td->d;
126  void **p = td->p;
127  const void **s = td->s;
128  const int nb_samples = td->nb_samples;
129  const int channels = td->channels;
130  double mult = td->mult;
131  const int clip = td->clip;
132  const int start = ff_slice_pos(channels, jobnr, nb_jobs);
133  const int end = ff_slice_pos(channels, jobnr + 1, nb_jobs);
134  double *prv = p[0];
135  int n, c;
136 
137  for (c = start; c < end; c++) {
138  const double *src = s[0];
139  double *dst = d[0];
140 
141  for (n = 0; n < nb_samples; n++) {
142  double current = src[c];
143 
144  dst[c] = current + (current - prv[c]) * mult;
145  prv[c] = current;
146  if (clip) {
147  dst[c] = av_clipd(dst[c], -1, 1);
148  }
149 
150  dst += channels;
151  src += channels;
152  }
153  }
154 
155  return 0;
156 }
157 
158 static int filter_fltp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
159 {
160  ThreadData *td = arg;
161  void **d = td->d;
162  void **p = td->p;
163  const void **s = td->s;
164  const int nb_samples = td->nb_samples;
165  const int channels = td->channels;
166  float mult = td->mult;
167  const int clip = td->clip;
168  const int start = ff_slice_pos(channels, jobnr, nb_jobs);
169  const int end = ff_slice_pos(channels, jobnr + 1, nb_jobs);
170  int n, c;
171 
172  for (c = start; c < end; c++) {
173  const float *src = s[c];
174  float *dst = d[c];
175  float *prv = p[c];
176 
177  for (n = 0; n < nb_samples; n++) {
178  float current = src[n];
179 
180  dst[n] = current + (current - prv[0]) * mult;
181  prv[0] = current;
182  if (clip) {
183  dst[n] = av_clipf(dst[n], -1, 1);
184  }
185  }
186  }
187 
188  return 0;
189 }
190 
191 static int filter_dblp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
192 {
193  ThreadData *td = arg;
194  void **d = td->d;
195  void **p = td->p;
196  const void **s = td->s;
197  const int nb_samples = td->nb_samples;
198  const int channels = td->channels;
199  const double mult = td->mult;
200  const int clip = td->clip;
201  const int start = ff_slice_pos(channels, jobnr, nb_jobs);
202  const int end = ff_slice_pos(channels, jobnr + 1, nb_jobs);
203  int n, c;
204 
205  for (c = start; c < end; c++) {
206  const double *src = s[c];
207  double *dst = d[c];
208  double *prv = p[c];
209 
210  for (n = 0; n < nb_samples; n++) {
211  double current = src[n];
212 
213  dst[n] = current + (current - prv[0]) * mult;
214  prv[0] = current;
215  if (clip) {
216  dst[n] = av_clipd(dst[n], -1, 1);
217  }
218  }
219  }
220 
221  return 0;
222 }
223 
224 static int ifilter_flt(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
225 {
226  ThreadData *td = arg;
227  void **d = td->d;
228  void **p = td->p;
229  const void **s = td->s;
230  const int nb_samples = td->nb_samples;
231  const int channels = td->channels;
232  const float mult = -td->mult;
233  const float div = -td->mult + 1.f;
234  const int clip = td->clip;
235  const int start = ff_slice_pos(channels, jobnr, nb_jobs);
236  const int end = ff_slice_pos(channels, jobnr + 1, nb_jobs);
237  float *prv = p[0];
238  int n, c;
239 
240  for (c = start; c < end; c++) {
241  const float *src = s[0];
242  float *dst = d[0];
243 
244  for (n = 0; n < nb_samples; n++) {
245  float current = src[c];
246  dst[c] = (current + prv[c] * mult) / div;
247  prv[c] = dst[c];
248  if (clip) {
249  dst[c] = av_clipf(dst[c], -1, 1);
250  }
251 
252  dst += channels;
253  src += channels;
254  }
255  }
256 
257  return 0;
258 }
259 
260 static int ifilter_dbl(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
261 {
262  ThreadData *td = arg;
263  void **d = td->d;
264  void **p = td->p;
265  const void **s = td->s;
266  const int nb_samples = td->nb_samples;
267  const int channels = td->channels;
268  const double mult = -td->mult;
269  const double div = -td->mult + 1.f;
270  const int clip = td->clip;
271  const int start = ff_slice_pos(channels, jobnr, nb_jobs);
272  const int end = ff_slice_pos(channels, jobnr + 1, nb_jobs);
273  double *prv = p[0];
274  int n, c;
275 
276  for (c = start; c < end; c++) {
277  const double *src = s[0];
278  double *dst = d[0];
279 
280  for (n = 0; n < nb_samples; n++) {
281  double current = src[c];
282 
283  dst[c] = (current + prv[c] * mult) / div;
284  prv[c] = dst[c];
285  if (clip) {
286  dst[c] = av_clipd(dst[c], -1, 1);
287  }
288 
289  dst += channels;
290  src += channels;
291  }
292  }
293 
294  return 0;
295 }
296 
297 static int ifilter_fltp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
298 {
299  ThreadData *td = arg;
300  void **d = td->d;
301  void **p = td->p;
302  const void **s = td->s;
303  const int nb_samples = td->nb_samples;
304  const int channels = td->channels;
305  const float mult = -td->mult;
306  const float div = -td->mult + 1.f;
307  const int clip = td->clip;
308  const int start = ff_slice_pos(channels, jobnr, nb_jobs);
309  const int end = ff_slice_pos(channels, jobnr + 1, nb_jobs);
310  int n, c;
311 
312  for (c = start; c < end; c++) {
313  const float *src = s[c];
314  float *dst = d[c];
315  float *prv = p[c];
316 
317  for (n = 0; n < nb_samples; n++) {
318  float current = src[n];
319 
320  dst[n] = (current + prv[0] * mult) / div;
321  prv[0] = dst[n];
322  if (clip) {
323  dst[n] = av_clipf(dst[n], -1, 1);
324  }
325  }
326  }
327 
328  return 0;
329 }
330 
331 static int ifilter_dblp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
332 {
333  ThreadData *td = arg;
334  void **d = td->d;
335  void **p = td->p;
336  const void **s = td->s;
337  const int nb_samples = td->nb_samples;
338  const int channels = td->channels;
339  const double mult = -td->mult;
340  const double div = -td->mult + 1.f;
341  const int clip = td->clip;
342  const int start = ff_slice_pos(channels, jobnr, nb_jobs);
343  const int end = ff_slice_pos(channels, jobnr + 1, nb_jobs);
344  int n, c;
345 
346  for (c = start; c < end; c++) {
347  const double *src = s[c];
348  double *dst = d[c];
349  double *prv = p[c];
350 
351  for (n = 0; n < nb_samples; n++) {
352  double current = src[n];
353 
354  dst[n] = (current + prv[0] * mult) / div;
355  prv[0] = dst[n];
356  if (clip) {
357  dst[n] = av_clipd(dst[n], -1, 1);
358  }
359  }
360  }
361 
362  return 0;
363 }
364 
365 static int config_input(AVFilterLink *inlink)
366 {
367  AVFilterContext *ctx = inlink->dst;
368  CrystalizerContext *s = ctx->priv;
369 
370  switch (inlink->format) {
371  case AV_SAMPLE_FMT_FLT: s->filter = s->mult >= 0.f ? filter_flt : ifilter_flt; break;
372  case AV_SAMPLE_FMT_DBL: s->filter = s->mult >= 0.f ? filter_dbl : ifilter_dbl; break;
373  case AV_SAMPLE_FMT_FLTP: s->filter = s->mult >= 0.f ? filter_fltp : ifilter_fltp; break;
374  case AV_SAMPLE_FMT_DBLP: s->filter = s->mult >= 0.f ? filter_dblp : ifilter_dblp; break;
375  }
376 
377  return 0;
378 }
379 
380 static int filter_frame(AVFilterLink *inlink, AVFrame *in)
381 {
382  AVFilterContext *ctx = inlink->dst;
383  AVFilterLink *outlink = ctx->outputs[0];
384  CrystalizerContext *s = ctx->priv;
385  AVFrame *out;
386  ThreadData td;
387 
388  if (!s->prev) {
389  s->prev = ff_get_audio_buffer(inlink, 1);
390  if (!s->prev) {
391  av_frame_free(&in);
392  return AVERROR(ENOMEM);
393  }
394  }
395 
396  if (av_frame_is_writable(in)) {
397  out = in;
398  } else {
399  out = ff_get_audio_buffer(outlink, in->nb_samples);
400  if (!out) {
401  av_frame_free(&in);
402  return AVERROR(ENOMEM);
403  }
405  }
406 
407  td.d = (void **)out->extended_data;
408  td.s = (const void **)in->extended_data;
409  td.p = (void **)s->prev->extended_data;
410  td.nb_samples = in->nb_samples;
411  td.channels = in->channels;
412  td.mult = ctx->is_disabled ? 0.f : s->mult;
413  td.clip = s->clip;
414  ctx->internal->execute(ctx, s->filter, &td, NULL, FFMIN(inlink->channels,
416 
417  if (out != in)
418  av_frame_free(&in);
419 
420  return ff_filter_frame(outlink, out);
421 }
422 
424 {
425  CrystalizerContext *s = ctx->priv;
426 
427  av_frame_free(&s->prev);
428 }
429 
430 static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
431  char *res, int res_len, int flags)
432 {
433  int ret;
434 
435  ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
436  if (ret < 0)
437  return ret;
438 
439  return config_input(ctx->inputs[0]);
440 }
441 
442 static const AVFilterPad inputs[] = {
443  {
444  .name = "default",
445  .type = AVMEDIA_TYPE_AUDIO,
446  .filter_frame = filter_frame,
447  .config_props = config_input,
448  },
449  { NULL }
450 };
451 
452 static const AVFilterPad outputs[] = {
453  {
454  .name = "default",
455  .type = AVMEDIA_TYPE_AUDIO,
456  },
457  { NULL }
458 };
459 
461  .name = "crystalizer",
462  .description = NULL_IF_CONFIG_SMALL("Simple audio noise sharpening filter."),
463  .query_formats = query_formats,
464  .priv_size = sizeof(CrystalizerContext),
465  .priv_class = &crystalizer_class,
466  .uninit = uninit,
467  .inputs = inputs,
468  .outputs = outputs,
472 };
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:925
static const AVOption crystalizer_options[]
static int ifilter_dbl(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int ifilter_fltp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int filter_flt(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int ifilter_flt(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int filter_dbl(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int query_formats(AVFilterContext *ctx)
static int config_input(AVFilterLink *inlink)
static int filter_fltp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
AVFilter ff_af_crystalizer
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
#define A
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static av_cold void uninit(AVFilterContext *ctx)
static int filter_dblp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
#define OFFSET(x)
AVFILTER_DEFINE_CLASS(crystalizer)
static int ifilter_dblp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
channels
Definition: aptx.h:33
#define av_cold
Definition: attributes.h:88
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
Definition: audio.c:86
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1096
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:882
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:802
Main libavfilter public API header.
#define flags(name, subs,...)
Definition: cbs_av1.c:572
#define s(width, name)
Definition: cbs_vp9.c:257
audio channel layout utility functions
#define FFMIN(a, b)
Definition: common.h:105
#define av_clipd
Definition: common.h:173
#define av_clipf
Definition: common.h:170
#define NULL
Definition: coverity.c:32
int
static int ff_slice_pos(int total, int jobnr, int nb_jobs)
Compute the boundary index for a slice when work of size total is split into nb_jobs slices.
Definition: filters.h:271
AVFilterChannelLayouts * ff_all_channel_counts(void)
Construct an AVFilterChannelLayouts coding for any channel layout, with known or unknown disposition.
Definition: formats.c:436
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:587
AVFilterFormats * ff_make_format_list(const int *fmts)
Create a list of supported formats.
Definition: formats.c:286
int ff_set_common_samplerates(AVFilterContext *ctx, AVFilterFormats *samplerates)
Definition: formats.c:575
int ff_set_common_channel_layouts(AVFilterContext *ctx, AVFilterChannelLayouts *channel_layouts)
A helper for query_formats() which sets all links to the same list of channel layouts/sample rates.
Definition: formats.c:568
AVFilterFormats * ff_all_samplerates(void)
Definition: formats.c:421
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
@ AV_OPT_TYPE_BOOL
Definition: opt.h:242
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
#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:134
#define AVERROR(e)
Definition: error.h:43
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
Definition: frame.c:594
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:203
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:658
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
@ AV_SAMPLE_FMT_FLT
float
Definition: samplefmt.h:63
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:70
@ AV_SAMPLE_FMT_DBL
double
Definition: samplefmt.h:64
static int16_t mult(Float11 *f1, Float11 *f2)
Definition: g726.c:55
const char * arg
Definition: jacosubdec.c:66
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
enum MovChannelLayoutTag * layouts
Definition: mov_chan.c:434
AVOptions.
#define td
Definition: regdef.h:70
formats
Definition: signature.h:48
Describe the class of an AVClass context structure.
Definition: log.h:67
A list of supported channel layouts.
Definition: formats.h:86
An instance of a filter.
Definition: avfilter.h:341
A list of supported formats for one end of a filter link.
Definition: formats.h:65
A filter pad used for either input or output.
Definition: internal.h:54
const char * name
Pad name.
Definition: internal.h:60
Filter definition.
Definition: avfilter.h:145
const char * name
Filter name.
Definition: avfilter.h:149
AVFormatInternal * internal
An opaque field for libavformat internal usage.
Definition: avformat.h:1699
This structure describes decoded (raw) audio or video data.
Definition: frame.h:318
AVOption.
Definition: opt.h:248
int(* filter)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Used for passing data between threads.
Definition: dsddec.c:67
const void ** s
#define src
Definition: vp8dsp.c:255
FILE * out
Definition: movenc.c:54
AVFormatContext * ctx
Definition: movenc.c:48
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.
Definition: vf_lut.c:163
static double c[64]