FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_hdcd.c File Reference
#include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "avfilter.h"
#include "internal.h"
#include "audio.h"

Go to the source code of this file.

Data Structures

struct  hdcd_state_t
 
struct  HDCDContext
 

Macros

#define APPLY_GAIN(s, g)   do{int64_t s64 = s; s64 *= gaintab[g]; s = (int32_t)(s64 >> 23); }while(0);
 

Functions

 AVFILTER_DEFINE_CLASS (hdcd)
 
static void hdcd_reset (hdcd_state_t *state, unsigned rate)
 
static int integrate (hdcd_state_t *state, int *flag, const int32_t *samples, int count, int stride)
 
static int hdcd_scan (hdcd_state_t *state, const int32_t *samples, int max, int stride)
 
static int hdcd_envelope (int32_t *samples, int count, int stride, int gain, int target_gain, int extend)
 
static void hdcd_process (hdcd_state_t *state, int32_t *samples, int count, int stride)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int query_formats (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 

Variables

static const uint32_t peaktab []
 
static const uint8_t readaheadtab []
 
static const int32_t gaintab []
 
static const AVOption hdcd_options []
 
static const AVFilterPad avfilter_af_hdcd_inputs []
 
static const AVFilterPad avfilter_af_hdcd_outputs []
 
AVFilter ff_af_hdcd
 

Macro Definition Documentation

#define APPLY_GAIN (   s,
  g 
)    do{int64_t s64 = s; s64 *= gaintab[g]; s = (int32_t)(s64 >> 23); }while(0);

Definition at line 839 of file af_hdcd.c.

Referenced by hdcd_envelope().

Function Documentation

AVFILTER_DEFINE_CLASS ( hdcd  )
static void hdcd_reset ( hdcd_state_t state,
unsigned  rate 
)
static

Definition at line 841 of file af_hdcd.c.

Referenced by init().

static int integrate ( hdcd_state_t state,
int *  flag,
const int32_t samples,
int  count,
int  stride 
)
static

Definition at line 858 of file af_hdcd.c.

Referenced by hdcd_scan().

static int hdcd_scan ( hdcd_state_t state,
const int32_t samples,
int  max,
int  stride 
)
static

Definition at line 903 of file af_hdcd.c.

Referenced by hdcd_process().

static int hdcd_envelope ( int32_t samples,
int  count,
int  stride,
int  gain,
int  target_gain,
int  extend 
)
static

Definition at line 927 of file af_hdcd.c.

Referenced by hdcd_process().

static void hdcd_process ( hdcd_state_t state,
int32_t samples,
int  count,
int  stride 
)
static

Definition at line 985 of file af_hdcd.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 1018 of file af_hdcd.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 1051 of file af_hdcd.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 1097 of file af_hdcd.c.

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 1109 of file af_hdcd.c.

Variable Documentation

const uint32_t peaktab[]
static

Definition at line 45 of file af_hdcd.c.

Referenced by hdcd_envelope().

const uint8_t readaheadtab[]
static
Initial value:
= {
0x03, 0x02, 0x01, 0x01, 0x1f, 0x1e, 0x1f, 0x11, 0x1f, 0x1e, 0x1f, 0x1d, 0x1f, 0x1e, 0x1f,
0x10, 0x1f, 0x1e, 0x1f, 0x1d, 0x1f, 0x1e, 0x1f, 0x1c, 0x1f, 0x1e, 0x1f, 0x1d, 0x1f, 0x1e,
0x1f, 0x0f, 0x1f, 0x1e, 0x1f, 0x1d, 0x1f, 0x1e, 0x1f, 0x1c, 0x1f, 0x1e, 0x1f, 0x1d, 0x1f,
0x1e, 0x1f, 0x1b, 0x1f, 0x1e, 0x1f, 0x1d, 0x1f, 0x1e, 0x1f, 0x1c, 0x1f, 0x1e, 0x1f, 0x1d,
0x1f, 0x1e, 0x0e, 0x19, 0x07, 0x1e, 0x1f, 0x1d, 0x1f, 0x1e, 0x1f, 0x1c, 0x1f, 0x1e, 0x1f,
0x1d, 0x1f, 0x1e, 0x1f, 0x1b, 0x1f, 0x1e, 0x1f, 0x1d, 0x1f, 0x1e, 0x1f, 0x1c, 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().

const int32_t gaintab[]
static

Definition at line 686 of file af_hdcd.c.

const AVOption hdcd_options[]
static
Initial value:
= {
{NULL}
}
#define NULL
Definition: coverity.c:32

Definition at line 833 of file af_hdcd.c.

const AVFilterPad avfilter_af_hdcd_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_hdcd.c:1018

Definition at line 1122 of file af_hdcd.c.

const AVFilterPad avfilter_af_hdcd_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 1131 of file af_hdcd.c.

AVFilter ff_af_hdcd
Initial value:
= {
.name = "hdcd",
.description = NULL_IF_CONFIG_SMALL("Apply high definition audio cd decoding."),
.priv_size = sizeof(HDCDContext),
.priv_class = &hdcd_class,
.init = init,
}
static av_cold int init(AVFilterContext *ctx)
Definition: af_hdcd.c:1109
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static const AVFilterPad avfilter_af_hdcd_outputs[]
Definition: af_hdcd.c:1131
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_hdcd.c:1097
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad avfilter_af_hdcd_inputs[]
Definition: af_hdcd.c:1122
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static int query_formats(AVFilterContext *ctx)
Definition: af_hdcd.c:1051

Definition at line 1139 of file af_hdcd.c.