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
a8925d26
Commit
a8925d26
authored
Sep 22, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: fix mercator_to_xyz()
parent
b4d2bea6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
vf_v360.c
libavfilter/vf_v360.c
+8
-7
No files found.
libavfilter/vf_v360.c
View file @
a8925d26
...
...
@@ -1589,17 +1589,18 @@ static void mercator_to_xyz(const V360Context *s,
int
i
,
int
j
,
int
width
,
int
height
,
float
*
vec
)
{
const
float
phi
=
((
2
.
f
*
i
)
/
width
-
1
.
f
)
*
M_PI
;
const
float
theta
=
atanf
(
sinhf
(((
2
.
f
*
j
)
/
height
-
1
.
f
)
*
2
.
f
*
M_PI
));
const
float
phi
=
((
2
.
f
*
i
)
/
width
-
1
.
f
)
*
M_PI
+
M_PI_2
;
const
float
y
=
((
2
.
f
*
j
)
/
height
-
1
.
f
)
*
M_PI
;
const
float
div
=
expf
(
2
.
f
*
y
)
+
1
.
f
;
const
float
sin_phi
=
sinf
(
phi
);
const
float
cos_phi
=
cosf
(
phi
);
const
float
sin_theta
=
sinf
(
theta
)
;
const
float
cos_theta
=
cosf
(
theta
)
;
const
float
sin_theta
=
-
2
.
f
*
expf
(
y
)
/
div
;
const
float
cos_theta
=
-
(
expf
(
2
.
f
*
y
)
-
1
.
f
)
/
div
;
vec
[
0
]
=
cos_theta
*
sin
_phi
;
vec
[
1
]
=
-
sin
_theta
;
vec
[
2
]
=
-
cos_theta
*
cos
_phi
;
vec
[
0
]
=
sin_theta
*
cos
_phi
;
vec
[
1
]
=
cos
_theta
;
vec
[
2
]
=
sin_theta
*
sin
_phi
;
}
/**
...
...
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