|
|
@ -24,6 +24,14 @@ |
|
|
|
#include "libavutil/cpu.h" |
|
|
|
#include "libavutil/cpu.h" |
|
|
|
#include "libavcodec/flacdsp.h" |
|
|
|
#include "libavcodec/flacdsp.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ff_flac_decorrelate_indep2_16_rvv(uint8_t **out, int32_t **in, |
|
|
|
|
|
|
|
int channels, int len, int shift); |
|
|
|
|
|
|
|
void ff_flac_decorrelate_indep4_16_rvv(uint8_t **out, int32_t **in, |
|
|
|
|
|
|
|
int channels, int len, int shift); |
|
|
|
|
|
|
|
void ff_flac_decorrelate_indep6_16_rvv(uint8_t **out, int32_t **in, |
|
|
|
|
|
|
|
int channels, int len, int shift); |
|
|
|
|
|
|
|
void ff_flac_decorrelate_indep8_16_rvv(uint8_t **out, int32_t **in, |
|
|
|
|
|
|
|
int channels, int len, int shift); |
|
|
|
void ff_flac_decorrelate_ls_16_rvv(uint8_t **out, int32_t **in, |
|
|
|
void ff_flac_decorrelate_ls_16_rvv(uint8_t **out, int32_t **in, |
|
|
|
int channels, int len, int shift); |
|
|
|
int channels, int len, int shift); |
|
|
|
void ff_flac_decorrelate_rs_16_rvv(uint8_t **out, int32_t **in, |
|
|
|
void ff_flac_decorrelate_rs_16_rvv(uint8_t **out, int32_t **in, |
|
|
@ -54,6 +62,20 @@ av_cold void ff_flacdsp_init_riscv(FLACDSPContext *c, enum AVSampleFormat fmt, |
|
|
|
if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { |
|
|
|
if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) { |
|
|
|
switch (fmt) { |
|
|
|
switch (fmt) { |
|
|
|
case AV_SAMPLE_FMT_S16: |
|
|
|
case AV_SAMPLE_FMT_S16: |
|
|
|
|
|
|
|
switch (channels) { |
|
|
|
|
|
|
|
case 2: |
|
|
|
|
|
|
|
c->decorrelate[0] = ff_flac_decorrelate_indep2_16_rvv; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 4: |
|
|
|
|
|
|
|
c->decorrelate[0] = ff_flac_decorrelate_indep4_16_rvv; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 6: |
|
|
|
|
|
|
|
c->decorrelate[0] = ff_flac_decorrelate_indep6_16_rvv; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 8: |
|
|
|
|
|
|
|
c->decorrelate[0] = ff_flac_decorrelate_indep8_16_rvv; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
c->decorrelate[1] = ff_flac_decorrelate_ls_16_rvv; |
|
|
|
c->decorrelate[1] = ff_flac_decorrelate_ls_16_rvv; |
|
|
|
c->decorrelate[2] = ff_flac_decorrelate_rs_16_rvv; |
|
|
|
c->decorrelate[2] = ff_flac_decorrelate_rs_16_rvv; |
|
|
|
c->decorrelate[3] = ff_flac_decorrelate_ms_16_rvv; |
|
|
|
c->decorrelate[3] = ff_flac_decorrelate_ms_16_rvv; |
|
|
|