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
70463b70
Commit
70463b70
authored
Nov 08, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showspectrum: add terrain color map
parent
09fdfc11
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
filters.texi
doc/filters.texi
+4
-0
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+10
-1
No files found.
doc/filters.texi
View file @
70463b70
...
@@ -21724,6 +21724,8 @@ each channel is displayed using the viridis color scheme
...
@@ -21724,6 +21724,8 @@ each channel is displayed using the viridis color scheme
each
channel
is
displayed
using
the
plasma
color
scheme
each
channel
is
displayed
using
the
plasma
color
scheme
@
item
cividis
@
item
cividis
each
channel
is
displayed
using
the
cividis
color
scheme
each
channel
is
displayed
using
the
cividis
color
scheme
@
item
terrain
each
channel
is
displayed
using
the
terrain
color
scheme
@
end
table
@
end
table
Default
value
is
@
samp
{
channel
}.
Default
value
is
@
samp
{
channel
}.
...
@@ -21896,6 +21898,8 @@ each channel is displayed using the viridis color scheme
...
@@ -21896,6 +21898,8 @@ each channel is displayed using the viridis color scheme
each
channel
is
displayed
using
the
plasma
color
scheme
each
channel
is
displayed
using
the
plasma
color
scheme
@
item
cividis
@
item
cividis
each
channel
is
displayed
using
the
cividis
color
scheme
each
channel
is
displayed
using
the
cividis
color
scheme
@
item
terrain
each
channel
is
displayed
using
the
terrain
color
scheme
@
end
table
@
end
table
Default
value
is
@
samp
{
intensity
}.
Default
value
is
@
samp
{
intensity
}.
...
...
libavfilter/avf_showspectrum.c
View file @
70463b70
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
enum
DisplayMode
{
COMBINED
,
SEPARATE
,
NB_MODES
};
enum
DisplayMode
{
COMBINED
,
SEPARATE
,
NB_MODES
};
enum
DataMode
{
D_MAGNITUDE
,
D_PHASE
,
NB_DMODES
};
enum
DataMode
{
D_MAGNITUDE
,
D_PHASE
,
NB_DMODES
};
enum
DisplayScale
{
LINEAR
,
SQRT
,
CBRT
,
LOG
,
FOURTHRT
,
FIFTHRT
,
NB_SCALES
};
enum
DisplayScale
{
LINEAR
,
SQRT
,
CBRT
,
LOG
,
FOURTHRT
,
FIFTHRT
,
NB_SCALES
};
enum
ColorMode
{
CHANNEL
,
INTENSITY
,
RAINBOW
,
MORELAND
,
NEBULAE
,
FIRE
,
FIERY
,
FRUIT
,
COOL
,
MAGMA
,
GREEN
,
VIRIDIS
,
PLASMA
,
CIVIDIS
,
NB_CLMODES
};
enum
ColorMode
{
CHANNEL
,
INTENSITY
,
RAINBOW
,
MORELAND
,
NEBULAE
,
FIRE
,
FIERY
,
FRUIT
,
COOL
,
MAGMA
,
GREEN
,
VIRIDIS
,
PLASMA
,
CIVIDIS
,
TERRAIN
,
NB_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
};
...
@@ -126,6 +126,7 @@ static const AVOption showspectrum_options[] = {
...
@@ -126,6 +126,7 @@ static const AVOption showspectrum_options[] = {
{
"viridis"
,
"viridis based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
VIRIDIS
},
0
,
0
,
FLAGS
,
"color"
},
{
"viridis"
,
"viridis based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
VIRIDIS
},
0
,
0
,
FLAGS
,
"color"
},
{
"plasma"
,
"plasma based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
PLASMA
},
0
,
0
,
FLAGS
,
"color"
},
{
"plasma"
,
"plasma based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
PLASMA
},
0
,
0
,
FLAGS
,
"color"
},
{
"cividis"
,
"cividis based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CIVIDIS
},
0
,
0
,
FLAGS
,
"color"
},
{
"cividis"
,
"cividis based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CIVIDIS
},
0
,
0
,
FLAGS
,
"color"
},
{
"terrain"
,
"terrain based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
TERRAIN
},
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"
},
{
"lin"
,
"linear"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
LINEAR
},
0
,
0
,
FLAGS
,
"scale"
},
{
"lin"
,
"linear"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
LINEAR
},
0
,
0
,
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"
},
...
@@ -282,6 +283,12 @@ static const struct ColorTable {
...
@@ -282,6 +283,12 @@ static const struct ColorTable {
{
0
.
76
,
0x89
/
255
.,
(
0x75
-
128
)
/
255
.,
(
0x84
-
128
)
/
255
.
},
{
0
.
76
,
0x89
/
255
.,
(
0x75
-
128
)
/
255
.,
(
0x84
-
128
)
/
255
.
},
{
0
.
90
,
0xCE
/
255
.,
(
0x35
-
128
)
/
255
.,
(
0x95
-
128
)
/
255
.
},
{
0
.
90
,
0xCE
/
255
.,
(
0x35
-
128
)
/
255
.,
(
0x95
-
128
)
/
255
.
},
{
1
,
1
,
0
,
0
.
}},
{
1
,
1
,
0
,
0
.
}},
[
TERRAIN
]
=
{
{
0
,
0
,
0
,
0
},
{
0
.
15
,
0
,
.
5
,
0
},
{
0
.
60
,
1
,
-
.
5
,
-
.
5
},
{
0
.
85
,
1
,
-
.
5
,
.
5
},
{
1
,
1
,
0
,
0
}},
};
};
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
...
@@ -514,6 +521,7 @@ static void color_range(ShowSpectrumContext *s, int ch,
...
@@ -514,6 +521,7 @@ static void color_range(ShowSpectrumContext *s, int ch,
case
VIRIDIS
:
case
VIRIDIS
:
case
PLASMA
:
case
PLASMA
:
case
CIVIDIS
:
case
CIVIDIS
:
case
TERRAIN
:
case
MAGMA
:
case
MAGMA
:
case
INTENSITY
:
case
INTENSITY
:
*
uf
=
*
yf
;
*
uf
=
*
yf
;
...
@@ -1431,6 +1439,7 @@ static const AVOption showspectrumpic_options[] = {
...
@@ -1431,6 +1439,7 @@ static const AVOption showspectrumpic_options[] = {
{
"viridis"
,
"viridis based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
VIRIDIS
},
0
,
0
,
FLAGS
,
"color"
},
{
"viridis"
,
"viridis based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
VIRIDIS
},
0
,
0
,
FLAGS
,
"color"
},
{
"plasma"
,
"plasma based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
PLASMA
},
0
,
0
,
FLAGS
,
"color"
},
{
"plasma"
,
"plasma based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
PLASMA
},
0
,
0
,
FLAGS
,
"color"
},
{
"cividis"
,
"cividis based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CIVIDIS
},
0
,
0
,
FLAGS
,
"color"
},
{
"cividis"
,
"cividis based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CIVIDIS
},
0
,
0
,
FLAGS
,
"color"
},
{
"terrain"
,
"terrain based coloring"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
TERRAIN
},
0
,
0
,
FLAGS
,
"color"
},
{
"scale"
,
"set display scale"
,
OFFSET
(
scale
),
AV_OPT_TYPE_INT
,
{.
i64
=
LOG
},
0
,
NB_SCALES
-
1
,
FLAGS
,
"scale"
},
{
"scale"
,
"set display scale"
,
OFFSET
(
scale
),
AV_OPT_TYPE_INT
,
{.
i64
=
LOG
},
0
,
NB_SCALES
-
1
,
FLAGS
,
"scale"
},
{
"lin"
,
"linear"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
LINEAR
},
0
,
0
,
FLAGS
,
"scale"
},
{
"lin"
,
"linear"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
LINEAR
},
0
,
0
,
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"
},
...
...
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