aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-27 16:50:09 -0800
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-28 16:48:41 -0800
commit9f4c7b4df7f31755b7caf4d080c7577c787c1e72 (patch)
treee86e1c8c0b3e6e84bbfe88c4cb1223902db184cf
parent59ac7ce4dac5b2a68c4afb827b03a595e2d2f32e (diff)
downloadffmpeg-9f4c7b4df7f31755b7caf4d080c7577c787c1e72.tar.gz
lavfi/af_anequalizer: replace pow(x,-2) by 1/(x*x)
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-rw-r--r--libavfilter/af_anequalizer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c
index d7b5b6cf08..649c0b961d 100644
--- a/libavfilter/af_anequalizer.c
+++ b/libavfilter/af_anequalizer.c
@@ -391,8 +391,8 @@ static void chebyshev1_bp_filter(EqualizatorFilter *f,
epsilon = sqrt((G*G - Gb*Gb) / (Gb*Gb - G0*G0));
g0 = pow(G0,1.0/N);
- alfa = pow(1.0/epsilon + sqrt(1 + pow(epsilon,-2.0)), 1.0/N);
- beta = pow(G/epsilon + Gb * sqrt(1 + pow(epsilon,-2.0)), 1.0/N);
+ alfa = pow(1.0/epsilon + sqrt(1 + 1/(epsilon*epsilon)), 1.0/N);
+ beta = pow(G/epsilon + Gb * sqrt(1 + 1/(epsilon*epsilon)), 1.0/N);
a = 0.5 * (alfa - 1.0/alfa);
b = 0.5 * (beta - g0*g0*(1/beta));
tetta_b = tan(wb/2);