mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
08339cdb6c
commit
2fbdc4faf1
|
@ -590,7 +590,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
|
||||||
a = cbrt(a);
|
a = cbrt(a);
|
||||||
break;
|
break;
|
||||||
case FOURTHRT:
|
case FOURTHRT:
|
||||||
a = pow(a, 0.25);
|
a = sqrt(sqrt(a));
|
||||||
break;
|
break;
|
||||||
case FIFTHRT:
|
case FIFTHRT:
|
||||||
a = pow(a, 0.20);
|
a = pow(a, 0.20);
|
||||||
|
|
Loading…
Reference in New Issue