[FFmpeg-devel] [PATCH 05/15] lavfi/af_compand: replace pow(10, x) by exp10(x)

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


exp10, recently introduced, is superior for the purpose.

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

diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c
index 68b1fae..9c18da6 100644
--- a/libavfilter/af_compand.c
+++ b/libavfilter/af_compand.c
@@ -506,7 +506,7 @@ static int config_output(AVFilterLink *outlink)
             cp->decay = 1.0 - exp(-1.0 / (sample_rate * cp->decay));
         else
             cp->decay = 1.0;
-        cp->volume = pow(10.0, s->initial_volume / 20);
+        cp->volume = exp10(s->initial_volume / 20);
     }
 
     s->delay_samples = s->delay * sample_rate;
-- 
2.6.4



More information about the ffmpeg-devel mailing list