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
ba3d983c
Commit
ba3d983c
authored
Dec 30, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_afir: stop using as much threads as stream have it
parent
72270d5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
af_afir.c
libavfilter/af_afir.c
+16
-2
No files found.
libavfilter/af_afir.c
View file @
ba3d983c
...
...
@@ -56,7 +56,7 @@ static void fcmul_add_c(float *sum, const float *t, const float *c, ptrdiff_t le
sum
[
2
*
n
]
+=
t
[
2
*
n
]
*
c
[
2
*
n
];
}
static
int
fir_channel
(
AVFilterContext
*
ctx
,
void
*
arg
,
int
ch
,
int
nb_jobs
)
static
int
fir_channel
(
AVFilterContext
*
ctx
,
void
*
arg
,
int
ch
)
{
AudioFIRContext
*
s
=
ctx
->
priv
;
const
float
*
in
=
(
const
float
*
)
s
->
in
[
0
]
->
extended_data
[
ch
];
...
...
@@ -138,6 +138,19 @@ static int fir_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
return
0
;
}
static
int
fir_channels
(
AVFilterContext
*
ctx
,
void
*
arg
,
int
jobnr
,
int
nb_jobs
)
{
AVFrame
*
out
=
arg
;
const
int
start
=
(
out
->
channels
*
jobnr
)
/
nb_jobs
;
const
int
end
=
(
out
->
channels
*
(
jobnr
+
1
))
/
nb_jobs
;
for
(
int
ch
=
start
;
ch
<
end
;
ch
++
)
{
fir_channel
(
ctx
,
out
,
ch
);
}
return
0
;
}
static
int
fir_frame
(
AudioFIRContext
*
s
,
AVFrame
*
in
,
AVFilterLink
*
outlink
)
{
AVFilterContext
*
ctx
=
outlink
->
src
;
...
...
@@ -152,7 +165,8 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink)
if
(
s
->
pts
==
AV_NOPTS_VALUE
)
s
->
pts
=
in
->
pts
;
s
->
in
[
0
]
=
in
;
ctx
->
internal
->
execute
(
ctx
,
fir_channel
,
out
,
NULL
,
outlink
->
channels
);
ctx
->
internal
->
execute
(
ctx
,
fir_channels
,
out
,
NULL
,
FFMIN
(
outlink
->
channels
,
ff_filter_get_nb_threads
(
ctx
)));
out
->
pts
=
s
->
pts
;
if
(
s
->
pts
!=
AV_NOPTS_VALUE
)
...
...
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