[FFmpeg-devel] [PATCH 01/15] lavu/eval: replace pow(10, x) by exp10

Ganesh Ajjanagadde gajjanagadde at gmail.com
Wed Dec 23 19:47:21 CET 2015


exp10, recently introduced, is superior for the purpose.

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

diff --git a/libavutil/eval.c b/libavutil/eval.c
index dcb8c56..936e6e6 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -106,7 +106,7 @@ double av_strtod(const char *numstr, char **tail)
     if (next!=numstr) {
         if (next[0] == 'd' && next[1] == 'B') {
             /* treat dB as decibels instead of decibytes */
-            d = pow(10, d / 20);
+            d = exp10(d / 20);
             next += 2;
         } else if (*next >= 'E' && *next <= 'z') {
             int e= si_prefixes[*next - 'E'].exp;
-- 
2.6.4



More information about the ffmpeg-devel mailing list