[FFmpeg-devel] [PATCH] lavu/riscv: fix compilation without Vector support

Brad Smith brad at comstyle.com
Mon Nov 18 04:01:06 EET 2024


On 2024-11-17 4:17 a.m., Rémi Denis-Courmont wrote:
> The half-baked assembler in Clang 16 and earlier can't process our
> RISC-V assembler. This adds yet another work around that.
>
> If you must use Clang, please use version 17 or later.

LGTM. Fixes build with 16.


> ---
>   libavutil/riscv/cpu.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/riscv/cpu.h b/libavutil/riscv/cpu.h
> index 191e4478c5..f2e6b7b430 100644
> --- a/libavutil/riscv/cpu.h
> +++ b/libavutil/riscv/cpu.h
> @@ -56,7 +56,6 @@ static inline size_t ff_get_rv_vlenb(void)
>           ".option pop\n" : "=r" (vlenb));
>       return vlenb;
>   }
> -#endif
>   
>   /**
>    * Checks that the vector bit-size is at least the given value.
> @@ -78,3 +77,4 @@ static inline bool ff_rv_vlen_least(unsigned int bits)
>       return bits <= (8 * ff_get_rv_vlenb());
>   }
>   #endif
> +#endif /* HAVE_RVV */


More information about the ffmpeg-devel mailing list