[FFmpeg-devel] [PATCH 06/11] avcodec/acelp_pitch_delay: Minor simplification by using ff_exp10()

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


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

diff --git a/libavcodec/acelp_pitch_delay.c b/libavcodec/acelp_pitch_delay.c
index c345a99c81..a070d1b25d 100644
--- a/libavcodec/acelp_pitch_delay.c
+++ b/libavcodec/acelp_pitch_delay.c
@@ -118,7 +118,7 @@ int16_t ff_acelp_decode_gain_code(
                (mr_energy >> 15) - 25
            );
 #else
-    mr_energy = gain_corr_factor * exp(M_LN10 / (20 << 23) * mr_energy) /
+    mr_energy = gain_corr_factor * ff_exp10((double)mr_energy / (20 << 23)) /
                 sqrt(adsp->scalarproduct_int16(fc_v, fc_v, subframe_size));
     return mr_energy >> 12;
 #endif
-- 
2.20.1



More information about the ffmpeg-devel mailing list