mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-18 03:19:31 +02:00
910d281b21
Since the horizontal and vertical filters are identical except for a transposition, this uses a common subprocedure with an ad-hoc ABI. To preserve return-address stack prediction, a link register has to be used (c.f. the "Control Transfer Instructions" from the RISC-V ISA Manual). The alternate/temporary link register T0 is used here, so that the normal RA is preserved (something Arm cannot do!). To load the strength value based on `qscale`, the shortest possible and PIC-compatible sequence is used: AUIPC; ADD; LBU. The classic LLA; ADD; LBU sequence would add one more instruction since LLA is a convenience alias for AUIPC; ADDI. To ensure that this trick works, relocation relaxation is disabled. To implement the two signed divisions by a power of two toward zero: (x / (1 << SHIFT)) the code relies on the small range of integers involved, computing: (x + (x >> (16 - SHIFT))) >> SHIFT rather than the more general: (x + ((x >> (16 - 1)) & ((1 << SHIFT) - 1))) >> SHIFT Thus one ANDI instruction is avoided. T-Head C908: h263dsp.h_loop_filter_c: 228.2 h263dsp.h_loop_filter_rvv_i32: 144.0 h263dsp.v_loop_filter_c: 242.7 h263dsp.v_loop_filter_rvv_i32: 114.0 (C is probably worse in real use due to less predictible branches.) |
||
---|---|---|
.. | ||
aacencdsp_init.c | ||
aacencdsp_rvv.S | ||
aacpsdsp_init.c | ||
aacpsdsp_rvv.S | ||
ac3dsp_init.c | ||
ac3dsp_rvb.S | ||
ac3dsp_rvv.S | ||
ac3dsp_rvvb.S | ||
alacdsp_init.c | ||
alacdsp_rvv.S | ||
audiodsp_init.c | ||
audiodsp_rvf.S | ||
audiodsp_rvv.S | ||
blockdsp_init.c | ||
blockdsp_rvv.S | ||
bswapdsp_init.c | ||
bswapdsp_rvb.S | ||
bswapdsp_rvv.S | ||
exrdsp_init.c | ||
exrdsp_rvv.S | ||
flacdsp_init.c | ||
flacdsp_rvv.S | ||
fmtconvert_init.c | ||
fmtconvert_rvv.S | ||
g722dsp_init.c | ||
g722dsp_rvv.S | ||
h263dsp_init.c | ||
h263dsp_rvv.S | ||
h264_chroma_init_riscv.c | ||
h264_mc_chroma.S | ||
h264dsp_init.c | ||
huffyuvdsp_init.c | ||
huffyuvdsp_rvv.S | ||
idctdsp_init.c | ||
idctdsp_rvv.S | ||
jpeg2000dsp_init.c | ||
jpeg2000dsp_rvv.S | ||
llauddsp_init.c | ||
llauddsp_rvv.S | ||
llviddsp_init.c | ||
llviddsp_rvv.S | ||
llvidencdsp_init.c | ||
llvidencdsp_rvv.S | ||
lpc_init.c | ||
lpc_rvv.S | ||
Makefile | ||
me_cmp_init.c | ||
me_cmp_rvv.S | ||
opusdsp_init.c | ||
opusdsp_rvv.S | ||
pixblockdsp_init.c | ||
pixblockdsp_rvi.S | ||
pixblockdsp_rvv.S | ||
rv34dsp_init.c | ||
rv34dsp_rvv.S | ||
rv40dsp_init.c | ||
rv40dsp_rvv.S | ||
sbrdsp_init.c | ||
sbrdsp_rvv.S | ||
startcode_rvb.S | ||
startcode_rvv.S | ||
svqenc_init.c | ||
svqenc_rvv.S | ||
takdsp_init.c | ||
takdsp_rvv.S | ||
utvideodsp_init.c | ||
utvideodsp_rvv.S | ||
vc1dsp_init.c | ||
vc1dsp_rvi.S | ||
vc1dsp_rvv.S | ||
vorbisdsp_init.c | ||
vorbisdsp_rvv.S | ||
vp8dsp_init.c | ||
vp8dsp_rvi.S | ||
vp8dsp_rvv.S | ||
vp8dsp.h | ||
vp9_intra_rvi.S | ||
vp9_intra_rvv.S | ||
vp9_mc_rvi.S | ||
vp9_mc_rvv.S | ||
vp9dsp_init.c | ||
vp9dsp.h |