Commit de5b12c9 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_aiir: unbreak clipping detection

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent ea25b7b4
...@@ -133,10 +133,10 @@ static int iir_ch_## name(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) ...@@ -133,10 +133,10 @@ static int iir_ch_## name(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
oc[0] = sample; \ oc[0] = sample; \
sample *= og; \ sample *= og; \
if (need_clipping && sample < min) { \ if (need_clipping && sample < min) { \
*clippings++; \ (*clippings)++; \
dst[n] = min; \ dst[n] = min; \
} else if (need_clipping && sample > max) { \ } else if (need_clipping && sample > max) { \
*clippings++; \ (*clippings)++; \
dst[n] = max; \ dst[n] = max; \
} else { \ } else { \
dst[n] = sample; \ dst[n] = sample; \
...@@ -188,10 +188,10 @@ static int iir_ch_serial_## name(AVFilterContext *ctx, void *arg, int ch, int nb ...@@ -188,10 +188,10 @@ static int iir_ch_serial_## name(AVFilterContext *ctx, void *arg, int ch, int nb
o0 *= og; \ o0 *= og; \
\ \
if (need_clipping && o0 < min) { \ if (need_clipping && o0 < min) { \
*clippings++; \ (*clippings)++; \
dst[n] = min; \ dst[n] = min; \
} else if (need_clipping && o0 > max) { \ } else if (need_clipping && o0 > max) { \
*clippings++; \ (*clippings)++; \
dst[n] = max; \ dst[n] = max; \
} else { \ } else { \
dst[n] = o0; \ dst[n] = o0; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment