From patchwork Wed Mar 8 10:00:55 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: 2803 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp953019vsy; Wed, 8 Mar 2017 02:02:32 -0800 (PST) X-Received: by 10.28.26.196 with SMTP id a187mr21876404wma.33.1488967352388; Wed, 08 Mar 2017 02:02:32 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 34si3691594wru.49.2017.03.08.02.02.31; Wed, 08 Mar 2017 02:02:32 -0800 (PST) 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 53CF56882B2; Wed, 8 Mar 2017 12:01:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E084668829C for ; Wed, 8 Mar 2017 12:01:15 +0200 (EET) Received: by mail-lf0-f46.google.com with SMTP id k202so12373025lfe.1 for ; Wed, 08 Mar 2017 02:01:29 -0800 (PST) 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=2ezy4VoK2QIiB1OVuK7QaPF55uWyuaAQibd5GtYq8dk=; b=UfUvmR2XbWJpv8yzyNa1FbQYFciEjIyL+Jy0nxIYa8wdDcgEcdn/OhyadEf8BvRYYS AIFkJCWFLhLOuWYrUaNUjU60ceWt3hv/plaDpp36gdRYFuKKwnW8dcmpir9aKXqJUf55 t+wZgYISXYd3TC0ylDdRFuHRiHoWhrKZgLJS6fzlVO4JdzloasruR1AkA3x8Yjlz2KRG bHoCjtPfvuq45yDTsiLnslaxu6KxYk+WDOb4j+i1yiaXPe7QUofZw/Z+/N5mOVB3knPD vgedHWYiT3lDhLBhKGIS1u3oMp8yi/qgYmojX/okpfvWS13eO77ETR5ZxMOzpr+YaeB2 J5Dg== 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=2ezy4VoK2QIiB1OVuK7QaPF55uWyuaAQibd5GtYq8dk=; b=qN74PMs8rp0YcTrU0S3qlH2SGLskCWzDM8rNefJdZ3OaZnf2SQnGJwf+oQ2+tXA/ta b6pKR+noIWw6E04WPhgFGOEGLPp50dlQ8ETF/JahSxvSUYPgNpHKOruR35uCNL67yBmm KKsVhKcVrC37Bjy2VHq5PjTVM1uza0rf4EgSGKCwVCd6NjLTpcApVA39G96pVZ8gN/7G leKV9sObwM3PDQ9vwqaioT06ar9T5FmREdeFiu1O/SWIbJww+Z+Oy9RDZBMC2ROk/4wV zV0wSnxCSLR7VrTkA2aAsauYWZjmPTKsr0rNawswWHIBbzPyTQPQpLumsDyBX0nbH+vG 5mlw== X-Gm-Message-State: AMke39kCOJ8aPrG6G0DEzCUefwgu57ljo1izvwAsHlCHgHPoJ9LtntLLY27kVYWxBg3Rvw== X-Received: by 10.46.69.215 with SMTP id s206mr1804543lja.26.1488967288463; Wed, 08 Mar 2017 02:01:28 -0800 (PST) Received: from localhost.localdomain ([2001:470:28:852:7d47:68e:13e8:4933]) by smtp.gmail.com with ESMTPSA id m127sm513064lfg.58.2017.03.08.02.01.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Mar 2017 02:01:28 -0800 (PST) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 8 Mar 2017 12:00:55 +0200 Message-Id: <1488967274-8143-15-git-send-email-martin@martin.st> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488967274-8143-1-git-send-email-martin@martin.st> References: <1488967274-8143-1-git-send-email-martin@martin.st> Subject: [FFmpeg-devel] [PATCH 15/34] aarch64: vp9mc: Simplify the extmla macro parameters 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" Fold the field lengths into the macro. This makes the macro invocations much more readable, when the lines are shorter. This also makes it easier to use only half the registers within the macro. This is cherrypicked from libav commit 5e0c2158fbc774f87d3ce4b7b950ba4d42c4a7b8. --- libavcodec/aarch64/vp9mc_neon.S | 50 ++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/libavcodec/aarch64/vp9mc_neon.S b/libavcodec/aarch64/vp9mc_neon.S index 80d1d23..9403911 100644 --- a/libavcodec/aarch64/vp9mc_neon.S +++ b/libavcodec/aarch64/vp9mc_neon.S @@ -193,41 +193,41 @@ endfunc // for size >= 16), and multiply-accumulate into dst1 and dst3 (or // dst1-dst2 and dst3-dst4 for size >= 16) .macro extmla dst1, dst2, dst3, dst4, src1, src2, src3, src4, src5, src6, offset, size - ext v20.16b, \src1, \src2, #(2*\offset) - ext v22.16b, \src4, \src5, #(2*\offset) + ext v20.16b, \src1\().16b, \src2\().16b, #(2*\offset) + ext v22.16b, \src4\().16b, \src5\().16b, #(2*\offset) .if \size >= 16 - mla \dst1, v20.8h, v0.h[\offset] - ext v21.16b, \src2, \src3, #(2*\offset) - mla \dst3, v22.8h, v0.h[\offset] - ext v23.16b, \src5, \src6, #(2*\offset) - mla \dst2, v21.8h, v0.h[\offset] - mla \dst4, v23.8h, v0.h[\offset] + mla \dst1\().8h, v20.8h, v0.h[\offset] + ext v21.16b, \src2\().16b, \src3\().16b, #(2*\offset) + mla \dst3\().8h, v22.8h, v0.h[\offset] + ext v23.16b, \src5\().16b, \src6\().16b, #(2*\offset) + mla \dst2\().8h, v21.8h, v0.h[\offset] + mla \dst4\().8h, v23.8h, v0.h[\offset] .else - mla \dst1, v20.8h, v0.h[\offset] - mla \dst3, v22.8h, v0.h[\offset] + mla \dst1\().8h, v20.8h, v0.h[\offset] + mla \dst3\().8h, v22.8h, v0.h[\offset] .endif .endm // The same as above, but don't accumulate straight into the // destination, but use a temp register and accumulate with saturation. .macro extmulqadd dst1, dst2, dst3, dst4, src1, src2, src3, src4, src5, src6, offset, size - ext v20.16b, \src1, \src2, #(2*\offset) - ext v22.16b, \src4, \src5, #(2*\offset) + ext v20.16b, \src1\().16b, \src2\().16b, #(2*\offset) + ext v22.16b, \src4\().16b, \src5\().16b, #(2*\offset) .if \size >= 16 mul v20.8h, v20.8h, v0.h[\offset] - ext v21.16b, \src2, \src3, #(2*\offset) + ext v21.16b, \src2\().16b, \src3\().16b, #(2*\offset) mul v22.8h, v22.8h, v0.h[\offset] - ext v23.16b, \src5, \src6, #(2*\offset) + ext v23.16b, \src5\().16b, \src6\().16b, #(2*\offset) mul v21.8h, v21.8h, v0.h[\offset] mul v23.8h, v23.8h, v0.h[\offset] .else mul v20.8h, v20.8h, v0.h[\offset] mul v22.8h, v22.8h, v0.h[\offset] .endif - sqadd \dst1, \dst1, v20.8h - sqadd \dst3, \dst3, v22.8h + sqadd \dst1\().8h, \dst1\().8h, v20.8h + sqadd \dst3\().8h, \dst3\().8h, v22.8h .if \size >= 16 - sqadd \dst2, \dst2, v21.8h - sqadd \dst4, \dst4, v23.8h + sqadd \dst2\().8h, \dst2\().8h, v21.8h + sqadd \dst4\().8h, \dst4\().8h, v23.8h .endif .endm @@ -291,13 +291,13 @@ function \type\()_8tap_\size\()h_\idx1\idx2 mul v2.8h, v5.8h, v0.h[0] mul v25.8h, v17.8h, v0.h[0] .endif - extmla v1.8h, v2.8h, v24.8h, v25.8h, v4.16b, v5.16b, v6.16b, v16.16b, v17.16b, v18.16b, 1, \size - extmla v1.8h, v2.8h, v24.8h, v25.8h, v4.16b, v5.16b, v6.16b, v16.16b, v17.16b, v18.16b, 2, \size - extmla v1.8h, v2.8h, v24.8h, v25.8h, v4.16b, v5.16b, v6.16b, v16.16b, v17.16b, v18.16b, \idx1, \size - extmla v1.8h, v2.8h, v24.8h, v25.8h, v4.16b, v5.16b, v6.16b, v16.16b, v17.16b, v18.16b, 5, \size - extmla v1.8h, v2.8h, v24.8h, v25.8h, v4.16b, v5.16b, v6.16b, v16.16b, v17.16b, v18.16b, 6, \size - extmla v1.8h, v2.8h, v24.8h, v25.8h, v4.16b, v5.16b, v6.16b, v16.16b, v17.16b, v18.16b, 7, \size - extmulqadd v1.8h, v2.8h, v24.8h, v25.8h, v4.16b, v5.16b, v6.16b, v16.16b, v17.16b, v18.16b, \idx2, \size + extmla v1, v2, v24, v25, v4, v5, v6, v16, v17, v18, 1, \size + extmla v1, v2, v24, v25, v4, v5, v6, v16, v17, v18, 2, \size + extmla v1, v2, v24, v25, v4, v5, v6, v16, v17, v18, \idx1, \size + extmla v1, v2, v24, v25, v4, v5, v6, v16, v17, v18, 5, \size + extmla v1, v2, v24, v25, v4, v5, v6, v16, v17, v18, 6, \size + extmla v1, v2, v24, v25, v4, v5, v6, v16, v17, v18, 7, \size + extmulqadd v1, v2, v24, v25, v4, v5, v6, v16, v17, v18, \idx2, \size // Round, shift and saturate sqrshrun v1.8b, v1.8h, #7