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 C4CFD4CDA7 for ; Tue, 25 Feb 2025 20:51:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 145EC68C915; Tue, 25 Feb 2025 22:51:40 +0200 (EET) Received: from szaka.eu (szaka.eu [144.217.86.229]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2A26068C10C for ; Tue, 25 Feb 2025 22:51:34 +0200 (EET) To: ffmpeg-devel@ffmpeg.org Date: Tue, 25 Feb 2025 21:45:56 +0100 Message-ID: <20250225204555.2372-2-ffmpeg@szaka.eu> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avutil/aarch64/tx_float_neon.S: clean up FFT4_X2 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: --- This patch rids the code from two tbl instructions and the shuffle table. There's no fneg v0.s[3] instruction unfortunately, so I negate the whole vector and copy the last element only. It's tricky to benchmark this little change but on average it seems to be beneficial. Krzysztof libavutil/aarch64/tx_float_neon.S | 32 ++++++++----------------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/libavutil/aarch64/tx_float_neon.S b/libavutil/aarch64/tx_float_neon.S index 78e4876d6c..d00b3f9684 100644 --- a/libavutil/aarch64/tx_float_neon.S +++ b/libavutil/aarch64/tx_float_neon.S @@ -119,13 +119,6 @@ endconst .endif .endm -const shuf_4pt_x2, align=4 - .byte 24, 25, 26, 27 // reg2, 3 - .byte 12, 13, 14, 15 // reg1, 4 - .byte 8, 9, 10, 11 // reg1, 3 - .byte 28, 29, 30, 31 // reg2, 4 -endconst - // Identical to FFT4, but does 2 transforms in parallel, with no deinterleaving .macro FFT4_X2 e0, o0, e1, o1, \ t0=v16, t1=v17, t2=v18, t3=v19, t4=v20, t5=v21, t6=v22 @@ -135,18 +128,17 @@ endconst fsub \e0\().4s, \e0\().4s, \o0\().4s // t1234 fsub \e1\().4s, \e1\().4s, \o1\().4s // t1234 - movrel x5, shuf_4pt_x2 - rev64 \t4\().4s, \e0\().4s rev64 \t5\().4s, \e1\().4s - zip2 \o0\().2d, \t0\().2d, \e0\().2d // t3,4 r3,4 - zip2 \o1\().2d, \t2\().2d, \e1\().2d // t3,4 r3,4 + zip2 \o0\().2d, \t0\().2d, \t4\().2d // t3,4 r3,4 + zip2 \o1\().2d, \t2\().2d, \t5\().2d // t3,4 r3,4 - ld1 { \t6\().16b }, [x5] + fneg \t3\().4s, \t4\().4s + fneg \t4\().4s, \t5\().4s - mov \o0\().d[1], \t4\().d[1] - mov \o1\().d[1], \t5\().d[1] + mov \o0\().s[3], \t3\().s[3] + mov \o1\().s[3], \t4\().s[3] zip1 \t1\().2d, \t0\().2d, \e0\().2d // t1,2 r1,2 zip1 \t3\().2d, \t2\().2d, \e1\().2d // t1,2 r1,2 @@ -156,18 +148,10 @@ endconst fsub \t2\().4s, \t3\().4s, \o1\().4s // a34 b32 fadd \t3\().4s, \t3\().4s, \o1\().4s // a12 b14 - // TODO: experiment with movs instead of tables here - tbl \o0\().16b, { \t4\().16b, \t5\().16b }, \t6\().16b // b1234 - tbl \o1\().16b, { \t2\().16b, \t3\().16b }, \t6\().16b // b1234 - zip1 \e0\().2d, \t5\().2d, \t4\().2d // a1234 -// zip2 \o0\().2d, \t5\().2d, \t4\().2d // b1432 + zip2 \o0\().2d, \t5\().2d, \t4\().2d // b1432 zip1 \e1\().2d, \t3\().2d, \t2\().2d // a1234 -// zip2 \o1\().2d, \t3\().2d, \t2\().2d // b1432 -// rev64 \o0\().4s, \o0\().4s // b4123 -// rev64 \o1\().4s, \o1\().4s // b4123 -// ext \o0\().16b, \o0\().16b, \o0\().16b, #4 // b1234 -// ext \o1\().16b, \o1\().16b, \o1\().16b, #4 // b1234 + zip2 \o1\().2d, \t3\().2d, \t2\().2d // b1432 .endm const tab_8pt, align=4 -- 2.47.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".