Re: [FFmpeg-devel] [PATCHv2] avfilter: add anoisesrc

2015-11-05 Thread Clément Bœsch
On Thu, Nov 05, 2015 at 09:49:32PM +0100, Nicolas George wrote: > Le quintidi 15 brumaire, an CCXXIV, Paul B Mahol a écrit : > > Hmm, why not simple enum/int? > > Did you miss the fact that AV_OPT_TYPE_FLAG is exactly for that? > AV_OPT_TYPE_FLAG is for concatenated "bool" flags (foo+bar+baz),

Re: [FFmpeg-devel] [PATCHv2] avfilter: add anoisesrc

2015-11-05 Thread Nicolas George
Le quintidi 15 brumaire, an CCXXIV, Clement Boesch a écrit : > AV_OPT_TYPE_FLAG is for concatenated "bool" flags (foo+bar+baz), > AV_OPT_TYPE_INT is probably what is needed here (it supports > AV_OPT_TYPE_CONST sub items) Oh, my bad, that was AV_OPT_TYPE_CONST I was referring to. Sorry for the

Re: [FFmpeg-devel] [PATCHv2] avfilter: add anoisesrc

2015-11-05 Thread Nicolas George
Le quintidi 15 brumaire, an CCXXIV, Paul B Mahol a écrit : > Hmm, why not simple enum/int? Did you miss the fact that AV_OPT_TYPE_FLAG is exactly for that? Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel

Re: [FFmpeg-devel] [PATCHv2] avfilter: add anoisesrc

2015-11-05 Thread Paul B Mahol
On 11/5/15, Nicolas George wrote: > Le quintidi 15 brumaire, an CCXXIV, Kyle Swanson a ecrit : >> +{ "color","set noise color", OFFSET(color), >> AV_OPT_TYPE_STRING,{.str = "white"}, CHAR_MIN, CHAR_MAX, FLAGS }, > >> +if (!strcmp(s->color, "pink")) { >> +

Re: [FFmpeg-devel] [PATCHv2] avfilter: add anoisesrc

2015-11-05 Thread Nicolas George
Le quintidi 15 brumaire, an CCXXIV, Kyle Swanson a écrit : > +{ "color","set noise color", OFFSET(color), > AV_OPT_TYPE_STRING,{.str = "white"}, CHAR_MIN, CHAR_MAX, FLAGS }, > +if (!strcmp(s->color, "pink")) { > +s->filter = pink_filter; > +} else

[FFmpeg-devel] [PATCHv2] avfilter: add anoisesrc

2015-11-05 Thread Kyle Swanson
Here's a new version of this patch based on everyone's comments. Sample format is still AV_SAMPLE_FMT_DBL despite concerns about that. The current pink and brown filter implementations are not designed for fixed-point DSP, and I was unable to come up with anything equal or better using