diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-10-05 12:00:57 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-10-05 12:00:57 +0200 |
commit | 3e687be4faa6dba2293317ccae732bacfc49e434 (patch) | |
tree | 85c0e68b549236132338f73d5ce515e7321465cb /libavfilter/avf_showspectrum.c | |
parent | 03123e4053d640070ca77adf99d5ae487806d51e (diff) | |
download | ffmpeg-3e687be4faa6dba2293317ccae732bacfc49e434.tar.gz |
avfilter/avf_showspectrum: add green color map
Diffstat (limited to 'libavfilter/avf_showspectrum.c')
-rw-r--r-- | libavfilter/avf_showspectrum.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index a750b9a3f1..b39c084a4b 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -44,7 +44,7 @@ enum DisplayMode { COMBINED, SEPARATE, NB_MODES }; enum DataMode { D_MAGNITUDE, D_PHASE, NB_DMODES }; enum DisplayScale { LINEAR, SQRT, CBRT, LOG, FOURTHRT, FIFTHRT, NB_SCALES }; -enum ColorMode { CHANNEL, INTENSITY, RAINBOW, MORELAND, NEBULAE, FIRE, FIERY, FRUIT, COOL, MAGMA, NB_CLMODES }; +enum ColorMode { CHANNEL, INTENSITY, RAINBOW, MORELAND, NEBULAE, FIRE, FIERY, FRUIT, COOL, MAGMA, GREEN, NB_CLMODES }; enum SlideMode { REPLACE, SCROLL, FULLFRAME, RSCROLL, NB_SLIDES }; enum Orientation { VERTICAL, HORIZONTAL, NB_ORIENTATIONS }; @@ -114,6 +114,7 @@ static const AVOption showspectrum_options[] = { { "fruit", "fruit based coloring", 0, AV_OPT_TYPE_CONST, {.i64=FRUIT}, 0, 0, FLAGS, "color" }, { "cool", "cool based coloring", 0, AV_OPT_TYPE_CONST, {.i64=COOL}, 0, 0, FLAGS, "color" }, { "magma", "magma based coloring", 0, AV_OPT_TYPE_CONST, {.i64=MAGMA}, 0, 0, FLAGS, "color" }, + { "green", "green based coloring", 0, AV_OPT_TYPE_CONST, {.i64=GREEN}, 0, 0, FLAGS, "color" }, { "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" }, { "sqrt", "square root", 0, AV_OPT_TYPE_CONST, {.i64=SQRT}, 0, 0, FLAGS, "scale" }, @@ -238,6 +239,10 @@ static const struct ColorTable { { 0.64, 128/256., (103-128)/256., (214-128)/256. }, { 0.78, 167/256., (85-128)/256., (174-128)/256. }, { 1, 205/256., (80-128)/256., (152-128)/256. }}, + [GREEN] = { + { 0, 0, 0, 0 }, + { .75, .5, 0, -.5 }, + { 1, 1, 0, 0 }}, }; static av_cold void uninit(AVFilterContext *ctx) @@ -698,6 +703,7 @@ static void color_range(ShowSpectrumContext *s, int ch, case FIERY: case FRUIT: case COOL: + case GREEN: case MAGMA: case INTENSITY: *uf = *yf; @@ -1086,6 +1092,7 @@ static const AVOption showspectrumpic_options[] = { { "fruit", "fruit based coloring", 0, AV_OPT_TYPE_CONST, {.i64=FRUIT}, 0, 0, FLAGS, "color" }, { "cool", "cool based coloring", 0, AV_OPT_TYPE_CONST, {.i64=COOL}, 0, 0, FLAGS, "color" }, { "magma", "magma based coloring", 0, AV_OPT_TYPE_CONST, {.i64=MAGMA}, 0, 0, FLAGS, "color" }, + { "green", "green based coloring", 0, AV_OPT_TYPE_CONST, {.i64=GREEN}, 0, 0, FLAGS, "color" }, { "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" }, { "sqrt", "square root", 0, AV_OPT_TYPE_CONST, {.i64=SQRT}, 0, 0, FLAGS, "scale" }, |