From: "Rémi Denis-Courmont" <remi@remlab.net> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 3/3] lavc/vp7dsp: R-V V vp7_idct_add Date: Sun, 26 May 2024 14:12:05 +0300 Message-ID: <20240526111205.21965-2-remi@remlab.net> (raw) In-Reply-To: <20240526111205.21965-1-remi@remlab.net> Most of the code is shared with DC, thanks to minor earlier changes. vp7_idct_add_c: 5.2 vp7_idct_add_rvv_i32: 2.5 --- libavcodec/riscv/vp7dsp_init.c | 2 ++ libavcodec/riscv/vp7dsp_rvv.S | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/libavcodec/riscv/vp7dsp_init.c b/libavcodec/riscv/vp7dsp_init.c index 1406eb1c6a..ae7f2d4277 100644 --- a/libavcodec/riscv/vp7dsp_init.c +++ b/libavcodec/riscv/vp7dsp_init.c @@ -26,6 +26,7 @@ #include "libavcodec/vp8dsp.h" void ff_vp7_luma_dc_wht_rvv(int16_t block[4][4][16], int16_t dc[16]); +void ff_vp7_idct_add_rvv(uint8_t *dst, int16_t block[16], ptrdiff_t stride); av_cold void ff_vp7dsp_init_riscv(VP8DSPContext *c) { @@ -37,6 +38,7 @@ av_cold void ff_vp7dsp_init_riscv(VP8DSPContext *c) #if __riscv_xlen >= 64 c->vp8_luma_dc_wht = ff_vp7_luma_dc_wht_rvv; #endif + c->vp8_idct_add = ff_vp7_idct_add_rvv; } #endif } diff --git a/libavcodec/riscv/vp7dsp_rvv.S b/libavcodec/riscv/vp7dsp_rvv.S index 06e251f5ce..2a4c404bbb 100644 --- a/libavcodec/riscv/vp7dsp_rvv.S +++ b/libavcodec/riscv/vp7dsp_rvv.S @@ -97,4 +97,33 @@ func ff_vp7_luma_dc_wht_rvv, zve32x vnclip.wi v7, v3, 18 jr t0 endfunc + +func ff_vp7_idct_add_rvv, zve32x + jal t0, 1b + csrwi vxrm, 2 + vsetvli zero, zero, e8, mf4, ta, ma + vle8.v v12, (a0) + vle8.v v13, (t1) + vwaddu.wv v4, v4, v12 + vle8.v v14, (t2) + vwaddu.wv v5, v5, v13 + vle8.v v15, (t3) + vwaddu.wv v6, v6, v14 + vwaddu.wv v7, v7, v15 + vsetvli zero, zero, e16, mf2, ta, ma + vmax.vx v4, v4, zero + vmax.vx v5, v5, zero + vmax.vx v6, v6, zero + vmax.vx v7, v7, zero + vsetvli zero, zero, e8, mf4, ta, ma + vnclipu.wi v0, v4, 0 + vnclipu.wi v1, v5, 0 + vse8.v v0, (a0) + vnclipu.wi v2, v6, 0 + vse8.v v1, (t1) + vnclipu.wi v3, v7, 0 + vse8.v v2, (t2) + vse8.v v3, (t3) + ret +endfunc #endif -- 2.45.1 _______________________________________________ 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".
prev parent reply other threads:[~2024-05-26 11:12 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-26 9:28 [FFmpeg-devel] [PATCH] lavc/vp7dsp: add R-V V vp7_luma_dc_wht Rémi Denis-Courmont 2024-05-26 11:12 ` [FFmpeg-devel] [PATCH 2/3] lavc/vp7dsp: revector ff_vp7_dc_wht_rvv Rémi Denis-Courmont 2024-05-26 11:12 ` Rémi Denis-Courmont [this message]
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=20240526111205.21965-2-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