From patchwork Tue Nov 29 21:03:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 1604 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp19778vsa; Tue, 29 Nov 2016 13:03:20 -0800 (PST) X-Received: by 10.194.86.104 with SMTP id o8mr24907031wjz.196.1480453400084; Tue, 29 Nov 2016 13:03:20 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id op6si44455080wjc.85.2016.11.29.13.03.11; Tue, 29 Nov 2016 13:03:20 -0800 (PST) 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 49B77689A3F; Tue, 29 Nov 2016 23:03:03 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-3.mx.upcmail.net (vie01a-dmta-pe01-3.mx.upcmail.net [62.179.121.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C6F016809A9 for ; Tue, 29 Nov 2016 23:02:57 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cBpYN-0004nc-Nq for ffmpeg-devel@ffmpeg.org; Tue, 29 Nov 2016 22:03:03 +0100 Received: from [192.168.1.3] ([80.110.108.40]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id Dx321u01r0sKnS801x339U; Tue, 29 Nov 2016 22:03:03 +0100 X-SourceIP: 80.110.108.40 From: Carl Eugen Hoyos To: FFmpeg development discussions and patches Date: Tue, 29 Nov 2016 22:03:02 +0100 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201611292203.02526.cehoyos@ag.or.at> Subject: [FFmpeg-devel] [PATCH]lavfi:Fix aix compilation 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch fixes aix compilation, similar to 33f5d70d Please comment, Carl Eugen From a959ae4347edb37dc342ef03c178a621a1c3a74a Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 29 Nov 2016 21:49:22 +0100 Subject: [PATCH] lavfi: Fix aix compilation. Rename hz in af_apulsator.c and avf_showspectrum.c as hertz. The aix header sys/m_param.h defines hz as __hz. --- libavfilter/af_apulsator.c | 6 +++--- libavfilter/avf_showspectrum.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libavfilter/af_apulsator.c b/libavfilter/af_apulsator.c index 802b8d0..67711a2 100644 --- a/libavfilter/af_apulsator.c +++ b/libavfilter/af_apulsator.c @@ -47,7 +47,7 @@ typedef struct AudioPulsatorContext { double offset_r; double pwidth; double bpm; - double hz; + double hertz; int ms; int timing; @@ -76,7 +76,7 @@ static const AVOption apulsator_options[] = { { "hz", NULL, 0, AV_OPT_TYPE_CONST, {.i64=UNIT_HZ}, 0, 0, FLAGS, "timing" }, { "bpm", "set BPM", OFFSET(bpm), AV_OPT_TYPE_DOUBLE, {.dbl=120}, 30, 300, FLAGS }, { "ms", "set ms", OFFSET(ms), AV_OPT_TYPE_INT, {.i64=500}, 10, 2000, FLAGS }, - { "hz", "set frequency", OFFSET(hz), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0.01, 100, FLAGS }, + { "hz", "set frequency", OFFSET(hertz), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0.01, 100, FLAGS }, { NULL } }; @@ -208,7 +208,7 @@ static int config_input(AVFilterLink *inlink) switch (s->timing) { case UNIT_BPM: freq = s->bpm / 60; break; case UNIT_MS: freq = 1 / (s->ms / 1000.); break; - case UNIT_HZ: freq = s->hz; break; + case UNIT_HZ: freq = s->hertz; break; default: av_assert0(0); } diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index f63fbe8..8a08b20 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1120,13 +1120,13 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink) dst[x] = 200; } for (y = 0; y < h; y += 40) { - float hz = y * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(h))); + float hertz = y * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(h))); char *units; - if (hz == 0) + if (hertz == 0) units = av_asprintf("DC"); else - units = av_asprintf("%.2f", hz); + units = av_asprintf("%.2f", hertz); if (!units) return AVERROR(ENOMEM); @@ -1185,13 +1185,13 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink) dst[x] = 200; } for (x = 0; x < w; x += 80) { - float hz = x * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(w))); + float hertz = x * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(w))); char *units; - if (hz == 0) + if (hertz == 0) units = av_asprintf("DC"); else - units = av_asprintf("%.2f", hz); + units = av_asprintf("%.2f", hertz); if (!units) return AVERROR(ENOMEM);