From patchwork Thu Sep 16 07:34:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 30270 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1010813iov; Thu, 16 Sep 2021 00:34:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnnMK6OZUlMI2RAE/Hgbfjq7YMaQO5YPKEcBJFisPBQ+EQcwkHiqz6fGQJubDlZ6aDR6/Y X-Received: by 2002:a50:e14c:: with SMTP id i12mr4905429edl.125.1631777697497; Thu, 16 Sep 2021 00:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631777697; cv=none; d=google.com; s=arc-20160816; b=B1aQw/By9SLU3OeSVwassYLd/s5WuLeQ8d1h6R73Wr5iaOnC76+D1A7TMMbzypYyDi 55DVCzCuoMqEth8bkKFtiwx87JzE/59+mmd70Wo911HD1oeo7DbcIJKtdi3B8/gY2uH8 s+jiGl+lOI1c8ZuXvl/RxSE8DLSGiXyDuU28CQPrv3hmriT+tPzYETajKS4anH5f+mZs 1ZHh44uHtenXQnFdgXbRdyAeLmXWJyW8a5CYFFuZzfUWxTaYLglShK71gNb1qmjSZReO OqUF+Ag0OpAdbt3mt+mYoQ9abc2CXQ8BgdMgfwBTScLRUCfzJJS59mwb4SO7zuDqbadb z1Lg== 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:message-id:date:to:from:delivered-to; bh=zdbp4LESOnn28jlXlFkuxdUbhYiTB2kO60BNt3IEHYE=; b=1I5L5noludG2Ktf9T19/LXOeu6YhlnC+eSewMEmT8Z49vUAOacyJ9ocPX6sdP/O94l LA/dI3cpE72RAhEGHt6+6VmMENj1INTVrhuBpJNn+z7Qc9esCpPXc/OywEOpY2zL0gf2 6r51wpARAqfz+8h4kL0a+2p0ghNyU8J4ykUYV02xb6BHO5NaUrtt5k5ZvtQ22Js3g474 MSGcaokrKzgngWjojK1fepgx9N5ADoBOO81TPYkUxZSqQuJo2vxEC9w+oG5Vtv2kTN/X qUPUTxsudKoMT20T+VJ9LVRzsX27xuAt7u1kAakp/dIPCRiuborkUT2zil9C8C8i8MeK noVw== 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 h6si2693477edj.615.2021.09.16.00.34.44; Thu, 16 Sep 2021 00:34:57 -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 7AEBC68ADA8; Thu, 16 Sep 2021 10:34:40 +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 94E3368A9EA for ; Thu, 16 Sep 2021 10:34:33 +0300 (EEST) X-IronPort-AV: E=McAfee;i="6200,9189,10108"; a="220623623" X-IronPort-AV: E=Sophos;i="5.85,297,1624345200"; d="scan'208";a="220623623" 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:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,297,1624345200"; d="scan'208";a="553732084" 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:29 -0700 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Sep 2021 15:34:07 +0800 Message-Id: <20210916073408.65561-1-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 1/2] libavfilter/x86/vf_gblur: fixed the fate-test failed on MacOS 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: xrtqes5yxBxu Signed-off-by: Wu Jianhua --- libavfilter/x86/vf_gblur.asm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/x86/vf_gblur.asm b/libavfilter/x86/vf_gblur.asm index c0d57cc82b..64c067538a 100644 --- a/libavfilter/x86/vf_gblur.asm +++ b/libavfilter/x86/vf_gblur.asm @@ -455,12 +455,13 @@ cglobal horiz_slice, 4, 9, 9, ptr, width, height, steps, nu, bscale, x, y, step, mov nuq, localbufm DEFINE_ARGS buffer, width, height, steps, \ localbuf, x, y, step, stride, remain, ptr, mask - MOVSXDIFNIDN width, height, steps %else VBROADCASTSS m0, xmm0 ; nu VBROADCASTSS m1, xmm1 ; bscale %endif + MOVSXDIFNIDN width, height, steps + %if cpuflag(avx512) vpbroadcastd m2, widthd INIT_WORD_MASK k6, k5, k4, k3, k2, k1 @@ -861,11 +862,12 @@ cglobal verti_slice, 6, 12, 9, 0-mmsize*2, buffer, width, height, cbegin, cend, VBROADCASTSS m1, bscalem DEFINE_ARGS buffer, width, height, cbegin, cend, \ steps, x, y, cwidth, step, ptr, stride - MOVSXDIFNIDN width, height, cbegin, cend, steps %else VBROADCASTSS m0, xmm0 ; nu VBROADCASTSS m1, xmm1 ; bscale %endif + MOVSXDIFNIDN width, height, cbegin, cend, steps + mov cwidthq, cendq sub cwidthq, cbeginq lea strideq, [widthq * 4] 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