FFmpeg
Data Structures | Macros | Functions | Variables
af_dialoguenhance.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/tx.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include <float.h>
#include "dialoguenhance_template.c"

Go to the source code of this file.

Data Structures

struct  AudioDialogueEnhancementContext
 

Macros

#define OFFSET(x)   offsetof(AudioDialogueEnhanceContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
 
#define DEPTH   32
 
#define DEPTH   64
 

Functions

 AVFILTER_DEFINE_CLASS (dialoguenhance)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption dialoguenhance_options []
 
static const AVFilterPad inputs []
 
const AVFilter ff_af_dialoguenhance
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 60 of file af_dialoguenhance.c.

◆ FLAGS

Definition at line 61 of file af_dialoguenhance.c.

◆ DEPTH [1/2]

#define DEPTH   32

Definition at line 102 of file af_dialoguenhance.c.

◆ DEPTH [2/2]

#define DEPTH   64

Definition at line 102 of file af_dialoguenhance.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( dialoguenhance  )

◆ query_formats()

static int query_formats ( const AVFilterContext ctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 72 of file af_dialoguenhance.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 105 of file af_dialoguenhance.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 138 of file af_dialoguenhance.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 164 of file af_dialoguenhance.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 194 of file af_dialoguenhance.c.

Variable Documentation

◆ dialoguenhance_options

const AVOption dialoguenhance_options[]
static
Initial value:
= {
{ "original", "set original center factor", OFFSET(original), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS },
{ "enhance", "set dialogue enhance factor",OFFSET(enhance), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 3, FLAGS },
{ "voice", "set voice detection factor", OFFSET(voice), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 2,32, FLAGS },
{NULL}
}

Definition at line 63 of file af_dialoguenhance.c.

◆ inputs

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

Definition at line 212 of file af_dialoguenhance.c.

◆ ff_af_dialoguenhance

const AVFilter ff_af_dialoguenhance
Initial value:
= {
.name = "dialoguenhance",
.description = NULL_IF_CONFIG_SMALL("Audio Dialogue Enhancement."),
.priv_size = sizeof(AudioDialogueEnhanceContext),
.priv_class = &dialoguenhance_class,
.activate = activate,
.process_command = ff_filter_process_command,
}

Definition at line 220 of file af_dialoguenhance.c.

inputs
static const AVFilterPad inputs[]
Definition: af_dialoguenhance.c:212
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_dialoguenhance.c:194
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
Definition: opt.h:267
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: af_dialoguenhance.c:72
FLAGS
#define FLAGS
Definition: af_dialoguenhance.c:61
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
OFFSET
#define OFFSET(x)
Definition: af_dialoguenhance.c:60
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:34
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:94
ff_filter_process_command
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:901
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_dialoguenhance.c:105
activate
static int activate(AVFilterContext *ctx)
Definition: af_dialoguenhance.c:164
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:190