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
08dadd33
Commit
08dadd33
authored
Nov 13, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mandelbrot: allow visualizing the period of converged points.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e8499ab1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
vsrc_mandelbrot.c
libavfilter/vsrc_mandelbrot.c
+12
-1
No files found.
libavfilter/vsrc_mandelbrot.c
View file @
08dadd33
...
...
@@ -39,6 +39,7 @@ enum Outer{
enum
Inner
{
BLACK
,
PERIOD
,
};
typedef
struct
Point
{
...
...
@@ -185,7 +186,7 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
if
(
color
[
x
+
y
*
linesize
]
&
0xFF000000
)
continue
;
use_zyklus
=
(
x
==
0
||
color
[
x
-
1
+
y
*
linesize
]
==
0xFF000000
);
use_zyklus
=
(
x
==
0
||
mb
->
inner
!=
BLACK
||
color
[
x
-
1
+
y
*
linesize
]
==
0xFF000000
);
for
(
i
=
0
;
i
<
mb
->
maxiter
;
i
++
){
double
t
;
...
...
@@ -213,6 +214,16 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
mb
->
zyklus
[
i
][
1
]
=
zi
;
}
}
if
(
!
c
&&
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
)
break
;
if
(
j
){
c
=
i
-
j
;
c
=
((
c
<<
5
)
&
0xE0
)
+
((
c
<<
16
)
&
0xE000
)
+
((
c
<<
27
)
&
0xE00000
);
}
}
c
|=
0xFF000000
;
color
[
x
+
y
*
linesize
]
=
c
;
if
(
next_cidx
<
mb
->
cache_allocated
){
...
...
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