[FFmpeg-devel] [PATCH] lavfi/geq: add aliases for RGB options
Michael Niedermayer
michaelni at gmx.at
Mon May 20 13:55:56 CEST 2013
On Mon, May 20, 2013 at 11:43:17AM +0200, Stefano Sabatini wrote:
> On date Monday 2013-05-20 00:23:21 +0200, Clément Bœsch encoded:
> > On Sun, May 19, 2013 at 11:25:01PM +0200, Stefano Sabatini wrote:
> > > ---
> > > doc/filters.texi | 19 ++++++++++---------
> > > libavfilter/vf_geq.c | 8 +++++++-
> > > 2 files changed, 17 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/doc/filters.texi b/doc/filters.texi
> > > index 910f876..c8d9979 100644
> > > --- a/doc/filters.texi
> > > +++ b/doc/filters.texi
> > > @@ -4003,27 +4003,28 @@ For more information see:
> > > The filter accepts the following options:
> > >
> > > @table @option
> > > - at item lum_expr
> > > + at item lum_expr, y
> > > Set the luminance expression.
> > > - at item cb_expr
> > > + at item cb_expr, u
> > > Set the chrominance blue expression.
> > > - at item cr_expr
> > > + at item cr_expr, v
> > > Set the chrominance red expression.
> > > - at item alpha_expr
> > > + at item alpha_expr, a
> > > Set the alpha expression.
> > > - at item r
> > > + at item red_expr, r
> > > Set the red expression.
> > > - at item g
> > > + at item green_expr, g
> > > Set the green expression.
> > > - at item b
> > > + at item blue_expr, b
> > > Set the blue expression.
> > > @end table
> > >
> > > The colorspace is selected according to the specified expressions. If
> > > one of the @option{lum_expr}, @option{cb_expr}, or @option{cr_expr}
> > > expression is specified, the filter will automatically select a YCbCr
> > > -colorspace. If one of the @option{r}, @option{g}, or @option{b}
> > > -options is specified, it will select an RGB colorspace.
> > > +colorspace. If one of the @option{red_exrp}, @option{green_expr}, or
> > > + at option{blue_expr} options is specified, it will select an RGB
> > > +colorspace.
> > >
> > > If one of the chrominance expression is not defined, it falls back on the other
> > > one. If no alpha expression is specified it will evaluate to opaque value.
> > > diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
> > > index 5ee75d1..def3956 100644
> > > --- a/libavfilter/vf_geq.c
> > > +++ b/libavfilter/vf_geq.c
> > > @@ -47,12 +47,18 @@ typedef struct {
> > >
> > > static const AVOption geq_options[] = {
> > > { "lum_expr", "set luminance expression", OFFSET(expr_str[0]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > + { "y", "set luminance expression", OFFSET(expr_str[0]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > { "cb_expr", "set chroma blue expression", OFFSET(expr_str[1]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > + { "u", "set chroma blue expression", OFFSET(expr_str[1]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > { "cr_expr", "set chroma red expression", OFFSET(expr_str[2]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > + { "v", "set chroma red expression", OFFSET(expr_str[2]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > { "alpha_expr", "set alpha expression", OFFSET(expr_str[3]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > -
> > > + { "a", "set alpha expression", OFFSET(expr_str[3]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > + { "red_expr", "set red expression", OFFSET(expr_str[6]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > { "r", "set red expression", OFFSET(expr_str[6]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > + { "green_expr", "set green expression", OFFSET(expr_str[4]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > { "g", "set green expression", OFFSET(expr_str[4]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > + { "blue_expr", "set blue expression", OFFSET(expr_str[5]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > { "b", "set blue expression", OFFSET(expr_str[5]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
> > > {NULL},
> > > };
> >
> > Fine with me.
>
> Updated.
>
> y -> lum
> u -> cb
> v -> cr
>
> for consistency with long names and lum/cb/cr functions.
> --
> FFmpeg = Faithful Fanciful Mastodontic Power Ephemeral God
> doc/filters.texi | 23 ++++++++++++-----------
> libavfilter/vf_geq.c | 8 +++++++-
> 2 files changed, 19 insertions(+), 12 deletions(-)
> 2b60c645fa52baac1fbef1be21159f76ae25d82f 0005-lavfi-geq-add-aliases-for-RGB-options.patch
> From b617269978edecdcc370228bc46bb0dcf39c8392 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Sun, 19 May 2013 23:24:21 +0200
> Subject: [PATCH] lavfi/geq: add aliases for RGB options
LGTM
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130520/7b9d1599/attachment.asc>
More information about the ffmpeg-devel
mailing list