FFmpeg
Macros | Functions | Variables
af_afir.c File Reference
#include <float.h>
#include "libavutil/avassert.h"
#include "libavutil/cpu.h"
#include "libavutil/tx.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/float_dsp.h"
#include "libavutil/frame.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/rational.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "internal.h"
#include "af_afir.h"
#include "af_afirdsp.h"
#include "video.h"
#include "afir_template.c"

Go to the source code of this file.

Macros

#define DEPTH   32
 
#define DEPTH   64
 
#define AF   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define AFR   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
#define VF   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define OFFSET(x)   offsetof(AudioFIRContext, x)
 

Functions

static int fir_channel (AVFilterContext *ctx, AVFrame *out, int ch)
 
static int fir_channels (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int fir_frame (AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink)
 
static int init_segment (AVFilterContext *ctx, AudioFIRSegment *seg, int selir, int offset, int nb_partitions, int part_size, int index)
 
static void uninit_segment (AVFilterContext *ctx, AudioFIRSegment *seg)
 
static int convert_coeffs (AVFilterContext *ctx, int selir)
 
static int check_ir (AVFilterLink *link, int selir)
 
static int activate (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
 
 AVFILTER_DEFINE_CLASS (afir)
 

Variables

static const AVOption afir_options []
 
static const AVFilterPad outputs []
 
const AVFilter ff_af_afir
 

Detailed Description

An arbitrary audio FIR filter

Definition in file af_afir.c.

Macro Definition Documentation

◆ DEPTH [1/2]

#define DEPTH   32

Definition at line 54 of file af_afir.c.

◆ DEPTH [2/2]

#define DEPTH   64

Definition at line 54 of file af_afir.c.

◆ AF

Definition at line 655 of file af_afir.c.

◆ AFR

Definition at line 656 of file af_afir.c.

◆ VF

Definition at line 657 of file af_afir.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(AudioFIRContext, x)

Definition at line 658 of file af_afir.c.

Function Documentation

◆ fir_channel()

static int fir_channel ( AVFilterContext ctx,
AVFrame out,
int  ch 
)
static

Definition at line 57 of file af_afir.c.

Referenced by fir_channels().

◆ fir_channels()

static int fir_channels ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 81 of file af_afir.c.

Referenced by fir_frame().

◆ fir_frame()

static int fir_frame ( AudioFIRContext s,
AVFrame in,
AVFilterLink outlink 
)
static

Definition at line 93 of file af_afir.c.

Referenced by activate().

◆ init_segment()

static int init_segment ( AVFilterContext ctx,
AudioFIRSegment seg,
int  selir,
int  offset,
int  nb_partitions,
int  part_size,
int  index 
)
static

Definition at line 117 of file af_afir.c.

Referenced by convert_coeffs().

◆ uninit_segment()

static void uninit_segment ( AVFilterContext ctx,
AudioFIRSegment seg 
)
static

Definition at line 193 of file af_afir.c.

Referenced by uninit().

◆ convert_coeffs()

static int convert_coeffs ( AVFilterContext ctx,
int  selir 
)
static

Definition at line 232 of file af_afir.c.

Referenced by activate().

◆ check_ir()

static int check_ir ( AVFilterLink link,
int  selir 
)
static

Definition at line 381 of file af_afir.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 400 of file af_afir.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 467 of file af_afir.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 505 of file af_afir.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 563 of file af_afir.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 586 of file af_afir.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  arg,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 629 of file af_afir.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( afir  )

Variable Documentation

◆ afir_options

const AVOption afir_options[]
static

Definition at line 660 of file af_afir.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
}

Definition at line 698 of file af_afir.c.

◆ ff_af_afir

const AVFilter ff_af_afir
Initial value:
= {
.name = "afir",
.description = NULL_IF_CONFIG_SMALL("Apply Finite Impulse Response filter with supplied coefficients in additional stream(s)."),
.priv_size = sizeof(AudioFIRContext),
.priv_class = &afir_class,
.init = init,
.activate = activate,
.uninit = uninit,
.process_command = process_command,
}

Definition at line 706 of file af_afir.c.

activate
static int activate(AVFilterContext *ctx)
Definition: af_afir.c:400
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_afir.c:563
AVFILTER_FLAG_DYNAMIC_INPUTS
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:106
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_afir.c:467
config_output
static int config_output(AVFilterLink *outlink)
Definition: af_afir.c:505
AudioFIRContext
Definition: af_afir.h:59
outputs
static const AVFilterPad outputs[]
Definition: af_afir.c:698
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
init
static av_cold int init(AVFilterContext *ctx)
Definition: af_afir.c:586
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#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:155
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Definition: af_afir.c:629