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 219604716F for ; Sun, 19 Jan 2025 18:14:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9C6F568B5C9; Sun, 19 Jan 2025 20:14:07 +0200 (EET) Received: from szaka.eu (szaka.eu [144.217.86.229]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2877A68B04A for ; Sun, 19 Jan 2025 20:14:01 +0200 (EET) To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 Jan 2025 19:07:07 +0100 Message-ID: <20250119180706.3075-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_butterflies_float_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: Modified the main loop to handle 8 floats in one go. A special case of length not being multiple of 8 is handled at the beginning. The speed increased from 3.90 to 4.50. Krzysztof --- libavutil/aarch64/float_dsp_neon.S | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/libavutil/aarch64/float_dsp_neon.S b/libavutil/aarch64/float_dsp_neon.S index 35e2715b87..f99cc2e6b2 100644 --- a/libavutil/aarch64/float_dsp_neon.S +++ b/libavutil/aarch64/float_dsp_neon.S @@ -178,14 +178,28 @@ function ff_vector_fmul_reverse_neon, export=1 endfunc function ff_butterflies_float_neon, export=1 -1: ld1 {v0.4s}, [x0] - ld1 {v1.4s}, [x1] - subs w2, w2, #4 - fsub v2.4s, v0.4s, v1.4s - fadd v3.4s, v0.4s, v1.4s - st1 {v2.4s}, [x1], #16 - st1 {v3.4s}, [x0], #16 - b.gt 1b + tst w2, #4 + b.eq bf8 + ldr q0, [x0] + ldr q1, [x1] + fadd v2.4s, v0.4s, v1.4s + fsub v3.4s, v0.4s, v1.4s + str q2, [x0], #16 + str q3, [x1], #16 + sub w2, w2, #4 + cbnz w2, bf8 + ret +bf8: + ldp q0, q1, [x0] + ldp q4, q5, [x1] + fadd v2.4s, v0.4s, v4.4s + fadd v3.4s, v1.4s, v5.4s + stp q2, q3, [x0], #32 + fsub v2.4s, v0.4s, v4.4s + fsub v3.4s, v1.4s, v5.4s + stp q2, q3, [x1], #32 + sub w2, w2, #8 + cbnz w2, bf8 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".