avfilter/af_agate: replace FFABS with fabs

This commit is contained in:
Ganesh Ajjanagadde 2015-10-13 09:31:16 +02:00 committed by Paul B Mahol
parent f1181e4660
commit 9ab98b580e

View File

@ -175,17 +175,17 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
dst = (double *)out->data[0];
for (n = 0; n < in->nb_samples; n++, src += inlink->channels, dst += inlink->channels) {
double abs_sample = FFABS(src[0]), gain = 1.0;
double abs_sample = fabs(src[0]), gain = 1.0;
for (c = 0; c < inlink->channels; c++)
dst[c] = src[c] * level_in;
if (s->link == 1) {
for (c = 1; c < inlink->channels; c++)
abs_sample = FFMAX(FFABS(src[c]), abs_sample);
abs_sample = FFMAX(fabs(src[c]), abs_sample);
} else {
for (c = 1; c < inlink->channels; c++)
abs_sample += FFABS(src[c]);
abs_sample += fabs(src[c]);
abs_sample /= inlink->channels;
}