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
0b438975
Commit
0b438975
authored
Mar 25, 2020
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: fix hfov/vfov calculation from dfov for sg projection
parent
e5d25d11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
vf_v360.c
libavfilter/vf_v360.c
+9
-0
No files found.
libavfilter/vf_v360.c
View file @
0b438975
...
...
@@ -3542,6 +3542,15 @@ static int allocate_plane(V360Context *s, int sizeof_uv, int sizeof_ker, int siz
static
void
fov_from_dfov
(
int
format
,
float
d_fov
,
float
w
,
float
h
,
float
*
h_fov
,
float
*
v_fov
)
{
switch
(
format
)
{
case
STEREOGRAPHIC
:
{
const
float
d
=
0
.
5
f
*
hypotf
(
w
,
h
);
const
float
l
=
d
/
(
tanf
(
d_fov
*
M_PI
/
720
.
f
));
*
h_fov
=
2
.
f
*
atan2f
(
w
*
0
.
5
f
,
l
)
*
360
.
f
/
M_PI
;
*
v_fov
=
2
.
f
*
atan2f
(
h
*
0
.
5
f
,
l
)
*
360
.
f
/
M_PI
;
}
break
;
case
FISHEYE
:
{
const
float
d
=
0
.
5
f
*
hypotf
(
w
,
h
);
...
...
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