At this point, they are identical to the C code, except for instruction ordering. In fact, they are typically slower or no faster than the C code.
Unified · Split
| @@ -73,8 +73,7 @@ OBJS-$(CONFIG_VP8DSP) += riscv/vp8dsp_init.o · 72 unmodified lines | ||
| 73 | 73 | RV-OBJS-$(CONFIG_VP8DSP) += riscv/vp8dsp_rvi.o |
| 74 | 74 | RVV-OBJS-$(CONFIG_VP8DSP) += riscv/vp8dsp_rvv.o |
| 75 | 75 | OBJS-$(CONFIG_VP9_DECODER) += riscv/vp9dsp_init.o |
| 76 | −RV-OBJS-$(CONFIG_VP9_DECODER) += riscv/vp9_intra_rvi.o \ | |
| 77 | − riscv/vp9_mc_rvi.o | |
| 76 | +RV-OBJS-$(CONFIG_VP9_DECODER) += riscv/vp9_mc_rvi.o | |
| 78 | 77 | RVV-OBJS-$(CONFIG_VP9_DECODER) += riscv/vp9_intra_rvv.o \ |
| 79 | 78 | riscv/vp9_mc_rvv.o |
| 80 | 79 | OBJS-$(CONFIG_VORBIS_DECODER) += riscv/vorbisdsp_init.o |
| @@ -1,74 +0,0 @@ | ||
| 1 | −/* | |
| 2 | − * Copyright (c) 2024 Institue of Software Chinese Academy of Sciences (ISCAS). | |
| 3 | − * | |
| 4 | − * This file is part of FFmpeg. | |
| 5 | − * | |
| 6 | − * FFmpeg is free software; you can redistribute it and/or | |
| 7 | − * modify it under the terms of the GNU Lesser General Public | |
| 8 | − * License as published by the Free Software Foundation; either | |
| 9 | − * version 2.1 of the License, or (at your option) any later version. | |
| 10 | − * | |
| 11 | − * FFmpeg is distributed in the hope that it will be useful, | |
| 12 | − * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | − * Lesser General Public License for more details. | |
| 15 | − * | |
| 16 | − * You should have received a copy of the GNU Lesser General Public | |
| 17 | − * License along with FFmpeg; if not, write to the Free Software | |
| 18 | − * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 19 | − */ | |
| 20 | − | |
| 21 | −#include "libavutil/riscv/asm.S" | |
| 22 | − | |
| 23 | −#if __riscv_xlen >= 64 | |
| 24 | −func ff_v_32x32_rvi, zba | |
| 25 | − lpad 0 | |
| 26 | − ld t0, (a3) | |
| 27 | − ld t1, 8(a3) | |
| 28 | − ld t2, 16(a3) | |
| 29 | − ld t3, 24(a3) | |
| 30 | − .rept 16 | |
| 31 | − add a7, a0, a1 | |
| 32 | − sd t0, (a0) | |
| 33 | − sd t1, 8(a0) | |
| 34 | − sd t2, 16(a0) | |
| 35 | − sd t3, 24(a0) | |
| 36 | − sh1add a0, a1, a0 | |
| 37 | − sd t0, (a7) | |
| 38 | − sd t1, 8(a7) | |
| 39 | − sd t2, 16(a7) | |
| 40 | − sd t3, 24(a7) | |
| 41 | − .endr | |
| 42 | − | |
| 43 | − ret | |
| 44 | −endfunc | |
| 45 | − | |
| 46 | −func ff_v_16x16_rvi, zba | |
| 47 | − lpad 0 | |
| 48 | − ld t0, (a3) | |
| 49 | − ld t1, 8(a3) | |
| 50 | − .rept 8 | |
| 51 | − add a7, a0, a1 | |
| 52 | − sd t0, (a0) | |
| 53 | − sd t1, 8(a0) | |
| 54 | − sh1add a0, a1, a0 | |
| 55 | − sd t0, (a7) | |
| 56 | − sd t1, 8(a7) | |
| 57 | − .endr | |
| 58 | − | |
| 59 | − ret | |
| 60 | −endfunc | |
| 61 | − | |
| 62 | −func ff_v_8x8_rvi, zba | |
| 63 | − lpad 0 | |
| 64 | − ld t0, (a3) | |
| 65 | − .rept 4 | |
| 66 | − add a7, a0, a1 | |
| 67 | − sd t0, (a0) | |
| 68 | − sh1add a0, a1, a0 | |
| 69 | − sd t0, (a7) | |
| 70 | − .endr | |
| 71 | − | |
| 72 | − ret | |
| 73 | −endfunc | |
| 74 | −#endif | |
| @@ -60,12 +60,6 @@ void ff_dc_129_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, · 59 unmodified lines | ||
| 60 | 60 | const uint8_t *a); |
| 61 | 61 | void ff_dc_129_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, |
| 62 | 62 | const uint8_t *a); |
| 63 | −void ff_v_32x32_rvi(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, | |
| 64 | − const uint8_t *a); | |
| 65 | −void ff_v_16x16_rvi(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, | |
| 66 | − const uint8_t *a); | |
| 67 | −void ff_v_8x8_rvi(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, | |
| 68 | − const uint8_t *a); | |
| 69 | 63 | void ff_h_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, |
| 70 | 64 | const uint8_t *a); |
| 71 | 65 | void ff_h_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, |
| @@ -74,13 +74,6 @@ static av_cold void vp9dsp_intrapred_init_riscv(VP9DSPContext *dsp, int bpp) · 73 unmodified lines | ||
| 74 | 74 | #if HAVE_RV |
| 75 | 75 | int flags = av_get_cpu_flags(); |
| 76 | 76 | |
| 77 | −# if __riscv_xlen >= 64 | |
| 78 | − if (bpp == 8 && (flags & AV_CPU_FLAG_RVB_ADDR)) { | |
| 79 | − dsp->intra_pred[TX_32X32][VERT_PRED] = ff_v_32x32_rvi; | |
| 80 | − dsp->intra_pred[TX_16X16][VERT_PRED] = ff_v_16x16_rvi; | |
| 81 | − dsp->intra_pred[TX_8X8][VERT_PRED] = ff_v_8x8_rvi; | |
| 82 | − } | |
| 83 | −# endif | |
| 84 | 77 | #if HAVE_RVV |
| 85 | 78 | if (bpp == 8 && flags & AV_CPU_FLAG_RVV_I64 && ff_rv_vlen_least(128)) { |
| 86 | 79 | dsp->intra_pred[TX_8X8][DC_PRED] = ff_dc_8x8_rvv; |