aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/riscv/fmtconvert_init.c
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi@remlab.net>2023-07-16 15:08:08 +0300
committerRémi Denis-Courmont <remi@remlab.net>2023-07-19 19:29:35 +0300
commitb6585eb04c0f63f231ed16266c6ad893522dc750 (patch)
treebc10e79af8332dd8c925a5fafa5546450c3e3b88 /libavcodec/riscv/fmtconvert_init.c
parent98e4dd39c5d59d62f61f48f6e4a0192f6b46e5aa (diff)
downloadffmpeg-b6585eb04c0f63f231ed16266c6ad893522dc750.tar.gz
lavu: add/use flag for RISC-V Zba extension
The code was blindly assuming that Zbb or V implied Zba. While the earlier is practically always true, the later broke some QEMU setups, as V was introduced earlier than Zba.
Diffstat (limited to 'libavcodec/riscv/fmtconvert_init.c')
-rw-r--r--libavcodec/riscv/fmtconvert_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/riscv/fmtconvert_init.c b/libavcodec/riscv/fmtconvert_init.c
index 2ded9d3615..f5eeafba45 100644
--- a/libavcodec/riscv/fmtconvert_init.c
+++ b/libavcodec/riscv/fmtconvert_init.c
@@ -36,7 +36,7 @@ av_cold void ff_fmt_convert_init_riscv(FmtConvertContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- if (flags & AV_CPU_FLAG_RVV_F32) {
+ if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_rvv;
c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_array8_rvv;
}