riscv64/mc: Add VLEN=256 8bpc RVV blend_v function
SpacemiT K1 blend_v_w2_8bpc_c: 217.0 ( 1.00x) blend_v_w2_8bpc_rvv: 143.3 ( 1.51x) blend_v_w4_8bpc_c: 921.6 ( 1.00x) blend_v_w4_8bpc_rvv: 236.3 ( 3.90x) blend_v_w8_8bpc_c: 1738.2 ( 1.00x) blend_v_w8_8bpc_rvv: 238.1 ( 7.30x) blend_v_w16_8bpc_c: 3376.1 ( 1.00x) blend_v_w16_8bpc_rvv: 298.0 (11.33x) blend_v_w32_8bpc_c: 6648.0 ( 1.00x) blend_v_w32_8bpc_rvv: 409.5 (16.24x)
This commit is contained in:
committed by
Luca Barbato
parent
a5b9544866
commit
0e3f70e898
+26
-5
@@ -209,6 +209,27 @@ L(blend_h_epilog):
|
||||
jr t5
|
||||
endfunc
|
||||
|
||||
function blend_v_vl256_8bpc_rvv, export=1, ext=v
|
||||
li t0, 4
|
||||
ble a3, t0, 24f
|
||||
li t0, 8
|
||||
beq a3, t0, 8f
|
||||
li t0, 16
|
||||
beq a3, t0, 16f
|
||||
32:
|
||||
vsetivli zero, 24, e8, m1, ta, ma
|
||||
j L(blend_v_epilog)
|
||||
16:
|
||||
vsetivli zero, 12, e8, mf2, ta, ma
|
||||
j L(blend_v_epilog)
|
||||
8:
|
||||
vsetivli zero, 6, e8, mf4, ta, ma
|
||||
j L(blend_v_epilog)
|
||||
24:
|
||||
vsetvli zero, a3, e8, mf8, ta, ma
|
||||
j L(blend_v_epilog)
|
||||
endfunc
|
||||
|
||||
function blend_v_8bpc_rvv, export=1, ext=v
|
||||
li t0, 2
|
||||
beq a3, t0, 2f
|
||||
@@ -220,19 +241,19 @@ function blend_v_8bpc_rvv, export=1, ext=v
|
||||
beq a3, t0, 16f
|
||||
32:
|
||||
vsetivli zero, 24, e8, m2, ta, ma
|
||||
j 0f
|
||||
j L(blend_v_epilog)
|
||||
16:
|
||||
vsetivli zero, 12, e8, m1, ta, ma
|
||||
j 0f
|
||||
j L(blend_v_epilog)
|
||||
8:
|
||||
vsetivli zero, 6, e8, mf2, ta, ma
|
||||
j 0f
|
||||
j L(blend_v_epilog)
|
||||
4:
|
||||
vsetivli zero, 3, e8, mf4, ta, ma
|
||||
j 0f
|
||||
j L(blend_v_epilog)
|
||||
2:
|
||||
vsetivli zero, 1, e8, mf8, ta, ma
|
||||
0:
|
||||
L(blend_v_epilog):
|
||||
csrw vxrm, zero
|
||||
la t1, dav1d_obmc_masks
|
||||
add t1, t1, a3
|
||||
|
||||
@@ -34,6 +34,7 @@ decl_blend_dir_fn(BF(dav1d_blend_v, rvv));
|
||||
|
||||
decl_blend_fn(BF(dav1d_blend_vl256, rvv));
|
||||
decl_blend_dir_fn(BF(dav1d_blend_h_vl256, rvv));
|
||||
decl_blend_dir_fn(BF(dav1d_blend_v_vl256, rvv));
|
||||
|
||||
static ALWAYS_INLINE void mc_dsp_init_riscv(Dav1dMCDSPContext *const c) {
|
||||
const unsigned flags = dav1d_get_cpu_flags();
|
||||
@@ -48,6 +49,7 @@ static ALWAYS_INLINE void mc_dsp_init_riscv(Dav1dMCDSPContext *const c) {
|
||||
if (dav1d_get_vlen() >= 256) {
|
||||
c->blend = BF(dav1d_blend_vl256, rvv);
|
||||
c->blend_h = BF(dav1d_blend_h_vl256, rvv);
|
||||
c->blend_v = BF(dav1d_blend_v_vl256, rvv);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user