mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-30 22:50:48 +00:00
avfilter/af_agate: replace FFABS with fabs
This commit is contained in:
parent
f1181e4660
commit
9ab98b580e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user