Benched on K230 for VLEN 128, SpaceMIT for VLEN 256. Variants for 4 width have no speedup for VLEN 256 vs VLEN 128 on available hardware, so were disabled. C RVV128 C RVV256 avg_h264_qpel_4_mc00_8 33.9 33.6 (1.01x) avg_h264_qpel_4_mc01_8 218.8 89.1 (2.46x) avg_h264_qpel_4_mc02_8 218.8 79.8 (2.74x) avg_h264_qpel_4_mc03_8 218.8 89.1 (2.46x) avg_h264_qpel_4_mc10_8 172.3 126.1 (1.37x) avg_h264_qpel_4_mc11_8 339.1 190.8 (1.78x) avg_h264_qpel_4_mc12_8 533.6 357.6 (1.49x) avg_h264_qpel_4_mc13_8 348.4 190.8 (1.83x) avg_h264_qpel_4_mc20_8 144.8 116.8 (1.24x) avg_h264_qpel_4_mc21_8 478.1 385.6 (1.24x) avg_h264_qpel_4_mc22_8 348.4 283.6 (1.23x) avg_h264_qpel_4_mc23_8 478.1 394.6 (1.21x) avg_h264_qpel_4_mc30_8 172.6 126.1 (1.37x) avg_h264_qpel_4_mc31_8 339.4 191.1 (1.78x) avg_h264_qpel_4_mc32_8 542.9 357.6 (1.52x) avg_h264_qpel_4_mc33_8 339.4 191.1 (1.78x) avg_h264_qpel_8_mc00_8 116.8 42.9 (2.72x) 123.6 50.6 (2.44x) avg_h264_qpel_8_mc01_8 774.4 163.1 (4.75x) 779.8 165.1 (4.72x) avg_h264_qpel_8_mc02_8 774.4 154.1 (5.03x) 779.8 144.3 (5.40x) avg_h264_qpel_8_mc03_8 774.4 163.3 (4.74x) 779.8 165.3 (4.72x) avg_h264_qpel_8_mc10_8 617.1 237.3 (2.60x) 613.1 227.6 (2.69x) avg_h264_qpel_8_mc11_8 1209.3 376.4 (3.21x) 1206.8 363.1 (3.32x) avg_h264_qpel_8_mc12_8 1913.3 598.6 (3.20x) 1894.3 561.1 (3.38x) avg_h264_qpel_8_mc13_8 1218.6 376.4 (3.24x) 1217.1 363.1 (3.35x) avg_h264_qpel_8_mc20_8 524.4 228.1 (2.30x) 519.3 227.6 (2.28x) avg_h264_qpel_8_mc21_8 1709.6 681.9 (2.51x) 1707.1 644.3 (2.65x) avg_h264_qpel_8_mc22_8 1274.3 459.6 (2.77x) 1279.8 436.1 (2.93x) avg_h264_qpel_8_mc23_8 1700.3 672.6 (2.53x) 1706.8 644.6 (2.65x) avg_h264_qpel_8_mc30_8 607.6 246.6 (2.46x) 623.6 238.1 (2.62x) avg_h264_qpel_8_mc31_8 1209.6 376.4 (3.21x) 1206.8 363.1 (3.32x) avg_h264_qpel_8_mc32_8 1904.1 607.9 (3.13x) 1894.3 571.3 (3.32x) avg_h264_qpel_8_mc33_8 1209.6 376.1 (3.22x) 1206.8 363.1 (3.32x) avg_h264_qpel_16_mc00_8 431.9 89.1 (4.85x) 436.1 71.3 (6.12x) avg_h264_qpel_16_mc01_8 2894.6 376.1 (7.70x) 2842.3 300.6 (9.46x) avg_h264_qpel_16_mc02_8 2987.3 348.4 (8.57x) 2967.3 290.1 (10.23x) avg_h264_qpel_16_mc03_8 2885.3 376.4 (7.67x) 2842.3 300.6 (9.46x) avg_h264_qpel_16_mc10_8 2404.1 524.4 (4.58x) 2404.8 456.8 (5.26x) avg_h264_qpel_16_mc11_8 4709.4 811.6 (5.80x) 4675.6 706.8 (6.62x) avg_h264_qpel_16_mc12_8 7477.9 1274.3 (5.87x) 7436.1 1061.1 (7.01x) avg_h264_qpel_16_mc13_8 4718.6 820.6 (5.75x) 4655.1 706.8 (6.59x) avg_h264_qpel_16_mc20_8 2052.1 487.1 (4.21x) 2071.3 446.3 (4.64x) avg_h264_qpel_16_mc21_8 7440.6 1422.6 (5.23x) 6727.8 1217.3 (5.53x) avg_h264_qpel_16_mc22_8 5051.9 950.4 (5.32x) 5071.6 790.3 (6.42x) avg_h264_qpel_16_mc23_8 6764.9 1422.3 (4.76x) 6748.6 1217.3 (5.54x) avg_h264_qpel_16_mc30_8 2413.1 524.4 (4.60x) 2415.1 467.3 (5.17x) avg_h264_qpel_16_mc31_8 4681.6 839.1 (5.58x) 4675.6 727.6 (6.43x) avg_h264_qpel_16_mc32_8 8579.6 1292.8 (6.64x) 7436.3 1071.3 (6.94x) avg_h264_qpel_16_mc33_8 5375.9 829.9 (6.48x) 4665.3 717.3 (6.50x) put_h264_qpel_4_mc00_8 24.4 24.4 (1.00x) put_h264_qpel_4_mc01_8 987.4 79.8 (12.37x) put_h264_qpel_4_mc02_8 190.8 79.8 (2.39x) put_h264_qpel_4_mc03_8 209.6 89.1 (2.35x) put_h264_qpel_4_mc10_8 163.3 117.1 (1.39x) put_h264_qpel_4_mc11_8 339.4 181.6 (1.87x) put_h264_qpel_4_mc12_8 533.6 348.4 (1.53x) put_h264_qpel_4_mc13_8 339.4 190.8 (1.78x) put_h264_qpel_4_mc20_8 126.3 116.8 (1.08x) put_h264_qpel_4_mc21_8 468.9 376.1 (1.25x) put_h264_qpel_4_mc22_8 330.1 274.4 (1.20x) put_h264_qpel_4_mc23_8 468.9 376.1 (1.25x) put_h264_qpel_4_mc30_8 163.3 126.3 (1.29x) put_h264_qpel_4_mc31_8 339.1 191.1 (1.77x) put_h264_qpel_4_mc32_8 533.6 348.4 (1.53x) put_h264_qpel_4_mc33_8 339.4 181.8 (1.87x) put_h264_qpel_8_mc00_8 98.6 33.6 (2.93x) 92.3 40.1 (2.30x) put_h264_qpel_8_mc01_8 737.1 153.8 (4.79x) 738.1 144.3 (5.12x) put_h264_qpel_8_mc02_8 663.1 135.3 (4.90x) 665.1 134.1 (4.96x) put_h264_qpel_8_mc03_8 737.4 154.1 (4.79x) 1508.8 144.3 (10.46x) put_h264_qpel_8_mc10_8 598.4 237.1 (2.52x) 592.3 227.6 (2.60x) put_h264_qpel_8_mc11_8 1172.3 357.9 (3.28x) 1175.6 342.3 (3.43x) put_h264_qpel_8_mc12_8 1867.1 589.1 (3.17x) 1863.1 561.1 (3.32x) put_h264_qpel_8_mc13_8 1172.6 366.9 (3.20x) 1175.6 352.8 (3.33x) put_h264_qpel_8_mc20_8 450.4 218.8 (2.06x) 446.3 206.8 (2.16x) put_h264_qpel_8_mc21_8 1672.3 663.1 (2.52x) 1675.6 633.8 (2.64x) put_h264_qpel_8_mc22_8 1144.6 1200.1 (0.95x) 1144.3 425.6 (2.69x) put_h264_qpel_8_mc23_8 1672.6 672.4 (2.49x) 1665.3 634.1 (2.63x) put_h264_qpel_8_mc30_8 598.6 237.3 (2.52x) 613.1 227.6 (2.69x) put_h264_qpel_8_mc31_8 1172.3 376.1 (3.12x) 1175.6 352.6 (3.33x) put_h264_qpel_8_mc32_8 1857.8 598.6 (3.10x) 1863.1 561.1 (3.32x) put_h264_qpel_8_mc33_8 1172.3 376.1 (3.12x) 1175.6 352.8 (3.33x) put_h264_qpel_16_mc00_8 320.6 61.4 (5.22x) 321.3 60.8 (5.28x) put_h264_qpel_16_mc01_8 2774.3 339.1 (8.18x) 2759.1 279.8 (9.86x) put_h264_qpel_16_mc02_8 2589.1 320.6 (8.08x) 2571.6 269.3 (9.55x) put_h264_qpel_16_mc03_8 2774.3 339.4 (8.17x) 2738.1 290.1 (9.44x) put_h264_qpel_16_mc10_8 2274.3 487.4 (4.67x) 2290.1 436.1 (5.25x) put_h264_qpel_16_mc11_8 5237.1 792.9 (6.60x) 4529.8 685.8 (6.61x) put_h264_qpel_16_mc12_8 7357.6 1255.8 (5.86x) 7352.8 1040.1 (7.07x) put_h264_qpel_16_mc13_8 4579.9 792.9 (5.78x) 4571.6 686.1 (6.66x) put_h264_qpel_16_mc20_8 1802.1 459.6 (3.92x) 1800.6 425.6 (4.23x) put_h264_qpel_16_mc21_8 6644.6 2246.6 (2.96x) 6644.3 1196.6 (5.55x) put_h264_qpel_16_mc22_8 4589.1 913.4 (5.02x) 4592.3 769.3 (5.97x) put_h264_qpel_16_mc23_8 6644.6 1394.6 (4.76x) 6634.1 1196.6 (5.54x) put_h264_qpel_16_mc30_8 2274.3 496.6 (4.58x) 2290.1 456.8 (5.01x) put_h264_qpel_16_mc31_8 5255.6 802.1 (6.55x) 4550.8 706.8 (6.44x) put_h264_qpel_16_mc32_8 7376.1 1265.1 (5.83x) 7352.8 1050.6 (7.00x) put_h264_qpel_16_mc33_8 4579.9 802.1 (5.71x) 4561.1 696.3 (6.55x)
Unified · Split
| @@ -102,6 +102,8 @@ av_cold void ff_h264qpel_init(H264QpelContext *c, int bit_depth) · 101 unmodified lines | ||
| 102 | 102 | ff_h264qpel_init_arm(c, bit_depth); |
| 103 | 103 | #elif ARCH_PPC |
| 104 | 104 | ff_h264qpel_init_ppc(c, bit_depth); |
| 105 | +#elif ARCH_RISCV | |
| 106 | + ff_h264qpel_init_riscv(c, bit_depth); | |
| 105 | 107 | #elif ARCH_X86 |
| 106 | 108 | ff_h264qpel_init_x86(c, bit_depth); |
| 107 | 109 | #elif ARCH_MIPS |
| @@ -34,6 +34,7 @@ void ff_h264qpel_init(H264QpelContext *c, int bit_depth); · 33 unmodified lines | ||
| 34 | 34 | void ff_h264qpel_init_aarch64(H264QpelContext *c, int bit_depth); |
| 35 | 35 | void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth); |
| 36 | 36 | void ff_h264qpel_init_ppc(H264QpelContext *c, int bit_depth); |
| 37 | +void ff_h264qpel_init_riscv(H264QpelContext *c, int bit_depth); | |
| 37 | 38 | void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth); |
| 38 | 39 | void ff_h264qpel_init_mips(H264QpelContext *c, int bit_depth); |
| 39 | 40 | void ff_h264qpel_init_loongarch(H264QpelContext *c, int bit_depth); |
| @@ -33,6 +33,8 @@ RVV-OBJS-$(CONFIG_H264CHROMA) += riscv/h264_mc_chroma.o · 32 unmodified lines | ||
| 33 | 33 | OBJS-$(CONFIG_H264DSP) += riscv/h264dsp_init.o |
| 34 | 34 | RVV-OBJS-$(CONFIG_H264DSP) += riscv/h264addpx_rvv.o riscv/h264dsp_rvv.o \ |
| 35 | 35 | riscv/h264idct_rvv.o |
| 36 | +OBJS-$(CONFIG_H264QPEL) += riscv/h264qpel_init.o | |
| 37 | +RVV-OBJS-$(CONFIG_H264QPEL) += riscv/h264qpel_rvv.o | |
| 36 | 38 | OBJS-$(CONFIG_HUFFYUV_DECODER) += riscv/huffyuvdsp_init.o |
| 37 | 39 | RVV-OBJS-$(CONFIG_HUFFYUV_DECODER) += riscv/huffyuvdsp_rvv.o |
| 38 | 40 | OBJS-$(CONFIG_IDCTDSP) += riscv/idctdsp_init.o |
| @@ -0,0 +1,113 @@ | ||
| 1 | +/* | |
| 2 | + * RISC-V optimised DSP functions | |
| 3 | + * Copyright (c) 2024 Niklas Haas | |
| 4 | + * | |
| 5 | + * This file is part of FFmpeg. | |
| 6 | + * | |
| 7 | + * FFmpeg is free software; you can redistribute it and/or | |
| 8 | + * modify it under the terms of the GNU Lesser General Public | |
| 9 | + * License as published by the Free Software Foundation; either | |
| 10 | + * version 2.1 of the License, or (at your option) any later version. | |
| 11 | + * | |
| 12 | + * FFmpeg is distributed in the hope that it will be useful, | |
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 15 | + * Lesser General Public License for more details. | |
| 16 | + * | |
| 17 | + * You should have received a copy of the GNU Lesser General Public | |
| 18 | + * License along with FFmpeg; if not, write to the Free Software | |
| 19 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 20 | + */ | |
| 21 | + | |
| 22 | +#include <stdint.h> | |
| 23 | + | |
| 24 | +#include "config.h" | |
| 25 | +#include "libavutil/attributes.h" | |
| 26 | +#include "libavutil/riscv/cpu.h" | |
| 27 | +#include "libavcodec/h264qpel.h" | |
| 28 | + | |
| 29 | +#define DECL_QPEL_OPS(OP, SIZE, EXT) \ | |
| 30 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc00_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 31 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc10_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 32 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc20_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 33 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc30_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 34 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc01_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 35 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc11_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 36 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc21_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 37 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc31_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 38 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc02_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 39 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc12_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 40 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc22_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 41 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc32_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 42 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc03_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 43 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc13_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 44 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc23_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); \ | |
| 45 | +void ff_ ## OP ## _h264_qpel ## SIZE ## _mc33_ ## EXT(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); | |
| 46 | + | |
| 47 | +DECL_QPEL_OPS(put, 16, rvv256) | |
| 48 | +DECL_QPEL_OPS(put, 8, rvv256) | |
| 49 | +// DECL_QPEL_OPS(put, 4, rvv256) | |
| 50 | + | |
| 51 | +DECL_QPEL_OPS(avg, 16, rvv256) | |
| 52 | +DECL_QPEL_OPS(avg, 8, rvv256) | |
| 53 | +// DECL_QPEL_OPS(avg, 4, rvv256) | |
| 54 | + | |
| 55 | +DECL_QPEL_OPS(put, 16, rvv) | |
| 56 | +DECL_QPEL_OPS(put, 8, rvv) | |
| 57 | +DECL_QPEL_OPS(put, 4, rvv) | |
| 58 | + | |
| 59 | +DECL_QPEL_OPS(avg, 16, rvv) | |
| 60 | +DECL_QPEL_OPS(avg, 8, rvv) | |
| 61 | +DECL_QPEL_OPS(avg, 4, rvv) | |
| 62 | + | |
| 63 | +#define SET_QPEL_FNS(OP, IDX, SIZE, EXT) \ | |
| 64 | +do { \ | |
| 65 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 0] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc00_ ## EXT; \ | |
| 66 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 1] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc10_ ## EXT; \ | |
| 67 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 2] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc20_ ## EXT; \ | |
| 68 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 3] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc30_ ## EXT; \ | |
| 69 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 4] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc01_ ## EXT; \ | |
| 70 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 5] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc11_ ## EXT; \ | |
| 71 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 6] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc21_ ## EXT; \ | |
| 72 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 7] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc31_ ## EXT; \ | |
| 73 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 8] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc02_ ## EXT; \ | |
| 74 | + c->OP ## _h264_qpel_pixels_tab[IDX][ 9] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc12_ ## EXT; \ | |
| 75 | + c->OP ## _h264_qpel_pixels_tab[IDX][10] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc22_ ## EXT; \ | |
| 76 | + c->OP ## _h264_qpel_pixels_tab[IDX][11] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc32_ ## EXT; \ | |
| 77 | + c->OP ## _h264_qpel_pixels_tab[IDX][12] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc03_ ## EXT; \ | |
| 78 | + c->OP ## _h264_qpel_pixels_tab[IDX][13] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc13_ ## EXT; \ | |
| 79 | + c->OP ## _h264_qpel_pixels_tab[IDX][14] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc23_ ## EXT; \ | |
| 80 | + c->OP ## _h264_qpel_pixels_tab[IDX][15] = ff_ ## OP ## _h264_qpel ## SIZE ## _mc33_ ## EXT; \ | |
| 81 | +} while (0) | |
| 82 | + | |
| 83 | +av_cold void ff_h264qpel_init_riscv(H264QpelContext *c, int bit_depth) | |
| 84 | +{ | |
| 85 | +#if HAVE_RVV | |
| 86 | + int flags = av_get_cpu_flags(); | |
| 87 | + if (flags & AV_CPU_FLAG_RVV_I32) { | |
| 88 | + const int vlen = 8 * ff_get_rv_vlenb(); | |
| 89 | + | |
| 90 | + switch (bit_depth) { | |
| 91 | + case 8: | |
| 92 | + if (vlen >= 256) { | |
| 93 | + SET_QPEL_FNS(put, 0, 16, rvv256); | |
| 94 | + SET_QPEL_FNS(put, 1, 8, rvv256); | |
| 95 | + SET_QPEL_FNS(put, 2, 4, rvv); | |
| 96 | + | |
| 97 | + SET_QPEL_FNS(avg, 0, 16, rvv256); | |
| 98 | + SET_QPEL_FNS(avg, 1, 8, rvv256); | |
| 99 | + SET_QPEL_FNS(avg, 2, 4, rvv); | |
| 100 | + } else if (vlen >= 128) { | |
| 101 | + SET_QPEL_FNS(put, 0, 16, rvv); | |
| 102 | + SET_QPEL_FNS(put, 1, 8, rvv); | |
| 103 | + SET_QPEL_FNS(put, 2, 4, rvv); | |
| 104 | + | |
| 105 | + SET_QPEL_FNS(avg, 0, 16, rvv); | |
| 106 | + SET_QPEL_FNS(avg, 1, 8, rvv); | |
| 107 | + SET_QPEL_FNS(avg, 2, 4, rvv); | |
| 108 | + } | |
| 109 | + break; | |
| 110 | + } | |
| 111 | + } | |
| 112 | +#endif | |
| 113 | +} | |
| @@ -0,0 +1,464 @@ | ||
| 1 | +/* | |
| 2 | + * SPDX-License-Identifier: BSD-2-Clause | |
| 3 | + * | |
| 4 | + * Copyright (c) 2024 Niklas Haas | |
| 5 | + * | |
| 6 | + * Redistribution and use in source and binary forms, with or without | |
| 7 | + * modification, are permitted provided that the following conditions are met: | |
| 8 | + * | |
| 9 | + * 1. Redistributions of source code must retain the above copyright notice, | |
| 10 | + * this list of conditions and the following disclaimer. | |
| 11 | + * | |
| 12 | + * 2. Redistributions in binary form must reproduce the above copyright notice, | |
| 13 | + * this list of conditions and the following disclaimer in the documentation | |
| 14 | + * and/or other materials provided with the distribution. | |
| 15 | + * | |
| 16 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
| 17 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 18 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
| 19 | + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | |
| 20 | + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
| 21 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 22 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
| 23 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
| 24 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 25 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 26 | + * POSSIBILITY OF SUCH DAMAGE. | |
| 27 | + */ | |
| 28 | + | |
| 29 | +#include "libavutil/riscv/asm.S" | |
| 30 | + | |
| 31 | +.macro lx rd, addr | |
| 32 | +#if (__riscv_xlen == 32) | |
| 33 | + lw \rd, \addr | |
| 34 | +#elif (__riscv_xlen == 64) | |
| 35 | + ld \rd, \addr | |
| 36 | +#else | |
| 37 | + lq \rd, \addr | |
| 38 | +#endif | |
| 39 | +.endm | |
| 40 | + | |
| 41 | +.macro sx rd, addr | |
| 42 | +#if (__riscv_xlen == 32) | |
| 43 | + sw \rd, \addr | |
| 44 | +#elif (__riscv_xlen == 64) | |
| 45 | + sd \rd, \addr | |
| 46 | +#else | |
| 47 | + sq \rd, \addr | |
| 48 | +#endif | |
| 49 | +.endm | |
| 50 | + | |
| 51 | + /* output is unclipped; clobbers v26-v31 plus t0 and t02 */ | |
| 52 | +.macro lowpass_h vdst, src | |
| 53 | + addi t4, \src, 3 | |
| 54 | + lbu t5, 2(\src) | |
| 55 | + vle8.v v31, (t4) | |
| 56 | + lbu t4, 1(\src) | |
| 57 | + vslide1up.vx v30, v31, t5 | |
| 58 | + lbu t5, 0(\src) | |
| 59 | + vslide1up.vx v29, v30, t4 | |
| 60 | + lbu t4, -1(\src) | |
| 61 | + vslide1up.vx v28, v29, t5 | |
| 62 | + lbu t5, -2(\src) | |
| 63 | + vslide1up.vx v27, v28, t4 | |
| 64 | + vslide1up.vx v26, v27, t5 | |
| 65 | + vwaddu.vv \vdst, v26, v31 | |
| 66 | + vwmaccu.vx \vdst, t6, v28 | |
| 67 | + vwmaccu.vx \vdst, t6, v29 | |
| 68 | + vwmaccsu.vx \vdst, a7, v27 | |
| 69 | + vwmaccsu.vx \vdst, a7, v30 | |
| 70 | +.endm | |
| 71 | + | |
| 72 | + /* output is unclipped */ | |
| 73 | +.macro lowpass_v vdst, vsrc0, vsrc1, vsrc2, vsrc3, vsrc4, vsrc5, signed=0 | |
| 74 | + .if \signed | |
| 75 | + vwadd.vv \vdst, \vsrc0, \vsrc5 | |
| 76 | + vwmacc.vx \vdst, t6, \vsrc2 | |
| 77 | + vwmacc.vx \vdst, t6, \vsrc3 | |
| 78 | + vwmacc.vx \vdst, a7, \vsrc1 | |
| 79 | + vwmacc.vx \vdst, a7, \vsrc4 | |
| 80 | + .else | |
| 81 | + vwaddu.vv \vdst, \vsrc0, \vsrc5 | |
| 82 | + vwmaccu.vx \vdst, t6, \vsrc2 | |
| 83 | + vwmaccu.vx \vdst, t6, \vsrc3 | |
| 84 | + vwmaccsu.vx \vdst, a7, \vsrc1 | |
| 85 | + vwmaccsu.vx \vdst, a7, \vsrc4 | |
| 86 | + .endif | |
| 87 | +.endm | |
| 88 | + | |
| 89 | +.macro qpel_mc00 op, dst, src, stride, size | |
| 90 | +func ff_\op\()_h264_qpel_pixels, zve32x | |
| 91 | +1: add t1, a2, a1 | |
| 92 | + add t2, a2, t1 | |
| 93 | + add t3, a2, t2 | |
| 94 | + vle8.v v0, (a1) | |
| 95 | + vle8.v v1, (t1) | |
| 96 | + vle8.v v2, (t2) | |
| 97 | + vle8.v v3, (t3) | |
| 98 | + addi a4, a4, -4 | |
| 99 | + add a1, a2, t3 | |
| 100 | + add t1, a2, a0 | |
| 101 | + add t2, a2, t1 | |
| 102 | + add t3, a2, t2 | |
| 103 | + .ifc \op, avg | |
| 104 | + vle8.v v4, (a0) | |
| 105 | + vle8.v v5, (t1) | |
| 106 | + vle8.v v6, (t2) | |
| 107 | + vle8.v v7, (t3) | |
| 108 | + vaaddu.vv v0, v0, v4 | |
| 109 | + vaaddu.vv v1, v1, v5 | |
| 110 | + vaaddu.vv v2, v2, v6 | |
| 111 | + vaaddu.vv v3, v3, v7 | |
| 112 | + .endif | |
| 113 | + vse8.v v0, (a0) | |
| 114 | + vse8.v v1, (t1) | |
| 115 | + vse8.v v2, (t2) | |
| 116 | + vse8.v v3, (t3) | |
| 117 | + add a0, a2, t3 | |
| 118 | + bnez a4, 1b | |
| 119 | + jr t0 | |
| 120 | +endfunc | |
| 121 | +.endm | |
| 122 | + | |
| 123 | + qpel_mc00 put, a0, a1, a2, a4 | |
| 124 | + qpel_mc00 avg, a0, a1, a2, a4 | |
| 125 | + | |
| 126 | +.macro qpel_lowpass op, ext, lmul, lmul2 | |
| 127 | +func ff_\op\()_h264_qpel_h_lowpass_\lmul\ext, zve32x | |
| 128 | +1: add t1, a3, a1 | |
| 129 | + add t2, a3, t1 | |
| 130 | + add t3, a3, t2 | |
| 131 | + lowpass_h v0, a1 | |
| 132 | + lowpass_h v2, t1 | |
| 133 | + lowpass_h v4, t2 | |
| 134 | + lowpass_h v6, t3 | |
| 135 | + add a1, a3, t3 | |
| 136 | + addi a4, a4, -4 | |
| 137 | + vsetvli zero, zero, e16, \lmul2, ta, ma | |
| 138 | + vmax.vx v0, v0, zero | |
| 139 | + vmax.vx v2, v2, zero | |
| 140 | + vmax.vx v4, v4, zero | |
| 141 | + vmax.vx v6, v6, zero | |
| 142 | + vsetvli zero, zero, e8, \lmul, ta, ma | |
| 143 | + vnclipu.wi v0, v0, 5 | |
| 144 | + vnclipu.wi v2, v2, 5 | |
| 145 | + vnclipu.wi v4, v4, 5 | |
| 146 | + vnclipu.wi v6, v6, 5 | |
| 147 | + .ifc \ext, _l2 | |
| 148 | + add t1, a6, a5 | |
| 149 | + add t2, a6, t1 | |
| 150 | + add t3, a6, t2 | |
| 151 | + vle8.v v8, (a5) | |
| 152 | + vle8.v v10, (t1) | |
| 153 | + vle8.v v12, (t2) | |
| 154 | + vle8.v v14, (t3) | |
| 155 | + add a5, a2, t3 | |
| 156 | + vaaddu.vv v0, v0, v8 | |
| 157 | + vaaddu.vv v2, v2, v10 | |
| 158 | + vaaddu.vv v4, v4, v12 | |
| 159 | + vaaddu.vv v6, v6, v14 | |
| 160 | + .endif | |
| 161 | + add t1, a2, a0 | |
| 162 | + add t2, a2, t1 | |
| 163 | + add t3, a2, t2 | |
| 164 | + .ifc \op, avg | |
| 165 | + vle8.v v1, (a0) | |
| 166 | + vle8.v v3, (t1) | |
| 167 | + vle8.v v5, (t2) | |
| 168 | + vle8.v v7, (t3) | |
| 169 | + vaaddu.vv v0, v0, v1 | |
| 170 | + vaaddu.vv v2, v2, v3 | |
| 171 | + vaaddu.vv v4, v4, v5 | |
| 172 | + vaaddu.vv v6, v6, v7 | |
| 173 | + .endif | |
| 174 | + vse8.v v0, (a0) | |
| 175 | + vse8.v v2, (t1) | |
| 176 | + vse8.v v4, (t2) | |
| 177 | + vse8.v v6, (t3) | |
| 178 | + add a0, a2, t3 | |
| 179 | + bnez a4, 1b | |
| 180 | + jr t0 | |
| 181 | +endfunc | |
| 182 | + | |
| 183 | +func ff_\op\()_h264_qpel_v_lowpass_\lmul\ext, zve32x | |
| 184 | + sub t1, a1, a3 | |
| 185 | + sub t2, t1, a3 | |
| 186 | + vle8.v v2, (a1) | |
| 187 | + vle8.v v1, (t1) | |
| 188 | + vle8.v v0, (t2) | |
| 189 | + add t1, a1, a3 | |
| 190 | + add t2, t1, a3 | |
| 191 | + add a1, t2, a3 | |
| 192 | + vle8.v v3, (t1) | |
| 193 | + vle8.v v4, (t2) | |
| 194 | +1: add t1, a3, a1 | |
| 195 | + add t2, a3, t1 | |
| 196 | + add t3, a3, t2 | |
| 197 | + vle8.v v5, (a1) | |
| 198 | + vle8.v v6, (t1) | |
| 199 | + vle8.v v7, (t2) | |
| 200 | + vle8.v v8, (t3) | |
| 201 | + add a1, a3, t3 | |
| 202 | + lowpass_v v24, v0, v1, v2, v3, v4, v5 | |
| 203 | + lowpass_v v26, v1, v2, v3, v4, v5, v6 | |
| 204 | + lowpass_v v28, v2, v3, v4, v5, v6, v7 | |
| 205 | + lowpass_v v30, v3, v4, v5, v6, v7, v8 | |
| 206 | + addi a4, a4, -4 | |
| 207 | + vsetvli zero, zero, e16, \lmul2, ta, ma | |
| 208 | + vmax.vx v24, v24, zero | |
| 209 | + vmax.vx v26, v26, zero | |
| 210 | + vmax.vx v28, v28, zero | |
| 211 | + vmax.vx v30, v30, zero | |
| 212 | + vsetvli zero, zero, e8, \lmul, ta, ma | |
| 213 | + vnclipu.wi v24, v24, 5 | |
| 214 | + vnclipu.wi v26, v26, 5 | |
| 215 | + vnclipu.wi v28, v28, 5 | |
| 216 | + vnclipu.wi v30, v30, 5 | |
| 217 | + .ifc \ext, _l2 | |
| 218 | + add t1, a6, a5 | |
| 219 | + add t2, a6, t1 | |
| 220 | + add t3, a6, t2 | |
| 221 | + vle8.v v9, (a5) | |
| 222 | + vle8.v v10, (t1) | |
| 223 | + vle8.v v11, (t2) | |
| 224 | + vle8.v v12, (t3) | |
| 225 | + add a5, a6, t3 | |
| 226 | + vaaddu.vv v24, v24, v9 | |
| 227 | + vaaddu.vv v26, v26, v10 | |
| 228 | + vaaddu.vv v28, v28, v11 | |
| 229 | + vaaddu.vv v30, v30, v12 | |
| 230 | + .endif | |
| 231 | + add t1, a2, a0 | |
| 232 | + add t2, a2, t1 | |
| 233 | + add t3, a2, t2 | |
| 234 | + .ifc \op, avg | |
| 235 | + vle8.v v9, (a0) | |
| 236 | + vle8.v v10, (t1) | |
| 237 | + vle8.v v11, (t2) | |
| 238 | + vle8.v v12, (t3) | |
| 239 | + vaaddu.vv v24, v24, v9 | |
| 240 | + vaaddu.vv v26, v26, v10 | |
| 241 | + vaaddu.vv v28, v28, v11 | |
| 242 | + vaaddu.vv v30, v30, v12 | |
| 243 | + .endif | |
| 244 | + vse8.v v24, (a0) | |
| 245 | + vse8.v v26, (t1) | |
| 246 | + vse8.v v28, (t2) | |
| 247 | + vse8.v v30, (t3) | |
| 248 | + add a0, a2, t3 | |
| 249 | + vmv.v.v v0, v4 | |
| 250 | + vmv.v.v v1, v5 | |
| 251 | + vmv.v.v v2, v6 | |
| 252 | + vmv.v.v v3, v7 | |
| 253 | + vmv.v.v v4, v8 | |
| 254 | + bnez a4, 1b | |
| 255 | + jr t0 | |
| 256 | +endfunc | |
| 257 | + | |
| 258 | +func ff_\op\()_h264_qpel_hv_lowpass_\lmul\ext, zve32x | |
| 259 | + sub t1, a1, a3 | |
| 260 | + sub t2, t1, a3 | |
| 261 | + lowpass_h v4, a1 | |
| 262 | + lowpass_h v2, t1 | |
| 263 | + lowpass_h v0, t2 | |
| 264 | + add t1, a1, a3 | |
| 265 | + add t2, t1, a3 | |
| 266 | + add a1, t2, a3 | |
| 267 | + lowpass_h v6, t1 | |
| 268 | + lowpass_h v8, t2 | |
| 269 | +1: add t1, a3, a1 | |
| 270 | + add t2, a3, t1 | |
| 271 | + add t3, a3, t2 | |
| 272 | + lowpass_h v10, a1 | |
| 273 | + lowpass_h v12, t1 | |
| 274 | + lowpass_h v14, t2 | |
| 275 | + lowpass_h v16, t3 | |
| 276 | + vsetvli zero, zero, e16, \lmul2, ta, ma | |
| 277 | + addi a4, a4, -4 | |
| 278 | + lowpass_v v20, v0, v2, v4, v6, v8, v10, signed=1 | |
| 279 | + lowpass_v v24, v2, v4, v6, v8, v10, v12, signed=1 | |
| 280 | + lowpass_v v28, v4, v6, v8, v10, v12, v14, signed=1 | |
| 281 | + vnclip.wi v0, v20, 10 | |
| 282 | + lowpass_v v20, v6, v8, v10, v12, v14, v16, signed=1 | |
| 283 | + vnclip.wi v2, v24, 10 | |
| 284 | + vnclip.wi v4, v28, 10 | |
| 285 | + vnclip.wi v6, v20, 10 | |
| 286 | + vmax.vx v18, v0, zero | |
| 287 | + vmax.vx v20, v2, zero | |
| 288 | + vmax.vx v22, v4, zero | |
| 289 | + vmax.vx v24, v6, zero | |
| 290 | + vmv.v.v v0, v8 | |
| 291 | + vmv.v.v v2, v10 | |
| 292 | + vmv.v.v v4, v12 | |
| 293 | + vmv.v.v v6, v14 | |
| 294 | + vmv.v.v v8, v16 | |
| 295 | + add a1, a3, t3 | |
| 296 | + vsetvli zero, zero, e8, \lmul, ta, ma | |
| 297 | + vnclipu.wi v18, v18, 0 | |
| 298 | + vnclipu.wi v20, v20, 0 | |
| 299 | + vnclipu.wi v22, v22, 0 | |
| 300 | + vnclipu.wi v24, v24, 0 | |
| 301 | + .ifc \ext, _l2 | |
| 302 | + add t1, a6, a5 | |
| 303 | + add t2, a6, t1 | |
| 304 | + add t3, a6, t2 | |
| 305 | + vle8.v v26, (a5) | |
| 306 | + vle8.v v27, (t1) | |
| 307 | + vle8.v v28, (t2) | |
| 308 | + vle8.v v29, (t3) | |
| 309 | + add a5, a6, t3 | |
| 310 | + vaaddu.vv v18, v18, v26 | |
| 311 | + vaaddu.vv v20, v20, v27 | |
| 312 | + vaaddu.vv v22, v22, v28 | |
| 313 | + vaaddu.vv v24, v24, v29 | |
| 314 | + .endif | |
| 315 | + add t1, a2, a0 | |
| 316 | + add t2, a2, t1 | |
| 317 | + add t3, a2, t2 | |
| 318 | + .ifc \op, avg | |
| 319 | + vle8.v v26, (a0) | |
| 320 | + vle8.v v27, (t1) | |
| 321 | + vle8.v v28, (t2) | |
| 322 | + vle8.v v29, (t3) | |
| 323 | + vaaddu.vv v18, v18, v26 | |
| 324 | + vaaddu.vv v20, v20, v27 | |
| 325 | + vaaddu.vv v22, v22, v28 | |
| 326 | + vaaddu.vv v24, v24, v29 | |
| 327 | + .endif | |
| 328 | + vse8.v v18, (a0) | |
| 329 | + vse8.v v20, (t1) | |
| 330 | + vse8.v v22, (t2) | |
| 331 | + vse8.v v24, (t3) | |
| 332 | + add a0, a2, t3 | |
| 333 | + bnez a4, 1b | |
| 334 | + jr t0 | |
| 335 | +endfunc | |
| 336 | +.endm | |
| 337 | + | |
| 338 | +/* Note: We could possibly specialize for the width 8 / width 4 cases by | |
| 339 | + loading 32 bit integers, but this makes the convolutions more complicated | |
| 340 | + to implement, so it's not necessarily any faster. */ | |
| 341 | + | |
| 342 | +.macro h264_qpel lmul, lmul2 | |
| 343 | + qpel_lowpass put, , \lmul, \lmul2 | |
| 344 | + qpel_lowpass put, _l2, \lmul, \lmul2 | |
| 345 | + qpel_lowpass avg, , \lmul, \lmul2 | |
| 346 | + qpel_lowpass avg, _l2, \lmul, \lmul2 | |
| 347 | +.endm | |
| 348 | + | |
| 349 | + h264_qpel m1, m2 | |
| 350 | + h264_qpel mf2, m1 | |
| 351 | + h264_qpel mf4, mf2 | |
| 352 | + h264_qpel mf8, mf4 | |
| 353 | + | |
| 354 | +.macro h264_qpel_1pass op, case, lmul, size, ext=rvv, dir, offset | |
| 355 | +func ff_\op\()_h264_qpel\size\()_\case\()_\ext, zve32x | |
| 356 | + lpad 0 | |
| 357 | + vsetivli zero, \size, e8, \lmul, ta, ma | |
| 358 | + csrwi vxrm, 0 | |
| 359 | + li a4, \size | |
| 360 | + li t6, 20 | |
| 361 | + li a7, -5 | |
| 362 | + mv a3, a2 | |
| 363 | + mv t0, ra | |
| 364 | +.ifnb \offset | |
| 365 | + .ifc \dir, v | |
| 366 | + add a5, a1, \offset | |
| 367 | + .else | |
| 368 | + addi a5, a1, \offset | |
| 369 | + .endif | |
| 370 | + mv a6, a3 | |
| 371 | + j ff_\op\()_h264_qpel_\dir\()_lowpass_\lmul\()_l2 | |
| 372 | +.else | |
| 373 | + j ff_\op\()_h264_qpel_\dir\()_lowpass_\lmul\() | |
| 374 | +.endif | |
| 375 | +endfunc | |
| 376 | +.endm | |
| 377 | + | |
| 378 | +.macro h264_qpel_2pass op, case, lmul, size, ext=rvv, dir1, dir2, off1=0, off2 | |
| 379 | +func ff_\op\()_h264_qpel\size\()_\case\()_\ext, zve32x | |
| 380 | + lpad 0 | |
| 381 | + vsetivli zero, \size, e8, \lmul, ta, ma | |
| 382 | + csrwi vxrm, 0 | |
| 383 | + addi sp, sp, (-(__riscv_xlen >> 2)) | |
| 384 | + li a4, \size | |
| 385 | + li t6, 20 | |
| 386 | + li a7, -5 | |
| 387 | + sx a0, 0(sp) | |
| 388 | + sx a1, (__riscv_xlen >> 3)(sp) | |
| 389 | + .ifc \off1, a2 | |
| 390 | + add a1, a1, \off1 | |
| 391 | + .elseif \off1 | |
| 392 | + addi a1, a1, \off1 | |
| 393 | + .endif | |
| 394 | + mv a3, a2 | |
| 395 | + .ifc \op, avg | |
| 396 | + // Use temporary array on stack for the first pass | |
| 397 | + addi a0, sp, -(\size * \size) | |
| 398 | + li a2, \size | |
| 399 | + .endif | |
| 400 | + jal t0, ff_put_h264_qpel_\dir1\()_lowpass_\lmul | |
| 401 | + lx a0, 0(sp) | |
| 402 | + lx a1, (__riscv_xlen >> 3)(sp) | |
| 403 | + .ifc \op, put | |
| 404 | + // Directly reuse the first pass output buffer | |
| 405 | + mv a5, a0 | |
| 406 | + mv a6, a2 | |
| 407 | + .else | |
| 408 | + addi a5, sp, -(\size * \size) | |
| 409 | + li a6, \size | |
| 410 | + mv a2, a3 | |
| 411 | + .endif | |
| 412 | + .ifnb \off2 | |
| 413 | + addi a1, a1, \off2 | |
| 414 | + .endif | |
| 415 | + li a4, \size | |
| 416 | + mv t0, ra | |
| 417 | + addi sp, sp, 16 | |
| 418 | + j ff_\op\()_h264_qpel_\dir2\()_lowpass_\lmul\()_l2 | |
| 419 | +endfunc | |
| 420 | +.endm | |
| 421 | + | |
| 422 | +.macro ff_h264_qpel_fns op, lmul, size, ext=rvv | |
| 423 | +func ff_\op\()_h264_qpel\size\()_mc00_\ext, zve32x | |
| 424 | + lpad 0 | |
| 425 | + vsetivli zero, \size, e8, \lmul, ta, ma | |
| 426 | + csrwi vxrm, 0 | |
| 427 | + li a4, \size | |
| 428 | + mv t0, ra | |
| 429 | + j ff_\op\()_h264_qpel_pixels | |
| 430 | +endfunc | |
| 431 | + | |
| 432 | + h264_qpel_1pass \op, mc20, \lmul, \size, \ext, h | |
| 433 | + h264_qpel_1pass \op, mc02, \lmul, \size, \ext, v | |
| 434 | + h264_qpel_1pass \op, mc10, \lmul, \size, \ext, h, 0 | |
| 435 | + h264_qpel_1pass \op, mc30, \lmul, \size, \ext, h, 1 | |
| 436 | + h264_qpel_1pass \op, mc01, \lmul, \size, \ext, v, zero | |
| 437 | + h264_qpel_1pass \op, mc03, \lmul, \size, \ext, v, a2 | |
| 438 | + h264_qpel_1pass \op, mc22, \lmul, \size, \ext, hv | |
| 439 | + | |
| 440 | + h264_qpel_2pass \op, mc11, \lmul, \size, \ext, h, v | |
| 441 | + h264_qpel_2pass \op, mc21, \lmul, \size, \ext, h, hv | |
| 442 | + h264_qpel_2pass \op, mc12, \lmul, \size, \ext, v, hv | |
| 443 | + h264_qpel_2pass \op, mc31, \lmul, \size, \ext, h, v, off2=1 | |
| 444 | + h264_qpel_2pass \op, mc13, \lmul, \size, \ext, h, v, a2 | |
| 445 | + h264_qpel_2pass \op, mc33, \lmul, \size, \ext, h, v, a2, 1 | |
| 446 | + h264_qpel_2pass \op, mc23, \lmul, \size, \ext, h, hv, a2 | |
| 447 | + h264_qpel_2pass \op, mc32, \lmul, \size, \ext, v, hv, 1 | |
| 448 | +.endm | |
| 449 | + | |
| 450 | + ff_h264_qpel_fns put, mf2, 16, rvv256 | |
| 451 | + ff_h264_qpel_fns put, mf4, 8, rvv256 | |
| 452 | + /* ff_h264_qpel_fns put, mf8, 4, rvv256 */ | |
| 453 | + | |
| 454 | + ff_h264_qpel_fns avg, mf2, 16, rvv256 | |
| 455 | + ff_h264_qpel_fns avg, mf4, 8, rvv256 | |
| 456 | + /* ff_h264_qpel_fns avg, mf8, 4, rvv256 */ | |
| 457 | + | |
| 458 | + ff_h264_qpel_fns put, m1, 16, rvv | |
| 459 | + ff_h264_qpel_fns put, mf2, 8, rvv | |
| 460 | + ff_h264_qpel_fns put, mf4, 4, rvv | |
| 461 | + | |
| 462 | + ff_h264_qpel_fns avg, m1, 16, rvv | |
| 463 | + ff_h264_qpel_fns avg, mf2, 8, rvv | |
| 464 | + ff_h264_qpel_fns avg, mf4, 4, rvv | |