[FFmpeg-cvslog] avfilter/avf_showspectrum: use log10 instead of log()/...
Ganesh Ajjanagadde
git at videolan.org
Thu Oct 29 23:56:21 CET 2015
ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Thu Oct 29 00:14:39 2015 -0400| [ec66bcc0e75ca839e82f3c87ebfa7cd90bc1c089] | committer: Ganesh Ajjanagadde
avfilter/avf_showspectrum: use log10 instead of log()/...
This is likely more precise and conveys the intent better.
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec66bcc0e75ca839e82f3c87ebfa7cd90bc1c089
---
libavfilter/avf_showspectrum.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 936db60..7d5c438 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/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);
More information about the ffmpeg-cvslog
mailing list