Go to the source code of this file.
◆ SDR_FILTER
Value:
{ \
AudioSDRContext *
s =
ctx->priv; \
AVFrame *
u =
s->cache[0]; \
AVFrame *v =
s->cache[1]; \
const
int channels =
u->ch_layout.nb_channels; \
const
int start = (
channels * jobnr) / nb_jobs; \
const
int end = (
channels * (jobnr+1)) / nb_jobs; \
const
int nb_samples =
u->nb_samples;
\
for (
int ch = start; ch < end; ch++) { \
ChanStats *chs = &
s->chs[ch]; \
const type *
const vs = (
type *)v->extended_data[ch]; \
double sum_uv = 0.; \
for (
int n = 0; n < nb_samples; n++) { \
sum_u +=
us[n] *
us[n]; \
sum_uv += (
us[n] - vs[n]) * (
us[n] - vs[n]); \
} \
\
chs->uv += sum_uv; \
chs->u += sum_u; \
} \
\
return 0; \
}
Definition at line 48 of file af_asdr.c.
◆ SISDR_FILTER
◆ PSNR_FILTER
Value:
{ \
AudioSDRContext *
s =
ctx->priv; \
AVFrame *
u =
s->cache[0]; \
AVFrame *v =
s->cache[1]; \
const
int channels =
u->ch_layout.nb_channels; \
const
int start = (
channels * jobnr) / nb_jobs; \
const
int end = (
channels * (jobnr+1)) / nb_jobs; \
const
int nb_samples =
u->nb_samples;
\
for (
int ch = start; ch < end; ch++) { \
ChanStats *chs = &
s->chs[ch]; \
const type *
const vs = (
type *)v->extended_data[ch]; \
for (
int n = 0; n < nb_samples; n++) \
sum_uv += (
us[n] - vs[n]) * (
us[n] - vs[n]); \
\
chs->uv += sum_uv; \
} \
\
return 0; \
}
Definition at line 117 of file af_asdr.c.
◆ activate()
◆ config_output()
◆ uninit()
◆ inputs
Initial value:= {
{
.name = "input0",
},
{
.name = "input1",
},
}
Definition at line 250 of file af_asdr.c.
◆ outputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 261 of file af_asdr.c.
◆ ff_af_asdr
◆ ff_af_apsnr
◆ ff_af_asisdr
@ AV_SAMPLE_FMT_FLTP
float, planar
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
#define u(width, name, range_min, range_max)
#define FILTER_INPUTS(array)
static int config_output(AVFilterLink *outlink)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
#define us(width, name, range_min, range_max, subs,...)
#define FILTER_SAMPLEFMTS(...)
static int activate(AVFilterContext *ctx)
#define FILTER_OUTPUTS(array)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const AVFilterPad outputs[]
static av_cold void uninit(AVFilterContext *ctx)
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
@ AV_SAMPLE_FMT_DBLP
double, planar
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
#define flags(name, subs,...)
static const AVFilterPad inputs[]