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
Initial value:= {
.p.name = "asisdr",
}
Definition at line 299 of file af_asdr.c.
#define us(width, name, range_min, range_max, subs,...)