From: flow gg <hlefthleft@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH 3/3] lavc/h264dsp: R-V V h264_add_pixels8_clear Date: Mon, 25 Dec 2023 12:01:33 +0800 Message-ID: <CAEa-L+shaSbos6f9aRMU36ARb+5+ncf3wUXV8Lz0_DaOSuTckA@mail.gmail.com> (raw) [-- Attachment #1: Type: text/plain, Size: 74 bytes --] C908 h264_add_pixels8_clear_c: 262.0 h264_add_pixels8_clear_rvv_i64: 59.0 [-- Attachment #2: 0003-lavc-h264dsp-R-V-V-h264_add_pixels8_clear.patch --] [-- Type: text/x-patch, Size: 2260 bytes --] From 11218f9067566fa3ace8821b4b890457d6ea17f9 Mon Sep 17 00:00:00 2001 From: sunyuechi <sunyuechi@iscas.ac.cn> Date: Mon, 25 Dec 2023 00:07:09 +0800 Subject: [PATCH 3/3] lavc/h264dsp: R-V V h264_add_pixels8_clear C908 h264_add_pixels8_clear_c: 262.0 h264_add_pixels8_clear_rvv_i64: 59.0 --- libavcodec/riscv/h264dsp_init.c | 2 ++ libavcodec/riscv/h264dsp_rvv.S | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/libavcodec/riscv/h264dsp_init.c b/libavcodec/riscv/h264dsp_init.c index 2538bc01a5..5630b08efd 100644 --- a/libavcodec/riscv/h264dsp_init.c +++ b/libavcodec/riscv/h264dsp_init.c @@ -26,6 +26,7 @@ #include "libavcodec/h264dsp.h" void ff_h264_add_pixels4_clear_rvv(uint8_t *dst, int16_t *block, int stride); +void ff_h264_add_pixels8_clear_rvv(uint8_t *dst, int16_t *block, int stride); av_cold void ff_h264dsp_init_riscv(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { @@ -35,6 +36,7 @@ av_cold void ff_h264dsp_init_riscv(H264DSPContext *c, const int bit_depth, const if (flags & AV_CPU_FLAG_RVV_I64) { if (bit_depth == 8) { c->h264_add_pixels4_clear = ff_h264_add_pixels4_clear_rvv; + c->h264_add_pixels8_clear = ff_h264_add_pixels8_clear_rvv; } } #endif diff --git a/libavcodec/riscv/h264dsp_rvv.S b/libavcodec/riscv/h264dsp_rvv.S index e6b943f57e..6a7ecb6858 100644 --- a/libavcodec/riscv/h264dsp_rvv.S +++ b/libavcodec/riscv/h264dsp_rvv.S @@ -40,3 +40,25 @@ func ff_h264_add_pixels4_clear_rvv, zve64x ret endfunc + +func ff_h264_add_pixels8_clear_rvv, zve64x + vsetivli zero, 16, e8, m1, ta, ma + vle64.v v24, (a1) + li t1, 8*8 + vsetvli zero, t1, e16, m8, ta, ma + li t0, 0xff + vand.vx v24, v24, t0 + addi a1, a1, 8*8*2 + vsetivli zero, 16, e8, m1, ta, ma + vse64.v v0, (a1) + vsetvli zero, t1, e8, m4, ta, ma + vnclipu.wi v24, v24, 0 + vsetivli zero, 8, e8, mf2, ta, ma + vle64.v v8, (a0) + vsetvli zero, t1, e8, m4, ta, ma + vadd.vv v24, v24, v8 + vsetivli zero, 8, e8, mf2, ta, ma + vse64.v v24, (a0) + + 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 reply other threads:[~2023-12-25 4:01 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-25 4:01 flow gg [this message] 2024-01-11 16:56 ` 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+shaSbos6f9aRMU36ARb+5+ncf3wUXV8Lz0_DaOSuTckA@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