Browse Source

avfilter/af_sofalizer: use fabsf() instead of fabs()

tags/n4.2
Paul B Mahol 6 years ago
parent
commit
c49307e784
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavfilter/af_sofalizer.c

+ 3
- 3
libavfilter/af_sofalizer.c View File

@@ -351,8 +351,8 @@ static int sofalizer_convolute(AVFilterContext *ctx, void *arg, int jobnr, int n
} }


/* clippings counter */ /* 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: */ /* move output buffer pointer by +2 to get to next sample of processed channel: */
dst += 2; 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 */ /* go through all samples of current output buffer: count clippings */
for (i = 0; i < out->nb_samples; i++) { for (i = 0; i < out->nb_samples; i++) {
/* clippings counter */ /* clippings counter */
if (fabs(*dst) > 1) { /* if current output sample > 1 */
if (fabsf(dst[0]) > 1) { /* if current output sample > 1 */
n_clippings[0]++; n_clippings[0]++;
} }




Loading…
Cancel
Save