mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
lavc/blockdsp: R-V V clear_blocks
C908: blockdsp.clear_blocks_c: 128.2 blockdsp.clear_blocks_rvv_i64: 102.5 Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
This commit is contained in:
parent
d2ae2aad8c
commit
fdebde817c
@ -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
|
||||
}
|
||||
|
@ -27,3 +27,16 @@ 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
|
||||
|
||||
.rept 5
|
||||
vse64.v v0, (a0)
|
||||
addi a0, a0, 128
|
||||
.endr
|
||||
vse64.v v0, (a0)
|
||||
|
||||
ret
|
||||
endfunc
|
||||
|
Loading…
x
Reference in New Issue
Block a user