[FFmpeg-devel] [PATCH 05/10] avfilter/avf_showcqt: use hypot()

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sun Nov 22 18:05:45 CET 2015


Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavfilter/avf_showcqt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index d6e2928..cd90c88 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -170,7 +170,7 @@ static double a_weighting(void *p, double f)
 static double b_weighting(void *p, double f)
 {
     double ret = 12200.0*12200.0 * (f*f*f);
-    ret /= (f*f + 20.6*20.6) * (f*f + 12200.0*12200.0) * sqrt(f*f + 158.5*158.5);
+    ret /= (f*f + 20.6*20.6) * (f*f + 12200.0*12200.0) * hypot(f, 158.5);
     return ret;
 }
 
-- 
2.6.2



More information about the ffmpeg-devel mailing list