diff options
author | RĂ©mi Denis-Courmont <remi@remlab.net> | 2022-09-26 17:52:40 +0300 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2022-09-27 13:19:52 +0200 |
commit | 27da9514c3a7b506e3c3e0ada5dee67566c5aadf (patch) | |
tree | 410ce5f347080e6c42dc836b3f4206e3d3135cc7 /libavcodec/riscv/audiodsp_init.c | |
parent | c1bb19e263e14887ad286c16352edbaa39be4f66 (diff) | |
download | ffmpeg-27da9514c3a7b506e3c3e0ada5dee67566c5aadf.tar.gz |
lavc/audiodsp: RISC-V V vector_clip_int32
Diffstat (limited to 'libavcodec/riscv/audiodsp_init.c')
-rw-r--r-- | libavcodec/riscv/audiodsp_init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/riscv/audiodsp_init.c b/libavcodec/riscv/audiodsp_init.c index c5842815d6..ac06848a82 100644 --- a/libavcodec/riscv/audiodsp_init.c +++ b/libavcodec/riscv/audiodsp_init.c @@ -18,16 +18,25 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavcodec/audiodsp.h" void ff_vector_clipf_rvf(float *dst, const float *src, int len, float min, float max); +void ff_vector_clip_int32_rvv(int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len); + av_cold void ff_audiodsp_init_riscv(AudioDSPContext *c) { int flags = av_get_cpu_flags(); if (flags & AV_CPU_FLAG_RVF) c->vector_clipf = ff_vector_clipf_rvf; +#if HAVE_RVV + if (flags & AV_CPU_FLAG_RVV_I32) + c->vector_clip_int32 = ff_vector_clip_int32_rvv; +#endif } |