From patchwork Sun Mar 26 18:53:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 3108 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp922792vsy; Sun, 26 Mar 2017 11:54:21 -0700 (PDT) X-Received: by 10.223.172.137 with SMTP id o9mr18296033wrc.66.1490554461014; Sun, 26 Mar 2017 11:54:21 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l187si11358006wml.150.2017.03.26.11.54.20; Sun, 26 Mar 2017 11:54:20 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BF5BE68828D; Sun, 26 Mar 2017 21:53:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from golem.pkh.me (LStLambert-657-1-117-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3A069680721 for ; Sun, 26 Mar 2017 21:53:45 +0300 (EEST) Received: from localhost (golem.pkh.me [local]) by golem.pkh.me (OpenSMTPD) with ESMTPA id f0427ace; Sun, 26 Mar 2017 18:54:01 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Sun, 26 Mar 2017 20:53:57 +0200 Message-Id: <20170326185359.5182-2-u@pkh.me> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170326185359.5182-1-u@pkh.me> References: <20170326185359.5182-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] lavfi/dynaudnorm: rename pow2 to pow_2 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This conflict with the DJGPP libc which includes a pow2 function¹ We can not make DJGPP posix only to avoid the conflict due to the lack of posix_memalign. [1]: http://www.delorie.com/djgpp/doc/libc-2.02/libc_536.html --- libavfilter/af_dynaudnorm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c index ddbef26ab5..aa5b28e647 100644 --- a/libavfilter/af_dynaudnorm.c +++ b/libavfilter/af_dynaudnorm.c @@ -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; }