Commit Graph

4 Commits

Author SHA1 Message Date
Rémi Denis-Courmont 0e580806d8 riscv/intmath: use builtins for counting ones
As with the earlier bswap change, all versions of GCC and Clang that
support RISC-V support the popcount built-ins, so we can just use them
instead of inline assembler.
2023-05-02 22:08:25 +02:00
Rémi Denis-Courmont 6df3ad9687 lavu/riscv: fix off-by-one in bit-magnitude clip 2022-09-15 18:11:12 -03:00
Rémi Denis-Courmont a5ce44f301 lavu/riscv: fix av_clip_int16
Some serious copy-paste / squash / rebase mismanipulation here.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-14 14:37:21 -03:00
Rémi Denis-Courmont c177108ae1 lavu/riscv: add <intmath.h> optimisations
This provides some micro-optimisations for signed integer clipping, and
support for bit weight with the Zbb extension.
2022-09-13 16:50:43 -03:00