[FFmpeg-devel] [PATCH] RISC-V:update ff_get_cpu_flags_riscv for RVV

Rémi Denis-Courmont remi at remlab.net
Thu Mar 20 13:17:21 EET 2025


Hi,

Le 20 mars 2025 11:27:39 GMT+02:00, daichengrong <daichengrong at iscas.ac.cn> a écrit :
>>> Availability of RVV and ZVBB should be determined with dl_hwcap.
>> No. That's completely superfluous since we already check for kernel support with hwprobe().
>No. If the operating system does not enable dl_hwcap support for rvv, an illegal instruction exception will be reported , even if the hardware and kernel support RVV.

And so what?

>> And we can't check for Zb* and Zv* with hwcap anyhow.
>> 
>>> As those extensions rely on vector registers, kernel vector support
>>> is required to save the state of context switching.
>> No. Kernel context switching is already ascertained.
>No. The kernel will not save and restore vector registers if the program does not use vector instructions.

That optimisation is a kernel implementation detail that is completely irrelevant to the subject matter.

I still completely fail to see any justification for this patch.


More information about the ffmpeg-devel mailing list