[FFmpeg-devel] [PATCH] lavu: add av_get_color_string() and use it in -colors option

Stefano Sabatini stefasab at gmail.com
Mon Oct 21 11:02:13 CEST 2013


On date Monday 2013-10-21 08:54:37 +0000, Paul B Mahol encoded:
> On 10/21/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> > On date Monday 2013-10-21 07:20:55 +0000, Paul B Mahol encoded:
> >> On 10/20/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> >> > On date Thursday 2013-10-17 19:06:39 +0200, Stefano Sabatini encoded:
> >> >> On date Tuesday 2013-10-15 11:58:44 +0200, Michael Niedermayer
> >> >> encoded:
> >> >> > On Sat, Mar 12, 2011 at 01:36:05PM +0100, Stefano Sabatini wrote:
> >> >> > > ---
> >> >> > >  cmdutils.c                   |   13 +++++++++++++
> >> >> > >  cmdutils.h                   |    6 ++++++
> >> >> > >  cmdutils_common_opts.h       |    1 +
> >> >> > >  doc/fftools-common-opts.texi |    3 +++
> >> >> > >  libavutil/parseutils.c       |   18 ++++++++++++++++++
> >> >> > >  libavutil/parseutils.h       |   14 ++++++++++++++
> >> >> > >  6 files changed, 55 insertions(+), 0 deletions(-)
> >> >>
> >> >> New patches, provide a more flexible approach.
> >> >
> >> > Ping.
> >>
> >> I already commented, but perhaps you like to ignore my comments.
> >
> > "It's ugly" is hardly a useful comment.
> >
> > So, what about:
> > const char *av_get_color_name(const char **bufp, const uint16_t **rgbp, int
> > color_idx)
> 
> Color can be given in other colorspaces. But looking that this function use
> is quite limited I'm not motivated to think about it more.

What this function does is to simply expose the color name
definitions, which is given as RGB 8-bits per component, and I'm not
even sure that 16bits per components are used for specifying standard
colors (human vision won't be able to reliably distinguish them).

We have already a RGB to YUV utilities (libavutil/colorspace.h) so the
colorspace representation is not an issue.

I will push my latest patches if I see no more comments.
-- 
FFmpeg = Frightening and Free Mastodontic Peaceless Enchanting Glue


More information about the ffmpeg-devel mailing list