From: "Rémi Denis-Courmont" <remi@remlab.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH] lavc/takdsp: R-V V decorrelate_sf
Date: Fri, 22 Dec 2023 18:18:25 +0200
Message-ID: <20231222161826.23511-1-remi@remlab.net> (raw)
decorrelate_sf_c: 259.2
decorrelate_sf_rvv_i32: 45.5
---
libavcodec/riscv/takdsp_init.c | 2 ++
libavcodec/riscv/takdsp_rvv.S | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/libavcodec/riscv/takdsp_init.c b/libavcodec/riscv/takdsp_init.c
index 4312c8d99d..58be83860b 100644
--- a/libavcodec/riscv/takdsp_init.c
+++ b/libavcodec/riscv/takdsp_init.c
@@ -28,6 +28,7 @@
void ff_decorrelate_ls_rvv(const int32_t *p1, int32_t *p2, int length);
void ff_decorrelate_sr_rvv(int32_t *p1, const int32_t *p2, int length);
void ff_decorrelate_sm_rvv(int32_t *p1, int32_t *p2, int length);
+void ff_decorrelate_sf_rvv(int32_t *p1, const int32_t *p2, int len, int, int);
av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp)
{
@@ -38,6 +39,7 @@ av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp)
dsp->decorrelate_ls = ff_decorrelate_ls_rvv;
dsp->decorrelate_sr = ff_decorrelate_sr_rvv;
dsp->decorrelate_sm = ff_decorrelate_sm_rvv;
+ dsp->decorrelate_sf = ff_decorrelate_sf_rvv;
}
#endif
}
diff --git a/libavcodec/riscv/takdsp_rvv.S b/libavcodec/riscv/takdsp_rvv.S
index b593d9139a..fa942a3be6 100644
--- a/libavcodec/riscv/takdsp_rvv.S
+++ b/libavcodec/riscv/takdsp_rvv.S
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2023 Institue of Software Chinese Academy of Sciences (ISCAS).
+ * Copyright (c) 2023 Rémi Denis-Courmont
*
* This file is part of FFmpeg.
*
@@ -65,3 +66,23 @@ func ff_decorrelate_sm_rvv, zve32x
ret
endfunc
+
+func ff_decorrelate_sf_rvv, zve32x
+ csrwi vxrm, 0
+1:
+ vsetvli t0, a2, e32, m8, ta, ma
+ vle32.v v8, (a1)
+ sub a2, a2, t0
+ vsra.vx v8, v8, a3
+ sh2add a1, t0, a1
+ vle32.v v0, (a0)
+ vmul.vx v8, v8, a4
+ vssra.vi v8, v8, 8
+ vsll.vx v8, v8, a3
+ vsub.vv v0, v8, v0
+ vse32.v v0, (a0)
+ sh2add a0, t0, a0
+ bnez a2, 1b
+
+ ret
+endfunc
--
2.43.0
_______________________________________________
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".
reply other threads:[~2023-12-22 16:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231222161826.23511-1-remi@remlab.net \
--to=remi@remlab.net \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git