Libav
Data Structures | Macros | Functions | Variables
af_hdcd.c File Reference

HDCD decoding filter, using libhdcd. More...

#include <hdcd/hdcd_simple.h>
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  HDCDContext
 

Macros

#define OFFSET(x)   offsetof(HDCDContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM
 
#define HDCD_ANA_MAX   6
 

Functions

static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int query_formats (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static void af_hdcd_log (const void *priv, const char *fmt, va_list args)
 callback for error logging More...
 
static av_cold int init (AVFilterContext *ctx)
 

Variables

static const AVOption hdcd_options []
 
static const AVClass hdcd_class
 
static const AVFilterPad avfilter_af_hdcd_inputs []
 
static const AVFilterPad avfilter_af_hdcd_outputs []
 
AVFilter ff_af_hdcd
 

Detailed Description

HDCD decoding filter, using libhdcd.

Definition in file af_hdcd.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 47 of file af_hdcd.c.

◆ A

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 48 of file af_hdcd.c.

◆ HDCD_ANA_MAX

#define HDCD_ANA_MAX   6

Definition at line 49 of file af_hdcd.c.

Function Documentation

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 70 of file af_hdcd.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 104 of file af_hdcd.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 137 of file af_hdcd.c.

◆ af_hdcd_log()

static void af_hdcd_log ( const void priv,
const char *  fmt,
va_list  args 
)
static

callback for error logging

Definition at line 150 of file af_hdcd.c.

Referenced by init().

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 155 of file af_hdcd.c.

Variable Documentation

◆ hdcd_options

const AVOption hdcd_options[]
static
Initial value:
= {
{ "analyze_mode", "Replace audio with solid tone and signal some processing aspect in the amplitude.",
OFFSET(analyze_mode), AV_OPT_TYPE_INT, { .i64=HDCD_ANA_OFF }, 0, HDCD_ANA_MAX, A, "analyze_mode"},
{ "off", HDCD_ANA_OFF_DESC, 0, AV_OPT_TYPE_CONST, { .i64 = HDCD_ANA_OFF}, 0, 0, A, "analyze_mode" },
{ "lle", HDCD_ANA_LLE_DESC, 0, AV_OPT_TYPE_CONST, { .i64 = HDCD_ANA_LLE}, 0, 0, A, "analyze_mode" },
{ "pe", HDCD_ANA_PE_DESC, 0, AV_OPT_TYPE_CONST, { .i64 = HDCD_ANA_PE}, 0, 0, A, "analyze_mode" },
{ "cdt", HDCD_ANA_CDT_DESC, 0, AV_OPT_TYPE_CONST, { .i64 = HDCD_ANA_CDT}, 0, 0, A, "analyze_mode" },
{ "tgm", HDCD_ANA_TGM_DESC, 0, AV_OPT_TYPE_CONST, { .i64 = HDCD_ANA_TGM}, 0, 0, A, "analyze_mode" },
{ "pel", HDCD_ANA_PEL_DESC, 0, AV_OPT_TYPE_CONST, { .i64 = HDCD_ANA_PEL}, 0, 0, A, "analyze_mode" },
{ "ltgm", HDCD_ANA_LTGM_DESC, 0, AV_OPT_TYPE_CONST, { .i64 = HDCD_ANA_LTGM}, 0, 0, A, "analyze_mode" },
{ NULL }
}
#define HDCD_ANA_MAX
Definition: af_hdcd.c:49
#define OFFSET(x)
Definition: af_hdcd.c:47
#define A
Definition: af_hdcd.c:48
NULL
Definition: eval.c:55

Definition at line 50 of file af_hdcd.c.

◆ hdcd_class

const AVClass hdcd_class
static
Initial value:
= {
.class_name = "HDCD filter",
.item_name = av_default_item_name,
.option = hdcd_options,
}
#define LIBAVFILTER_VERSION_INT
Definition: version.h:36
static const AVOption hdcd_options[]
Definition: af_hdcd.c:50
av_default_item_name
Definition: dnxhdenc.c:55

Definition at line 63 of file af_hdcd.c.

◆ avfilter_af_hdcd_inputs

const AVFilterPad avfilter_af_hdcd_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_hdcd.c:70
NULL
Definition: eval.c:55

Definition at line 170 of file af_hdcd.c.

◆ avfilter_af_hdcd_outputs

const AVFilterPad avfilter_af_hdcd_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
NULL
Definition: eval.c:55

Definition at line 179 of file af_hdcd.c.

◆ ff_af_hdcd

AVFilter ff_af_hdcd
Initial value:
= {
.name = "hdcd",
.description = NULL_IF_CONFIG_SMALL("Apply High Definition Compatible Digital (HDCD) decoding."),
.priv_size = sizeof(HDCDContext),
.priv_class = &hdcd_class,
.init = init,
}
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:259
static av_cold int init(AVFilterContext *ctx)
Definition: af_hdcd.c:155
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
static const AVFilterPad avfilter_af_hdcd_outputs[]
Definition: af_hdcd.c:179
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_hdcd.c:137
static const AVFilterPad avfilter_af_hdcd_inputs[]
Definition: af_hdcd.c:170
static const AVFilterPad inputs[]
Definition: af_ashowinfo.c:248
static const AVClass hdcd_class
Definition: af_hdcd.c:63
static int query_formats(AVFilterContext *ctx)
Definition: af_hdcd.c:104

Definition at line 187 of file af_hdcd.c.