From patchwork Thu Sep 16 07:34:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 30269 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1010779iov; Thu, 16 Sep 2021 00:34:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl5TcFlzMerlmCLhBsm2s+qgWppMO7a4QJKuV3cJ/7hxKM41q3FB2SeWDmn91hZRVSshn5 X-Received: by 2002:a50:f60a:: with SMTP id c10mr4825982edn.250.1631777694420; Thu, 16 Sep 2021 00:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631777694; cv=none; d=google.com; s=arc-20160816; b=tOawPZsAUfo4u9oP7DmyH4szSVnhXnUqQWo6+gVDq/bspnpRbABY4koZV/gcU16hAa MikPOce46fbGLjPYHHK+p1idEDYudYisVUeNgVhr7ek0ybSqA9zRtXQWwAucUncHlLgU JB888fMimkfDj1Swb8UA/+Llkjxts3FvCiS6PeF0Ti3BzltE8kvSv+JeltGPCQpQ2VtY /1MeC/JTjqqn5EAEDhbGHvUNtAGjLZjZUmkUM3EzIS3TilOrKXqXMuBy5CXCUgKM7sgz MssQNa+u9MGvtxAqRzfvVFzxhg23oLmtWrDFXgtso4oB3iOlTDASrj1e/40EZbxcaB1F 4ZdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=3VShdptlLJtOMlWVEEBOD91uCZB3AOyxeEtfevMLvmI=; b=udRvzo8RYb6y3TAEfiD+4TIU/bfv3g8WAr8aIrpBts1NWTnS+q5MqZMwky1f3Dm8iK 5BHydI1kXIMBAcOZOQWn8yeBumqhnSoJxfs+LbwIeJrOZEriVWNrJoQlDopMCg04eIPv u9aUqxdmYpBgeB1uOOdZkmEM5M31x3k8Wha0OZUqWYvxo2wnduo5+yRucz1dtcflT1qk +xl4ZixGegM/a8OLUFVW5U3jCagLcsHfSzeuEe4dS6BITaaElg+t1hka0JCMFnJPxvcP JEMP48ebXCb/H4JuYxybUGoJeOHqM7102WH1rfXnLu4Xg7QF7ybEI09m2IIJnKtY8BRr gajg== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t10si2747654edv.312.2021.09.16.00.34.54; Thu, 16 Sep 2021 00:34:54 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 83D9A68AE83; Thu, 16 Sep 2021 10:34:46 +0300 (EEST) 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 79BF068AA83 for ; Thu, 16 Sep 2021 10:34:39 +0300 (EEST) X-IronPort-AV: E=McAfee;i="6200,9189,10108"; a="220623627" X-IronPort-AV: E=Sophos;i="5.85,297,1624345200"; d="scan'208";a="220623627" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2021 00:34:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,297,1624345200"; d="scan'208";a="553732087" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by fmsmga002.fm.intel.com with ESMTP; 16 Sep 2021 00:34:30 -0700 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Sep 2021 15:34:08 +0800 Message-Id: <20210916073408.65561-2-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210916073408.65561-1-jianhua.wu@intel.com> References: <20210916073408.65561-1-jianhua.wu@intel.com> Subject: [FFmpeg-devel] [PATCH 2/2] libavfilter/x86/vf_gblur: correct the order of loop step X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: W5BS1ZGEaIrL The problem was caused by if the width of the processed block minus 1 is a multiple of the aligned number the instruction jle .bscale_scalar would skip the Optimized Loop Step, which will lead to an incorrect sampling when specifying steps more than 1. Move the Optimized Loop Step after .bscale_scalar to ensure the loop step is enabled. Signed-off-by: Wu Jianhua --- libavfilter/x86/vf_gblur.asm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/x86/vf_gblur.asm b/libavfilter/x86/vf_gblur.asm index 64c067538a..16e802e002 100644 --- a/libavfilter/x86/vf_gblur.asm +++ b/libavfilter/x86/vf_gblur.asm @@ -524,9 +524,8 @@ cglobal horiz_slice, 4, 9, 9, ptr, width, height, steps, nu, bscale, x, y, step, cmp xq, 0 jg .loop_x_scalar - OPTIMIZED_LOOP_STEP - .bscale_scalar: + OPTIMIZED_LOOP_STEP sub ptrq, 4 sub localbufq, mmsize mulps m3, m1