Browse Source

lavfi/avf_showspectrum: replace pow(x, 0.25) by sqrt(sqrt(x))

This is faster; precision assured as result is a float.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
tags/n3.0
Ganesh Ajjanagadde 10 years ago
parent
commit
2fbdc4faf1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/avf_showspectrum.c

+ 1
- 1
libavfilter/avf_showspectrum.c View File

@@ -590,7 +590,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
a = cbrt(a);
break;
case FOURTHRT:
a = pow(a, 0.25);
a = sqrt(sqrt(a));
break;
case FIFTHRT:
a = pow(a, 0.20);


Loading…
Cancel
Save