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
79938a4e
Commit
79938a4e
authored
Mar 27, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mandelbrot: add outer coloring method showing bailouted z
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a2b58256
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
vsrc_mandelbrot.c
libavfilter/vsrc_mandelbrot.c
+7
-0
No files found.
libavfilter/vsrc_mandelbrot.c
View file @
79938a4e
...
...
@@ -42,6 +42,7 @@ enum Outer{
ITERATION_COUNT
,
NORMALIZED_ITERATION_COUNT
,
WHITE
,
OUTZ
,
};
enum
Inner
{
...
...
@@ -98,6 +99,7 @@ static const AVOption mandelbrot_options[] = {
{
"iteration_count"
,
"set iteration count mode"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
ITERATION_COUNT
},
INT_MIN
,
INT_MAX
,
FLAGS
,
"outer"
},
{
"normalized_iteration_count"
,
"set normalized iteration count mode"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
NORMALIZED_ITERATION_COUNT
},
INT_MIN
,
INT_MAX
,
FLAGS
,
"outer"
},
{
"white"
,
"set white mode"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WHITE
},
INT_MIN
,
INT_MAX
,
FLAGS
,
"outer"
},
{
"outz"
,
"set outz mode"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
OUTZ
},
INT_MIN
,
INT_MAX
,
FLAGS
,
"outer"
},
{
"inner"
,
"set inner coloring mode"
,
OFFSET
(
inner
),
AV_OPT_TYPE_INT
,
{.
i64
=
MINCOL
},
0
,
INT_MAX
,
FLAGS
,
"inner"
},
{
"black"
,
"set black mode"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
BLACK
},
INT_MIN
,
INT_MAX
,
FLAGS
,
"inner"
},
...
...
@@ -330,6 +332,11 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
break
;
case
WHITE
:
c
=
0xFFFFFF
;
break
;
case
OUTZ
:
zr
/=
mb
->
bailout
;
zi
/=
mb
->
bailout
;
c
=
(((
int
)(
zr
*
128
+
128
))
&
0xFF
)
*
256
+
(((
int
)(
zi
*
128
+
128
))
&
0xFF
);
}
break
;
}
...
...
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