From patchwork Thu Mar 16 22:10:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 2963 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp3077vsy; Thu, 16 Mar 2017 15:15:47 -0700 (PDT) X-Received: by 10.223.136.182 with SMTP id f51mr9466562wrf.90.1489702547709; Thu, 16 Mar 2017 15:15:47 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l4si464695wmb.49.2017.03.16.15.15.47; Thu, 16 Mar 2017 15:15:47 -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; dkim=neutral (body hash did not verify) header.i=@martin-st.20150623.gappssmtp.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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C98486882A8; Fri, 17 Mar 2017 00:15:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C3844688261 for ; Fri, 17 Mar 2017 00:15:21 +0200 (EET) Received: by mail-lf0-f66.google.com with SMTP id g70so4301501lfh.3 for ; Thu, 16 Mar 2017 15:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=7xFODszrlx8YYa+rEvoDublML4eIoiDfiae7kZywk54=; b=iz9us8AFXNzdFMaXOUCEV/gR8z/M5jDoC2M7rZltPrrNiHd80XKRh6oqGODZI+KwA+ AJlTpa2SLL7DoPcR/WNTJnEbWdhh6Y9Z4MIF6hDaGks0oSAWGLvzwFeusM1oKMJvRkXK APHT95zz6A0GwtiVcUVjB4HLz+lO7O2n7i75ZtG7bd3jsnl7lFOWXXYF1B2qXuaVNKhC dlHwIvSS0Bgus9WicvfnhWDt7771qfwSAxATfIkg5UU8WQdOqTgI5P0yDIID5C6DGADp 3VQm1RBXQ84ysG41ySPjfAf15HJRn23c/VLqAQSHUo1NE9CBMTR85KiB0Rvn//5cWLBk P3VA== 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; bh=7xFODszrlx8YYa+rEvoDublML4eIoiDfiae7kZywk54=; b=L6ZiPHKlvAuWWfZcAwpiXwYOUoiu7KPZ+iGHm8FnJ1dziq+MBA8cD7LrEslzEglSID l2t3Re6qWfjceGGaf7W+QrzfUtU7iPRLPDmokfJSwgm2OxwZCUhyms7cfxrkfefmpY4O 4uJ1egH2myQKDgPeNksqcGuidvaXb0Ik82V1a/pYIUnLoRiL8rUnOxFzPdu0fHsHCC59 F+eK80kxBK1KFFE/kTRvsb+MG/p3WkadsfffDLIQftQLBHfZCjMB3ZhTgHsdb0y40Gfe go8DZAHMiyYAKzGuOjMhSbUj0C2IBX5D8WFJCDjS7rDQjfGISaI2rWDjGC+EnDnUF1px QQmw== X-Gm-Message-State: AFeK/H3VdyQk/lXD9U4VmlQyHbcX/f5u2AfozCrJ48/LJAjkBHomZKmkq4eXrXKVFJBx3Q== X-Received: by 10.25.234.71 with SMTP id i68mr3378002lfh.25.1489702230800; Thu, 16 Mar 2017 15:10:30 -0700 (PDT) Received: from localhost.localdomain ([2001:470:28:852:10ad:e858:1f3b:5c2c]) by smtp.gmail.com with ESMTPSA id g3sm1124718lfe.34.2017.03.16.15.10.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Mar 2017 15:10:30 -0700 (PDT) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 17 Mar 2017 00:10:17 +0200 Message-Id: <1489702219-12643-12-git-send-email-martin@martin.st> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489702219-12643-1-git-send-email-martin@martin.st> References: <1489702219-12643-1-git-send-email-martin@martin.st> Subject: [FFmpeg-devel] [PATCH 12/14] aarch64: vp9itxfm16: Move the load_add_store macro out from the itxfm16 pass2 function 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This allows reusing the macro for a separate implementation of the pass2 function. --- libavcodec/aarch64/vp9itxfm_16bpp_neon.S | 98 ++++++++++++++++---------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/libavcodec/aarch64/vp9itxfm_16bpp_neon.S b/libavcodec/aarch64/vp9itxfm_16bpp_neon.S index de1da55..f30fdd8 100644 --- a/libavcodec/aarch64/vp9itxfm_16bpp_neon.S +++ b/libavcodec/aarch64/vp9itxfm_16bpp_neon.S @@ -851,6 +851,55 @@ endfunc st1 {v4.4s}, [\src], \inc .endm +.macro load_add_store coef0, coef1, coef2, coef3, coef4, coef5, coef6, coef7 + srshr \coef0, \coef0, #6 + ld1 {v4.4h}, [x0], x1 + srshr \coef1, \coef1, #6 + ld1 {v4.d}[1], [x3], x1 + srshr \coef2, \coef2, #6 + ld1 {v5.4h}, [x0], x1 + srshr \coef3, \coef3, #6 + uaddw \coef0, \coef0, v4.4h + ld1 {v5.d}[1], [x3], x1 + srshr \coef4, \coef4, #6 + uaddw2 \coef1, \coef1, v4.8h + ld1 {v6.4h}, [x0], x1 + srshr \coef5, \coef5, #6 + uaddw \coef2, \coef2, v5.4h + ld1 {v6.d}[1], [x3], x1 + sqxtun v4.4h, \coef0 + srshr \coef6, \coef6, #6 + uaddw2 \coef3, \coef3, v5.8h + ld1 {v7.4h}, [x0], x1 + sqxtun2 v4.8h, \coef1 + srshr \coef7, \coef7, #6 + uaddw \coef4, \coef4, v6.4h + ld1 {v7.d}[1], [x3], x1 + umin v4.8h, v4.8h, v8.8h + sub x0, x0, x1, lsl #2 + sub x3, x3, x1, lsl #2 + sqxtun v5.4h, \coef2 + uaddw2 \coef5, \coef5, v6.8h + st1 {v4.4h}, [x0], x1 + sqxtun2 v5.8h, \coef3 + uaddw \coef6, \coef6, v7.4h + st1 {v4.d}[1], [x3], x1 + umin v5.8h, v5.8h, v8.8h + sqxtun v6.4h, \coef4 + uaddw2 \coef7, \coef7, v7.8h + st1 {v5.4h}, [x0], x1 + sqxtun2 v6.8h, \coef5 + st1 {v5.d}[1], [x3], x1 + umin v6.8h, v6.8h, v8.8h + sqxtun v7.4h, \coef6 + st1 {v6.4h}, [x0], x1 + sqxtun2 v7.8h, \coef7 + st1 {v6.d}[1], [x3], x1 + umin v7.8h, v7.8h, v8.8h + st1 {v7.4h}, [x0], x1 + st1 {v7.d}[1], [x3], x1 +.endm + // Read a vertical 4x16 slice out of a 16x16 matrix, do a transform on it, // transpose into a horizontal 16x4 slice and store. // x0 = dst (temp buffer) @@ -937,57 +986,8 @@ function \txfm\()16_1d_4x16_pass2_neon bl \txfm\()16 dup v8.8h, w13 -.macro load_add_store coef0, coef1, coef2, coef3, coef4, coef5, coef6, coef7 - srshr \coef0, \coef0, #6 - ld1 {v4.4h}, [x0], x1 - srshr \coef1, \coef1, #6 - ld1 {v4.d}[1], [x3], x1 - srshr \coef2, \coef2, #6 - ld1 {v5.4h}, [x0], x1 - srshr \coef3, \coef3, #6 - uaddw \coef0, \coef0, v4.4h - ld1 {v5.d}[1], [x3], x1 - srshr \coef4, \coef4, #6 - uaddw2 \coef1, \coef1, v4.8h - ld1 {v6.4h}, [x0], x1 - srshr \coef5, \coef5, #6 - uaddw \coef2, \coef2, v5.4h - ld1 {v6.d}[1], [x3], x1 - sqxtun v4.4h, \coef0 - srshr \coef6, \coef6, #6 - uaddw2 \coef3, \coef3, v5.8h - ld1 {v7.4h}, [x0], x1 - sqxtun2 v4.8h, \coef1 - srshr \coef7, \coef7, #6 - uaddw \coef4, \coef4, v6.4h - ld1 {v7.d}[1], [x3], x1 - umin v4.8h, v4.8h, v8.8h - sub x0, x0, x1, lsl #2 - sub x3, x3, x1, lsl #2 - sqxtun v5.4h, \coef2 - uaddw2 \coef5, \coef5, v6.8h - st1 {v4.4h}, [x0], x1 - sqxtun2 v5.8h, \coef3 - uaddw \coef6, \coef6, v7.4h - st1 {v4.d}[1], [x3], x1 - umin v5.8h, v5.8h, v8.8h - sqxtun v6.4h, \coef4 - uaddw2 \coef7, \coef7, v7.8h - st1 {v5.4h}, [x0], x1 - sqxtun2 v6.8h, \coef5 - st1 {v5.d}[1], [x3], x1 - umin v6.8h, v6.8h, v8.8h - sqxtun v7.4h, \coef6 - st1 {v6.4h}, [x0], x1 - sqxtun2 v7.8h, \coef7 - st1 {v6.d}[1], [x3], x1 - umin v7.8h, v7.8h, v8.8h - st1 {v7.4h}, [x0], x1 - st1 {v7.d}[1], [x3], x1 -.endm load_add_store v16.4s, v17.4s, v18.4s, v19.4s, v20.4s, v21.4s, v22.4s, v23.4s load_add_store v24.4s, v25.4s, v26.4s, v27.4s, v28.4s, v29.4s, v30.4s, v31.4s -.purgem load_add_store br x14 endfunc