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
5c7b6aad
Commit
5c7b6aad
authored
Mar 03, 2020
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: simplify some unnecessary indirections
parent
580d68f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
vf_v360.c
libavfilter/vf_v360.c
+12
-18
No files found.
libavfilter/vf_v360.c
View file @
5c7b6aad
...
...
@@ -1265,8 +1265,8 @@ static int cube3x2_to_xyz(const V360Context *s,
int
i
,
int
j
,
int
width
,
int
height
,
float
*
vec
)
{
const
float
scalew
=
s
->
fout_pad
>
0
?
1
.
f
-
s
->
fout_pad
/
(
s
->
out_
width
/
3
.
f
)
:
1
.
f
-
s
->
out_pad
;
const
float
scaleh
=
s
->
fout_pad
>
0
?
1
.
f
-
s
->
fout_pad
/
(
s
->
out_
height
/
2
.
f
)
:
1
.
f
-
s
->
out_pad
;
const
float
scalew
=
s
->
fout_pad
>
0
?
1
.
f
-
s
->
fout_pad
/
(
width
/
3
.
f
)
:
1
.
f
-
s
->
out_pad
;
const
float
scaleh
=
s
->
fout_pad
>
0
?
1
.
f
-
s
->
fout_pad
/
(
height
/
2
.
f
)
:
1
.
f
-
s
->
out_pad
;
const
float
ew
=
width
/
3
.
f
;
const
float
eh
=
height
/
2
.
f
;
...
...
@@ -1304,8 +1304,8 @@ static int xyz_to_cube3x2(const V360Context *s,
const
float
*
vec
,
int
width
,
int
height
,
int16_t
us
[
4
][
4
],
int16_t
vs
[
4
][
4
],
float
*
du
,
float
*
dv
)
{
const
float
scalew
=
s
->
fin_pad
>
0
?
1
.
f
-
s
->
fin_pad
/
(
s
->
in_
width
/
3
.
f
)
:
1
.
f
-
s
->
in_pad
;
const
float
scaleh
=
s
->
fin_pad
>
0
?
1
.
f
-
s
->
fin_pad
/
(
s
->
in_
height
/
2
.
f
)
:
1
.
f
-
s
->
in_pad
;
const
float
scalew
=
s
->
fin_pad
>
0
?
1
.
f
-
s
->
fin_pad
/
(
width
/
3
.
f
)
:
1
.
f
-
s
->
in_pad
;
const
float
scaleh
=
s
->
fin_pad
>
0
?
1
.
f
-
s
->
fin_pad
/
(
height
/
2
.
f
)
:
1
.
f
-
s
->
in_pad
;
const
float
ew
=
width
/
3
.
f
;
const
float
eh
=
height
/
2
.
f
;
float
uf
,
vf
;
...
...
@@ -1393,8 +1393,8 @@ static int cube1x6_to_xyz(const V360Context *s,
int
i
,
int
j
,
int
width
,
int
height
,
float
*
vec
)
{
const
float
scalew
=
s
->
fout_pad
>
0
?
1
.
f
-
(
float
)(
s
->
fout_pad
)
/
s
->
out_
width
:
1
.
f
-
s
->
out_pad
;
const
float
scaleh
=
s
->
fout_pad
>
0
?
1
.
f
-
s
->
fout_pad
/
(
s
->
out_
height
/
6
.
f
)
:
1
.
f
-
s
->
out_pad
;
const
float
scalew
=
s
->
fout_pad
>
0
?
1
.
f
-
(
float
)(
s
->
fout_pad
)
/
width
:
1
.
f
-
s
->
out_pad
;
const
float
scaleh
=
s
->
fout_pad
>
0
?
1
.
f
-
s
->
fout_pad
/
(
height
/
6
.
f
)
:
1
.
f
-
s
->
out_pad
;
const
float
ew
=
width
;
const
float
eh
=
height
/
6
.
f
;
...
...
@@ -1426,8 +1426,8 @@ static int cube6x1_to_xyz(const V360Context *s,
int
i
,
int
j
,
int
width
,
int
height
,
float
*
vec
)
{
const
float
scalew
=
s
->
fout_pad
>
0
?
1
.
f
-
s
->
fout_pad
/
(
s
->
out_
width
/
6
.
f
)
:
1
.
f
-
s
->
out_pad
;
const
float
scaleh
=
s
->
fout_pad
>
0
?
1
.
f
-
(
float
)(
s
->
fout_pad
)
/
s
->
out_
height
:
1
.
f
-
s
->
out_pad
;
const
float
scalew
=
s
->
fout_pad
>
0
?
1
.
f
-
s
->
fout_pad
/
(
width
/
6
.
f
)
:
1
.
f
-
s
->
out_pad
;
const
float
scaleh
=
s
->
fout_pad
>
0
?
1
.
f
-
(
float
)(
s
->
fout_pad
)
/
height
:
1
.
f
-
s
->
out_pad
;
const
float
ew
=
width
/
6
.
f
;
const
float
eh
=
height
;
...
...
@@ -1461,8 +1461,8 @@ static int xyz_to_cube1x6(const V360Context *s,
const
float
*
vec
,
int
width
,
int
height
,
int16_t
us
[
4
][
4
],
int16_t
vs
[
4
][
4
],
float
*
du
,
float
*
dv
)
{
const
float
scalew
=
s
->
fin_pad
>
0
?
1
.
f
-
(
float
)(
s
->
fin_pad
)
/
s
->
in_
width
:
1
.
f
-
s
->
in_pad
;
const
float
scaleh
=
s
->
fin_pad
>
0
?
1
.
f
-
s
->
fin_pad
/
(
s
->
in_
height
/
6
.
f
)
:
1
.
f
-
s
->
in_pad
;
const
float
scalew
=
s
->
fin_pad
>
0
?
1
.
f
-
(
float
)(
s
->
fin_pad
)
/
width
:
1
.
f
-
s
->
in_pad
;
const
float
scaleh
=
s
->
fin_pad
>
0
?
1
.
f
-
s
->
fin_pad
/
(
height
/
6
.
f
)
:
1
.
f
-
s
->
in_pad
;
const
float
eh
=
height
/
6
.
f
;
const
int
ewi
=
width
;
float
uf
,
vf
;
...
...
@@ -1541,8 +1541,8 @@ static int xyz_to_cube6x1(const V360Context *s,
const
float
*
vec
,
int
width
,
int
height
,
int16_t
us
[
4
][
4
],
int16_t
vs
[
4
][
4
],
float
*
du
,
float
*
dv
)
{
const
float
scalew
=
s
->
fin_pad
>
0
?
1
.
f
-
s
->
fin_pad
/
(
s
->
in_
width
/
6
.
f
)
:
1
.
f
-
s
->
in_pad
;
const
float
scaleh
=
s
->
fin_pad
>
0
?
1
.
f
-
(
float
)(
s
->
fin_pad
)
/
s
->
in_
height
:
1
.
f
-
s
->
in_pad
;
const
float
scalew
=
s
->
fin_pad
>
0
?
1
.
f
-
s
->
fin_pad
/
(
width
/
6
.
f
)
:
1
.
f
-
s
->
in_pad
;
const
float
scaleh
=
s
->
fin_pad
>
0
?
1
.
f
-
(
float
)(
s
->
fin_pad
)
/
height
:
1
.
f
-
s
->
in_pad
;
const
float
ew
=
width
/
6
.
f
;
const
int
ehi
=
height
;
float
uf
,
vf
;
...
...
@@ -4061,12 +4061,6 @@ static int config_output(AVFilterLink *outlink)
set_dimensions
(
s
->
pr_width
,
s
->
pr_height
,
w
,
h
,
desc
);
s
->
out_width
=
s
->
pr_width
[
0
];
s
->
out_height
=
s
->
pr_height
[
0
];
if
(
s
->
out_transpose
)
FFSWAP
(
int
,
s
->
out_width
,
s
->
out_height
);
switch
(
s
->
out_stereo
)
{
case
STEREO_2D
:
out_offset_w
=
out_offset_h
=
0
;
...
...
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