[FFmpeg-devel] [PATCH] lavc/h264chroma: RISC-V V add motion compensation for 4xH and 2xH chroma blocks

Rémi Denis-Courmont remi at remlab.net
Thu Jun 15 21:48:02 EEST 2023

Le torstaina 15. kesäkuuta 2023, 17.58.37 EEST Arnie Chang a écrit :
> Since these functions are frequently called, I prefer instantiating similar
> code many times
> rather than calling another internal function, as it may introduce
> additional function call overhead.

This works both ways. Smaller code reduces IC overhead and the risk of its own 
eviction or that of some other frequently used code.

Here, we would just add one `li` to the 8x cases, and a pair of `li` and `j` 
to the 2x and 4x cases (like we already do for Opus postfilter). Indeed, since 
this is assembler, we can enforce tail-call optimisation.

Since this is assembler, you can count on tail-call optimisation. This is 
really just one `li` and `j` added on the 2 and 4.

Not that I could measure the actual impact of either approaches.

Rémi Denis-Courmont

More information about the ffmpeg-devel mailing list