[FFmpeg-cvslog] avfilter/avf_showspectrum: finally fix log scaler

Paul B Mahol git at videolan.org
Sun Jan 3 23:12:21 CET 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jan  3 22:43:21 2016 +0100| [0a451082c774540f8d47642d2078fcf2c822ebc1] | committer: Paul B Mahol

avfilter/avf_showspectrum: finally fix log scaler

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

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

 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 6e73b9e..48d811e 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -581,7 +581,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
                 a = pow(a, 0.20);
                 break;
             case LOG:
-                a = 1 + log10(FFMAX(FFMIN(1, a), 1e-6)) / 5; // zero = -120dBFS
+                a = 1 + log10(FFMAX(FFMIN(1, a * w), 1e-6)) / 6; // zero = -120dBFS
                 break;
             default:
                 av_assert0(0);



More information about the ffmpeg-cvslog mailing list