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
1fc5ddf7
Commit
1fc5ddf7
authored
May 21, 2020
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_aiir: fix first delay value
parent
38490cbe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
af_aiir.c
libavfilter/af_aiir.c
+2
-6
No files found.
libavfilter/af_aiir.c
View file @
1fc5ddf7
...
...
@@ -823,7 +823,7 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out, int sample_rate)
{
AudioIIRContext
*
s
=
ctx
->
priv
;
double
*
mag
,
*
phase
,
*
temp
,
*
delay
,
min
=
DBL_MAX
,
max
=
-
DBL_MAX
;
double
min_delay
,
max_delay
,
min_phase
,
max_phase
;
double
min_delay
=
DBL_MAX
,
max_delay
=
-
DBL_MAX
,
min_phase
,
max_phase
;
int
prev_ymag
=
-
1
,
prev_yphase
=
-
1
,
prev_ydelay
=
-
1
;
char
text
[
32
];
int
ch
,
i
;
...
...
@@ -869,9 +869,6 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out, int sample_rate)
max_phase
=
fmax
(
max_phase
,
phase
[
i
]);
}
delay
[
0
]
=
0
.;
min_delay
=
0
.;
max_delay
=
0
.;
for
(
i
=
0
;
i
<
s
->
w
-
1
;
i
++
)
{
double
div
=
s
->
w
/
(
double
)
sample_rate
;
...
...
@@ -879,8 +876,7 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out, int sample_rate)
min_delay
=
fmin
(
min_delay
,
delay
[
i
+
1
]);
max_delay
=
fmax
(
max_delay
,
delay
[
i
+
1
]);
}
delay
[
i
]
=
delay
[
i
-
1
];
delay
[
0
]
=
delay
[
1
];
for
(
i
=
0
;
i
<
s
->
w
;
i
++
)
{
int
ymag
=
mag
[
i
]
/
max
*
(
s
->
h
-
1
);
...
...
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