From: flow gg <hlefthleft@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 4/4] lavc/rv34dsp: R-V V rv34_idct_dc_add Date: Thu, 1 Feb 2024 01:58:55 +0800 Message-ID: <CAEa-L+uaqzk0GhS-bs=RVnOyNqDPdV-CnRMGC9yuPkprd2gt9w@mail.gmail.com> (raw) In-Reply-To: <CAEa-L+vTP9cZ_3cSPOJNGr9i2+TRB6znkg4GkFAPH+ioSLJVuw@mail.gmail.com> [-- Attachment #1: Type: text/plain, Size: 119 bytes --] Fixed the rv32 break in this reply flow gg <hlefthleft@gmail.com> 于2024年1月31日周三 20:01写道: > > [-- Attachment #2: 0004-lavc-rv34dsp-R-V-V-rv34_idct_dc_add.patch --] [-- Type: text/x-patch, Size: 2033 bytes --] From 0874f319e1c26aa0eeb5ed0d4e00d29aec4c5af8 Mon Sep 17 00:00:00 2001 From: sunyuechi <sunyuechi@iscas.ac.cn> Date: Wed, 31 Jan 2024 19:04:11 +0800 Subject: [PATCH 4/4] lavc/rv34dsp: R-V V rv34_idct_dc_add C908: rv34_idct_dc_add_c: 134.7 rv34_idct_dc_add_rvv_i32: 45.5 --- libavcodec/riscv/rv34dsp_init.c | 2 ++ libavcodec/riscv/rv34dsp_rvv.S | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/libavcodec/riscv/rv34dsp_init.c b/libavcodec/riscv/rv34dsp_init.c index 852c8ad9a8..7dcadc7e43 100644 --- a/libavcodec/riscv/rv34dsp_init.c +++ b/libavcodec/riscv/rv34dsp_init.c @@ -26,6 +26,7 @@ #include "libavcodec/rv34dsp.h" void ff_rv34_inv_transform_dc_rvv(int16_t *block); +void ff_rv34_idct_dc_add_rvv(uint8_t *dst, ptrdiff_t stride, int dc); av_cold void ff_rv34dsp_init_riscv(RV34DSPContext *c) { @@ -34,6 +35,7 @@ av_cold void ff_rv34dsp_init_riscv(RV34DSPContext *c) if (flags & AV_CPU_FLAG_RVV_I32 && ff_get_rv_vlenb() >= 16) { c->rv34_inv_transform_dc = ff_rv34_inv_transform_dc_rvv; + c->rv34_idct_dc_add = ff_rv34_idct_dc_add_rvv; } #endif } diff --git a/libavcodec/riscv/rv34dsp_rvv.S b/libavcodec/riscv/rv34dsp_rvv.S index 4b7a071f7c..450226f742 100644 --- a/libavcodec/riscv/rv34dsp_rvv.S +++ b/libavcodec/riscv/rv34dsp_rvv.S @@ -36,3 +36,23 @@ func ff_rv34_inv_transform_dc_rvv, zve32x ret endfunc + +func ff_rv34_idct_dc_add_rvv, zve32x + vsetivli zero, 4, e8, mf4, ta, ma + vlse32.v v0, (a0), a1 + li t1, 169 + mul t1, t1, a2 + li a2, 255 + addi t1, t1, 512 + srai t1, t1, 10 + vsetivli zero, 4*4, e16, m2, ta, ma + vzext.vf2 v2, v0 + vadd.vx v2, v2, t1 + vmax.vx v2, v2, zero + vsetvli zero, zero, e8, m1, ta, ma + vnclipu.wi v0, v2, 0 + vsetivli zero, 4, e8, mf4, ta, ma + vsse32.v v0, (a0), a1 + + ret +endfunc -- 2.43.0 [-- Attachment #3: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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".
next prev parent reply other threads:[~2024-01-31 17:59 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-31 12:01 flow gg 2024-01-31 17:58 ` flow gg [this message] 2024-02-12 19:46 ` Rémi Denis-Courmont 2024-02-13 2:18 ` flow gg
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='CAEa-L+uaqzk0GhS-bs=RVnOyNqDPdV-CnRMGC9yuPkprd2gt9w@mail.gmail.com' \ --to=hlefthleft@gmail.com \ --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