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
bc89434a
Commit
bc89434a
authored
Sep 20, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: fix various artifacts with cubemaps
parent
048c712a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
vf_v360.c
libavfilter/vf_v360.c
+12
-12
No files found.
libavfilter/vf_v360.c
View file @
bc89434a
...
...
@@ -1073,8 +1073,8 @@ static void cube3x2_to_xyz(const V360Context *s,
const
int
ewi
=
ceilf
(
ew
*
(
u_face
+
1
))
-
u_shift
;
const
int
ehi
=
ceilf
(
eh
*
(
v_face
+
1
))
-
v_shift
;
const
float
uf
=
2
.
f
*
(
i
-
u_shift
)
/
ewi
-
1
.
f
;
const
float
vf
=
2
.
f
*
(
j
-
v_shift
)
/
ehi
-
1
.
f
;
const
float
uf
=
2
.
f
*
(
i
-
u_shift
+
0
.
5
f
)
/
ewi
-
1
.
f
;
const
float
vf
=
2
.
f
*
(
j
-
v_shift
+
0
.
5
f
)
/
ehi
-
1
.
f
;
cube_to_xyz
(
s
,
uf
,
vf
,
face
,
vec
);
}
...
...
@@ -1114,8 +1114,8 @@ static void xyz_to_cube3x2(const V360Context *s,
ewi
=
ceilf
(
ew
*
(
u_face
+
1
))
-
ceilf
(
ew
*
u_face
);
ehi
=
ceilf
(
eh
*
(
v_face
+
1
))
-
ceilf
(
eh
*
v_face
);
uf
=
0
.
5
f
*
ewi
*
(
uf
+
1
.
f
);
vf
=
0
.
5
f
*
ehi
*
(
vf
+
1
.
f
);
uf
=
0
.
5
f
*
ewi
*
(
uf
+
1
.
f
)
-
0
.
5
f
;
vf
=
0
.
5
f
*
ehi
*
(
vf
+
1
.
f
)
-
0
.
5
f
;
ui
=
floorf
(
uf
);
vi
=
floorf
(
vf
);
...
...
@@ -1188,8 +1188,8 @@ static void cube1x6_to_xyz(const V360Context *s,
const
int
v_shift
=
ceilf
(
eh
*
face
);
const
int
ehi
=
ceilf
(
eh
*
(
face
+
1
))
-
v_shift
;
const
float
uf
=
2
.
f
*
i
/
ew
-
1
.
f
;
const
float
vf
=
2
.
f
*
(
j
-
v_shift
)
/
ehi
-
1
.
f
;
const
float
uf
=
2
.
f
*
(
i
+
0
.
5
f
)
/
ew
-
1
.
f
;
const
float
vf
=
2
.
f
*
(
j
-
v_shift
+
0
.
5
f
)
/
ehi
-
1
.
f
;
cube_to_xyz
(
s
,
uf
,
vf
,
face
,
vec
);
}
...
...
@@ -1216,8 +1216,8 @@ static void cube6x1_to_xyz(const V360Context *s,
const
int
u_shift
=
ceilf
(
ew
*
face
);
const
int
ewi
=
ceilf
(
ew
*
(
face
+
1
))
-
u_shift
;
const
float
uf
=
2
.
f
*
(
i
-
u_shift
)
/
ewi
-
1
.
f
;
const
float
vf
=
2
.
f
*
j
/
eh
-
1
.
f
;
const
float
uf
=
2
.
f
*
(
i
-
u_shift
+
0
.
5
f
)
/
ewi
-
1
.
f
;
const
float
vf
=
2
.
f
*
(
j
+
0
.
5
f
)
/
eh
-
1
.
f
;
cube_to_xyz
(
s
,
uf
,
vf
,
face
,
vec
);
}
...
...
@@ -1253,8 +1253,8 @@ static void xyz_to_cube1x6(const V360Context *s,
face
=
s
->
in_cubemap_face_order
[
direction
];
ehi
=
ceilf
(
eh
*
(
face
+
1
))
-
ceilf
(
eh
*
face
);
uf
=
0
.
5
f
*
ewi
*
(
uf
+
1
.
f
);
vf
=
0
.
5
f
*
ehi
*
(
vf
+
1
.
f
);
uf
=
0
.
5
f
*
ewi
*
(
uf
+
1
.
f
)
-
0
.
5
f
;
vf
=
0
.
5
f
*
ehi
*
(
vf
+
1
.
f
)
-
0
.
5
f
;
ui
=
floorf
(
uf
);
vi
=
floorf
(
vf
);
...
...
@@ -1329,8 +1329,8 @@ static void xyz_to_cube6x1(const V360Context *s,
face
=
s
->
in_cubemap_face_order
[
direction
];
ewi
=
ceilf
(
ew
*
(
face
+
1
))
-
ceilf
(
ew
*
face
);
uf
=
0
.
5
f
*
ewi
*
(
uf
+
1
.
f
);
vf
=
0
.
5
f
*
ehi
*
(
vf
+
1
.
f
);
uf
=
0
.
5
f
*
ewi
*
(
uf
+
1
.
f
)
-
0
.
5
f
;
vf
=
0
.
5
f
*
ehi
*
(
vf
+
1
.
f
)
-
0
.
5
f
;
ui
=
floorf
(
uf
);
vi
=
floorf
(
vf
);
...
...
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