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
8f3df1dd
Commit
8f3df1dd
authored
Feb 29, 2020
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: improve interpolation for equirect input at poles
parent
be82dc17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
vf_v360.c
libavfilter/vf_v360.c
+18
-2
No files found.
libavfilter/vf_v360.c
View file @
8f3df1dd
...
...
@@ -639,6 +639,22 @@ static inline int reflecty(int y, int h)
return
y
;
}
/**
* Reflect x operation for equirect.
*
* @param x input horizontal position
* @param y input vertical position
* @param w input width
* @param h input height
*/
static
inline
int
ereflectx
(
int
x
,
int
y
,
int
w
,
int
h
)
{
if
(
y
<
0
||
y
>=
h
)
x
+=
w
/
2
;
return
mod
(
x
,
w
);
}
/**
* Reflect x operation.
*
...
...
@@ -1745,8 +1761,8 @@ static int xyz_to_equirect(const V360Context *s,
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
j
=
0
;
j
<
4
;
j
++
)
{
us
[
i
][
j
]
=
mod
(
ui
+
j
-
1
,
width
);
vs
[
i
][
j
]
=
av_clip
(
vi
+
i
-
1
,
0
,
height
-
1
);
us
[
i
][
j
]
=
ereflectx
(
ui
+
j
-
1
,
vi
+
i
-
1
,
width
,
height
);
vs
[
i
][
j
]
=
reflecty
(
vi
+
i
-
1
,
height
);
}
}
...
...
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