lavc/huffyuvdsp: optimise RVV vtype for add_hfyu_left_pred_bgr32

T-Head C908:
add_hfyu_left_pred_bgr32_c:       237.5
add_hfyu_left_pred_bgr32_rvv_i32: 173.5 (before)
add_hfyu_left_pred_bgr32_rvv_i32: 110.0 (after)
release/7.1
Rémi Denis-Courmont 6 months ago
parent 233066e85a
commit 463c573e6b
  1. 3
      libavcodec/riscv/huffyuvdsp_init.c
  2. 6
      libavcodec/riscv/huffyuvdsp_rvv.S

@ -35,7 +35,8 @@ av_cold void ff_huffyuvdsp_init_riscv(HuffYUVDSPContext *c,
if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
c->add_int16 = ff_add_int16_rvv;
c->add_hfyu_left_pred_bgr32 = ff_add_hfyu_left_pred_bgr32_rvv;
if (flags & AV_CPU_FLAG_RVB_BASIC)
c->add_hfyu_left_pred_bgr32 = ff_add_hfyu_left_pred_bgr32_rvv;
}
#endif
}

@ -36,8 +36,10 @@ func ff_add_int16_rvv, zve32x
ret
endfunc
func ff_add_hfyu_left_pred_bgr32_rvv, zve32x
vsetivli zero, 4, e8, m1, ta, ma
func ff_add_hfyu_left_pred_bgr32_rvv, zve32x, zbb
vtype_ivli t1, 4, e8, ta, ma
li t0, 4
vsetvl zero, t0, t1
vle8.v v8, (a3)
sh2add a2, a2, a1
1:

Loading…
Cancel
Save