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
073d2269
Commit
073d2269
authored
Sep 21, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: simplify xyz_to_dfisheye() calculations
parent
b342678b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
vf_v360.c
libavfilter/vf_v360.c
+5
-4
No files found.
libavfilter/vf_v360.c
View file @
073d2269
...
@@ -2083,11 +2083,12 @@ static void xyz_to_dfisheye(const V360Context *s,
...
@@ -2083,11 +2083,12 @@ static void xyz_to_dfisheye(const V360Context *s,
const
float
ew
=
width
/
2
.
f
;
const
float
ew
=
width
/
2
.
f
;
const
float
eh
=
height
;
const
float
eh
=
height
;
const
float
phi
=
atan2f
(
-
vec
[
1
],
-
vec
[
0
])
*
s
->
input_mirror_modifier
[
0
];
const
float
h
=
hypotf
(
vec
[
0
],
vec
[
1
]);
const
float
theta
=
acosf
(
fabsf
(
vec
[
2
]))
/
M_PI
*
s
->
input_mirror_modifier
[
1
];
const
float
lh
=
h
>
0
.
f
?
h
:
1
.
f
;
const
float
theta
=
acosf
(
fabsf
(
vec
[
2
]))
/
M_PI
;
float
uf
=
(
theta
*
cosf
(
phi
)
*
scale
+
0
.
5
f
)
*
ew
;
float
uf
=
(
theta
*
(
-
vec
[
0
]
/
lh
)
*
s
->
input_mirror_modifier
[
0
]
*
scale
+
0
.
5
f
)
*
ew
;
float
vf
=
(
theta
*
sinf
(
phi
)
*
scale
+
0
.
5
f
)
*
eh
;
float
vf
=
(
theta
*
(
-
vec
[
1
]
/
lh
)
*
s
->
input_mirror_modifier
[
1
]
*
scale
+
0
.
5
f
)
*
eh
;
int
ui
,
vi
;
int
ui
,
vi
;
int
u_shift
;
int
u_shift
;
...
...
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