[FFmpeg-devel] [PATCH 1/8] avfilter/af_replaygain: use fabsf() instead of fabs()

lance.lmwang at gmail.com lance.lmwang at gmail.com
Thu Oct 14 16:08:55 EEST 2021


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavfilter/af_replaygain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_replaygain.c b/libavfilter/af_replaygain.c
index 4bf2763..da5c196 100644
--- a/libavfilter/af_replaygain.c
+++ b/libavfilter/af_replaygain.c
@@ -428,7 +428,7 @@ static void butter_filter_stereo_samples(ReplayGainContext *s,
     // (slowing us down).
 
     for (j = -4; j < 0; ++j)
-        if (fabs(hist_a[i + j]) > 1e-10 || fabs(hist_b[i + j]) > 1e-10)
+        if (fabsf(hist_a[i + j]) > 1e-10 || fabsf(hist_b[i + j]) > 1e-10)
             break;
 
     if (!j) {
@@ -477,7 +477,7 @@ static void yule_filter_stereo_samples(ReplayGainContext *s, const float *src,
     // (slowing us down).
 
     for (j = -20; j < 0; ++j)
-        if (fabs(hist_a[i + j]) > 1e-10 || fabs(hist_b[i + j]) > 1e-10)
+        if (fabsf(hist_a[i + j]) > 1e-10 || fabsf(hist_b[i + j]) > 1e-10)
             break;
 
     if (!j) {
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list