avfilter/avf_showspectrum: use log10 instead of log()/...

This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
pull/158/head
Ganesh Ajjanagadde 9 years ago
parent 59d37f5a4e
commit ec66bcc0e7
  1. 2
      libavfilter/avf_showspectrum.c

@ -386,7 +386,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
a = cbrt(a);
break;
case LOG:
a = 1 - log(FFMAX(FFMIN(1, a), 1e-6)) / log(1e-6); // zero = -120dBFS
a = 1 + log10(FFMAX(FFMIN(1, a), 1e-6)) / 6; // zero = -120dBFS
break;
default:
av_assert0(0);

Loading…
Cancel
Save