avfilter/avf_showspectrum: finally fix log scaler
authorPaul B Mahol <onemda@gmail.com>
Sun, 3 Jan 2016 21:43:21 +0000 (22:43 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 3 Jan 2016 22:09:43 +0000 (23:09 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/avf_showspectrum.c

index 6e73b9e..48d811e 100644 (file)
@@ -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);