2018-05-19 22:06:27 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Paul B Mahol
|
|
|
|
*
|
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <float.h>
|
|
|
|
|
|
|
|
#include "libavutil/avassert.h"
|
2019-06-03 14:14:37 +02:00
|
|
|
#include "libavutil/avstring.h"
|
2018-05-19 22:06:27 +02:00
|
|
|
#include "libavutil/opt.h"
|
|
|
|
#include "avfilter.h"
|
|
|
|
#include "audio.h"
|
|
|
|
#include "formats.h"
|
2022-03-09 21:39:46 +01:00
|
|
|
#include "filters.h"
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2019-01-09 13:33:02 +01:00
|
|
|
#include "af_anlmdndsp.h"
|
|
|
|
|
2019-01-10 12:00:56 +01:00
|
|
|
#define WEIGHT_LUT_NBITS 20
|
|
|
|
#define WEIGHT_LUT_SIZE (1<<WEIGHT_LUT_NBITS)
|
|
|
|
|
2018-05-19 22:06:27 +02:00
|
|
|
typedef struct AudioNLMeansContext {
|
|
|
|
const AVClass *class;
|
|
|
|
|
|
|
|
float a;
|
|
|
|
int64_t pd;
|
|
|
|
int64_t rd;
|
2019-06-02 11:58:49 +02:00
|
|
|
float m;
|
2019-03-01 16:38:59 +01:00
|
|
|
int om;
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2019-01-10 12:00:56 +01:00
|
|
|
float pdiff_lut_scale;
|
|
|
|
float weight_lut[WEIGHT_LUT_SIZE];
|
|
|
|
|
2018-05-19 22:06:27 +02:00
|
|
|
int K;
|
|
|
|
int S;
|
|
|
|
int N;
|
|
|
|
int H;
|
|
|
|
|
2022-03-10 10:33:26 +01:00
|
|
|
AVFrame *in;
|
2018-05-19 22:06:27 +02:00
|
|
|
AVFrame *cache;
|
2022-03-09 21:39:46 +01:00
|
|
|
AVFrame *window;
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2019-01-09 13:33:02 +01:00
|
|
|
AudioNLMDNDSPContext dsp;
|
2018-05-19 22:06:27 +02:00
|
|
|
} AudioNLMeansContext;
|
|
|
|
|
2019-03-01 16:38:59 +01:00
|
|
|
enum OutModes {
|
|
|
|
IN_MODE,
|
|
|
|
OUT_MODE,
|
|
|
|
NOISE_MODE,
|
|
|
|
NB_MODES
|
|
|
|
};
|
|
|
|
|
2018-05-19 22:06:27 +02:00
|
|
|
#define OFFSET(x) offsetof(AudioNLMeansContext, x)
|
2019-10-08 13:12:52 +02:00
|
|
|
#define AFT AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
|
2018-05-19 22:06:27 +02:00
|
|
|
|
|
|
|
static const AVOption anlmdn_options[] = {
|
2022-03-09 21:11:47 +01:00
|
|
|
{ "strength", "set denoising strength", OFFSET(a), AV_OPT_TYPE_FLOAT, {.dbl=0.00001},0.00001, 10000, AFT },
|
|
|
|
{ "s", "set denoising strength", OFFSET(a), AV_OPT_TYPE_FLOAT, {.dbl=0.00001},0.00001, 10000, AFT },
|
2021-07-25 10:22:42 +02:00
|
|
|
{ "patch", "set patch duration", OFFSET(pd), AV_OPT_TYPE_DURATION, {.i64=2000}, 1000, 100000, AFT },
|
2020-11-17 13:43:55 +01:00
|
|
|
{ "p", "set patch duration", OFFSET(pd), AV_OPT_TYPE_DURATION, {.i64=2000}, 1000, 100000, AFT },
|
2021-07-25 10:22:42 +02:00
|
|
|
{ "research", "set research duration", OFFSET(rd), AV_OPT_TYPE_DURATION, {.i64=6000}, 2000, 300000, AFT },
|
2020-11-17 13:43:55 +01:00
|
|
|
{ "r", "set research duration", OFFSET(rd), AV_OPT_TYPE_DURATION, {.i64=6000}, 2000, 300000, AFT },
|
2021-07-25 10:22:42 +02:00
|
|
|
{ "output", "set output mode", OFFSET(om), AV_OPT_TYPE_INT, {.i64=OUT_MODE}, 0, NB_MODES-1, AFT, "mode" },
|
2019-10-08 13:12:52 +02:00
|
|
|
{ "o", "set output mode", OFFSET(om), AV_OPT_TYPE_INT, {.i64=OUT_MODE}, 0, NB_MODES-1, AFT, "mode" },
|
|
|
|
{ "i", "input", 0, AV_OPT_TYPE_CONST, {.i64=IN_MODE}, 0, 0, AFT, "mode" },
|
|
|
|
{ "o", "output", 0, AV_OPT_TYPE_CONST, {.i64=OUT_MODE}, 0, 0, AFT, "mode" },
|
|
|
|
{ "n", "noise", 0, AV_OPT_TYPE_CONST, {.i64=NOISE_MODE},0, 0, AFT, "mode" },
|
2022-03-09 21:11:47 +01:00
|
|
|
{ "smooth", "set smooth factor", OFFSET(m), AV_OPT_TYPE_FLOAT, {.dbl=11.}, 1, 1000, AFT },
|
|
|
|
{ "m", "set smooth factor", OFFSET(m), AV_OPT_TYPE_FLOAT, {.dbl=11.}, 1, 1000, AFT },
|
2018-05-19 22:06:27 +02:00
|
|
|
{ NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
AVFILTER_DEFINE_CLASS(anlmdn);
|
|
|
|
|
2022-03-09 21:11:47 +01:00
|
|
|
static inline float sqrdiff(float x, float y)
|
|
|
|
{
|
|
|
|
const float diff = x - y;
|
|
|
|
|
|
|
|
return diff * diff;
|
|
|
|
}
|
|
|
|
|
2019-01-09 13:33:02 +01:00
|
|
|
static float compute_distance_ssd_c(const float *f1, const float *f2, ptrdiff_t K)
|
2018-05-19 22:06:27 +02:00
|
|
|
{
|
|
|
|
float distance = 0.;
|
|
|
|
|
|
|
|
for (int k = -K; k <= K; k++)
|
2022-03-09 21:11:47 +01:00
|
|
|
distance += sqrdiff(f1[k], f2[k]);
|
2018-05-19 22:06:27 +02:00
|
|
|
|
|
|
|
return distance;
|
|
|
|
}
|
|
|
|
|
2019-01-09 13:33:02 +01:00
|
|
|
static void compute_cache_c(float *cache, const float *f,
|
|
|
|
ptrdiff_t S, ptrdiff_t K,
|
|
|
|
ptrdiff_t i, ptrdiff_t jj)
|
|
|
|
{
|
|
|
|
int v = 0;
|
|
|
|
|
|
|
|
for (int j = jj; j < jj + S; j++, v++)
|
2022-03-09 21:11:47 +01:00
|
|
|
cache[v] += -sqrdiff(f[i - K - 1], f[j - K - 1]) + sqrdiff(f[i + K], f[j + K]);
|
2019-01-09 13:33:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ff_anlmdn_init(AudioNLMDNDSPContext *dsp)
|
|
|
|
{
|
|
|
|
dsp->compute_distance_ssd = compute_distance_ssd_c;
|
|
|
|
dsp->compute_cache = compute_cache_c;
|
|
|
|
|
2022-06-12 05:51:12 +02:00
|
|
|
#if ARCH_X86
|
|
|
|
ff_anlmdn_init_x86(dsp);
|
|
|
|
#endif
|
2019-01-09 13:33:02 +01:00
|
|
|
}
|
|
|
|
|
2020-11-17 13:43:55 +01:00
|
|
|
static int config_filter(AVFilterContext *ctx)
|
2018-05-19 22:06:27 +02:00
|
|
|
{
|
|
|
|
AudioNLMeansContext *s = ctx->priv;
|
2020-11-17 13:43:55 +01:00
|
|
|
AVFilterLink *outlink = ctx->outputs[0];
|
|
|
|
int newK, newS, newH, newN;
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2020-11-17 13:43:55 +01:00
|
|
|
newK = av_rescale(s->pd, outlink->sample_rate, AV_TIME_BASE);
|
|
|
|
newS = av_rescale(s->rd, outlink->sample_rate, AV_TIME_BASE);
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2020-11-17 13:43:55 +01:00
|
|
|
newH = newK * 2 + 1;
|
|
|
|
newN = newH + (newK + newS) * 2;
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2020-11-17 13:43:55 +01:00
|
|
|
av_log(ctx, AV_LOG_DEBUG, "K:%d S:%d H:%d N:%d\n", newK, newS, newH, newN);
|
2019-01-11 11:14:35 +01:00
|
|
|
|
2020-11-17 13:43:55 +01:00
|
|
|
if (!s->cache || s->cache->nb_samples < newS * 2) {
|
2022-03-09 21:39:46 +01:00
|
|
|
AVFrame *new_cache = ff_get_audio_buffer(outlink, newS * 2);
|
2020-11-17 13:43:55 +01:00
|
|
|
if (new_cache) {
|
2022-03-09 21:39:46 +01:00
|
|
|
if (s->cache)
|
|
|
|
av_samples_copy(new_cache->extended_data, s->cache->extended_data, 0, 0,
|
2021-08-31 16:03:14 +02:00
|
|
|
s->cache->nb_samples, new_cache->ch_layout.nb_channels, new_cache->format);
|
2020-11-17 13:43:55 +01:00
|
|
|
av_frame_free(&s->cache);
|
|
|
|
s->cache = new_cache;
|
|
|
|
} else {
|
|
|
|
return AVERROR(ENOMEM);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!s->cache)
|
2018-05-19 22:06:27 +02:00
|
|
|
return AVERROR(ENOMEM);
|
|
|
|
|
2022-03-09 21:39:46 +01:00
|
|
|
if (!s->window || s->window->nb_samples < newN) {
|
|
|
|
AVFrame *new_window = ff_get_audio_buffer(outlink, newN);
|
|
|
|
if (new_window) {
|
|
|
|
if (s->window)
|
|
|
|
av_samples_copy(new_window->extended_data, s->window->extended_data, 0, 0,
|
2021-08-31 16:03:14 +02:00
|
|
|
s->window->nb_samples, new_window->ch_layout.nb_channels, new_window->format);
|
2022-03-09 21:39:46 +01:00
|
|
|
av_frame_free(&s->window);
|
|
|
|
s->window = new_window;
|
|
|
|
} else {
|
|
|
|
return AVERROR(ENOMEM);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!s->window)
|
|
|
|
return AVERROR(ENOMEM);
|
|
|
|
|
2020-11-17 13:43:55 +01:00
|
|
|
s->pdiff_lut_scale = 1.f / s->m * WEIGHT_LUT_SIZE;
|
|
|
|
for (int i = 0; i < WEIGHT_LUT_SIZE; i++) {
|
|
|
|
float w = -i / s->pdiff_lut_scale;
|
|
|
|
|
|
|
|
s->weight_lut[i] = expf(w);
|
|
|
|
}
|
|
|
|
|
|
|
|
s->K = newK;
|
|
|
|
s->S = newS;
|
|
|
|
s->H = newH;
|
|
|
|
s->N = newN;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int config_output(AVFilterLink *outlink)
|
|
|
|
{
|
|
|
|
AVFilterContext *ctx = outlink->src;
|
|
|
|
AudioNLMeansContext *s = ctx->priv;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = config_filter(ctx);
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
2019-01-09 13:33:02 +01:00
|
|
|
ff_anlmdn_init(&s->dsp);
|
2018-05-19 22:06:27 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int filter_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
|
|
|
|
{
|
|
|
|
AudioNLMeansContext *s = ctx->priv;
|
|
|
|
AVFrame *out = arg;
|
|
|
|
const int S = s->S;
|
|
|
|
const int K = s->K;
|
2022-03-10 10:33:26 +01:00
|
|
|
const int N = s->N;
|
|
|
|
const int H = s->H;
|
2019-03-01 16:38:59 +01:00
|
|
|
const int om = s->om;
|
2022-03-09 21:39:46 +01:00
|
|
|
const float *f = (const float *)(s->window->extended_data[ch]) + K;
|
2018-05-19 22:06:27 +02:00
|
|
|
float *cache = (float *)s->cache->extended_data[ch];
|
2019-01-12 15:33:39 +01:00
|
|
|
const float sw = (65536.f / (4 * K + 2)) / sqrtf(s->a);
|
2022-03-09 21:39:46 +01:00
|
|
|
float *dst = (float *)out->extended_data[ch];
|
2022-03-09 21:11:47 +01:00
|
|
|
const float *const weight_lut = s->weight_lut;
|
|
|
|
const float pdiff_lut_scale = s->pdiff_lut_scale;
|
|
|
|
const float smooth = fminf(s->m, WEIGHT_LUT_SIZE / pdiff_lut_scale);
|
2022-03-10 10:33:26 +01:00
|
|
|
const int offset = N - H;
|
|
|
|
float *src = (float *)s->window->extended_data[ch];
|
|
|
|
const AVFrame *const in = s->in;
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2022-03-10 10:33:26 +01:00
|
|
|
memmove(src, &src[H], offset * sizeof(float));
|
|
|
|
memcpy(&src[offset], in->extended_data[ch], in->nb_samples * sizeof(float));
|
|
|
|
memset(&src[offset + in->nb_samples], 0, (H - in->nb_samples) * sizeof(float));
|
|
|
|
|
|
|
|
for (int i = S; i < H + S; i++) {
|
2018-05-19 22:06:27 +02:00
|
|
|
float P = 0.f, Q = 0.f;
|
|
|
|
int v = 0;
|
|
|
|
|
|
|
|
if (i == S) {
|
|
|
|
for (int j = i - S; j <= i + S; j++) {
|
|
|
|
if (i == j)
|
|
|
|
continue;
|
2019-01-09 13:33:02 +01:00
|
|
|
cache[v++] = s->dsp.compute_distance_ssd(f + i, f + j, K);
|
2018-05-19 22:06:27 +02:00
|
|
|
}
|
|
|
|
} else {
|
2019-01-09 13:33:02 +01:00
|
|
|
s->dsp.compute_cache(cache, f, S, K, i, i - S);
|
|
|
|
s->dsp.compute_cache(cache + S, f, S, K, i, i + 1);
|
2018-05-19 22:06:27 +02:00
|
|
|
}
|
|
|
|
|
2019-01-13 11:55:01 +01:00
|
|
|
for (int j = 0; j < 2 * S && !ctx->is_disabled; j++) {
|
2022-03-09 21:11:47 +01:00
|
|
|
float distance = cache[j];
|
2019-01-10 12:00:56 +01:00
|
|
|
unsigned weight_lut_idx;
|
2018-05-19 22:06:27 +02:00
|
|
|
float w;
|
|
|
|
|
2022-03-09 21:11:47 +01:00
|
|
|
if (distance < 0.f)
|
|
|
|
cache[j] = distance = 0.f;
|
2019-01-10 12:00:56 +01:00
|
|
|
w = distance * sw;
|
2019-06-02 11:58:49 +02:00
|
|
|
if (w >= smooth)
|
2019-01-09 21:00:16 +01:00
|
|
|
continue;
|
2022-03-09 21:11:47 +01:00
|
|
|
weight_lut_idx = w * pdiff_lut_scale;
|
2019-01-10 12:00:56 +01:00
|
|
|
av_assert2(weight_lut_idx < WEIGHT_LUT_SIZE);
|
2022-03-09 21:11:47 +01:00
|
|
|
w = weight_lut[weight_lut_idx];
|
2018-05-19 22:06:27 +02:00
|
|
|
P += w * f[i - S + j + (j >= S)];
|
|
|
|
Q += w;
|
|
|
|
}
|
|
|
|
|
|
|
|
P += f[i];
|
2022-03-09 21:11:47 +01:00
|
|
|
Q += 1.f;
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2019-03-01 16:38:59 +01:00
|
|
|
switch (om) {
|
|
|
|
case IN_MODE: dst[i - S] = f[i]; break;
|
|
|
|
case OUT_MODE: dst[i - S] = P / Q; break;
|
|
|
|
case NOISE_MODE: dst[i - S] = f[i] - (P / Q); break;
|
|
|
|
}
|
2018-05-19 22:06:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
|
|
|
{
|
|
|
|
AVFilterContext *ctx = inlink->dst;
|
|
|
|
AVFilterLink *outlink = ctx->outputs[0];
|
|
|
|
AudioNLMeansContext *s = ctx->priv;
|
2022-03-09 21:39:46 +01:00
|
|
|
AVFrame *out;
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2022-03-10 10:33:26 +01:00
|
|
|
if (av_frame_is_writable(in)) {
|
|
|
|
out = in;
|
|
|
|
} else {
|
|
|
|
out = ff_get_audio_buffer(outlink, in->nb_samples);
|
|
|
|
if (!out) {
|
|
|
|
av_frame_free(&in);
|
|
|
|
return AVERROR(ENOMEM);
|
|
|
|
}
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2022-03-10 10:33:26 +01:00
|
|
|
out->pts = in->pts;
|
2018-05-19 22:06:27 +02:00
|
|
|
}
|
|
|
|
|
2022-03-10 10:33:26 +01:00
|
|
|
s->in = in;
|
2021-08-31 16:03:14 +02:00
|
|
|
ff_filter_execute(ctx, filter_channel, out, NULL, inlink->ch_layout.nb_channels);
|
2018-05-19 22:06:27 +02:00
|
|
|
|
2022-03-10 10:33:26 +01:00
|
|
|
if (out != in)
|
|
|
|
av_frame_free(&in);
|
2022-03-09 21:39:46 +01:00
|
|
|
return ff_filter_frame(outlink, out);
|
2018-05-19 22:06:27 +02:00
|
|
|
}
|
|
|
|
|
2022-03-09 21:39:46 +01:00
|
|
|
static int activate(AVFilterContext *ctx)
|
2019-01-11 11:45:42 +01:00
|
|
|
{
|
2022-03-09 21:39:46 +01:00
|
|
|
AVFilterLink *inlink = ctx->inputs[0];
|
|
|
|
AVFilterLink *outlink = ctx->outputs[0];
|
2019-01-11 11:45:42 +01:00
|
|
|
AudioNLMeansContext *s = ctx->priv;
|
2022-03-09 21:39:46 +01:00
|
|
|
AVFrame *in = NULL;
|
|
|
|
int ret = 0, status;
|
|
|
|
int64_t pts;
|
2019-01-11 11:45:42 +01:00
|
|
|
|
2022-03-09 21:39:46 +01:00
|
|
|
FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink);
|
2019-01-11 11:45:42 +01:00
|
|
|
|
2022-03-09 21:39:46 +01:00
|
|
|
ret = ff_inlink_consume_samples(inlink, s->H, s->H, &in);
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
2019-01-11 11:45:42 +01:00
|
|
|
|
2022-03-09 21:39:46 +01:00
|
|
|
if (ret > 0) {
|
|
|
|
return filter_frame(inlink, in);
|
|
|
|
} else if (ff_inlink_acknowledge_status(inlink, &status, &pts)) {
|
|
|
|
ff_outlink_set_status(outlink, status, pts);
|
|
|
|
return 0;
|
|
|
|
} else {
|
|
|
|
if (ff_inlink_queued_samples(inlink) >= s->H) {
|
|
|
|
ff_filter_set_ready(ctx, 10);
|
|
|
|
} else if (ff_outlink_frame_wanted(outlink)) {
|
|
|
|
ff_inlink_request_frame(inlink);
|
|
|
|
}
|
|
|
|
return 0;
|
2019-01-11 11:45:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-17 13:43:55 +01:00
|
|
|
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
|
|
|
|
char *res, int res_len, int flags)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
2022-03-09 21:39:46 +01:00
|
|
|
return config_filter(ctx);
|
2020-11-17 13:43:55 +01:00
|
|
|
}
|
|
|
|
|
2018-05-19 22:06:27 +02:00
|
|
|
static av_cold void uninit(AVFilterContext *ctx)
|
|
|
|
{
|
|
|
|
AudioNLMeansContext *s = ctx->priv;
|
|
|
|
|
|
|
|
av_frame_free(&s->cache);
|
2022-03-09 21:39:46 +01:00
|
|
|
av_frame_free(&s->window);
|
2018-05-19 22:06:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static const AVFilterPad inputs[] = {
|
|
|
|
{
|
|
|
|
.name = "default",
|
|
|
|
.type = AVMEDIA_TYPE_AUDIO,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AVFilterPad outputs[] = {
|
|
|
|
{
|
|
|
|
.name = "default",
|
|
|
|
.type = AVMEDIA_TYPE_AUDIO,
|
|
|
|
.config_props = config_output,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-04-19 18:33:56 +02:00
|
|
|
const AVFilter ff_af_anlmdn = {
|
2018-05-19 22:06:27 +02:00
|
|
|
.name = "anlmdn",
|
|
|
|
.description = NULL_IF_CONFIG_SMALL("Reduce broadband noise from stream using Non-Local Means."),
|
|
|
|
.priv_size = sizeof(AudioNLMeansContext),
|
|
|
|
.priv_class = &anlmdn_class,
|
2022-03-09 21:39:46 +01:00
|
|
|
.activate = activate,
|
2018-05-19 22:06:27 +02:00
|
|
|
.uninit = uninit,
|
2021-08-12 13:05:31 +02:00
|
|
|
FILTER_INPUTS(inputs),
|
|
|
|
FILTER_OUTPUTS(outputs),
|
2021-09-27 13:10:11 +02:00
|
|
|
FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP),
|
2020-11-17 13:43:55 +01:00
|
|
|
.process_command = process_command,
|
2019-01-13 11:55:01 +01:00
|
|
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
|
|
|
|
AVFILTER_FLAG_SLICE_THREADS,
|
2018-05-19 22:06:27 +02:00
|
|
|
};
|