FFmpeg
Loading...
Searching...
No Matches
vp9dsp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Institute 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#ifndef AVCODEC_RISCV_VP9DSP_H
22#define AVCODEC_RISCV_VP9DSP_H
23
24#include <stddef.h>
25#include <stdint.h>
26
27void ff_dc_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
28 const uint8_t *a);
29void ff_dc_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
30 const uint8_t *a);
31void ff_dc_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
32 const uint8_t *a);
33void ff_dc_top_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
34 const uint8_t *a);
35void ff_dc_top_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
36 const uint8_t *a);
37void ff_dc_top_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
38 const uint8_t *a);
39void ff_dc_left_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
40 const uint8_t *a);
41void ff_dc_left_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
42 const uint8_t *a);
43void ff_dc_left_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
44 const uint8_t *a);
45void ff_dc_127_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
46 const uint8_t *a);
47void ff_dc_127_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
48 const uint8_t *a);
49void ff_dc_127_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
50 const uint8_t *a);
51void ff_dc_128_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
52 const uint8_t *a);
53void ff_dc_128_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
54 const uint8_t *a);
55void ff_dc_128_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
56 const uint8_t *a);
57void ff_dc_129_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
58 const uint8_t *a);
59void ff_dc_129_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
60 const uint8_t *a);
61void ff_dc_129_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
62 const uint8_t *a);
63void ff_h_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
64 const uint8_t *a);
65void ff_h_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
66 const uint8_t *a);
67void ff_h_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
68 const uint8_t *a);
69void ff_tm_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
70 const uint8_t *a);
71void ff_tm_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
72 const uint8_t *a);
73void ff_tm_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
74 const uint8_t *a);
75void ff_tm_4x4_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l,
76 const uint8_t *a);
77
78#define VP9_8TAP_RISCV_RVV_FUNC(SIZE, type, type_idx) \
79void ff_put_8tap_##type##_##SIZE##h_rvv(uint8_t *dst, ptrdiff_t dststride, \
80 const uint8_t *src, \
81 ptrdiff_t srcstride, \
82 int h, int mx, int my); \
83 \
84void ff_put_8tap_##type##_##SIZE##v_rvv(uint8_t *dst, ptrdiff_t dststride, \
85 const uint8_t *src, \
86 ptrdiff_t srcstride, \
87 int h, int mx, int my); \
88 \
89void ff_put_8tap_##type##_##SIZE##hv_rvv(uint8_t *dst, ptrdiff_t dststride, \
90 const uint8_t *src, \
91 ptrdiff_t srcstride, \
92 int h, int mx, int my); \
93 \
94void ff_avg_8tap_##type##_##SIZE##h_rvv(uint8_t *dst, ptrdiff_t dststride, \
95 const uint8_t *src, \
96 ptrdiff_t srcstride, \
97 int h, int mx, int my); \
98 \
99void ff_avg_8tap_##type##_##SIZE##v_rvv(uint8_t *dst, ptrdiff_t dststride, \
100 const uint8_t *src, \
101 ptrdiff_t srcstride, \
102 int h, int mx, int my); \
103 \
104void ff_avg_8tap_##type##_##SIZE##hv_rvv(uint8_t *dst, ptrdiff_t dststride, \
105 const uint8_t *src, \
106 ptrdiff_t srcstride, \
107 int h, int mx, int my);
108
109#define VP9_BILINEAR_RISCV_RVV_FUNC(SIZE) \
110void ff_put_vp9_bilin_##SIZE##h_rvv(uint8_t *dst, ptrdiff_t dststride, \
111 const uint8_t *src, ptrdiff_t srcstride, \
112 int h, int mx, int my); \
113 \
114void ff_put_vp9_bilin_##SIZE##v_rvv(uint8_t *dst, ptrdiff_t dststride, \
115 const uint8_t *src, ptrdiff_t srcstride, \
116 int h, int mx, int my); \
117 \
118void ff_put_vp9_bilin_##SIZE##hv_rvv(uint8_t *dst, ptrdiff_t dststride, \
119 const uint8_t *src, ptrdiff_t srcstride, \
120 int h, int mx, int my); \
121 \
122void ff_avg_vp9_bilin_##SIZE##h_rvv(uint8_t *dst, ptrdiff_t dststride, \
123 const uint8_t *src, ptrdiff_t srcstride, \
124 int h, int mx, int my); \
125 \
126void ff_avg_vp9_bilin_##SIZE##v_rvv(uint8_t *dst, ptrdiff_t dststride, \
127 const uint8_t *src, ptrdiff_t srcstride, \
128 int h, int mx, int my); \
129 \
130void ff_avg_vp9_bilin_##SIZE##hv_rvv(uint8_t *dst, ptrdiff_t dststride, \
131 const uint8_t *src, ptrdiff_t srcstride, \
132 int h, int mx, int my);
133
134#define VP9_COPY_AVG_RISCV_RVV_FUNC(SIZE) \
135void ff_vp9_copy##SIZE##_rvv(uint8_t *dst, ptrdiff_t dststride, \
136 const uint8_t *src, ptrdiff_t srcstride, \
137 int h, int mx, int my); \
138 \
139void ff_vp9_avg##SIZE##_rvv(uint8_t *dst, ptrdiff_t dststride, \
140 const uint8_t *src, ptrdiff_t srcstride, \
141 int h, int mx, int my);
142
148
154
160
166
172
173#define VP9_COPY_RISCV_RVI_FUNC(SIZE) \
174void ff_copy##SIZE##_rvi(uint8_t *dst, ptrdiff_t dststride, \
175 const uint8_t *src, ptrdiff_t srcstride, \
176 int h, int mx, int my);
177
183
184#undef VP9_8TAP_RISCV_RVV_FUNC
185#undef VP9_BILINEAR_RISCV_RVV_FUNC
186#undef VP9_COPY_AVG_RISCV_RVV_FUNC
187
188#endif // #ifndef AVCODEC_RISCV_VP9DSP_H
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
int a
void ff_dc_top_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
#define VP9_COPY_RISCV_RVI_FUNC(SIZE)
Definition vp9dsp.h:173
void ff_tm_4x4_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_tm_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_left_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_tm_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_h_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_127_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_128_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_127_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
#define VP9_BILINEAR_RISCV_RVV_FUNC(SIZE)
Definition vp9dsp.h:109
void ff_dc_127_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_129_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_top_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_left_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_129_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_129_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_tm_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_h_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
#define VP9_8TAP_RISCV_RVV_FUNC(SIZE, type, type_idx)
Definition vp9dsp.h:78
void ff_dc_top_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_128_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_left_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_dc_128_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
void ff_h_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a)
#define VP9_COPY_AVG_RISCV_RVV_FUNC(SIZE)
Definition vp9dsp.h:134
#define stride
static float smooth(DeshakeOpenCLContext *deshake_ctx, float *gauss_kernel, int length, float max_val, AVFifo *values)
@ FILTER_8TAP_REGULAR
Definition vp9.h:66
@ FILTER_8TAP_SHARP
Definition vp9.h:67
@ FILTER_8TAP_SMOOTH
Definition vp9.h:65