[FFmpeg-devel] [PATCH v4 1/9] lavc/vp8dsp: R-V put_vp8_pixels

Lynne dev at lynne.ee
Tue May 7 22:25:46 EEST 2024


May 7, 2024, 20:25 by remi at remlab.net:

> Le tiistaina 7. toukokuuta 2024, 20.41.30 EEST Lynne a écrit :
>
>> May 7, 2024, 18:54 by uk7b at foxmail.com:
>> > From: sunyuechi <sunyuechi at iscas.ac.cn>
>> > 
>> > C908:
>> > vp8_put_pixels4_c: 78.0
>> > vp8_put_pixels4_rvi: 33.7
>> > vp8_put_pixels8_c: 278.0
>> > vp8_put_pixels8_rvi: 55.0
>> > vp8_put_pixels16_c: 999.0
>> > vp8_put_pixels16_rvi: 86.7
>> > ---
>> > 
>> >  libavcodec/riscv/Makefile      |  1 +
>> >  libavcodec/riscv/vp8dsp.h      | 75 ++++++++++++++++++++++++++++++++++
>> >  libavcodec/riscv/vp8dsp_init.c | 22 ++++++++++
>> >  libavcodec/riscv/vp8dsp_rvi.S  | 61 +++++++++++++++++++++++++++
>> >  libavcodec/vp8dsp.c            |  2 +
>> >  libavcodec/vp8dsp.h            |  1 +
>> >  6 files changed, 162 insertions(+)
>> >  create mode 100644 libavcodec/riscv/vp8dsp.h
>> >  create mode 100644 libavcodec/riscv/vp8dsp_rvi.S
>> > 
>> > +
>> > +av_cold void ff_vp78dsp_init_riscv(VP8DSPContext *c)
>> > +{
>> > +#if HAVE_RV
>> > +    int flags = av_get_cpu_flags();
>> > +    if (flags & AV_CPU_FLAG_RVI) {
>> > +#if __riscv_xlen >= 64
>>
>> Why are you not detecting this at runtime?
>>
>
> XLEN is a compile time constant of the ABI. You cannot run 32-bit code in 64-
> bit mode, and the ELF loader will not allow you to do so.
>

Ah, I mistook it for the vector length.


More information about the ffmpeg-devel mailing list