[FFmpeg-cvslog] avfilter/avf_showspectrum: unbreak dB legend

Paul B Mahol git at videolan.org
Wed Aug 17 23:03:12 EEST 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 17 21:55:23 2016 +0200| [345c252e9c19621f86a837688015ca1fae92d96f] | committer: Paul B Mahol

avfilter/avf_showspectrum: unbreak dB legend

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=345c252e9c19621f86a837688015ca1fae92d96f
---

 libavfilter/avf_showspectrum.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 567ce5d..5741a1e 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);



More information about the ffmpeg-cvslog mailing list