1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include <tuple>
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
#include "test/av1_convolve_2d_test_util.h"
using libaom_test::ACMRandom;
using libaom_test::AV1Convolve2D::AV1Convolve2DSrTest;
using libaom_test::AV1Convolve2D::AV1JntConvolve2DTest;
#if CONFIG_AV1_HIGHBITDEPTH
using libaom_test::AV1HighbdConvolve2D::AV1HighbdConvolve2DSrTest;
using libaom_test::AV1HighbdConvolve2D::AV1HighbdJntConvolve2DTest;
#endif
using std::make_tuple;
using std::tuple;
namespace {
TEST_P(AV1Convolve2DSrTest, DISABLED_Speed) { RunSpeedTest(GET_PARAM(0)); }
TEST_P(AV1Convolve2DSrTest, CheckOutput) { RunCheckOutput(GET_PARAM(0)); }
INSTANTIATE_TEST_SUITE_P(
C_COPY, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_2d_copy_sr_c, 0, 0));
INSTANTIATE_TEST_SUITE_P(
C_X, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_x_sr_c, 1, 0));
INSTANTIATE_TEST_SUITE_P(
C_Y, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_y_sr_c, 0, 1));
INSTANTIATE_TEST_SUITE_P(
C, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_2d_sr_c, 1, 1));
#if HAVE_SSE2
INSTANTIATE_TEST_SUITE_P(SSE2_COPY, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_convolve_2d_copy_sr_sse2, 0, 0));
INSTANTIATE_TEST_SUITE_P(
SSE2_X, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_x_sr_sse2, 1, 0));
INSTANTIATE_TEST_SUITE_P(
SSE2_Y, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_y_sr_sse2, 0, 1));
INSTANTIATE_TEST_SUITE_P(
SSE2, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_2d_sr_sse2, 1, 1));
#if HAVE_AVX2
INSTANTIATE_TEST_SUITE_P(AVX2_COPY, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_convolve_2d_copy_sr_avx2, 0, 0));
INSTANTIATE_TEST_SUITE_P(
AVX2_X, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_x_sr_avx2, 1, 0));
INSTANTIATE_TEST_SUITE_P(
AVX2_Y, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_y_sr_avx2, 0, 1));
INSTANTIATE_TEST_SUITE_P(
AVX2, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_2d_sr_avx2, 1, 1));
#endif // HAVE_AVX2
#endif // HAVE_SSE2
#if HAVE_NEON
INSTANTIATE_TEST_SUITE_P(
NEON_X, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_x_sr_neon, 1, 0));
INSTANTIATE_TEST_SUITE_P(
NEON_Y, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_y_sr_neon, 0, 1));
INSTANTIATE_TEST_SUITE_P(
NEON, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(av1_convolve_2d_sr_neon, 1, 1));
INSTANTIATE_TEST_SUITE_P(NEON_COPY, AV1Convolve2DSrTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_convolve_2d_copy_sr_neon, 0, 0));
#endif // HAVE_NEON
TEST_P(AV1JntConvolve2DTest, CheckOutput) { RunCheckOutput(GET_PARAM(0)); }
TEST_P(AV1JntConvolve2DTest, DISABLED_Speed) { RunSpeedTest(GET_PARAM(0)); }
INSTANTIATE_TEST_SUITE_P(C_COPY, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_2d_copy_c, 0, 0));
INSTANTIATE_TEST_SUITE_P(
C_X, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(av1_dist_wtd_convolve_x_c, 1, 0));
INSTANTIATE_TEST_SUITE_P(
C_Y, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(av1_dist_wtd_convolve_y_c, 0, 1));
#if HAVE_SSE2
INSTANTIATE_TEST_SUITE_P(SSE2_COPY, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_2d_copy_sse2, 0, 0));
INSTANTIATE_TEST_SUITE_P(SSE2, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_2d_sse2, 1, 1));
INSTANTIATE_TEST_SUITE_P(SSE2_X, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_x_sse2, 1, 0));
INSTANTIATE_TEST_SUITE_P(SSE2_Y, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_y_sse2, 0, 1));
#if HAVE_SSSE3
INSTANTIATE_TEST_SUITE_P(SSSE3, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_2d_ssse3, 1, 1));
#if HAVE_AVX2
INSTANTIATE_TEST_SUITE_P(AVX2_COPY, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_2d_copy_avx2, 0, 0));
INSTANTIATE_TEST_SUITE_P(AVX2_X, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_x_avx2, 1, 0));
INSTANTIATE_TEST_SUITE_P(AVX2_Y, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_y_avx2, 0, 1));
INSTANTIATE_TEST_SUITE_P(AVX2, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_2d_avx2, 1, 1));
#endif // HAVE_AVX2
#endif // HAVE_SSSE3
#endif // HAVE_SSE2
#if HAVE_NEON
INSTANTIATE_TEST_SUITE_P(NEON_COPY, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_2d_copy_neon, 0, 0));
INSTANTIATE_TEST_SUITE_P(NEON, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_2d_neon, 1, 1));
INSTANTIATE_TEST_SUITE_P(NEON_X, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_x_neon, 1, 0));
INSTANTIATE_TEST_SUITE_P(NEON_Y, AV1JntConvolve2DTest,
libaom_test::AV1Convolve2D::BuildParams(
av1_dist_wtd_convolve_y_neon, 0, 1));
#endif // HAVE_NEON
#if CONFIG_AV1_HIGHBITDEPTH
TEST_P(AV1HighbdConvolve2DSrTest, CheckOutput) { RunCheckOutput(GET_PARAM(1)); }
TEST_P(AV1HighbdConvolve2DSrTest, DISABLED_Speed) {
RunSpeedTest(GET_PARAM(1));
}
INSTANTIATE_TEST_SUITE_P(C_X, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_x_sr_c, 1, 0));
INSTANTIATE_TEST_SUITE_P(C_Y, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_y_sr_c, 0, 1));
INSTANTIATE_TEST_SUITE_P(C_COPY, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_2d_copy_sr_c, 0, 0));
#if HAVE_SSE2
INSTANTIATE_TEST_SUITE_P(SSE2_COPY, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_2d_copy_sr_sse2, 0, 0));
#if HAVE_SSSE3
INSTANTIATE_TEST_SUITE_P(SSSE3, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_2d_sr_ssse3, 1, 1));
INSTANTIATE_TEST_SUITE_P(SSSE3_X, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_x_sr_ssse3, 1, 0));
INSTANTIATE_TEST_SUITE_P(SSSE3_Y, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_y_sr_ssse3, 0, 1));
#if HAVE_AVX2
INSTANTIATE_TEST_SUITE_P(AVX2, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_2d_sr_avx2, 1, 1));
INSTANTIATE_TEST_SUITE_P(AVX2_X, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_x_sr_avx2, 1, 0));
INSTANTIATE_TEST_SUITE_P(AVX2_Y, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_y_sr_avx2, 0, 1));
INSTANTIATE_TEST_SUITE_P(AVX2_COPY, AV1HighbdConvolve2DSrTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_convolve_2d_copy_sr_avx2, 0, 0));
#endif // HAVE_AVX2
#endif // HAVE_SSSE3
#endif // HAVE_SSE2
TEST_P(AV1HighbdJntConvolve2DTest, CheckOutput) {
RunCheckOutput(GET_PARAM(1));
}
TEST_P(AV1HighbdJntConvolve2DTest, DISABLED_Speed) {
RunSpeedTest(GET_PARAM(1));
}
INSTANTIATE_TEST_SUITE_P(C_X, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_x_c, 1, 0));
INSTANTIATE_TEST_SUITE_P(C_Y, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_y_c, 0, 1));
INSTANTIATE_TEST_SUITE_P(C_COPY, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_2d_copy_c, 0, 0));
#if HAVE_SSE4_1
INSTANTIATE_TEST_SUITE_P(SSE4_1_COPY, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_2d_copy_sse4_1, 0,
0));
INSTANTIATE_TEST_SUITE_P(SSE4_1, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_2d_sse4_1, 1, 1));
INSTANTIATE_TEST_SUITE_P(SSE4_1_X, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_x_sse4_1, 1, 0));
INSTANTIATE_TEST_SUITE_P(SSE4_1_Y, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_y_sse4_1, 0, 1));
#if HAVE_AVX2
INSTANTIATE_TEST_SUITE_P(AVX2_COPY, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_2d_copy_avx2, 0, 0));
INSTANTIATE_TEST_SUITE_P(AVX2, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_2d_avx2, 1, 1));
INSTANTIATE_TEST_SUITE_P(AVX2_X, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_x_avx2, 1, 0));
INSTANTIATE_TEST_SUITE_P(AVX2_Y, AV1HighbdJntConvolve2DTest,
libaom_test::AV1HighbdConvolve2D::BuildParams(
av1_highbd_dist_wtd_convolve_y_avx2, 0, 1));
#endif // HAVE_AVX2
#endif // HAVE_SSE4_1
#endif // CONFIG_AV1_HIGHBITDEPTH
} // namespace
|