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
6f4ec4d9
Commit
6f4ec4d9
authored
Sep 16, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_v360: add slice threading to remap calculation
parent
05ffaa25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
vf_v360.c
libavfilter/vf_v360.c
+7
-3
No files found.
libavfilter/vf_v360.c
View file @
6f4ec4d9
...
...
@@ -2162,7 +2162,7 @@ static void set_dimensions(int *outw, int *outh, int w, int h, const AVPixFmtDes
}
// Calculate remap data
static
av_always_inline
void
v360_filter
(
AVFilterContext
*
ctx
)
static
av_always_inline
int
v360_slice
(
AVFilterContext
*
ctx
,
void
*
arg
,
int
jobnr
,
int
nb_jobs
)
{
V360Context
*
s
=
ctx
->
priv
;
...
...
@@ -2172,11 +2172,13 @@ static av_always_inline void v360_filter(AVFilterContext *ctx)
const
int
height
=
s
->
pr_height
[
p
];
const
int
in_width
=
s
->
inplanewidth
[
p
];
const
int
in_height
=
s
->
inplaneheight
[
p
];
const
int
slice_start
=
(
height
*
jobnr
)
/
nb_jobs
;
const
int
slice_end
=
(
height
*
(
jobnr
+
1
))
/
nb_jobs
;
float
du
,
dv
;
float
vec
[
3
];
XYRemap
rmap
;
for
(
int
j
=
0
;
j
<
height
;
j
++
)
{
for
(
int
j
=
slice_start
;
j
<
slice_end
;
j
++
)
{
for
(
int
i
=
0
;
i
<
width
;
i
++
)
{
uint16_t
*
u
=
s
->
u
[
p
]
+
(
j
*
uv_linesize
+
i
)
*
s
->
elements
;
uint16_t
*
v
=
s
->
v
[
p
]
+
(
j
*
uv_linesize
+
i
)
*
s
->
elements
;
...
...
@@ -2200,6 +2202,8 @@ static av_always_inline void v360_filter(AVFilterContext *ctx)
}
}
}
return
0
;
}
static
int
config_output
(
AVFilterLink
*
outlink
)
...
...
@@ -2493,7 +2497,7 @@ static int config_output(AVFilterLink *outlink)
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
);
v360_filter
(
ctx
);
ctx
->
internal
->
execute
(
ctx
,
v360_slice
,
NULL
,
NULL
,
FFMIN
(
outlink
->
h
,
ff_filter_get_nb_threads
(
ctx
))
);
return
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