35#define OFFSET(x) offsetof(AudioContrastContext, x)
36#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
49 const float *
src =
s[0];
53 for (n = 0; n < nb_samples; n++) {
69 const double *
src =
s[0];
73 for (n = 0; n < nb_samples; n++) {
77 dst[
c] = sin(d + contrast * sin(d * 4));
92 const float *
src =
s[
c];
95 for (n = 0; n < nb_samples; n++) {
110 const double *
src =
s[
c];
113 for (n = 0; n < nb_samples; n++) {
116 dst[n] = sin(d + contrast * sin(d * 4));
173 .p.name =
"acontrast",
174 .p.description =
NULL_IF_CONFIG_SMALL(
"Simple audio dynamic range compression/expansion filter."),
175 .p.priv_class = &acontrast_class,
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static const AVFilterPad inputs[]
static void filter_dblp(void **d, const void **s, int nb_samples, int channels, float contrast)
static int config_input(AVFilterLink *inlink)
static void filter_dbl(void **d, const void **s, int nb_samples, int channels, float contrast)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static const AVOption acontrast_options[]
const FFFilter ff_af_acontrast
static void filter_flt(void **d, const void **s, int nb_samples, int channels, float contrast)
static void filter_fltp(void **d, const void **s, int nb_samples, int channels, float contrast)
static AVFormatContext * ctx
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
Public libavutil channel layout APIs header.
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
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
@ AV_SAMPLE_FMT_DBL
double
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define FILTER_SAMPLEFMTS(...)
#define AVFILTER_DEFINE_CLASS(fname)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int nb_channels
Number of channels in this layout.
Describe the class of an AVClass context structure.
A link between two filters.
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.
void(* filter)(void **dst, const void **src, int nb_samples, int channels, float contrast)