[FFmpeg-devel] [RFC] Scalar color conversion utils (colorutils.[hc])?

Stefano Sabatini stefano.sabatini-lala
Wed May 6 00:10:12 CEST 2009


On date Tuesday 2009-05-05 01:56:30 +0200, Michael Niedermayer encoded:
> On Mon, May 04, 2009 at 09:23:21PM +0200, Stefano Sabatini wrote:
> > On date Monday 2009-05-04 07:56:34 +0200, Diego Biurrun encoded:
> > > On Mon, May 04, 2009 at 01:08:33AM +0200, Stefano Sabatini wrote:
> > > > --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> > > > +++ libavfilter-soc/ffmpeg/libavfilter/colorutils.c	2009-05-04 01:04:50.000000000 +0200
> > > > @@ -0,0 +1,246 @@
> > > > +
> > > > +int main()
> > > 
> > > Once more with feeling:
> > > 
> > >   int main(void)
> > > 
> > > You cannot leave this out, it's not just consistency pedantry.
> > > 
> > > > --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> > > > +++ libavfilter-soc/ffmpeg/libavfilter/colorutils.h	2009-05-04 01:06:34.000000000 +0200
> > > > @@ -0,0 +1,41 @@
> > > > +/*
> > > > + * Stefano Sabatini 2009
> > > 
> > > What is this?
> > > 
> > > > +/**
> > > > + * Parses the color string in color_string, and puts in rgba_color the
> > > > + * RGBA component values of the corresponding color.
> > > 
> > > Your most common grammmar mistake.  In English it is
> > > 
> > >   put what where
> > > 
> > > not
> > > 
> > >   put where what
> > > 
> > > (like it probably is in Italian).
> > 
> > In Italian is "put what where" or "put where what" indifferently, so
> > I'm not used to pay much attention to the order, anyway fixed and
> > patch updated.
> > 
> > Result of test is:
> > 
> > Testing av_parse_color()
> > Cannot find color 'foo'
> > Cannot find color 'red'
> > Cannot find color 'Red '
> > Cannot find color 'RED'
> > Violet -> R(238) G(130) B(238) A(0)
> > Yellow -> R(255) G(255) B(0) A(0)
> > Red -> R(255) G(0) B(0) A(0)
> > 0x000000 -> R(0) G(0) B(0) A(0)
> > 0x3e34ff -> R(62) G(52) B(255) A(0)
> > 0x3e34ffaa -> R(62) G(52) B(255) A(170)
> > Invalid RGB[A] color string: '0xfoobar'
> > Invalid RGB[A] color string: '0xffffeeeeeeee'
> > 
> > Should I keep it in the commit?
> > 
> > Regards.
> > -- 
> > FFmpeg = Frightening & Freak MultiPurpose Ecumenical Gadget
> 
> >  parseutils.c |  213 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  parseutils.h |   10 ++
> >  2 files changed, 223 insertions(+)
> > a58e4ca3a385765e2d6f35b12f23f84e9110b5b5  implement-parse-color.patch
> 
> code ok, english is left to thouse who are better at judging its quality

Committed.
-- 
FFmpeg = Friendly Faithless Most Philosofic Erratic Guru



More information about the ffmpeg-devel mailing list