43 const void *
src,
int nb_samples);
47 const void *srcp,
int nb_samples)
50 const float *
src = (
const float *)srcp;
51 float *
dst = (
float *)dstp;
52 const float dc =
s->level;
54 for (
int n = 0; n < nb_samples; n++) {
60 const void *srcp,
int nb_samples)
63 const double *
src = (
const double *)srcp;
64 double *
dst = (
double *)dstp;
65 const double dc =
s->level;
67 for (
int n = 0; n < nb_samples; n++) {
73 const void *srcp,
int nb_samples)
76 const float *
src = (
const float *)srcp;
77 float *
dst = (
float *)dstp;
78 const float dc =
s->level;
81 for (
int n = 0; n < nb_samples; n++) {
82 dst[n] =
src[n] + dc * (((
N + n) & 1) ? -1.f : 1.f);
87 const void *srcp,
int nb_samples)
90 const double *
src = (
const double *)srcp;
91 double *
dst = (
double *)dstp;
92 const double dc =
s->level;
95 for (
int n = 0; n < nb_samples; n++) {
96 dst[n] =
src[n] + dc * (((
N + n) & 1) ? -1. : 1.);
101 const void *srcp,
int nb_samples)
104 const float *
src = (
const float *)srcp;
105 float *
dst = (
float *)dstp;
106 const float dc =
s->level;
109 for (
int n = 0; n < nb_samples; n++) {
110 dst[n] =
src[n] + dc * ((((
N + n) >> 8) & 1) ? -1.f : 1.f);
115 const void *srcp,
int nb_samples)
118 const double *
src = (
const double *)srcp;
119 double *
dst = (
double *)dstp;
120 const double dc =
s->level;
123 for (
int n = 0; n < nb_samples; n++) {
124 dst[n] =
src[n] + dc * ((((
N + n) >> 8) & 1) ? -1. : 1.);
129 const void *srcp,
int nb_samples)
132 const float *
src = (
const float *)srcp;
133 float *
dst = (
float *)dstp;
134 const float dc =
s->level;
137 for (
int n = 0; n < nb_samples; n++) {
138 dst[n] =
src[n] + dc * (((
N + n) & 255) ? 0.f : 1.f);
143 const void *srcp,
int nb_samples)
146 const double *
src = (
const double *)srcp;
147 double *
dst = (
double *)dstp;
148 const double dc =
s->level;
151 for (
int n = 0; n < nb_samples; n++) {
152 dst[n] =
src[n] + dc * (((
N + n) & 255) ? 0. : 1.);
161 switch (outlink->
format) {
194 for (
int ch = start; ch < end; ch++) {
195 s->filter[
s->type](
ctx,
out->extended_data[ch],
250#define OFFSET(x) offsetof(ADenormContext, x)
251#define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
268 .p.priv_class = &adenorm_class,
static int fn filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static void sq_denorm_dblp(AVFilterContext *ctx, void *dstp, const void *srcp, int nb_samples)
static void sq_denorm_fltp(AVFilterContext *ctx, void *dstp, const void *srcp, int nb_samples)
static const AVOption adenorm_options[]
const FFFilter ff_af_adenorm
static int filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static void ac_denorm_dblp(AVFilterContext *ctx, void *dstp, const void *srcp, int nb_samples)
static void ps_denorm_fltp(AVFilterContext *ctx, void *dstp, const void *srcp, int nb_samples)
static const AVFilterPad adenorm_inputs[]
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static void dc_denorm_fltp(AVFilterContext *ctx, void *dstp, const void *srcp, int nb_samples)
static void dc_denorm_dblp(AVFilterContext *ctx, void *dstp, const void *srcp, int nb_samples)
static const AVFilterPad adenorm_outputs[]
static void ps_denorm_dblp(AVFilterContext *ctx, void *dstp, const void *srcp, int nb_samples)
static int config_output(AVFilterLink *outlink)
static void ac_denorm_fltp(AVFilterContext *ctx, void *dstp, const void *srcp, int nb_samples)
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
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.
int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Main libavfilter public API header.
Public libavutil channel layout APIs header.
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
@ AV_SAMPLE_FMT_FLTP
float, planar
@ AV_SAMPLE_FMT_DBLP
double, planar
static int config_output(AVBitStreamFilterLink *outlink)
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define FILTER_SAMPLEFMTS(...)
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.
#define AVFILTER_DEFINE_CLASS(fname)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
void(* filter[NB_TYPES])(AVFilterContext *ctx, void *dst, const void *src, int nb_samples)
int nb_channels
Number of channels in this layout.
Describe the class of an AVClass context structure.
A link between two filters.
AVFilterContext * src
source filter
AVChannelLayout ch_layout
channel layout of current buffer (see libavutil/channel_layout.h)
AVFilterContext * dst
dest filter
int format
agreed upon media format
A filter pad used for either input or output.
This structure describes decoded (raw) audio or video data.
int nb_samples
number of audio samples (per channel) described by this frame
AVChannelLayout ch_layout
Channel layout of the audio data.
uint8_t ** extended_data
pointers to the data planes/channels.
Used for passing data between threads.
static AVFormatContext * ctx