mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
lavc/bswapdsp: RISC-V V bswap_buf
This commit is contained in:
parent
f0ef11ea83
commit
d7528af4df
3 changed files with 52 additions and 1 deletions
|
|
@ -26,13 +26,18 @@
|
|||
#include "libavcodec/bswapdsp.h"
|
||||
|
||||
void ff_bswap32_buf_rvb(uint32_t *dst, const uint32_t *src, int len);
|
||||
void ff_bswap32_buf_rvv(uint32_t *dst, const uint32_t *src, int len);
|
||||
|
||||
av_cold void ff_bswapdsp_init_riscv(BswapDSPContext *c)
|
||||
{
|
||||
#if (__riscv_xlen >= 64)
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
#if (__riscv_xlen >= 64)
|
||||
if (cpu_flags & AV_CPU_FLAG_RVB_BASIC)
|
||||
c->bswap_buf = ff_bswap32_buf_rvb;
|
||||
#endif
|
||||
#if HAVE_RVV
|
||||
if (cpu_flags & AV_CPU_FLAG_RVV_I32)
|
||||
c->bswap_buf = ff_bswap32_buf_rvv;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue