Le tiistaina 11. kesäkuuta 2024, 21.38.10 EEST u...@foxmail.com a écrit :
> +#include "libavutil/riscv/asm.S"
> +
> +.macro vsetvlstatic8 w, vlen, is_w
> +.if \w <= 2
> +vsetivlizero, \w, e8, mf8, ta, ma
> +.elseif \w <= 4 && \vlen == 128
> +v
> Nit: for overall code base consistency, I'd use csrwi here. Reason being
that
> for other rounding modes, csrwi is the better option.
>
> Probably faster to swap the two above, to avoid stalling on LD.
>
> If you check more than one length, better to get ff_get_rv_vlenb() into a
local
> variable.
From: sunyuechi
C908 X60
avg_8_2x2_c:1.21.0
avg_8_2x2_rvv_i32 :1.01.0
avg_8_2x4_c:2.02.0
avg_8_2x4_rvv_i