mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 03:28:27 +00:00
avfilter/aspace_template: small refactor
This commit is contained in:
parent
88fd1a9eeb
commit
68b107b2ca
@ -21,12 +21,15 @@
|
|||||||
|
|
||||||
#undef ftype
|
#undef ftype
|
||||||
#undef SAMPLE_FORMAT
|
#undef SAMPLE_FORMAT
|
||||||
|
#undef VECTOR_MUL
|
||||||
#if DEPTH == 32
|
#if DEPTH == 32
|
||||||
#define SAMPLE_FORMAT float
|
#define SAMPLE_FORMAT float
|
||||||
#define ftype float
|
#define ftype float
|
||||||
|
#define VECTOR_MUL s->fdsp->vector_fmul
|
||||||
#else
|
#else
|
||||||
#define SAMPLE_FORMAT double
|
#define SAMPLE_FORMAT double
|
||||||
#define ftype double
|
#define ftype double
|
||||||
|
#define VECTOR_MUL s->fdsp->vector_dmul
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define fn3(a,b) a##_##b
|
#define fn3(a,b) a##_##b
|
||||||
@ -41,16 +44,9 @@ static void fn(process)(AVFilterContext *ctx,
|
|||||||
AudioSpaceContext *s = ctx->priv;
|
AudioSpaceContext *s = ctx->priv;
|
||||||
|
|
||||||
for (int i = 0; i < nb_channels; i++) {
|
for (int i = 0; i < nb_channels; i++) {
|
||||||
#if DEPTH == 32
|
VECTOR_MUL((ftype *)out->extended_data[i],
|
||||||
s->fdsp->vector_fmul((ftype *)out->extended_data[i],
|
|
||||||
(const ftype *)in->extended_data[0],
|
(const ftype *)in->extended_data[0],
|
||||||
(const ftype *)w->extended_data[i],
|
(const ftype *)w->extended_data[i],
|
||||||
nb_samples);
|
nb_samples);
|
||||||
#else
|
|
||||||
s->fdsp->vector_dmul((ftype *)out->extended_data[i],
|
|
||||||
(const ftype *)in->extended_data[0],
|
|
||||||
(const ftype *)w->extended_data[i],
|
|
||||||
nb_samples);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user