]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_acrossover: add missing inverter as last step
authorPaul B Mahol <onemda@gmail.com>
Thu, 26 Nov 2020 12:13:42 +0000 (13:13 +0100)
committerPaul B Mahol <onemda@gmail.com>
Thu, 26 Nov 2020 12:17:20 +0000 (13:17 +0100)
libavfilter/af_acrossover.c

index f4b45d4b60293c7133ad48d61eb44c90fa4130d0..11785e017db812c0decc4128498aeb7c0668d767 100644 (file)
@@ -315,6 +315,15 @@ static int filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jo
                 biquad_process(lp, dst, lsrc, nb_samples);
             }
         }
+
+        for (int band = 0; band < ctx->nb_outputs && s->filter_count & 1; band++) {
+            if (band & 1) {
+                double *dst = (double *)frames[band]->extended_data[ch];
+
+                for (int n = 0; n < nb_samples; n++)
+                    dst[n] *= -1.;
+            }
+        }
     }
 
     return 0;