[FFmpeg-cvslog] avfilter/avf_showspectrum: make colors for log scale more user friendly

Paul B Mahol git at videolan.org
Mon Dec 28 20:39:32 CET 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Dec 28 20:20:32 2015 +0100| [4020787b5bbd2ac159c860d1d1ec983837bf31bb] | committer: Paul B Mahol

avfilter/avf_showspectrum: make colors for log scale more user friendly

Previosly output was almost useless because background noise, due to
windowing function picked and which is not actually present in audio,
had too much brightness.
Now output of sine wave matches more with SoX.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavfilter/avf_showspectrum.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 433400d..0e2e84b 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -380,7 +380,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
                 a = cbrt(a);
                 break;
             case LOG:
-                a = 1 + log10(FFMAX(FFMIN(1, a), 1e-6)) / 6; // zero = -120dBFS
+                a = 1 + log10(FFMAX(FFMIN(1, a), 1e-6)) / 5; // zero = -120dBFS
                 break;
             default:
                 av_assert0(0);



More information about the ffmpeg-cvslog mailing list