[FFmpeg-devel] [PATCH 4/4] lavu/riscv: use Zbb CLZ/CTZ/CLZW/CTZW at run-time

Rémi Denis-Courmont remi at remlab.net
Sat Jun 8 21:17:08 EEST 2024


Le lauantaina 8. kesäkuuta 2024, 21.01.08 EEST Lynne via ffmpeg-devel a écrit :
> >   #if HAVE_RV && !defined(__riscv_zbb)
> 
> Could you add a ./configure flag or a check for enabling non-dynamic Zbb?

That's defined by the compiler target architecture and/or CPU. Adding a 
configure flag wouldn't work since the compiler wouldn't know that it can use 
emit Zbb instructions for the corresponding built-ins.

And before you ask, to my knowledge, GCC exposes no ad-hoc `-m` flags. This has 
to be included in -march or -mcpu instead, e.g.:
CFLAGS="-march=rv64gc_zba_zbb"

-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the ffmpeg-devel mailing list