Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-12-30 23:20:16 +0300
committerPaul B Mahol <onemda@gmail.com>2015-12-30 23:28:52 +0300
commit0f387f2b6265e963d9cfd71239da3d8afa854b86 (patch)
treef69ad6c32f8c9570f348a08b592c6a229dd31786 /libavfilter/avf_showspectrum.c
parentdde994751b16913afb59fbea2e0294e1e6468ef4 (diff)
avfilter/avf_showspectrum: add nebulae color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/avf_showspectrum.c')
-rw-r--r--libavfilter/avf_showspectrum.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index fbb0f78dec..227aff8d32 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -37,7 +37,7 @@
enum DisplayMode { COMBINED, SEPARATE, NB_MODES };
enum DisplayScale { LINEAR, SQRT, CBRT, LOG, NB_SCALES };
-enum ColorMode { CHANNEL, INTENSITY, RAINBOW, MORELAND, NB_CLMODES };
+enum ColorMode { CHANNEL, INTENSITY, RAINBOW, MORELAND, NEBULAE, NB_CLMODES };
enum SlideMode { REPLACE, SCROLL, FULLFRAME, RSCROLL, NB_SLIDES };
enum Orientation { VERTICAL, HORIZONTAL, NB_ORIENTATIONS };
@@ -84,6 +84,7 @@ static const AVOption showspectrum_options[] = {
{ "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" },
{ "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" },
{ "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" },
@@ -144,6 +145,15 @@ static const struct ColorTable {
{ 0.73, 177/256., (103-128)/256., (165-128)/256. },
{ 0.86, 136/256., (100-128)/256., (183-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)
@@ -392,6 +402,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
switch (s->color_mode) {
case RAINBOW:
case MORELAND:
+ case NEBULAE:
case INTENSITY:
uf = yf;
vf = yf;