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
0d3b31ae
Commit
0d3b31ae
authored
Jan 04, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showspectrum: add yet another color map
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
68eb2080
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
filters.texi
doc/filters.texi
+4
-0
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+13
-1
No files found.
doc/filters.texi
View file @
0d3b31ae
...
...
@@ -14625,6 +14625,8 @@ each channel is displayed using the nebulae color scheme
each channel is displayed using the fire color scheme
@item fiery
each channel is displayed using the fiery color scheme
@item fruit
each channel is displayed using the fruit color scheme
@end table
Default value is @samp{channel}.
...
...
@@ -14758,6 +14760,8 @@ each channel is displayed using the nebulae color scheme
each channel is displayed using the fire color scheme
@item fiery
each channel is displayed using the fiery color scheme
@item fruit
each channel is displayed using the fruit color scheme
@end table
Default value is @samp{intensity}.
...
...
libavfilter/avf_showspectrum.c
View file @
0d3b31ae
...
...
@@ -41,7 +41,7 @@
enum
DisplayMode
{
COMBINED
,
SEPARATE
,
NB_MODES
};
enum
DisplayScale
{
LINEAR
,
SQRT
,
CBRT
,
LOG
,
FOURTHRT
,
FIFTHRT
,
NB_SCALES
};
enum
ColorMode
{
CHANNEL
,
INTENSITY
,
RAINBOW
,
MORELAND
,
NEBULAE
,
FIRE
,
FIERY
,
NB_CLMODES
};
enum
ColorMode
{
CHANNEL
,
INTENSITY
,
RAINBOW
,
MORELAND
,
NEBULAE
,
FIRE
,
FIERY
,
FRUIT
,
NB_CLMODES
};
enum
SlideMode
{
REPLACE
,
SCROLL
,
FULLFRAME
,
RSCROLL
,
NB_SLIDES
};
enum
Orientation
{
VERTICAL
,
HORIZONTAL
,
NB_ORIENTATIONS
};
...
...
@@ -98,6 +98,7 @@ static const AVOption showspectrum_options[] = {
{
"nebulae"
,
"nebulae based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
NEBULAE
},
0
,
0
,
FLAGS
,
"color"
},
{
"fire"
,
"fire based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FIRE
},
0
,
0
,
FLAGS
,
"color"
},
{
"fiery"
,
"fiery based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FIERY
},
0
,
0
,
FLAGS
,
"color"
},
{
"fruit"
,
"fruit based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FRUIT
},
0
,
0
,
FLAGS
,
"color"
},
{
"scale"
,
"set display scale"
,
OFFSET
(
scale
),
AV_OPT_TYPE_INT
,
{.
i64
=
SQRT
},
LINEAR
,
NB_SCALES
-
1
,
FLAGS
,
"scale"
},
{
"sqrt"
,
"square root"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
SQRT
},
0
,
0
,
FLAGS
,
"scale"
},
{
"cbrt"
,
"cubic root"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CBRT
},
0
,
0
,
FLAGS
,
"scale"
},
...
...
@@ -189,6 +190,15 @@ static const struct ColorTable {
{
0
.
77
,
193
/
256
.,
(
40
-
128
)
/
256
.,
(
155
-
128
)
/
256
.
},
{
0
.
87
,
221
/
256
.,
(
101
-
128
)
/
256
.,
(
134
-
128
)
/
256
.
},
{
1
,
1
,
0
,
0
}},
[
FRUIT
]
=
{
{
0
,
0
,
0
,
0
},
{
0
.
20
,
29
/
256
.,
(
136
-
128
)
/
256
.,
(
119
-
128
)
/
256
.
},
{
0
.
30
,
60
/
256
.,
(
119
-
128
)
/
256
.,
(
90
-
128
)
/
256
.
},
{
0
.
40
,
85
/
256
.,
(
91
-
128
)
/
256
.,
(
85
-
128
)
/
256
.
},
{
0
.
50
,
116
/
256
.,
(
70
-
128
)
/
256
.,
(
105
-
128
)
/
256
.
},
{
0
.
60
,
151
/
256
.,
(
50
-
128
)
/
256
.,
(
146
-
128
)
/
256
.
},
{
0
.
70
,
191
/
256
.,
(
63
-
128
)
/
256
.,
(
178
-
128
)
/
256
.
},
{
1
,
98
/
256
.,
(
80
-
128
)
/
256
.,
(
221
-
128
)
/
256
.
}},
};
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
...
...
@@ -523,6 +533,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
case
NEBULAE
:
case
FIRE
:
case
FIERY
:
case
FRUIT
:
case
INTENSITY
:
uf
=
yf
;
vf
=
yf
;
...
...
@@ -790,6 +801,7 @@ static const AVOption showspectrumpic_options[] = {
{
"nebulae"
,
"nebulae based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
NEBULAE
},
0
,
0
,
FLAGS
,
"color"
},
{
"fire"
,
"fire based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FIRE
},
0
,
0
,
FLAGS
,
"color"
},
{
"fiery"
,
"fiery based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FIERY
},
0
,
0
,
FLAGS
,
"color"
},
{
"fruit"
,
"fruit based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FRUIT
},
0
,
0
,
FLAGS
,
"color"
},
{
"scale"
,
"set display scale"
,
OFFSET
(
scale
),
AV_OPT_TYPE_INT
,
{.
i64
=
LOG
},
0
,
NB_SCALES
-
1
,
FLAGS
,
"scale"
},
{
"sqrt"
,
"square root"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
SQRT
},
0
,
0
,
FLAGS
,
"scale"
},
{
"cbrt"
,
"cubic root"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CBRT
},
0
,
0
,
FLAGS
,
"scale"
},
...
...
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