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
dbf43ace
Commit
dbf43ace
authored
Dec 27, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
afilter/af_afir: remove invalid delay
parent
f266d2ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
20 deletions
+7
-20
af_afir.c
libavfilter/af_afir.c
+7
-19
af_afir.h
libavfilter/af_afir.h
+0
-1
No files found.
libavfilter/af_afir.c
View file @
dbf43ace
...
...
@@ -60,12 +60,9 @@ static int fir_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
{
AudioFIRContext
*
s
=
ctx
->
priv
;
const
float
*
src
=
(
const
float
*
)
s
->
in
[
0
]
->
extended_data
[
ch
];
int
index1
=
(
s
->
index
+
1
)
%
3
;
int
index2
=
(
s
->
index
+
2
)
%
3
;
float
*
sum
=
s
->
sum
[
ch
];
AVFrame
*
out
=
arg
;
float
*
block
;
float
*
dst
;
float
*
block
,
*
dst
,
*
ptr
;
int
n
,
i
,
j
;
memset
(
sum
,
0
,
sizeof
(
*
sum
)
*
s
->
fft_length
);
...
...
@@ -96,23 +93,18 @@ static int fir_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
sum
[
1
]
=
sum
[
2
*
s
->
part_size
];
av_rdft_calc
(
s
->
irdft
[
ch
],
sum
);
dst
=
(
float
*
)
s
->
buffer
->
extended_data
[
ch
]
+
index1
*
s
->
part_size
;
dst
=
(
float
*
)
s
->
buffer
->
extended_data
[
ch
];
for
(
n
=
0
;
n
<
s
->
part_size
;
n
++
)
{
dst
[
n
]
+=
sum
[
n
];
}
dst
=
(
float
*
)
s
->
buffer
->
extended_data
[
ch
]
+
index2
*
s
->
part_size
;
ptr
=
(
float
*
)
out
->
extended_data
[
ch
];
s
->
fdsp
->
vector_fmul_scalar
(
ptr
,
dst
,
s
->
wet_gain
,
FFALIGN
(
out
->
nb_samples
,
4
));
emms_c
();
dst
=
(
float
*
)
s
->
buffer
->
extended_data
[
ch
];
memcpy
(
dst
,
sum
+
s
->
part_size
,
s
->
part_size
*
sizeof
(
*
dst
));
dst
=
(
float
*
)
s
->
buffer
->
extended_data
[
ch
]
+
s
->
index
*
s
->
part_size
;
if
(
out
)
{
float
*
ptr
=
(
float
*
)
out
->
extended_data
[
ch
];
s
->
fdsp
->
vector_fmul_scalar
(
ptr
,
dst
,
s
->
wet_gain
,
FFALIGN
(
out
->
nb_samples
,
4
));
emms_c
();
}
return
0
;
}
...
...
@@ -138,10 +130,6 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink)
if
(
s
->
pts
!=
AV_NOPTS_VALUE
)
s
->
pts
+=
av_rescale_q
(
out
->
nb_samples
,
(
AVRational
){
1
,
outlink
->
sample_rate
},
outlink
->
time_base
);
s
->
index
++
;
if
(
s
->
index
==
3
)
s
->
index
=
0
;
av_frame_free
(
&
in
);
s
->
in
[
0
]
=
NULL
;
...
...
@@ -329,7 +317,7 @@ static int convert_coeffs(AVFilterContext *ctx)
return
AVERROR
(
ENOMEM
);
}
s
->
buffer
=
ff_get_audio_buffer
(
ctx
->
inputs
[
0
],
s
->
part_size
*
3
);
s
->
buffer
=
ff_get_audio_buffer
(
ctx
->
inputs
[
0
],
s
->
part_size
);
if
(
!
s
->
buffer
)
return
AVERROR
(
ENOMEM
);
...
...
libavfilter/af_afir.h
View file @
dbf43ace
...
...
@@ -72,7 +72,6 @@ typedef struct AudioFIRContext {
AVFrame
*
buffer
;
AVFrame
*
video
;
int64_t
pts
;
int
index
;
AVFloatDSPContext
*
fdsp
;
void
(
*
fcmul_add
)(
float
*
sum
,
const
float
*
t
,
const
float
*
c
,
...
...
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