|
|
|
@ -52,6 +52,11 @@ void ff_h264_idct8_add4_8_rvv(uint8_t *dst, const int *blockoffset, |
|
|
|
|
int16_t *block, int stride, |
|
|
|
|
const uint8_t nnzc[5 * 8]); |
|
|
|
|
|
|
|
|
|
void ff_h264_idct_add_9_rvv(uint8_t *dst, int16_t *block, int stride); |
|
|
|
|
void ff_h264_idct_add_10_rvv(uint8_t *dst, int16_t *block, int stride); |
|
|
|
|
void ff_h264_idct_add_12_rvv(uint8_t *dst, int16_t *block, int stride); |
|
|
|
|
void ff_h264_idct_add_14_rvv(uint8_t *dst, int16_t *block, int stride); |
|
|
|
|
|
|
|
|
|
extern int ff_startcode_find_candidate_rvb(const uint8_t *, int); |
|
|
|
|
extern int ff_startcode_find_candidate_rvv(const uint8_t *, int); |
|
|
|
|
|
|
|
|
@ -65,7 +70,9 @@ av_cold void ff_h264dsp_init_riscv(H264DSPContext *dsp, const int bit_depth, |
|
|
|
|
dsp->startcode_find_candidate = ff_startcode_find_candidate_rvb; |
|
|
|
|
# if HAVE_RVV |
|
|
|
|
if (flags & AV_CPU_FLAG_RVV_I32) { |
|
|
|
|
if (bit_depth == 8 && ff_rv_vlen_least(128)) { |
|
|
|
|
const bool zvl128b = ff_rv_vlen_least(128); |
|
|
|
|
|
|
|
|
|
if (bit_depth == 8 && zvl128b) { |
|
|
|
|
for (int i = 0; i < 4; i++) { |
|
|
|
|
dsp->weight_h264_pixels_tab[i] = |
|
|
|
|
ff_h264_weight_funcs_8_rvv[i].weight; |
|
|
|
@ -86,6 +93,16 @@ av_cold void ff_h264dsp_init_riscv(H264DSPContext *dsp, const int bit_depth, |
|
|
|
|
dsp->h264_idct8_add4 = ff_h264_idct8_add4_8_rvv; |
|
|
|
|
# endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (bit_depth == 9 && zvl128b) |
|
|
|
|
dsp->h264_idct_add = ff_h264_idct_add_9_rvv; |
|
|
|
|
if (bit_depth == 10 && zvl128b) |
|
|
|
|
dsp->h264_idct_add = ff_h264_idct_add_10_rvv; |
|
|
|
|
if (bit_depth == 12 && zvl128b) |
|
|
|
|
dsp->h264_idct_add = ff_h264_idct_add_12_rvv; |
|
|
|
|
if (bit_depth == 14 && zvl128b) |
|
|
|
|
dsp->h264_idct_add = ff_h264_idct_add_14_rvv; |
|
|
|
|
|
|
|
|
|
dsp->startcode_find_candidate = ff_startcode_find_candidate_rvv; |
|
|
|
|
} |
|
|
|
|
# endif |
|
|
|
|