From patchwork Tue Oct 23 21:48:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Thompson X-Patchwork-Id: 10760 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 9A70E44ABA1 for ; Wed, 24 Oct 2018 00:48:39 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 132FE68A4B1; Wed, 24 Oct 2018 00:48:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4EFC9680682 for ; Wed, 24 Oct 2018 00:48:04 +0300 (EEST) Received: by mail-wr1-f52.google.com with SMTP id y16so3314957wrw.3 for ; Tue, 23 Oct 2018 14:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=RZGJbFJBhVWhnlYhFZdIukPFP6jwHhLv3b3m5HHIMJ4=; b=10BP0T1J/8zSGKZ5nTE9uFB8E29SzxPPnuuUjnuZL+VB/yYDWP5U6Jvi0YZaEQc05v Vt6YMLs6CLPBXlS+jw+hamzlMos2o8p4S2343QxhVq8/+mX1nVXFinMpE836i+GDZlnj x/99LVnzOLd2wXpKl5ObK+ONm/7Yyh9HB5x9BtAHhszQ1mXelwLz7HblAlh3m9mRYjYP 12u8ujiQkYDT7CB2FZuXvP5Cnbz2KmkMhZzUmnbI7fF4x9q/D+Gs+r6uwgAFslDH6nRa MuKhf8SWlqjT1IQiP2tdJPotY2B59KfQO6moyP6Twjafn/uBmobIJTO1P4unwOI0VgjJ eL/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RZGJbFJBhVWhnlYhFZdIukPFP6jwHhLv3b3m5HHIMJ4=; b=V3wAfUTuCE31HCW6EIwB14px65Zx6RaIDYqRRFKFuOnckqVPrGbhhRnEfzjeyXdrI1 zwHkOrC54ULcENgY6utAMcLTpvB6uAw0xWTD0vKU8CCRZWo17TYZNND6NiYOuW6prmgZ jIG3QwY6FOW2Y8HSxVwva9QRkrdq2YCXzfnl6AI5nJMQV7sM0Bjigwfhs33lDgrXfdxn qpOyIHK9CRSHFlr7ZmOkcCRPT9/23lbSi7XRtVaCpaSqQ20/rFgoJKcLVk3JWcG+ogjP 4Z6iPRHr0OwTBKQNyvEPQXhCAt4soU8vvXUxbOzneshy9vXbUmxtyvFQvWMBajO2vlZt v6Jw== X-Gm-Message-State: AGRZ1gIZ6HMHCx6XFsXAObKflFHcETzS0eERWTQpafp/e7mN90ATBHnd QIqIrZZi5kKXZklIYxMOjlQKCRIKD6k= X-Google-Smtp-Source: AJdET5dTbPbn2S++1cT7G4FTDDtrt+V1SNoY/YjyT0MQi5CpzDdK9fNvlxZa8CJnCkrm6yAycFS8zg== X-Received: by 2002:adf:cc8a:: with SMTP id p10-v6mr25487wrj.208.1540331311800; Tue, 23 Oct 2018 14:48:31 -0700 (PDT) Received: from rywe.jkqxz.net (cpc91242-cmbg18-2-0-cust650.5-4.cable.virginm.net. [82.8.130.139]) by smtp.gmail.com with ESMTPSA id c18-v6sm1389797wrr.74.2018.10.23.14.48.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 14:48:30 -0700 (PDT) From: Mark Thompson To: ffmpeg-devel@ffmpeg.org Date: Tue, 23 Oct 2018 22:48:26 +0100 Message-Id: <20181023214826.31994-2-sw@jkqxz.net> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181023214826.31994-1-sw@jkqxz.net> References: <20181023214826.31994-1-sw@jkqxz.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] lavfi/ebur128: Fix mixed declarations and code 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" --- libavfilter/f_ebur128.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index e03adc9ba1..f613d8def2 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -777,6 +777,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) int x, y, ret; uint8_t *p; double gauge_value; + int y_loudness_lu_graph, y_loudness_lu_gauge; if (ebur128->gauge_type == GAUGE_TYPE_MOMENTARY) { gauge_value = loudness_400 - ebur128->target; @@ -784,8 +785,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) gauge_value = loudness_3000 - ebur128->target; } - const int y_loudness_lu_graph = lu_to_y(ebur128, loudness_3000 - ebur128->target); - const int y_loudness_lu_gauge = lu_to_y(ebur128, gauge_value); + y_loudness_lu_graph = lu_to_y(ebur128, loudness_3000 - ebur128->target); + y_loudness_lu_gauge = lu_to_y(ebur128, gauge_value); /* draw the graph using the short-term loudness */ p = pic->data[0] + ebur128->graph.y*pic->linesize[0] + ebur128->graph.x*3;