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
c271d882
Commit
c271d882
authored
Sep 16, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: move some local variables to private filter context
parent
d87db83e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
v360.h
libavfilter/v360.h
+3
-0
vf_v360.c
libavfilter/vf_v360.c
+4
-6
No files found.
libavfilter/v360.h
View file @
c271d882
...
...
@@ -115,7 +115,10 @@ typedef struct V360Context {
float
h_fov
,
v_fov
,
d_fov
;
float
flat_range
[
3
];
float
rot_mat
[
3
][
3
];
float
input_mirror_modifier
[
2
];
float
output_mirror_modifier
[
3
];
int
pr_width
[
4
],
pr_height
[
4
];
...
...
libavfilter/vf_v360.c
View file @
c271d882
...
...
@@ -2182,7 +2182,6 @@ static int config_output(AVFilterLink *outlink)
int
in_offset_h
,
in_offset_w
;
int
out_offset_h
,
out_offset_w
;
float
hf
,
wf
;
float
output_mirror_modifier
[
3
];
void
(
*
in_transform
)(
const
V360Context
*
s
,
const
float
*
vec
,
int
width
,
int
height
,
uint16_t
us
[
4
][
4
],
uint16_t
vs
[
4
][
4
],
float
*
du
,
float
*
dv
);
...
...
@@ -2192,7 +2191,6 @@ static int config_output(AVFilterLink *outlink)
void
(
*
calculate_kernel
)(
float
du
,
float
dv
,
const
XYRemap
*
rmap
,
uint16_t
*
u
,
uint16_t
*
v
,
int16_t
*
ker
);
int
(
*
prepare_out
)(
AVFilterContext
*
ctx
);
float
rot_mat
[
3
][
3
];
s
->
input_mirror_modifier
[
0
]
=
s
->
ih_flip
?
-
1
.
f
:
1
.
f
;
s
->
input_mirror_modifier
[
1
]
=
s
->
iv_flip
?
-
1
.
f
:
1
.
f
;
...
...
@@ -2466,8 +2464,8 @@ static int config_output(AVFilterLink *outlink)
allocate_plane
(
s
,
sizeof_uv
,
sizeof_ker
,
1
);
}
calculate_rotation_matrix
(
s
->
yaw
,
s
->
pitch
,
s
->
roll
,
rot_mat
,
s
->
rotation_order
);
set_mirror_modifier
(
s
->
h_flip
,
s
->
v_flip
,
s
->
d_flip
,
output_mirror_modifier
);
calculate_rotation_matrix
(
s
->
yaw
,
s
->
pitch
,
s
->
roll
,
s
->
rot_mat
,
s
->
rotation_order
);
set_mirror_modifier
(
s
->
h_flip
,
s
->
v_flip
,
s
->
d_flip
,
s
->
output_mirror_modifier
);
// Calculate remap data
for
(
int
p
=
0
;
p
<
s
->
nb_allocated
;
p
++
)
{
...
...
@@ -2491,10 +2489,10 @@ static int config_output(AVFilterLink *outlink)
else
out_transform
(
s
,
i
,
j
,
width
,
height
,
vec
);
av_assert1
(
!
isnan
(
vec
[
0
])
&&
!
isnan
(
vec
[
1
])
&&
!
isnan
(
vec
[
2
]));
rotate
(
rot_mat
,
vec
);
rotate
(
s
->
rot_mat
,
vec
);
av_assert1
(
!
isnan
(
vec
[
0
])
&&
!
isnan
(
vec
[
1
])
&&
!
isnan
(
vec
[
2
]));
normalize_vector
(
vec
);
mirror
(
output_mirror_modifier
,
vec
);
mirror
(
s
->
output_mirror_modifier
,
vec
);
if
(
s
->
in_transpose
)
in_transform
(
s
,
vec
,
in_height
,
in_width
,
rmap
.
v
,
rmap
.
u
,
&
du
,
&
dv
);
else
...
...
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