From ab3df357371b1d6edec187fa4bda93bc844af53d Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Fri, 28 May 2021 19:26:50 +0300 Subject: [PATCH] Begin on SV for mp3_0 --- .../mp3/mp3_0_apply_window_float_basicsv.s | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 media/audio/mp3/mp3_0_apply_window_float_basicsv.s diff --git a/media/audio/mp3/mp3_0_apply_window_float_basicsv.s b/media/audio/mp3/mp3_0_apply_window_float_basicsv.s new file mode 100644 index 00000000..6d6c89e7 --- /dev/null +++ b/media/audio/mp3/mp3_0_apply_window_float_basicsv.s @@ -0,0 +1,57 @@ +# ffmpeg lgpl 2.1 or later + +# ints +.set buf, 3 +.set win, 4 +.set out, 6 +.set incr, 7 + +.set p, 5 +.set i, 8 + +# floats +.set sum, 0 + + .machine power9 + .abiversion 2 + .section ".text" + .align 2 + .p2align 4,,15 + .globl ff_mpadsp_apply_window_float_sv + .type ff_mpadsp_apply_window_float_sv, @function +ff_mpadsp_apply_window_float_sv: +.LCF0: + addis 2,12,.TOC.-.LCF0@ha + addi 2,2,.TOC.-.LCF0@l + + addis 9,2,.LC0@toc@ha + addi 9,9,.LC0@toc@l + + slwi incr, incr, 2 # incr *= 4, sizeof float + + # Loop 32 times + li 0, 32 + mtctr 0 + li i, 0 +.Lloop: + lfiwax sum, 0, 9 # zero it + addi p, buf, 64 + add p, p, i + # SUM8(MACS, sum, w, p) TODO + addi p, buf, 192 + subf p, i, p + # SUM8(MLSS, sum, w + 32, p) TODO + stfs sum, 0(out) + add out, out, incr + addi i, i, 4 + addi win, win, 4 + bdnz .Lloop + + blr + + .size ff_mpadsp_apply_window_float_sv,.-ff_mpadsp_apply_window_float_sv + + .section .rodata + .align 2 + .LC0: + .long 0 -- 2.30.2