| commit | 87ed1cd2b802ba8df133e6cbc91a5b4fdaf87cf6 | [log] [tgz] |
|---|---|---|
| author | liangjunzhao <junzhao.liang@spacemit.com> | Mon Dec 01 15:29:26 2025 +0800 |
| committer | Cosmin Truta <ctruta@gmail.com> | Wed Dec 03 20:31:19 2025 +0200 |
| tree | 6255e5044e127c616a2047046d2261e3876c3155 | |
| parent | a05a48b756de63e3234ea6b3b938b8f5f862484a [diff] |
riscv: Improve averaging performance in `png_read_filter_row_avg_rvv` Replace the two-instruction sequence (vwaddu and vnsrl) with a single vaaddu instruction for computing the average. The vaaddu instruction with vxrm=2 (round-toward-zero) produces identical results to the widening add followed by narrowing shift, but in a single operation. Reviewed-by: Cosmin Truta <ctruta@gmail.com> Signed-off-by: Cosmin Truta <ctruta@gmail.com>