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
0f387f2b
Commit
0f387f2b
authored
Dec 30, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showspectrum: add nebulae color map
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
dde99475
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
filters.texi
doc/filters.texi
+2
-0
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+12
-1
No files found.
doc/filters.texi
View file @
0f387f2b
...
@@ -14619,6 +14619,8 @@ each channel is displayed using the same color scheme
...
@@ -14619,6 +14619,8 @@ each channel is displayed using the same color scheme
each channel is displayed using the rainbow color scheme
each channel is displayed using the rainbow color scheme
@item moreland
@item moreland
each channel is displayed using the moreland color scheme
each channel is displayed using the moreland color scheme
@item nebulae
each channel is displayed using the nebulae color scheme
@end table
@end table
Default value is @samp{channel}.
Default value is @samp{channel}.
...
...
libavfilter/avf_showspectrum.c
View file @
0f387f2b
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
enum
DisplayMode
{
COMBINED
,
SEPARATE
,
NB_MODES
};
enum
DisplayMode
{
COMBINED
,
SEPARATE
,
NB_MODES
};
enum
DisplayScale
{
LINEAR
,
SQRT
,
CBRT
,
LOG
,
NB_SCALES
};
enum
DisplayScale
{
LINEAR
,
SQRT
,
CBRT
,
LOG
,
NB_SCALES
};
enum
ColorMode
{
CHANNEL
,
INTENSITY
,
RAINBOW
,
MORELAND
,
NB_CLMODES
};
enum
ColorMode
{
CHANNEL
,
INTENSITY
,
RAINBOW
,
MORELAND
,
N
EBULAE
,
N
B_CLMODES
};
enum
SlideMode
{
REPLACE
,
SCROLL
,
FULLFRAME
,
RSCROLL
,
NB_SLIDES
};
enum
SlideMode
{
REPLACE
,
SCROLL
,
FULLFRAME
,
RSCROLL
,
NB_SLIDES
};
enum
Orientation
{
VERTICAL
,
HORIZONTAL
,
NB_ORIENTATIONS
};
enum
Orientation
{
VERTICAL
,
HORIZONTAL
,
NB_ORIENTATIONS
};
...
@@ -84,6 +84,7 @@ static const AVOption showspectrum_options[] = {
...
@@ -84,6 +84,7 @@ static const AVOption showspectrum_options[] = {
{
"intensity"
,
"intensity based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
INTENSITY
},
0
,
0
,
FLAGS
,
"color"
},
{
"intensity"
,
"intensity based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
INTENSITY
},
0
,
0
,
FLAGS
,
"color"
},
{
"rainbow"
,
"rainbow based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
RAINBOW
},
0
,
0
,
FLAGS
,
"color"
},
{
"rainbow"
,
"rainbow based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
RAINBOW
},
0
,
0
,
FLAGS
,
"color"
},
{
"moreland"
,
"moreland based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
MORELAND
},
0
,
0
,
FLAGS
,
"color"
},
{
"moreland"
,
"moreland based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
MORELAND
},
0
,
0
,
FLAGS
,
"color"
},
{
"nebulae"
,
"nebulae based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
NEBULAE
},
0
,
0
,
FLAGS
,
"color"
},
{
"scale"
,
"set display scale"
,
OFFSET
(
scale
),
AV_OPT_TYPE_INT
,
{.
i64
=
SQRT
},
LINEAR
,
NB_SCALES
-
1
,
FLAGS
,
"scale"
},
{
"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"
},
{
"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"
},
{
"cbrt"
,
"cubic root"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CBRT
},
0
,
0
,
FLAGS
,
"scale"
},
...
@@ -144,6 +145,15 @@ static const struct ColorTable {
...
@@ -144,6 +145,15 @@ static const struct ColorTable {
{
0
.
73
,
177
/
256
.,
(
103
-
128
)
/
256
.,
(
165
-
128
)
/
256
.
},
{
0
.
73
,
177
/
256
.,
(
103
-
128
)
/
256
.,
(
165
-
128
)
/
256
.
},
{
0
.
86
,
136
/
256
.,
(
100
-
128
)
/
256
.,
(
183
-
128
)
/
256
.
},
{
0
.
86
,
136
/
256
.,
(
100
-
128
)
/
256
.,
(
183
-
128
)
/
256
.
},
{
1
,
68
/
256
.,
(
117
-
128
)
/
256
.,
(
203
-
128
)
/
256
.
}},
{
1
,
68
/
256
.,
(
117
-
128
)
/
256
.,
(
203
-
128
)
/
256
.
}},
[
NEBULAE
]
=
{
{
0
,
10
/
256
.,
(
134
-
128
)
/
256
.,
(
132
-
128
)
/
256
.
},
{
0
.
23
,
21
/
256
.,
(
137
-
128
)
/
256
.,
(
130
-
128
)
/
256
.
},
{
0
.
45
,
35
/
256
.,
(
134
-
128
)
/
256
.,
(
134
-
128
)
/
256
.
},
{
0
.
57
,
51
/
256
.,
(
130
-
128
)
/
256
.,
(
139
-
128
)
/
256
.
},
{
0
.
67
,
104
/
256
.,
(
116
-
128
)
/
256
.,
(
162
-
128
)
/
256
.
},
{
0
.
77
,
120
/
256
.,
(
105
-
128
)
/
256
.,
(
188
-
128
)
/
256
.
},
{
0
.
87
,
140
/
256
.,
(
105
-
128
)
/
256
.,
(
188
-
128
)
/
256
.
},
{
1
,
1
,
0
,
0
}},
};
};
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
...
@@ -392,6 +402,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
...
@@ -392,6 +402,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
switch
(
s
->
color_mode
)
{
switch
(
s
->
color_mode
)
{
case
RAINBOW
:
case
RAINBOW
:
case
MORELAND
:
case
MORELAND
:
case
NEBULAE
:
case
INTENSITY
:
case
INTENSITY
:
uf
=
yf
;
uf
=
yf
;
vf
=
yf
;
vf
=
yf
;
...
...
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