Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
a00fa73f
Commit
a00fa73f
authored
Jan 22, 2020
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: improve fisheye input format
parent
2bae3da7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
vf_v360.c
libavfilter/vf_v360.c
+11
-10
No files found.
libavfilter/vf_v360.c
View file @
a00fa73f
...
@@ -2379,22 +2379,23 @@ static void xyz_to_fisheye(const V360Context *s,
...
@@ -2379,22 +2379,23 @@ static void xyz_to_fisheye(const V360Context *s,
const
float
*
vec
,
int
width
,
int
height
,
const
float
*
vec
,
int
width
,
int
height
,
int16_t
us
[
4
][
4
],
int16_t
vs
[
4
][
4
],
float
*
du
,
float
*
dv
)
int16_t
us
[
4
][
4
],
int16_t
vs
[
4
][
4
],
float
*
du
,
float
*
dv
)
{
{
const
float
h
=
hypotf
(
vec
[
0
],
vec
[
1
]);
const
float
phi
=
-
atan2f
(
hypotf
(
vec
[
0
],
vec
[
1
]),
-
vec
[
2
])
/
M_PI
;
const
float
lh
=
h
>
0
.
f
?
h
:
1
.
f
;
const
float
theta
=
-
atan2f
(
vec
[
0
],
vec
[
1
]);
const
float
theta
=
acosf
(
fabsf
(
vec
[
2
]))
/
M_PI
;
const
float
uf
=
(
theta
*
(
vec
[
0
]
/
lh
)
*
s
->
input_mirror_modifier
[
0
]
/
s
->
iflat_range
[
0
]
+
0
.
5
f
)
*
width
;
float
uf
=
sinf
(
theta
)
*
phi
*
s
->
input_mirror_modifier
[
0
]
/
s
->
iflat_range
[
0
]
;
const
float
vf
=
(
theta
*
(
-
vec
[
1
]
/
lh
)
*
s
->
input_mirror_modifier
[
1
]
/
s
->
iflat_range
[
1
]
+
0
.
5
f
)
*
height
;
float
vf
=
cosf
(
theta
)
*
phi
*
s
->
input_mirror_modifier
[
1
]
/
s
->
iflat_range
[
1
]
;
int
visible
,
ui
,
vi
;
const
int
visible
=
hypotf
(
uf
,
vf
)
<=
0
.
5
f
;
int
ui
,
vi
;
uf
=
(
uf
+
0
.
5
f
)
*
width
;
vf
=
(
vf
+
0
.
5
f
)
*
height
;
ui
=
floorf
(
uf
);
ui
=
floorf
(
uf
);
vi
=
floorf
(
vf
);
vi
=
floorf
(
vf
);
visible
=
vec
[
2
]
<
0
.
f
;
*
du
=
visible
?
uf
-
ui
:
0
.
f
;
*
dv
=
visible
?
vf
-
vi
:
0
.
f
;
*
du
=
uf
-
ui
;
*
dv
=
vf
-
vi
;
for
(
int
i
=
-
1
;
i
<
3
;
i
++
)
{
for
(
int
i
=
-
1
;
i
<
3
;
i
++
)
{
for
(
int
j
=
-
1
;
j
<
3
;
j
++
)
{
for
(
int
j
=
-
1
;
j
<
3
;
j
++
)
{
...
...
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