Commit 0a451082 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/avf_showspectrum: finally fix log scaler

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 14caf966
...@@ -581,7 +581,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples) ...@@ -581,7 +581,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
a = pow(a, 0.20); a = pow(a, 0.20);
break; break;
case LOG: case LOG:
a = 1 + log10(FFMAX(FFMIN(1, a), 1e-6)) / 5; // zero = -120dBFS a = 1 + log10(FFMAX(FFMIN(1, a * w), 1e-6)) / 6; // zero = -120dBFS
break; break;
default: default:
av_assert0(0); 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