diff --git a/libavcodec/riscv/pixblockdsp_init.c b/libavcodec/riscv/pixblockdsp_init.c index 2735776105..28caa99dff 100644 --- a/libavcodec/riscv/pixblockdsp_init.c +++ b/libavcodec/riscv/pixblockdsp_init.c @@ -48,6 +48,7 @@ av_cold void ff_pixblockdsp_init_riscv(PixblockDSPContext *c, #if HAVE_RV int cpu_flags = av_get_cpu_flags(); +#if __riscv_xlen >= 64 if (cpu_flags & AV_CPU_FLAG_RVI) { if (high_bit_depth) c->get_pixels = ff_get_pixels_16_rvi; @@ -61,7 +62,7 @@ av_cold void ff_pixblockdsp_init_riscv(PixblockDSPContext *c, else c->get_pixels_unaligned = ff_get_pixels_8_rvi; } - +#endif #if HAVE_RVV if ((cpu_flags & AV_CPU_FLAG_RVV_I32) && ff_rv_vlen_least(128)) { c->diff_pixels = ff_diff_pixels_unaligned_rvv; diff --git a/libavcodec/riscv/pixblockdsp_rvi.S b/libavcodec/riscv/pixblockdsp_rvi.S index ed1af70251..c47204856b 100644 --- a/libavcodec/riscv/pixblockdsp_rvi.S +++ b/libavcodec/riscv/pixblockdsp_rvi.S @@ -20,6 +20,7 @@ #include "libavutil/riscv/asm.S" +#if __riscv_xlen >= 64 func ff_get_pixels_8_rvi lpad 0 .irp row, 0, 1, 2, 3, 4, 5, 6, 7 @@ -58,3 +59,4 @@ func ff_get_pixels_16_rvi .endr ret endfunc +#endif