Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: flow gg <hlefthleft@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2] lavc/blockdsp: R-V V clear_blocks
Date: Fri, 2 Feb 2024 09:14:39 +0800
Message-ID: <CAEa-L+uy9V9vwBZyQWK9tLuv1GLKFdOXzh2xZRqv4vosW7a8=g@mail.gmail.com> (raw)
In-Reply-To: <1960931.tAO1MjzdVI@basile.remlab.net>

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

Ok, updated it in the reply

Rémi Denis-Courmont <remi@remlab.net> 于2024年2月2日周五 04:13写道:

> You should probably use an assembler macro to repeat the code.
>
>
> --
> レミ・デニ-クールモン
> http://www.remlab.net/
> _______________________________________________
> 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".
>

[-- Attachment #2: 0002-lavc-blockdsp-R-V-V-clear_blocks.patch --]
[-- Type: text/x-patch, Size: 1749 bytes --]

From 5e08d728470fde81cba3e109932e4e22d1adc2ce Mon Sep 17 00:00:00 2001
From: sunyuechi <sunyuechi@iscas.ac.cn>
Date: Thu, 1 Feb 2024 15:41:09 +0800
Subject: [PATCH 2/2] lavc/blockdsp: R-V V clear_blocks

C908:
blockdsp.clear_blocks_c: 128.2
blockdsp.clear_blocks_rvv_i64: 102.5
---
 libavcodec/riscv/blockdsp_init.c |  2 ++
 libavcodec/riscv/blockdsp_rvv.S  | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/libavcodec/riscv/blockdsp_init.c b/libavcodec/riscv/blockdsp_init.c
index 5370418687..59b2f9d47b 100644
--- a/libavcodec/riscv/blockdsp_init.c
+++ b/libavcodec/riscv/blockdsp_init.c
@@ -26,6 +26,7 @@
 #include "libavcodec/blockdsp.h"
 
 void ff_clear_block_rvv(int16_t *block);
+void ff_clear_blocks_rvv(int16_t *block);
 
 av_cold void ff_blockdsp_init_riscv(BlockDSPContext *c)
 {
@@ -34,6 +35,7 @@ av_cold void ff_blockdsp_init_riscv(BlockDSPContext *c)
 
     if (flags & AV_CPU_FLAG_RVV_I64 && ff_get_rv_vlenb() >= 16) {
         c->clear_block = ff_clear_block_rvv;
+        c->clear_blocks = ff_clear_blocks_rvv;
     }
 #endif
 }
diff --git a/libavcodec/riscv/blockdsp_rvv.S b/libavcodec/riscv/blockdsp_rvv.S
index e85697613a..ad97cb64df 100644
--- a/libavcodec/riscv/blockdsp_rvv.S
+++ b/libavcodec/riscv/blockdsp_rvv.S
@@ -27,3 +27,22 @@ func ff_clear_block_rvv, zve64x
 
         ret
 endfunc
+
+func ff_clear_blocks_rvv, zve64x
+        vsetivli      zero, 16, e64, m8, ta, ma
+        vmv.v.i       v0, 0
+
+        .macro vec_store_inc
+        vse64.v       v0, (a0)
+        addi          a0, a0, 128
+        .endm
+
+        vec_store_inc
+        vec_store_inc
+        vec_store_inc
+        vec_store_inc
+        vec_store_inc
+        vse64.v       v0, (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".

  reply	other threads:[~2024-02-02  1:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01  8:43 flow gg
2024-02-01 20:13 ` Rémi Denis-Courmont
2024-02-02  1:14   ` flow gg [this message]
2024-02-12 19:49     ` Rémi Denis-Courmont
2024-02-13  1:00       ` 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+uy9V9vwBZyQWK9tLuv1GLKFdOXzh2xZRqv4vosW7a8=g@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