FFmpeg
Data Structures | Macros | Functions | Variables
af_dialoguenhance.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/tx.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "internal.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 (AVFilterContext *ctx)
 
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 94 of file af_dialoguenhance.c.

◆ DEPTH [2/2]

#define DEPTH   64

Definition at line 94 of file af_dialoguenhance.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( dialoguenhance  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 72 of file af_dialoguenhance.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 97 of file af_dialoguenhance.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 130 of file af_dialoguenhance.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 156 of file af_dialoguenhance.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 186 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 204 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 212 of file af_dialoguenhance.c.

inputs
static const AVFilterPad inputs[]
Definition: af_dialoguenhance.c:204
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_dialoguenhance.c:186
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:237
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FLAGS
#define FLAGS
Definition: af_dialoguenhance.c:61
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
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:33
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
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:890
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_dialoguenhance.c:97
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_dialoguenhance.c:72
activate
static int activate(AVFilterContext *ctx)
Definition: af_dialoguenhance.c:156
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