diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2016-01-05 05:37:16 +0300 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2016-01-08 03:57:20 +0300 |
commit | 2fbdc4faf1bc0740cf18b0267c017e2afafaa99e (patch) | |
tree | 8e5c290d40de6c3adf104cbcfc397bd91702e19d /libavfilter/avf_showspectrum.c | |
parent | 08339cdb6c8fb3adfa63ec7ed787cce73063b773 (diff) |
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>
Diffstat (limited to 'libavfilter/avf_showspectrum.c')
-rw-r--r-- | libavfilter/avf_showspectrum.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index 3611c96a5e..88bee3cb6e 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -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); |