Browse Source

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>
tags/n3.0
Ganesh Ajjanagadde 9 years ago
parent
commit
ec66bcc0e7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/avf_showspectrum.c

+ 1
- 1
libavfilter/avf_showspectrum.c 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);


Loading…
Cancel
Save