@@ -35,7 +35,7 @@ av_cold void ff_aacenc_dsp_init_riscv(AACEncDSPContext *s)
int flags = av_get_cpu_flags();
if (flags & AV_CPU_FLAG_RVV_F32) {
- if (flags & AV_CPU_FLAG_RVB_ADDR) {
+ if (flags & AV_CPU_FLAG_RVB) {
s->abs_pow34 = ff_abs_pow34_rvv;
s->quant_bands = ff_aac_quant_bands_rvv;
}
@@ -42,20 +42,25 @@ av_cold void ff_psdsp_init_riscv(PSDSPContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- if (flags & AV_CPU_FLAG_RVV_F32) {
- c->hybrid_analysis = ff_ps_hybrid_analysis_rvv;
+ if (flags & AV_CPU_FLAG_RVV_I32) {
+ if (flags & AV_CPU_FLAG_RVV_F32) {
+ if (flags & AV_CPU_FLAG_RVB) {
+ if (flags & AV_CPU_FLAG_RVV_I64)
+ c->add_squares = ff_ps_add_squares_rvv;
- if (flags & AV_CPU_FLAG_RVB_ADDR) {
- if (flags & AV_CPU_FLAG_RVV_I64) {
- c->add_squares = ff_ps_add_squares_rvv;
- c->hybrid_synthesis_deint = ff_ps_hybrid_synthesis_deint_rvv;
+ c->mul_pair_single = ff_ps_mul_pair_single_rvv;
}
- c->mul_pair_single = ff_ps_mul_pair_single_rvv;
- c->stereo_interpolate[0] = ff_ps_stereo_interpolate_rvv;
+ c->hybrid_analysis = ff_ps_hybrid_analysis_rvv;
}
- }
- if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR))
- c->hybrid_analysis_ileave = ff_ps_hybrid_analysis_ileave_rvv;
+ if (flags & AV_CPU_FLAG_RVB) {
+ c->hybrid_analysis_ileave = ff_ps_hybrid_analysis_ileave_rvv;
+
+ if (flags & AV_CPU_FLAG_RVV_I64)
+ c->hybrid_synthesis_deint = ff_ps_hybrid_synthesis_deint_rvv;
+ if (flags & AV_CPU_FLAG_RVV_F32)
+ c->stereo_interpolate[0] = ff_ps_stereo_interpolate_rvv;
+ }
+ }
#endif
}
@@ -41,7 +41,7 @@ av_cold void ff_alacdsp_init_riscv(ALACDSPContext *c)
#if HAVE_RVV && (__riscv_xlen == 64)
int flags = av_get_cpu_flags();
- 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)) {
c->decorrelate_stereo = ff_alac_decorrelate_stereo_rvv;
c->append_extra_bits[0] = ff_alac_append_extra_bits_mono_rvv;
c->append_extra_bits[1] = ff_alac_append_extra_bits_stereo_rvv;
@@ -34,11 +34,10 @@ av_cold void ff_audiodsp_init_riscv(AudioDSPContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- if (flags & AV_CPU_FLAG_RVB_ADDR) {
- if (flags & AV_CPU_FLAG_RVV_I32) {
- c->scalarproduct_int16 = ff_scalarproduct_int16_rvv;
- c->vector_clip_int32 = ff_vector_clip_int32_rvv;
- }
+ if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) {
+ c->scalarproduct_int16 = ff_scalarproduct_int16_rvv;
+ c->vector_clip_int32 = ff_vector_clip_int32_rvv;
+
if (flags & AV_CPU_FLAG_RVV_F32)
c->vector_clipf = ff_vector_clipf_rvv;
}
@@ -31,8 +31,7 @@ av_cold void ff_exrdsp_init_riscv(ExrDSPContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- 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))
c->reorder_pixels = ff_reorder_pixels_rvv;
- }
#endif
}
@@ -70,10 +70,10 @@ av_cold void ff_flacdsp_init_riscv(FLACDSPContext *c, enum AVSampleFormat fmt,
#if HAVE_RVV
int flags = av_get_cpu_flags();
- 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)) {
int vlenb = ff_get_rv_vlenb();
- if ((flags & AV_CPU_FLAG_RVB_BASIC) && vlenb >= 16) {
+ if (vlenb >= 16) {
c->lpc16 = ff_flac_lpc16_rvv;
# if (__riscv_xlen >= 64)
@@ -36,7 +36,7 @@ av_cold void ff_fmt_convert_init_riscv(FmtConvertContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
+ if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB)) {
c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_rvv;
c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_array8_rvv;
}
@@ -38,7 +38,7 @@ av_cold void ff_h264chroma_init_riscv(H264ChromaContext *c, int bit_depth)
int flags = av_get_cpu_flags();
if (bit_depth == 8 && (flags & AV_CPU_FLAG_RVV_I32) &&
- (flags & AV_CPU_FLAG_RVB_ADDR) && ff_rv_vlen_least(128)) {
+ (flags & AV_CPU_FLAG_RVB) && ff_rv_vlen_least(128)) {
c->put_h264_chroma_pixels_tab[0] = h264_put_chroma_mc8_rvv;
c->avg_h264_chroma_pixels_tab[0] = h264_avg_chroma_mc8_rvv;
c->put_h264_chroma_pixels_tab[1] = h264_put_chroma_mc4_rvv;
@@ -128,7 +128,7 @@ av_cold void ff_h264dsp_init_riscv(H264DSPContext *dsp, const int bit_depth,
if (bit_depth == depth) { \
if (zvl128b) \
dsp->h264_idct_add = ff_h264_idct_add_##depth##_rvv; \
- if (flags & AV_CPU_FLAG_RVB_ADDR) \
+ if (flags & AV_CPU_FLAG_RVB) \
dsp->h264_idct8_add = ff_h264_idct8_add_##depth##_rvv; \
if (zvl128b && (flags & AV_CPU_FLAG_RVB)) { \
dsp->h264_idct_dc_add = ff_h264_idct4_dc_add_##depth##_rvv; \
@@ -33,10 +33,9 @@ av_cold void ff_huffyuvdsp_init_riscv(HuffYUVDSPContext *c,
#if HAVE_RVV
int flags = av_get_cpu_flags();
- 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)) {
c->add_int16 = ff_add_int16_rvv;
- if (flags & AV_CPU_FLAG_RVB_BASIC)
- c->add_hfyu_left_pred_bgr32 = ff_add_hfyu_left_pred_bgr32_rvv;
+ c->add_hfyu_left_pred_bgr32 = ff_add_hfyu_left_pred_bgr32_rvv;
}
#endif
}
@@ -31,7 +31,7 @@ av_cold void ff_jpeg2000dsp_init_riscv(Jpeg2000DSPContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- 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)) {
if (flags & AV_CPU_FLAG_RVV_F32)
c->mct_decode[FF_DWT97] = ff_ict_float_rvv;
c->mct_decode[FF_DWT53] = ff_rct_int_rvv;
@@ -36,7 +36,7 @@ av_cold void ff_llauddsp_init_riscv(LLAudDSPContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- 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)) {
c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_rvv;
c->scalarproduct_and_madd_int32 = ff_scalarproduct_and_madd_int32_rvv;
}
@@ -33,11 +33,10 @@ av_cold void ff_lpc_init_riscv(LPCContext *c)
#if HAVE_RVV && (__riscv_xlen >= 64)
int flags = av_get_cpu_flags();
- if ((flags & AV_CPU_FLAG_RVV_F64) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
+ if ((flags & AV_CPU_FLAG_RVV_F64) && (flags & AV_CPU_FLAG_RVB)) {
c->lpc_apply_welch_window = ff_lpc_apply_welch_window_rvv;
- if ((flags & AV_CPU_FLAG_RVB_BASIC) &&
- ff_get_rv_vlenb() > c->max_order)
+ if (ff_get_rv_vlenb() > c->max_order)
c->lpc_compute_autocorr = ff_lpc_compute_autocorr_rvv;
}
#endif
@@ -32,8 +32,7 @@ av_cold void ff_opus_dsp_init_riscv(OpusDSP *d)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB_ADDR) &&
- (flags & AV_CPU_FLAG_RVB_BASIC))
+ if ((flags & AV_CPU_FLAG_RVV_F32) && (flags & AV_CPU_FLAG_RVB))
d->postfilter = ff_opus_postfilter_rvv;
#endif
}
@@ -41,7 +41,7 @@ av_cold void ff_rv40dsp_init_riscv(RV34DSPContext *c)
int flags = av_get_cpu_flags();
if ((flags & AV_CPU_FLAG_RVV_I32) && ff_rv_vlen_least(128) &&
- (flags & AV_CPU_FLAG_RVB_ADDR)) {
+ (flags & AV_CPU_FLAG_RVB)) {
c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_rvv;
c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_rvv;
c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_rvv;
@@ -47,7 +47,7 @@ av_cold void ff_sbrdsp_init_riscv(SBRDSPContext *c)
int flags = av_get_cpu_flags();
if (flags & AV_CPU_FLAG_RVV_F32) {
- if (flags & AV_CPU_FLAG_RVB_ADDR) {
+ if (flags & AV_CPU_FLAG_RVB) {
c->sum64x5 = ff_sbr_sum64x5_rvv;
c->sum_square = ff_sbr_sum_square_rvv;
c->hf_gen = ff_sbr_hf_gen_rvv;
@@ -55,10 +55,8 @@ av_cold void ff_sbrdsp_init_riscv(SBRDSPContext *c)
if (ff_get_rv_vlenb() <= 32) {
c->hf_apply_noise[0] = ff_sbr_hf_apply_noise_0_rvv;
c->hf_apply_noise[2] = ff_sbr_hf_apply_noise_2_rvv;
- if (flags & AV_CPU_FLAG_RVB_BASIC) {
- c->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_rvv;
- c->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_rvv;
- }
+ c->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_rvv;
+ c->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_rvv;
}
}
c->autocorrelate = ff_sbr_autocorrelate_rvv;
@@ -33,7 +33,7 @@ av_cold void ff_svq1enc_init_riscv(SVQ1EncDSPContext *c)
int flags = av_get_cpu_flags();
if (flags & AV_CPU_FLAG_RVV_I32) {
- if (flags & AV_CPU_FLAG_RVB_ADDR) {
+ if (flags & AV_CPU_FLAG_RVB) {
c->ssd_int8_vs_int16 = ff_ssd_int8_vs_int16_rvv;
}
}
@@ -35,7 +35,7 @@ av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- 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)) {
dsp->decorrelate_ls = ff_decorrelate_ls_rvv;
dsp->decorrelate_sr = ff_decorrelate_sr_rvv;
dsp->decorrelate_sm = ff_decorrelate_sm_rvv;
@@ -38,7 +38,7 @@ av_cold void ff_utvideodsp_init_riscv(UTVideoDSPContext *c)
if (flags & AV_CPU_FLAG_RVV_I32) {
c->restore_rgb_planes = ff_restore_rgb_planes_rvv;
- if (flags & AV_CPU_FLAG_RVB_ADDR)
+ if (flags & AV_CPU_FLAG_RVB)
c->restore_rgb_planes10 = ff_restore_rgb_planes10_rvv;
}
#endif
@@ -31,7 +31,7 @@ av_cold void ff_vorbisdsp_init_riscv(VorbisDSPContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- 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))
c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_rvv;
#endif
}
@@ -44,7 +44,7 @@ av_cold void ff_vp7dsp_init_riscv(VP8DSPContext *c)
#if HAVE_RVV
int flags = av_get_cpu_flags();
- 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) &&
ff_rv_vlen_least(128)) {
#if __riscv_xlen >= 64
c->vp8_luma_dc_wht = ff_vp7_luma_dc_wht_rvv;
@@ -86,7 +86,7 @@ av_cold void ff_vp78dsp_init_riscv(VP8DSPContext *c)
c->put_vp8_bilinear_pixels_tab[2][2][1] = ff_put_vp8_bilin4_hv_rvv;
c->put_vp8_bilinear_pixels_tab[2][2][2] = ff_put_vp8_bilin4_hv_rvv;
- if (flags & AV_CPU_FLAG_RVB_ADDR) {
+ if (flags & AV_CPU_FLAG_RVB) {
c->put_vp8_epel_pixels_tab[0][0][2] = ff_put_vp8_epel16_h6_rvv;
c->put_vp8_epel_pixels_tab[1][0][2] = ff_put_vp8_epel8_h6_rvv;
c->put_vp8_epel_pixels_tab[2][0][2] = ff_put_vp8_epel4_h6_rvv;