aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-08-17 21:55:23 +0200
committerPaul B Mahol <onemda@gmail.com>2016-08-17 22:02:29 +0200
commit345c252e9c19621f86a837688015ca1fae92d96f (patch)
tree3c9068e3d40a85a575eb4026902db8b79a54a407
parentf84cff8565e94d14456bd5494d4d29b125219357 (diff)
downloadffmpeg-345c252e9c19621f86a837688015ca1fae92d96f.tar.gz
avfilter/avf_showspectrum: unbreak dB legend
-rw-r--r--libavfilter/avf_showspectrum.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 567ce5d483..5741a1e93d 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -1233,9 +1233,13 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
for (chn = 0; chn < (s->mode == SEPARATE ? 1 : s->nb_display_channels); chn++) {
float yf, uf, vf;
int channel = (multi) ? s->nb_display_channels - ch - 1 : chn;
+ float lout[3];
color_range(s, channel, &yf, &uf, &vf);
- pick_color(s, yf, uf, vf, y / (float)h, out);
+ pick_color(s, yf, uf, vf, y / (float)h, lout);
+ out[0] += lout[0];
+ out[1] += lout[1];
+ out[2] += lout[2];
}
memset(s->outpicref->data[0]+(s->start_y + h * (ch + 1) - y - 1) * s->outpicref->linesize[0] + s->w + s->start_x + 20, av_clip_uint8(out[0]), 10);
memset(s->outpicref->data[1]+(s->start_y + h * (ch + 1) - y - 1) * s->outpicref->linesize[1] + s->w + s->start_x + 20, av_clip_uint8(out[1]), 10);