diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-14 18:15:14 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-10-17 19:44:11 +0200 |
commit | 295d99b4393de8ff844048237eddac8496af567c (patch) | |
tree | ddc366a88fa1d3f3d7df96504360f7140b128fce /libavfilter/vf_atadenoise.c | |
parent | eb17bf6fd3da5136d3b15c7e608a317826fd15f9 (diff) | |
download | ffmpeg-295d99b4393de8ff844048237eddac8496af567c.tar.gz |
avfilter/vf_adadenoise: add x86 SIMD
Diffstat (limited to 'libavfilter/vf_atadenoise.c')
-rw-r--r-- | libavfilter/vf_atadenoise.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c index 21c9bb3bac..740f99d952 100644 --- a/libavfilter/vf_atadenoise.c +++ b/libavfilter/vf_atadenoise.c @@ -33,6 +33,7 @@ #define FF_BUFQUEUE_SIZE 129 #include "bufferqueue.h" +#include "atadenoise.h" #include "formats.h" #include "internal.h" #include "video.h" @@ -57,10 +58,8 @@ typedef struct ATADenoiseContext { int available; int (*filter_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); - void (*filter_row)(const uint8_t *src, uint8_t *dst, - const uint8_t *srcf[SIZE], - int w, int mid, int size, - int thra, int thrb); + + ATADenoiseDSPContext dsp; } ATADenoiseContext; #define OFFSET(x) offsetof(ATADenoiseContext, x) @@ -209,7 +208,7 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) srcf[i] = data[i] + slice_start * linesize[i]; for (y = slice_start; y < slice_end; y++) { - s->filter_row(src, dst, srcf, w, mid, size, thra, thrb); + s->dsp.filter_row(src, dst, srcf, w, mid, size, thra, thrb); dst += out->linesize[p]; src += in->linesize[p]; @@ -239,9 +238,9 @@ static int config_input(AVFilterLink *inlink) depth = desc->comp[0].depth; s->filter_slice = filter_slice; if (depth == 8) - s->filter_row = filter_row8; + s->dsp.filter_row = filter_row8; else - s->filter_row = filter_row16; + s->dsp.filter_row = filter_row16; s->thra[0] = s->fthra[0] * (1 << depth) - 1; s->thra[1] = s->fthra[1] * (1 << depth) - 1; @@ -250,6 +249,9 @@ static int config_input(AVFilterLink *inlink) s->thrb[1] = s->fthrb[1] * (1 << depth) - 1; s->thrb[2] = s->fthrb[2] * (1 << depth) - 1; + if (ARCH_X86) + ff_atadenoise_init_x86(&s->dsp, depth); + return 0; } |