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
5a68b1ac
Commit
5a68b1ac
authored
Nov 15, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mandelbrot: add inner drawing method to show converence time
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5582e557
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
vsrc_mandelbrot.c
libavfilter/vsrc_mandelbrot.c
+7
-1
No files found.
libavfilter/vsrc_mandelbrot.c
View file @
5a68b1ac
...
...
@@ -43,6 +43,7 @@ enum Outer{
enum
Inner
{
BLACK
,
PERIOD
,
CONVTIME
,
};
typedef
struct
Point
{
...
...
@@ -94,6 +95,7 @@ static const AVOption mandelbrot_options[] = {
{
"inner"
,
"set inner coloring mode"
,
OFFSET
(
inner
),
AV_OPT_TYPE_INT
,
{.
dbl
=
BLACK
},
0
,
INT_MAX
,
0
,
"inner"
},
{
"black"
,
"set black mode"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
BLACK
},
INT_MIN
,
INT_MAX
,
0
,
"inner"
},
{
"period"
,
"set period mode"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
PERIOD
},
INT_MIN
,
INT_MAX
,
0
,
"inner"
},
{
"convergence"
,
"show time until convergence"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
CONVTIME
},
INT_MIN
,
INT_MAX
,
0
,
"inner"
},
{
NULL
},
};
...
...
@@ -252,7 +254,8 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
mb
->
zyklus
[
i
][
1
]
=
zi
;
}
}
if
(
!
c
&&
mb
->
inner
==
PERIOD
){
if
(
!
c
){
if
(
mb
->
inner
==
PERIOD
){
int
j
;
for
(
j
=
i
-
1
;
j
;
j
--
)
if
(
SQR
(
mb
->
zyklus
[
j
][
0
]
-
zr
)
+
SQR
(
mb
->
zyklus
[
j
][
1
]
-
zi
)
<
0
.
0000000000000001
)
...
...
@@ -261,6 +264,9 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
c
=
i
-
j
;
c
=
((
c
<<
5
)
&
0xE0
)
+
((
c
<<
16
)
&
0xE000
)
+
((
c
<<
27
)
&
0xE00000
);
}
}
else
if
(
mb
->
inner
==
CONVTIME
){
c
=
(
i
*
255
/
mb
->
maxiter
)
*
0x010101
;
}
}
c
|=
0xFF000000
;
color
[
x
+
y
*
linesize
]
=
c
;
...
...
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