1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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>
This commit is contained in:
Ganesh Ajjanagadde 2015-10-29 00:14:39 -04:00
parent 59d37f5a4e
commit ec66bcc0e7

View File

@ -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);