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>2016-01-02 01:22:00 +0300
committerPaul B Mahol <onemda@gmail.com>2016-01-02 20:53:09 +0300
commit9b06e7befaa761b7f42108c2d720f78757458c2a (patch)
treed6f075af3c90f1f45a36dfe13228f72b8c857246 /libavfilter/avf_showspectrum.c
parent72280d1c6caaa23887aaed715d389b6c08cf9e91 (diff)
avfilter/avf_showspectrum: add fiery color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/avf_showspectrum.c')
-rw-r--r--libavfilter/avf_showspectrum.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 961b1406f6..b7ee266220 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -41,7 +41,7 @@
enum DisplayMode { COMBINED, SEPARATE, NB_MODES };
enum DisplayScale { LINEAR, SQRT, CBRT, LOG, NB_SCALES };
-enum ColorMode { CHANNEL, INTENSITY, RAINBOW, MORELAND, NEBULAE, FIRE, NB_CLMODES };
+enum ColorMode { CHANNEL, INTENSITY, RAINBOW, MORELAND, NEBULAE, FIRE, FIERY, NB_CLMODES };
enum SlideMode { REPLACE, SCROLL, FULLFRAME, RSCROLL, NB_SLIDES };
enum Orientation { VERTICAL, HORIZONTAL, NB_ORIENTATIONS };
@@ -96,6 +96,7 @@ static const AVOption showspectrum_options[] = {
{ "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" },
{ "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" },
{ "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" },
@@ -175,6 +176,15 @@ static const struct ColorTable {
{ 0.77, 126/256., (74-128)/256., (172-128)/256. },
{ 0.87, 164/256., (73-128)/256., (162-128)/256. },
{ 1, 1, 0, 0 }},
+ [FIERY] = {
+ { 0, 0, 0, 0 },
+ { 0.23, 36/256., (116-128)/256., (163-128)/256. },
+ { 0.45, 52/256., (102-128)/256., (200-128)/256. },
+ { 0.57, 116/256., (84-128)/256., (196-128)/256. },
+ { 0.67, 157/256., (67-128)/256., (181-128)/256. },
+ { 0.77, 193/256., (40-128)/256., (155-128)/256. },
+ { 0.87, 221/256., (101-128)/256., (134-128)/256. },
+ { 1, 1, 0, 0 }},
};
static av_cold void uninit(AVFilterContext *ctx)
@@ -456,6 +466,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
case MORELAND:
case NEBULAE:
case FIRE:
+ case FIERY:
case INTENSITY:
uf = yf;
vf = yf;
@@ -753,6 +764,7 @@ static const AVOption showspectrumpic_options[] = {
{ "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" },
{ "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" },
{ "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" },