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
34046bcd
Commit
34046bcd
authored
Sep 21, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: simplify ball_to_xyz() calculations
parent
ecaef69f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
vf_v360.c
libavfilter/vf_v360.c
+4
-10
No files found.
libavfilter/vf_v360.c
View file @
34046bcd
...
...
@@ -1643,17 +1643,11 @@ static void ball_to_xyz(const V360Context *s,
const
float
l
=
hypotf
(
x
,
y
);
if
(
l
<=
1
.
f
)
{
const
float
phi
=
atan2f
(
x
,
y
);
const
float
theta
=
2
.
f
*
asinf
(
l
);
const
float
z
=
2
.
f
*
l
*
sqrtf
(
1
.
f
-
l
*
l
);
const
float
sin_phi
=
sinf
(
phi
);
const
float
cos_phi
=
cosf
(
phi
);
const
float
sin_theta
=
sinf
(
theta
);
const
float
cos_theta
=
cosf
(
theta
);
vec
[
0
]
=
sin_theta
*
sin_phi
;
vec
[
1
]
=
-
sin_theta
*
cos_phi
;
vec
[
2
]
=
-
cos_theta
;
vec
[
0
]
=
z
*
x
/
(
l
>
0
.
f
?
l
:
1
.
f
);
vec
[
1
]
=
-
z
*
y
/
(
l
>
0
.
f
?
l
:
1
.
f
);
vec
[
2
]
=
-
1
.
f
+
2
.
f
*
l
*
l
;
}
else
{
vec
[
0
]
=
0
.
f
;
vec
[
1
]
=
-
1
.
f
;
...
...
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