FFmpeg
Data Structures | Macros | Functions | Variables
af_aderivative.c File Reference
#include "audio.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ADerivativeContext
 

Macros

#define DERIVATIVE(name, type)
 
#define INTEGRAL(name, type)
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVFilterPad aderivative_inputs []
 
static const AVFilterPad aderivative_outputs []
 
AVFilter ff_af_aderivative
 
AVFilter ff_af_aintegral
 

Macro Definition Documentation

#define DERIVATIVE (   name,
  type 
)
Value:
static void aderivative_## name ##p(void **d, void **p, const void **s, \
int nb_samples, int channels) \
{ \
int n, c; \
for (c = 0; c < channels; c++) { \
const type *src = s[c]; \
type *dst = d[c]; \
type *prv = p[c]; \
for (n = 0; n < nb_samples; n++) { \
const type current = src[n]; \
\
dst[n] = current - prv[0]; \
prv[0] = current; \
} \
} \
}
channels
Definition: aptx.c:30
GLint GLenum type
Definition: opengl_enc.c:104
#define src
Definition: vp8dsp.c:254
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
#define s(width, name)
Definition: cbs_vp9.c:257
int n
Definition: avisynth_c.h:760
int
for(j=16;j >0;--j)
const char * name
Definition: opengl_enc.c:102

Definition at line 65 of file af_aderivative.c.

#define INTEGRAL (   name,
  type 
)
Value:
static void aintegral_## name ##p(void **d, void **p, const void **s, \
int nb_samples, int channels) \
{ \
int n, c; \
for (c = 0; c < channels; c++) { \
const type *src = s[c]; \
type *dst = d[c]; \
type *prv = p[c]; \
for (n = 0; n < nb_samples; n++) { \
const type current = src[n]; \
\
dst[n] = current + prv[0]; \
prv[0] = dst[n]; \
} \
} \
}
channels
Definition: aptx.c:30
GLint GLenum type
Definition: opengl_enc.c:104
#define src
Definition: vp8dsp.c:254
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
#define s(width, name)
Definition: cbs_vp9.c:257
int n
Definition: avisynth_c.h:760
int
for(j=16;j >0;--j)
const char * name
Definition: opengl_enc.c:102

Definition at line 90 of file af_aderivative.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 30 of file af_aderivative.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 113 of file af_aderivative.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 136 of file af_aderivative.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 164 of file af_aderivative.c.

Variable Documentation

const AVFilterPad aderivative_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static int config_input(AVFilterLink *inlink)

Definition at line 171 of file af_aderivative.c.

const AVFilterPad aderivative_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 181 of file af_aderivative.c.

AVFilter ff_af_aderivative
Initial value:
= {
.name = "aderivative",
.description = NULL_IF_CONFIG_SMALL("Compute derivative of input audio."),
.query_formats = query_formats,
.priv_size = sizeof(ADerivativeContext),
}
static const AVFilterPad aderivative_outputs[]
static const AVFilterPad aderivative_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static av_cold void uninit(AVFilterContext *ctx)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
static int query_formats(AVFilterContext *ctx)

Definition at line 189 of file af_aderivative.c.

AVFilter ff_af_aintegral
Initial value:
= {
.name = "aintegral",
.description = NULL_IF_CONFIG_SMALL("Compute integral of input audio."),
.query_formats = query_formats,
.priv_size = sizeof(ADerivativeContext),
}
static const AVFilterPad aderivative_outputs[]
static const AVFilterPad aderivative_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static av_cold void uninit(AVFilterContext *ctx)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
static int query_formats(AVFilterContext *ctx)

Definition at line 199 of file af_aderivative.c.