History

lavc/vp9dsp: remove R-V I intra functions

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.

Rémi Denis-Courmont committed 2 years ago

Commit 7b24f961 parent 7aa65104 files · +1 −89Browse files

Unified · Split

4 files
  1. libavcodec/riscv/Makefile +1 −2
  2. libavcodec/riscv/vp9_intra_rvi.S +0 −74
  3. libavcodec/riscv/vp9dsp.h +0 −6
  4. libavcodec/riscv/vp9dsp_init.c +0 −7
libavcodec/riscv/Makefile+1−2
@@ -73,8 +73,7 @@ OBJS-$(CONFIG_VP8DSP) += riscv/vp8dsp_init.o · 72 unmodified lines
7373 RV-OBJS-$(CONFIG_VP8DSP) += riscv/vp8dsp_rvi.o
7474 RVV-OBJS-$(CONFIG_VP8DSP) += riscv/vp8dsp_rvv.o
7575 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
7877 RVV-OBJS-$(CONFIG_VP9_DECODER) += riscv/vp9_intra_rvv.o \
7978 riscv/vp9_mc_rvv.o
8079 OBJS-$(CONFIG_VORBIS_DECODER) += riscv/vorbisdsp_init.o
libavcodec/riscv/vp9_intra_rvi.S+0−74
@@ -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
libavcodec/riscv/vp9dsp.h+0−6
@@ -60,12 +60,6 @@ void ff_dc_129_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, · 59 unmodified lines
6060 const uint8_t *a);
6161 void ff_dc_129_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
6262 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);
6963 void ff_h_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
7064 const uint8_t *a);
7165 void ff_h_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
libavcodec/riscv/vp9dsp_init.c+0−7
@@ -74,13 +74,6 @@ static av_cold void vp9dsp_intrapred_init_riscv(VP9DSPContext *dsp, int bpp) · 73 unmodified lines
7474 #if HAVE_RV
7575 int flags = av_get_cpu_flags();
7676
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
8477 #if HAVE_RVV
8578 if (bpp == 8 && flags & AV_CPU_FLAG_RVV_I64 && ff_rv_vlen_least(128)) {
8679 dsp->intra_pred[TX_8X8][DC_PRED] = ff_dc_8x8_rvv;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t