[FFmpeg-devel] [PATCH] life source

Stefano Sabatini stefasab at gmail.com
Sun Dec 4 21:25:28 CET 2011


On date Sunday 2011-12-04 18:05:04 +0100, Clément Bœsch encoded:
> On Sun, Dec 04, 2011 at 01:16:21PM +0100, Stefano Sabatini wrote:
[...]
> > Added random grid generation in case of no specified file (based on a
> > simple probabilistic approach), border stitching (by default) and
> > implemented a saner syntax for specifying rules based on the game of
> > life Wikipedia article. Also changed the name lifesrc -> life.
> > 
> 
> We will need to add FFmpeg in the "Notable Life programs" section now ;)
> 
> > I'll apply it in a few days if no one has more comments, documentation
> > remarks are especially appreciated.
> > -- 
> > FFmpeg = Free Forgiving Mysterious Portable Efficient Guru
> 
> > From 807a3d6a306070a3d64cb367187a91fde2656e29 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefasab at gmail.com>
> > Date: Sun, 26 Jun 2011 19:47:18 +0200
> > Subject: [PATCH] lavfi: add life source
> > 
> > ---
> >  doc/filters.texi         |   80 +++++++++
> >  libavfilter/Makefile     |    1 +
> >  libavfilter/allfilters.c |    1 +
> >  libavfilter/vsrc_life.c  |  410 ++++++++++++++++++++++++++++++++++++++++++++++
> >  4 files changed, 492 insertions(+), 0 deletions(-)
> >  create mode 100644 libavfilter/vsrc_life.c
> > 
> > diff --git a/doc/filters.texi b/doc/filters.texi
> > index fc34bf2..a83a2d3 100644
> > --- a/doc/filters.texi
> > +++ b/doc/filters.texi
> > @@ -2772,6 +2772,86 @@ Some examples follow:
> >  frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay
> >  @end example
> >  
> > + at section life
> > +
> > +Generate a life pattern.
> > +
> [...]
> > +
> > +Default value is "S23/B3", which is the original Conway's game of life
> > +rule, and will keep a cell alive if it has 2 or 3 neighbor alive
> > +cells, and will born a new cell if there are three alive cells around
> > +a dead cell.
> > +
> > + at item random_fill_ratio, ratio
> > +Set the random fill ratio for the initial random grid. It is a
> > +floating point number value ranging from 0 to 1, defaults to 1/PHI.
> 
> Ignored when a file is specified I guess?

Added a note.

> 
> > +
> > + at item random_seed, seed
> > +Set the seed for filling the initial grid, must be an integer included
> > +between 0 and UINT32_MAX. If not specified, or if explicitely set to
> 
> explicitly

Fixed.

> 
> > +-1, the filter will try to use a good random seed at a best effort bases.
> > +
> > + at item size, s
> > +Set the size of the output video.
> > +
> > +If the @option{filename} option is specified it is set by default to
> > +the same value of the input file, and the specified size must contain
> > +the size specified in the initial grid file.
> > +Otherwise it is set by default to "320x240" for a randomly generated
> > +initial grid.
> > +
> 
> We can't have a larger area in which the grid from the file would be set
> in the center, right? IIRC the first initial patch had that kind of
> behaviour. I don't mind if this isn't possible anymore, but it might be
> nice to explicit it.

I reformulated the paragraph.

[...]

Did more wording fixes here and there, added some examples, and
added life to FFmpeg.
-- 
FFmpeg = Freak & Fundamentalist Mortal Pitiful Everlasting Game


More information about the ffmpeg-devel mailing list