Commit ec66bcc0 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde

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

This is likely more precise and conveys the intent better.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
parent 59d37f5a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment