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
2f5fb9e6
Commit
2f5fb9e6
authored
Nov 22, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_aiir: make a/b coefficients array
parent
e169d375
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
af_aiir.c
libavfilter/af_aiir.c
+19
-19
No files found.
libavfilter/af_aiir.c
View file @
2f5fb9e6
...
...
@@ -38,8 +38,8 @@ typedef struct Pair {
}
Pair
;
typedef
struct
BiquadContext
{
double
a
0
,
a1
,
a2
;
double
b
0
,
b1
,
b2
;
double
a
[
3
]
;
double
b
[
3
]
;
double
i1
,
i2
;
double
o1
,
o2
;
}
BiquadContext
;
...
...
@@ -193,11 +193,11 @@ static int iir_ch_serial_## name(AVFilterContext *ctx, void *arg, int ch, int nb
int n, i; \
\
for (i = 0; i < nb_biquads; i++) { \
const double a1 = -iir->biquads[i].a
1;
\
const double a2 = -iir->biquads[i].a
2;
\
const double b0 = iir->biquads[i].b
0;
\
const double b1 = iir->biquads[i].b
1;
\
const double b2 = iir->biquads[i].b
2;
\
const double a1 = -iir->biquads[i].a
[1];
\
const double a2 = -iir->biquads[i].a
[2];
\
const double b0 = iir->biquads[i].b
[0];
\
const double b1 = iir->biquads[i].b
[1];
\
const double b2 = iir->biquads[i].b
[2];
\
double i1 = iir->biquads[i].i1; \
double i2 = iir->biquads[i].i2; \
double o1 = iir->biquads[i].o1; \
...
...
@@ -593,20 +593,20 @@ static int decompose_zp2biquads(AVFilterContext *ctx, int channels)
iir
->
ab
[
1
][
2
*
nearest_zero
.
a
]
=
iir
->
ab
[
1
][
2
*
nearest_zero
.
a
+
1
]
=
NAN
;
iir
->
ab
[
1
][
2
*
nearest_zero
.
b
]
=
iir
->
ab
[
1
][
2
*
nearest_zero
.
b
+
1
]
=
NAN
;
iir
->
biquads
[
current_biquad
].
a
0
=
1
.
0
;
iir
->
biquads
[
current_biquad
].
a
1
=
a
[
2
]
/
a
[
4
];
iir
->
biquads
[
current_biquad
].
a
2
=
a
[
0
]
/
a
[
4
];
iir
->
biquads
[
current_biquad
].
b
0
=
(
b
[
4
]
/
a
[
4
])
*
(
current_biquad
?
1
.
0
:
iir
->
g
);
iir
->
biquads
[
current_biquad
].
b
1
=
(
b
[
2
]
/
a
[
4
])
*
(
current_biquad
?
1
.
0
:
iir
->
g
);
iir
->
biquads
[
current_biquad
].
b
2
=
(
b
[
0
]
/
a
[
4
])
*
(
current_biquad
?
1
.
0
:
iir
->
g
);
iir
->
biquads
[
current_biquad
].
a
[
0
]
=
1
.
0
;
iir
->
biquads
[
current_biquad
].
a
[
1
]
=
a
[
2
]
/
a
[
4
];
iir
->
biquads
[
current_biquad
].
a
[
2
]
=
a
[
0
]
/
a
[
4
];
iir
->
biquads
[
current_biquad
].
b
[
0
]
=
(
b
[
4
]
/
a
[
4
])
*
(
current_biquad
?
1
.
0
:
iir
->
g
);
iir
->
biquads
[
current_biquad
].
b
[
1
]
=
(
b
[
2
]
/
a
[
4
])
*
(
current_biquad
?
1
.
0
:
iir
->
g
);
iir
->
biquads
[
current_biquad
].
b
[
2
]
=
(
b
[
0
]
/
a
[
4
])
*
(
current_biquad
?
1
.
0
:
iir
->
g
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"a=%f %f %f:b=%f %f %f
\n
"
,
iir
->
biquads
[
current_biquad
].
a
0
,
iir
->
biquads
[
current_biquad
].
a
1
,
iir
->
biquads
[
current_biquad
].
a
2
,
iir
->
biquads
[
current_biquad
].
b
0
,
iir
->
biquads
[
current_biquad
].
b
1
,
iir
->
biquads
[
current_biquad
].
b
2
);
iir
->
biquads
[
current_biquad
].
a
[
0
]
,
iir
->
biquads
[
current_biquad
].
a
[
1
]
,
iir
->
biquads
[
current_biquad
].
a
[
2
]
,
iir
->
biquads
[
current_biquad
].
b
[
0
]
,
iir
->
biquads
[
current_biquad
].
b
[
1
]
,
iir
->
biquads
[
current_biquad
].
b
[
2
]
);
current_biquad
++
;
}
...
...
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