From patchwork Sat Feb 20 07:22:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Guo, Yejun" X-Patchwork-Id: 25830 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 B1E3A4498CA for ; Sat, 20 Feb 2021 09:32:49 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9262C68A711; Sat, 20 Feb 2021 09:32:49 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7001568A636 for ; Sat, 20 Feb 2021 09:32:42 +0200 (EET) IronPort-SDR: m8UzNGyEk8YJCz4lToVwhpDEXD9O/FaQ5m9ADKMI+Lp5QCMpw3jbPNaXRVZ6fN+tjzy3t3PDkN IymEZOspXn/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9900"; a="181506580" X-IronPort-AV: E=Sophos;i="5.81,192,1610438400"; d="scan'208";a="181506580" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 23:32:39 -0800 IronPort-SDR: brMkJKZghtanGvBjujlmGqPmFiRyNJyQTuFm7hud7rndkgMuPnYi3+wWwVpvHAw0mWAK17K/Mp lE4n0oR2RjPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,192,1610438400"; d="scan'208";a="440578046" Received: from yguo18-skl-u1604.sh.intel.com ([10.239.159.53]) by orsmga001.jf.intel.com with ESMTP; 19 Feb 2021 23:32:38 -0800 From: "Guo, Yejun" To: ffmpeg-devel@ffmpeg.org Date: Sat, 20 Feb 2021 15:22:12 +0800 Message-Id: <20210220072218.31629-2-yejun.guo@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210220072218.31629-1-yejun.guo@intel.com> References: <20210220072218.31629-1-yejun.guo@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/8] libavfilter/vf_ssim.c: fix build warning 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: yejun.guo@intel.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The build warning message: src/libavfilter/vf_ssim.c: In function ‘ssim_plane_16bit’: src/libavfilter/vf_ssim.c:246:24: warning: ‘main’ is usually a function [-Wmain] const uint8_t *main = td->main_data[c]; ^~~~ src/libavfilter/vf_ssim.c: In function ‘ssim_plane’: src/libavfilter/vf_ssim.c:289:24: warning: ‘main’ is usually a function [-Wmain] const uint8_t *main = td->main_data[c]; ^~~~ --- libavfilter/vf_ssim.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index 9682c093b2..ebb314c69f 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -243,8 +243,8 @@ static int ssim_plane_16bit(AVFilterContext *ctx, void *arg, const int max = td->max; for (int c = 0; c < td->nb_components; c++) { - const uint8_t *main = td->main_data[c]; - const uint8_t *ref = td->ref_data[c]; + const uint8_t *main_data = td->main_data[c]; + const uint8_t *ref_data = td->ref_data[c]; const int main_stride = td->main_linesize[c]; const int ref_stride = td->ref_linesize[c]; int width = td->planewidth[c]; @@ -263,8 +263,8 @@ static int ssim_plane_16bit(AVFilterContext *ctx, void *arg, for (int y = ystart; y < slice_end; y++) { for (; z <= y; z++) { FFSWAP(void*, sum0, sum1); - ssim_4x4xn_16bit(&main[4 * z * main_stride], main_stride, - &ref[4 * z * ref_stride], ref_stride, + ssim_4x4xn_16bit(&main_data[4 * z * main_stride], main_stride, + &ref_data[4 * z * ref_stride], ref_stride, sum0, width); } @@ -286,8 +286,8 @@ static int ssim_plane(AVFilterContext *ctx, void *arg, SSIMDSPContext *dsp = td->dsp; for (int c = 0; c < td->nb_components; c++) { - const uint8_t *main = td->main_data[c]; - const uint8_t *ref = td->ref_data[c]; + const uint8_t *main_data = td->main_data[c]; + const uint8_t *ref_data = td->ref_data[c]; const int main_stride = td->main_linesize[c]; const int ref_stride = td->ref_linesize[c]; int width = td->planewidth[c]; @@ -306,8 +306,8 @@ static int ssim_plane(AVFilterContext *ctx, void *arg, for (int y = ystart; y < slice_end; y++) { for (; z <= y; z++) { FFSWAP(void*, sum0, sum1); - dsp->ssim_4x4_line(&main[4 * z * main_stride], main_stride, - &ref[4 * z * ref_stride], ref_stride, + dsp->ssim_4x4_line(&main_data[4 * z * main_stride], main_stride, + &ref_data[4 * z * ref_stride], ref_stride, sum0, width); }