[FFmpeg-devel] [PATCH] lavfi/hue: apply major simplifications, and switch to AVOption-based system

Stefano Sabatini stefasab at gmail.com
Thu Apr 11 20:37:34 CEST 2013


On date Thursday 2013-04-11 09:01:55 +0000, Paul B Mahol encoded:
> On 4/10/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> > This also drops support for "flat syntax" and "reinit" command.
> > ---
> >  doc/filters.texi       |   40 ++++++----------
> >  libavfilter/avfilter.c |    1 +
> >  libavfilter/vf_hue.c   |  119
> > ++++++++++++++++--------------------------------
> >  3 files changed, 53 insertions(+), 107 deletions(-)
[...]
> > @@ -345,8 +298,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame
> > *inpic)
> >  static int process_command(AVFilterContext *ctx, const char *cmd, const
> > char *args,
> >                             char *res, int res_len, int flags)
> >  {
> > -    if (!strcmp(cmd, "reinit"))
> > -        return set_options(ctx, args);
> > +    HueContext *hue = ctx->priv;
> > +
> > +    if      (!strcmp(cmd, "h"))
> > +        return set_expr(&hue->hue_deg_pexpr, args, ctx);
> > +    else if (!strcmp(cmd, "H"))
> > +        return set_expr(&hue->hue_pexpr, args, ctx);
> > +    else if (!strcmp(cmd, "s"))
> > +        return set_expr(&hue->saturation_pexpr, args, ctx);
> >      else
> >          return AVERROR(ENOSYS);
> 
> I would like that this could be further simplified.

Done (and fixed a crash as well).
-- 
FFmpeg = Furious and Foolish Monstrous Perennial Educated Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-lavfi-hue-apply-major-simplifications-and-switch-to-.patch
Type: text/x-diff
Size: 10652 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130411/2157fbad/attachment.bin>


More information about the ffmpeg-devel mailing list