From patchwork Thu Feb 25 06:38:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Guo, Yejun" X-Patchwork-Id: 25975 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 3D921449E75 for ; Thu, 25 Feb 2021 08:48:57 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2219168A0F0; Thu, 25 Feb 2021 08:48:57 +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 4E693680A2D for ; Thu, 25 Feb 2021 08:48:48 +0200 (EET) IronPort-SDR: ZxkWDGXfGmXFGP66WaoY9Jn6CinY34QlPMmmYyRFmuixkflH8fp8oSY3N5KdlKNohYm3uTRYvj 3+NwXbuPwkFQ== X-IronPort-AV: E=McAfee;i="6000,8403,9905"; a="182968977" X-IronPort-AV: E=Sophos;i="5.81,205,1610438400"; d="scan'208";a="182968977" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2021 22:48:45 -0800 IronPort-SDR: dldj5LeG1PNi5v0Pk26mDBOd2AUqJ6NkgwwP4rC3u1QdGFV4sRVLaJpDNq0dV31mF0LlhDZU0Y QPeL9k1msIoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,205,1610438400"; d="scan'208";a="404113267" Received: from yguo18-skl-u1604.sh.intel.com ([10.239.159.53]) by orsmga008.jf.intel.com with ESMTP; 24 Feb 2021 22:48:44 -0800 From: "Guo, Yejun" To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Feb 2021 14:38:11 +0800 Message-Id: <20210225063816.8644-2-yejun.guo@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210225063816.8644-1-yejun.guo@intel.com> References: <20210225063816.8644-1-yejun.guo@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH V2 2/7] libavfilter/vf_ssim.c: fix build warning for [-Wmain] 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]; ^~~~ Signed-off-by: Guo, Yejun --- 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); }