lavfi/dynaudnorm: rename pow2 to pow_2

This conflict with the DJGPP libc which includes a pow2 function¹

We cannot make DJGPP POSIX only (using -D_POSIX_SOURCE) to avoid this
kind of symbols conflicts due to the lack of both posix_memalign and
memalign (DJGPP non standard function) in that POSIX mode. We currently
rely on memalign for aligned heap allocation.

[1]: http://www.delorie.com/djgpp/doc/libc-2.02/libc_536.html
This commit is contained in:
Clément Bœsch 2017-03-26 20:41:41 +02:00
parent 2d12b910f7
commit 8f9edf89d5

View File

@ -341,7 +341,7 @@ static inline double fade(double prev, double next, int pos,
return fade_factors[0][pos] * prev + fade_factors[1][pos] * next;
}
static inline double pow2(const double value)
static inline double pow_2(const double value)
{
return value * value;
}
@ -384,7 +384,7 @@ static double compute_frame_rms(AVFrame *frame, int channel)
const double *data_ptr = (double *)frame->extended_data[c];
for (i = 0; i < frame->nb_samples; i++) {
rms_value += pow2(data_ptr[i]);
rms_value += pow_2(data_ptr[i]);
}
}
@ -392,7 +392,7 @@ static double compute_frame_rms(AVFrame *frame, int channel)
} else {
const double *data_ptr = (double *)frame->extended_data[channel];
for (i = 0; i < frame->nb_samples; i++) {
rms_value += pow2(data_ptr[i]);
rms_value += pow_2(data_ptr[i]);
}
rms_value /= frame->nb_samples;
@ -545,7 +545,7 @@ static double compute_frame_std_dev(DynamicAudioNormalizerContext *s,
const double *data_ptr = (double *)frame->extended_data[c];
for (i = 0; i < frame->nb_samples; i++) {
variance += pow2(data_ptr[i]); // Assume that MEAN is *zero*
variance += pow_2(data_ptr[i]); // Assume that MEAN is *zero*
}
}
variance /= (s->channels * frame->nb_samples) - 1;
@ -553,7 +553,7 @@ static double compute_frame_std_dev(DynamicAudioNormalizerContext *s,
const double *data_ptr = (double *)frame->extended_data[channel];
for (i = 0; i < frame->nb_samples; i++) {
variance += pow2(data_ptr[i]); // Assume that MEAN is *zero*
variance += pow_2(data_ptr[i]); // Assume that MEAN is *zero*
}
variance /= frame->nb_samples - 1;
}