Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
6c44ff38
Commit
6c44ff38
authored
Dec 08, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add cellauto source
parent
60b252eb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
489 additions
and
1 deletion
+489
-1
Changelog
Changelog
+1
-0
filters.texi
doc/filters.texi
+115
-0
Makefile
libavfilter/Makefile
+1
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
avfilter.h
libavfilter/avfilter.h
+1
-1
vsrc_cellauto.c
libavfilter/vsrc_cellauto.c
+370
-0
No files found.
Changelog
View file @
6c44ff38
...
...
@@ -133,6 +133,7 @@ easier to use. The changes are:
- CLJR encoder
- new option: -report
- Dxtory capture format decoder
- cellauto source
version 0.8:
...
...
doc/filters.texi
View file @
6c44ff38
...
...
@@ -2604,6 +2604,121 @@ this example corresponds to:
buffer=320:240:6:1:24:1:1
@end example
@section cellauto
Create a pattern generated by an elementary cellular automaton.
The initial state of the cellular automaton can be defined through the
@option{filename}, and @option{pattern} options. If such options are
not specified an initial state is created randomly.
At each new frame a new row in the video is filled with the result of
the cellular automaton next generation. The behavior when the whole
frame is filled is defined by the @option{scroll} option.
This source accepts a list of options in the form of
@var{key}=@var{value} pairs separated by ":". A description of the
accepted options follows.
@table @option
@item filename, f
Read the initial cellular automaton state, i.e. the starting row, from
the specified file.
In the file, each non-whitespace character is considered an alive
cell, a newline will terminate the row, and further characters in the
file will be ignored.
@item pattern, p
Read the initial cellular automaton state, i.e. the starting row, from
the specified string.
Each non-whitespace character in the string is considered an alive
cell, a newline will terminate the row, and further characters in the
string will be ignored.
@item rate, r
Set the video rate, that is the number of frames generated per second.
Default is 25.
@item random_fill_ratio, ratio
Set the random fill ratio for the initial cellular automaton row. It
is a floating point number value ranging from 0 to 1, defaults to
1/PHI.
This option is ignored when a file or a pattern is specified.
@item random_seed, seed
Set the seed for filling randomly the initial row, must be an integer
included between 0 and UINT32_MAX. If not specified, or if explicitly
set to -1, the filter will try to use a good random seed on a best
effort basis.
@item rule
Set the cellular automaton rule, it is a number ranging from 0 to 255.
Default value is 110.
@item size, s
Set the size of the output video.
If @option{filename} or @option{pattern} is specified, the size is set
by default to the width of the specified initial state row, and the
height is set to @var{width} * PHI.
If @option{size} is set, it must contain the width of the specified
pattern string, and the specified pattern will be centered in the
larger row.
If a filename or a pattern string is not specified, the size value
defaults to "320x518" (used for a randomly generated initial state).
@item scroll
If set to 1, scroll the output upward when all the rows in the output
have been already filled. If set to 0, the new generated row will be
written over the top row just after the bottom row is filled.
Defaults to 1.
@item start_full, full
If set to 1, completely fill the output with generated rows before
outputting the first frame.
This is the default behavior, for disabling set the value to 0.
@item stitch
If set to 1, stitch the left and right row edges together.
This is the default behavior, for disabling set the value to 0.
@end table
@subsection Examples
@itemize
@item
Read the initial state from @file{pattern}, and specify an output of
size 200x400.
@example
cellauto=f=pattern:s=200x400
@end example
@item
Generate a random initial row with a width of 200 cells, with a fill
ratio of 2/3:
@example
cellauto=ratio=2/3:s=200x200
@end example
@item
Create a pattern generated by rule 18 starting by a single alive cell
centered on an initial row with width 100:
@example
cellauto=p=@@:s=100x400:full=0:rule=18
@end example
@item
Specify a more elaborated initial pattern:
@example
cellauto=p='@@@@ @@ @@@@':s=100x400:full=0:rule=18
@end example
@end itemize
@section color
Provide an uniformly colored input.
...
...
libavfilter/Makefile
View file @
6c44ff38
...
...
@@ -84,6 +84,7 @@ OBJS-$(CONFIG_VFLIP_FILTER) += vf_vflip.o
OBJS-$(CONFIG_YADIF_FILTER)
+=
vf_yadif.o
OBJS-$(CONFIG_BUFFER_FILTER)
+=
vsrc_buffer.o
OBJS-$(CONFIG_CELLAUTO_FILTER)
+=
vsrc_cellauto.o
OBJS-$(CONFIG_COLOR_FILTER)
+=
vsrc_color.o
OBJS-$(CONFIG_FREI0R_SRC_FILTER)
+=
vf_frei0r.o
OBJS-$(CONFIG_LIFE_FILTER)
+=
vsrc_life.o
...
...
libavfilter/allfilters.c
View file @
6c44ff38
...
...
@@ -95,6 +95,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
YADIF
,
yadif
,
vf
);
REGISTER_FILTER
(
BUFFER
,
buffer
,
vsrc
);
REGISTER_FILTER
(
CELLAUTO
,
cellauto
,
vsrc
);
REGISTER_FILTER
(
COLOR
,
color
,
vsrc
);
REGISTER_FILTER
(
FREI0R
,
frei0r_src
,
vsrc
);
REGISTER_FILTER
(
LIFE
,
life
,
vsrc
);
...
...
libavfilter/avfilter.h
View file @
6c44ff38
...
...
@@ -29,7 +29,7 @@
#include "libavutil/rational.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 5
2
#define LIBAVFILTER_VERSION_MINOR 5
3
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
libavfilter/vsrc_cellauto.c
0 → 100644
View file @
6c44ff38
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment