[FFmpeg-devel] [PATCH] avfilter/vf_bilateral: process command to set the parameter at runtime

Tao Zhang nowerzt at gmail.com
Thu Oct 24 04:28:25 EEST 2019


Paul B Mahol <onemda at gmail.com> 于2019年10月23日周三 下午9:47写道:
>
> Not ok, range sigma is used to change array values you never update here.
Right, I will submit a new version which try to call config_props()
when the user set range sigma at runtime. Thanks a lot.
>
> On 10/23/19, leozhang <leozhang at qiyi.com> wrote:
> > ---
> >  libavfilter/vf_bilateral.c | 21 +++++++++++----------
> >  1 file changed, 11 insertions(+), 10 deletions(-)
> >
> > diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c
> > index 3c9d800..a06f434 100644
> > --- a/libavfilter/vf_bilateral.c
> > +++ b/libavfilter/vf_bilateral.c
> > @@ -54,7 +54,7 @@ typedef struct BilateralContext {
> >  } BilateralContext;
> >
> >  #define OFFSET(x) offsetof(BilateralContext, x)
> > -#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
> > +#define FLAGS
> > AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
> >
> >  static const AVOption bilateral_options[] = {
> >      { "sigmaS", "set spatial sigma",    OFFSET(sigmaS), AV_OPT_TYPE_FLOAT,
> > {.dbl=0.1}, 0.0,  10, FLAGS },
> > @@ -358,13 +358,14 @@ static const AVFilterPad bilateral_outputs[] = {
> >  };
> >
> >  AVFilter ff_vf_bilateral = {
> > -    .name          = "bilateral",
> > -    .description   = NULL_IF_CONFIG_SMALL("Apply Bilateral filter."),
> > -    .priv_size     = sizeof(BilateralContext),
> > -    .priv_class    = &bilateral_class,
> > -    .uninit        = uninit,
> > -    .query_formats = query_formats,
> > -    .inputs        = bilateral_inputs,
> > -    .outputs       = bilateral_outputs,
> > -    .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
> > +    .name            = "bilateral",
> > +    .description     = NULL_IF_CONFIG_SMALL("Apply Bilateral filter."),
> > +    .priv_size       = sizeof(BilateralContext),
> > +    .priv_class      = &bilateral_class,
> > +    .uninit          = uninit,
> > +    .query_formats   = query_formats,
> > +    .inputs          = bilateral_inputs,
> > +    .outputs         = bilateral_outputs,
> > +    .flags           = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
> > +    .process_command = ff_filter_process_command,
> >  };
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list