]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_sofalizer: use fabsf() instead of fabs()
authorPaul B Mahol <onemda@gmail.com>
Fri, 21 Dec 2018 10:53:44 +0000 (11:53 +0100)
committerPaul B Mahol <onemda@gmail.com>
Fri, 21 Dec 2018 10:53:44 +0000 (11:53 +0100)
libavfilter/af_sofalizer.c

index 94e8c8a53eb3de4602ecc114881e24fce09b85dc..6b189cffea540af282f82b59325f058db7408b71 100644 (file)
@@ -351,8 +351,8 @@ static int sofalizer_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n
         }
 
         /* clippings counter */
-        if (fabs(dst[0]) > 1)
-            *n_clippings += 1;
+        if (fabsf(dst[0]) > 1)
+            n_clippings[0]++;
 
         /* move output buffer pointer by +2 to get to next sample of processed channel: */
         dst += 2;
@@ -469,7 +469,7 @@ static int sofalizer_fast_convolute(AVFilterContext *ctx, void *arg, int jobnr,
     /* go through all samples of current output buffer: count clippings */
     for (i = 0; i < out->nb_samples; i++) {
         /* clippings counter */
-        if (fabs(*dst) > 1) { /* if current output sample > 1 */
+        if (fabsf(dst[0]) > 1) { /* if current output sample > 1 */
             n_clippings[0]++;
         }