Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
fcbee7ef
Commit
fcbee7ef
authored
Jul 09, 2023
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showcwt: add qdrt frequency scale
parent
aee8689b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
filters.texi
doc/filters.texi
+1
-0
avf_showcwt.c
libavfilter/avf_showcwt.c
+10
-0
No files found.
doc/filters.texi
View file @
fcbee7ef
...
...
@@ -30711,6 +30711,7 @@ Set the frequency scale used. Allowed values are:
@item erbs
@item sqrt
@item cbrt
@item qdrt
@end table
Default value is @code{linear}.
...
...
libavfilter/avf_showcwt.c
View file @
fcbee7ef
...
...
@@ -42,6 +42,7 @@ enum FrequencyScale {
FSCALE_ERBS
,
FSCALE_SQRT
,
FSCALE_CBRT
,
FSCALE_QDRT
,
NB_FSCALE
};
...
...
@@ -131,6 +132,7 @@ static const AVOption showcwt_options[] = {
{
"erbs"
,
"erbs"
,
0
,
AV_OPT_TYPE_CONST
,{.
i64
=
FSCALE_ERBS
},
0
,
0
,
FLAGS
,
"scale"
},
{
"sqrt"
,
"sqrt"
,
0
,
AV_OPT_TYPE_CONST
,{.
i64
=
FSCALE_SQRT
},
0
,
0
,
FLAGS
,
"scale"
},
{
"cbrt"
,
"cbrt"
,
0
,
AV_OPT_TYPE_CONST
,{.
i64
=
FSCALE_CBRT
},
0
,
0
,
FLAGS
,
"scale"
},
{
"qdrt"
,
"qdrt"
,
0
,
AV_OPT_TYPE_CONST
,{.
i64
=
FSCALE_QDRT
},
0
,
0
,
FLAGS
,
"scale"
},
{
"min"
,
"set minimum frequency"
,
OFFSET
(
minimum_frequency
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
20
.},
1
,
2000
,
FLAGS
},
{
"max"
,
"set maximum frequency"
,
OFFSET
(
maximum_frequency
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
20000
.},
0
,
192000
,
FLAGS
},
{
"logb"
,
"set logarithmic basis"
,
OFFSET
(
logarithmic_basis
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
0001
},
0
,
1
,
FLAGS
},
...
...
@@ -253,6 +255,10 @@ static void frequency_band(float *frequency_band,
frequency
=
frequency
*
frequency
*
frequency
;
frequency_derivative
*=
3
.
f
*
powf
(
frequency
,
2
.
f
/
3
.
f
);
break
;
case
FSCALE_QDRT
:
frequency
=
frequency
*
frequency
*
frequency
*
frequency
;
frequency_derivative
*=
4
.
f
*
powf
(
frequency
,
3
.
f
/
4
.
f
);
break
;
}
frequency_band
[
y
*
2
]
=
frequency
;
...
...
@@ -700,6 +706,10 @@ static int config_output(AVFilterLink *outlink)
minimum_frequency
=
cbrtf
(
minimum_frequency
);
maximum_frequency
=
cbrtf
(
maximum_frequency
);
break
;
case
FSCALE_QDRT
:
minimum_frequency
=
powf
(
minimum_frequency
,
0
.
25
f
);
maximum_frequency
=
powf
(
maximum_frequency
,
0
.
25
f
);
break
;
}
frequency_band
(
s
->
frequency_band
,
...
...
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