riscv: test for assembler support

This should fix the build on LLVM 16 and earlier, at the cost of turning
all non-RVV optimisations off.
This commit is contained in:
Rémi Denis-Courmont 2023-12-05 17:54:26 +02:00
parent 0b9d009b4a
commit b3825bbe45
13 changed files with 33 additions and 16 deletions

View file

@ -45,6 +45,7 @@ av_cold void ff_pixblockdsp_init_riscv(PixblockDSPContext *c,
AVCodecContext *avctx,
unsigned high_bit_depth)
{
#if HAVE_RV
int cpu_flags = av_get_cpu_flags();
if (cpu_flags & AV_CPU_FLAG_RVI) {
@ -69,4 +70,5 @@ av_cold void ff_pixblockdsp_init_riscv(PixblockDSPContext *c,
c->diff_pixels = ff_diff_pixels_rvv;
}
#endif
#endif
}