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
ea58dd2b
Commit
ea58dd2b
authored
Aug 16, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/window_func: add dolph window
parent
c3c4c726
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
1 deletion
+20
-1
filters.texi
doc/filters.texi
+3
-0
avf_showfreqs.c
libavfilter/avf_showfreqs.c
+1
-0
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+2
-0
window_func.c
libavfilter/window_func.c
+12
-0
window_func.h
libavfilter/window_func.h
+2
-1
No files found.
doc/filters.texi
View file @
ea58dd2b
...
...
@@ -16518,6 +16518,7 @@ It accepts the following values:
@item lanczos
@item gauss
@item tukey
@item dolph
@end table
Default is @code{hanning}.
...
...
@@ -16665,6 +16666,7 @@ It accepts the following values:
@item lanczos
@item gauss
@item tukey
@item dolph
@end table
Default value is @code{hann}.
...
...
@@ -16808,6 +16810,7 @@ It accepts the following values:
@item lanczos
@item gauss
@item tukey
@item dolph
@end table
Default value is @code{hann}.
...
...
libavfilter/avf_showfreqs.c
View file @
ea58dd2b
...
...
@@ -112,6 +112,7 @@ static const AVOption showfreqs_options[] = {
{
"lanczos"
,
"Lanczos"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_LANCZOS
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"gauss"
,
"Gauss"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_GAUSS
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"tukey"
,
"Tukey"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_TUKEY
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"dolph"
,
"Dolph-Chebyshev"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_DOLPH
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"overlap"
,
"set window overlap"
,
OFFSET
(
overlap
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.},
0
.,
1
.,
FLAGS
},
{
"averaging"
,
"set time averaging"
,
OFFSET
(
avg
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
INT32_MAX
,
FLAGS
},
{
"colors"
,
"set channels colors"
,
OFFSET
(
colors
),
AV_OPT_TYPE_STRING
,
{.
str
=
"red|green|blue|yellow|orange|lime|pink|magenta|brown"
},
0
,
0
,
FLAGS
},
...
...
libavfilter/avf_showspectrum.c
View file @
ea58dd2b
...
...
@@ -133,6 +133,7 @@ static const AVOption showspectrum_options[] = {
{
"lanczos"
,
"Lanczos"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_LANCZOS
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"gauss"
,
"Gauss"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_GAUSS
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"tukey"
,
"Tukey"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_TUKEY
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"dolph"
,
"Dolph-Chebyshev"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_DOLPH
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"orientation"
,
"set orientation"
,
OFFSET
(
orientation
),
AV_OPT_TYPE_INT
,
{.
i64
=
VERTICAL
},
0
,
NB_ORIENTATIONS
-
1
,
FLAGS
,
"orientation"
},
{
"vertical"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
VERTICAL
},
0
,
0
,
FLAGS
,
"orientation"
},
{
"horizontal"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
HORIZONTAL
},
0
,
0
,
FLAGS
,
"orientation"
},
...
...
@@ -942,6 +943,7 @@ static const AVOption showspectrumpic_options[] = {
{
"lanczos"
,
"Lanczos"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_LANCZOS
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"gauss"
,
"Gauss"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_GAUSS
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"tukey"
,
"Tukey"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_TUKEY
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"dolph"
,
"Dolph-Chebyshev"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
WFUNC_DOLPH
},
0
,
0
,
FLAGS
,
"win_func"
},
{
"orientation"
,
"set orientation"
,
OFFSET
(
orientation
),
AV_OPT_TYPE_INT
,
{.
i64
=
VERTICAL
},
0
,
NB_ORIENTATIONS
-
1
,
FLAGS
,
"orientation"
},
{
"vertical"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
VERTICAL
},
0
,
0
,
FLAGS
,
"orientation"
},
{
"horizontal"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
HORIZONTAL
},
0
,
0
,
FLAGS
,
"orientation"
},
...
...
libavfilter/window_func.c
View file @
ea58dd2b
...
...
@@ -116,6 +116,18 @@ void ff_generate_window_func(float *lut, int N, int win_func, float *overlap)
}
*
overlap
=
0
.
33
;
break
;
case
WFUNC_DOLPH
:
{
double
b
=
cosh
(
acosh
(
pow
(
10
.,
3
))
/
(
N
-
1
)),
sum
,
t
,
c
,
norm
=
0
;
int
j
;
for
(
c
=
1
-
1
/
(
b
*
b
),
n
=
(
N
-
1
)
/
2
;
n
>=
0
;
--
n
)
{
for
(
sum
=
!
n
,
b
=
t
=
j
=
1
;
j
<=
n
&&
sum
!=
t
;
b
*=
(
n
-
j
)
*
(
1
.
/
j
),
++
j
)
t
=
sum
,
sum
+=
(
b
*=
c
*
(
N
-
n
-
j
)
*
(
1
.
/
j
));
sum
/=
(
N
-
1
-
n
),
sum
/=
(
norm
=
norm
?
norm
:
sum
);
lut
[
n
]
=
sum
;
lut
[
N
-
1
-
n
]
=
sum
;
}
*
overlap
=
0
.
5
;}
break
;
default:
av_assert0
(
0
);
}
...
...
libavfilter/window_func.h
View file @
ea58dd2b
...
...
@@ -25,7 +25,8 @@
enum
WindowFunc
{
WFUNC_RECT
,
WFUNC_HANNING
,
WFUNC_HAMMING
,
WFUNC_BLACKMAN
,
WFUNC_BARTLETT
,
WFUNC_WELCH
,
WFUNC_FLATTOP
,
WFUNC_BHARRIS
,
WFUNC_BNUTTALL
,
WFUNC_SINE
,
WFUNC_NUTTALL
,
WFUNC_BHANN
,
WFUNC_LANCZOS
,
WFUNC_GAUSS
,
WFUNC_TUKEY
,
NB_WFUNC
};
WFUNC_BHANN
,
WFUNC_LANCZOS
,
WFUNC_GAUSS
,
WFUNC_TUKEY
,
WFUNC_DOLPH
,
NB_WFUNC
};
void
ff_generate_window_func
(
float
*
lut
,
int
N
,
int
win_func
,
float
*
overlap
);
...
...
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