[FFmpeg-devel] [PATCH 03/11] avfilter/ebur128: Simplify by using log10()

Michael Niedermayer michael at niedermayer.cc
Mon Dec 31 23:03:10 EET 2018


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavfilter/ebur128.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/ebur128.c b/libavfilter/ebur128.c
index e11008078d..c8986fb5e1 100644
--- a/libavfilter/ebur128.c
+++ b/libavfilter/ebur128.c
@@ -368,7 +368,7 @@ EBUR128_FILTER(double, 1.0)
 
 static double ebur128_energy_to_loudness(double energy)
 {
-    return 10 * (log(energy) / log(10.0)) - 0.691;
+    return 10 * log10(energy) - 0.691;
 }
 
 static size_t find_histogram_index(double energy)
-- 
2.20.1



More information about the ffmpeg-devel mailing list