[FFmpeg-devel] RISC-V vector DSP functions: Motivation for commit 446b009

Michael Platzer michael.platzer at axelera.ai
Fri Jan 19 17:30:00 EET 2024


Hi,

Commit 446b0090cbb66ee614dcf6ca79c78dc8eb7f0e37 by Remi Denis-Courmont has replaced RISC-V vector loads and stores with negative stride with vrgather (generalized permutation within vector registers) instructions in order to reverse the elements in a vector register. The commit message explains that this change was done, but it does not explain why.

I fail to see what could possibly have motivated this change. The RISC-V vector loads and stores support negative stride values for use cases such as this one. Using vrgather instead replaces the more specific operation with a more generic one, which is likely to be less performant on most HW architectures. In addition, it requires to setup an index vector, thus raising dynamic instruction count.

Could someone familiar with this change (perhaps Remi himself) please explain the motivation for this change?

Thanks,
Michael


More information about the ffmpeg-devel mailing list