Re: [FFmpeg-devel] [PATCH] avfilter: add deflash filter
On Fri, Nov 20, 2015 at 20:13:11 +0100, Paul B Mahol wrote: Trivial, but: > +{ "0fd", "set flash threshold detection for 1st color component", > OFFSET(fthrd[0]), AV_OPT_TYPE_FLOAT, {.dbl=0.2}, 0, 5, FLAGS }, > +{ "0fr", "set ammount of flash reduction for 1st color component", > OFFSET(fthrr[0]), AV_OPT_TYPE_FLOAT, {.dbl=0.05}, 0, 1, FLAGS }, ^^^ amount (Three times in the options declarations.) Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add deflash filter
On 11/21/15, Clement Boesch wrote: > On Fri, Nov 20, 2015 at 08:13:11PM +0100, Paul B Mahol wrote: > [...] >> +for (y = 0; y < h; y++) { >> +for (x = 0; x < w; x++) { >> +int diff = next[x] - src[x]; >> +int t = 0; >> + >> +for (z = 0; z < FF_BUFQUEUE_SIZE - 1; z++) { >> +AVFrame *f1 = ff_bufqueue_peek(&s->q, z); >> +AVFrame *f2 = ff_bufqueue_peek(&s->q, z+1); >> + > > f1 and f2 are const > >> +t += FFABS(f2->data[p][f2->linesize[p] * y + x] - >> f1->data[p][f1->linesize[p] * y + x]); > > fabs()? > > looks like you could use sad utils and/or threading > > [...] > > doc? > > -- > Clement B. > I'm more interested in beter algorithm for flash removal. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add deflash filter
On Fri, Nov 20, 2015 at 08:13:11PM +0100, Paul B Mahol wrote: [...] > +for (y = 0; y < h; y++) { > +for (x = 0; x < w; x++) { > +int diff = next[x] - src[x]; > +int t = 0; > + > +for (z = 0; z < FF_BUFQUEUE_SIZE - 1; z++) { > +AVFrame *f1 = ff_bufqueue_peek(&s->q, z); > +AVFrame *f2 = ff_bufqueue_peek(&s->q, z+1); > + f1 and f2 are const > +t += FFABS(f2->data[p][f2->linesize[p] * y + x] - > f1->data[p][f1->linesize[p] * y + x]); fabs()? looks like you could use sad utils and/or threading [...] doc? -- Clément B. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add deflash filter
On Fri, Nov 20, 2015 at 08:13:11PM +0100, Paul B Mahol wrote: [...] > +static av_cold void uninit(AVFilterContext *ctx) > +{ > +DeFlashContext *s = ctx->priv; > +} > + > +static const AVFilterPad inputs[] = { > +{ > +.name = "default", > +.type = AVMEDIA_TYPE_VIDEO, > +.filter_frame = filter_frame, > +.config_props = config_input, > +}, > +{ NULL } > +}; > + > +static const AVFilterPad outputs[] = { > +{ > +.name = "default", > +.type = AVMEDIA_TYPE_VIDEO, > +}, > +{ NULL } > +}; > + > +AVFilter ff_vf_deflash = { > +.name = "deflash", > +.description = NULL_IF_CONFIG_SMALL("Deflash."), > +.priv_size = sizeof(DeFlashContext), > +.priv_class= &deflash_class, > +.uninit= uninit, function is empty, this could be removed, unless you want to keep it / plan to add something to it either way, patch shuld be ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel