Merge "Use expf() instead of an approximation" into main
diff --git a/media/libeffects/loudness/dsp/core/dynamic_range_compression.cpp b/media/libeffects/loudness/dsp/core/dynamic_range_compression.cpp
index 578f58a..33f6779 100644
--- a/media/libeffects/loudness/dsp/core/dynamic_range_compression.cpp
+++ b/media/libeffects/loudness/dsp/core/dynamic_range_compression.cpp
@@ -89,8 +89,7 @@
} else {
state_ = alpha_release_ * state_ + (1.0f - alpha_release_) * cv;
}
- compressor_gain_ *=
- math::ExpApproximationViaTaylorExpansionOrder5(state_ - prev_state);
+ compressor_gain_ *= expf(state_ - prev_state);
x *= compressor_gain_;
if (x > kFixedPointLimit) {
return kFixedPointLimit;
@@ -118,8 +117,7 @@
} else {
state_ = alpha_release_ * state_ + (1.0f - alpha_release_) * cv;
}
- compressor_gain_ *=
- math::ExpApproximationViaTaylorExpansionOrder5(state_ - prev_state);
+ compressor_gain_ *= expf(state_ - prev_state);
*x1 *= compressor_gain_;
if (*x1 > kFixedPointLimit) {
*x1 = kFixedPointLimit;