From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 3376047094 for ; Sun, 19 Jan 2025 17:36:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1EF3968B5DB; Sun, 19 Jan 2025 19:36:06 +0200 (EET) Received: from szaka.eu (szaka.eu [144.217.86.229]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 359B268B404 for ; Sun, 19 Jan 2025 19:35:59 +0200 (EET) To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 Jan 2025 18:33:00 +0100 Message-ID: <20250119173259.1533-2-ffmpeg@szaka.eu> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avutil/aarch64/float_dsp_neon: Refactor ff_vector_fmul_add_neon 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: , From: Krzysztof Pyrkosz via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Krzysztof Pyrkosz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Removed a branch, unrolled loop. Speed increase bumped from 3.95 to 5.60. Krzysztof --- libavutil/aarch64/float_dsp_neon.S | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/libavutil/aarch64/float_dsp_neon.S b/libavutil/aarch64/float_dsp_neon.S index 35e2715b87..0ee5c67b91 100644 --- a/libavutil/aarch64/float_dsp_neon.S +++ b/libavutil/aarch64/float_dsp_neon.S @@ -138,19 +138,21 @@ function ff_vector_fmul_window_neon, export=1 endfunc function ff_vector_fmul_add_neon, export=1 - ld1 {v0.4s, v1.4s}, [x1], #32 - ld1 {v2.4s, v3.4s}, [x2], #32 - ld1 {v4.4s, v5.4s}, [x3], #32 -1: subs w4, w4, #8 - fmla v4.4s, v0.4s, v2.4s - fmla v5.4s, v1.4s, v3.4s - b.eq 2f - ld1 {v0.4s, v1.4s}, [x1], #32 - ld1 {v2.4s, v3.4s}, [x2], #32 - st1 {v4.4s, v5.4s}, [x0], #32 - ld1 {v4.4s, v5.4s}, [x3], #32 - b 1b -2: st1 {v4.4s, v5.4s}, [x0], #32 +1: + ldp q0, q1, [x1], #32 + ldp q2, q3, [x2], #32 + ldp q4, q5, [x3], #32 + fmla v4.4s, v0.4s, v2.4s + fmla v5.4s, v1.4s, v3.4s + stp q4, q5, [x0], #32 + ldp q0, q1, [x1], #32 + ldp q2, q3, [x2], #32 + ldp q4, q5, [x3], #32 + fmla v4.4s, v0.4s, v2.4s + fmla v5.4s, v1.4s, v3.4s + stp q4, q5, [x0], #32 + sub w4, w4, #16 + cbnz w4, 1b ret endfunc -- 2.45.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".