lavc/vp8dsp: R-V V vp8_idct_dc_add4uv

c908:
vp8_idct_dc_add4uv_c: 387.7
vp8_idct_dc_add4uv_rvv_i32: 134.5

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
This commit is contained in:
sunyuechi 2024-02-02 12:50:50 +08:00 committed by Rémi Denis-Courmont
parent e74e18cae4
commit d897bbb48d
2 changed files with 17 additions and 0 deletions

View File

@ -27,6 +27,7 @@
void ff_vp8_idct_dc_add_rvv(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
void ff_vp8_idct_dc_add4y_rvv(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride);
void ff_vp8_idct_dc_add4uv_rvv(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride);
av_cold void ff_vp8dsp_init_riscv(VP8DSPContext *c)
{
@ -36,6 +37,9 @@ av_cold void ff_vp8dsp_init_riscv(VP8DSPContext *c)
if (flags & AV_CPU_FLAG_RVV_I32 && ff_get_rv_vlenb() >= 16) {
c->vp8_idct_dc_add = ff_vp8_idct_dc_add_rvv;
c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_rvv;
if (flags & AV_CPU_FLAG_RVB_ADDR) {
c->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_rvv;
}
}
#endif
}

View File

@ -58,3 +58,16 @@ func ff_vp8_idct_dc_add4y_rvv, zve32x
ret
endfunc
func ff_vp8_idct_dc_add4uv_rvv, zve32x
vsetivli zero, 4, e8, mf4, ta, ma
vp8_idct_dc_addy
vp8_idct_dc_add
addi a0, a0, -4
sh2add a0, a2, a0
addi a1, a1, 32
vp8_idct_dc_addy
vp8_idct_dc_add
ret
endfunc