xref: /aosp_15_r20/external/libaom/test/intrapred_test.cc (revision 77c1e3ccc04c968bd2bc212e87364f250e820521)
1 /*
2  * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
3  *
4  * This source code is subject to the terms of the BSD 2 Clause License and
5  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6  * was not distributed with this source code in the LICENSE file, you can
7  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8  * Media Patent License 1.0 was not distributed with this source code in the
9  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10  */
11 
12 #include <string>
13 
14 #include "gtest/gtest.h"
15 
16 #include "config/aom_config.h"
17 #include "config/aom_dsp_rtcd.h"
18 
19 #include "test/acm_random.h"
20 #include "test/register_state_check.h"
21 #include "test/util.h"
22 #include "av1/common/blockd.h"
23 #include "av1/common/common.h"
24 #include "av1/common/pred_common.h"
25 #include "aom_mem/aom_mem.h"
26 
27 namespace {
28 
29 using libaom_test::ACMRandom;
30 
31 const int count_test_block = 100000;
32 
33 typedef void (*HighbdIntraPred)(uint16_t *dst, ptrdiff_t stride,
34                                 const uint16_t *above, const uint16_t *left,
35                                 int bps);
36 typedef void (*IntraPred)(uint8_t *dst, ptrdiff_t stride, const uint8_t *above,
37                           const uint8_t *left);
38 
39 }  // namespace
40 
41 // NOTE: Under gcc version 7.3.0 (Debian 7.3.0-5), if this template is in the
42 // anonymous namespace, then we get a strange compiler warning in
43 // the begin() and end() methods of the ParamGenerator template class in
44 // gtest/internal/gtest-param-util.h:
45 //   warning: ‘<anonymous>’ is used uninitialized in this function
46 // As a workaround, put this template outside the anonymous namespace.
47 // See bug aomedia:2003.
48 template <typename FuncType>
49 struct IntraPredFunc {
IntraPredFuncIntraPredFunc50   IntraPredFunc(FuncType pred = nullptr, FuncType ref = nullptr,
51                 int block_width_value = 0, int block_height_value = 0,
52                 int bit_depth_value = 0)
53       : pred_fn(pred), ref_fn(ref), block_width(block_width_value),
54         block_height(block_height_value), bit_depth(bit_depth_value) {}
55 
56   FuncType pred_fn;
57   FuncType ref_fn;
58   int block_width;
59   int block_height;
60   int bit_depth;
61 };
62 
63 namespace {
64 
65 template <typename FuncType, typename Pixel>
66 class AV1IntraPredTest
67     : public ::testing::TestWithParam<IntraPredFunc<FuncType> > {
68  public:
RunTest(Pixel * left_col,Pixel * above_data,Pixel * dst,Pixel * ref_dst)69   void RunTest(Pixel *left_col, Pixel *above_data, Pixel *dst, Pixel *ref_dst) {
70     ACMRandom rnd(ACMRandom::DeterministicSeed());
71     const int block_width = params_.block_width;
72     const int block_height = params_.block_height;
73     above_row_ = above_data + 16;
74     left_col_ = left_col;
75     dst_ = dst;
76     ref_dst_ = ref_dst;
77     int error_count = 0;
78     for (int i = 0; i < count_test_block; ++i) {
79       // Fill edges with random data, try first with saturated values.
80       for (int x = -1; x <= block_width * 2; x++) {
81         if (i == 0) {
82           above_row_[x] = mask_;
83         } else {
84           above_row_[x] = rnd.Rand16() & mask_;
85         }
86       }
87       for (int y = 0; y < block_height; y++) {
88         if (i == 0) {
89           left_col_[y] = mask_;
90         } else {
91           left_col_[y] = rnd.Rand16() & mask_;
92         }
93       }
94       Predict();
95       CheckPrediction(i, &error_count);
96     }
97     ASSERT_EQ(0, error_count);
98   }
RunSpeedTest(Pixel * left_col,Pixel * above_data,Pixel * dst,Pixel * ref_dst)99   void RunSpeedTest(Pixel *left_col, Pixel *above_data, Pixel *dst,
100                     Pixel *ref_dst) {
101     ACMRandom rnd(ACMRandom::DeterministicSeed());
102     const int block_width = params_.block_width;
103     const int block_height = params_.block_height;
104     above_row_ = above_data + 16;
105     left_col_ = left_col;
106     dst_ = dst;
107     ref_dst_ = ref_dst;
108     int error_count = 0;
109     const int numIter = 100;
110 
111     int c_sum_time = 0;
112     int simd_sum_time = 0;
113     for (int i = 0; i < count_test_block; ++i) {
114       // Fill edges with random data, try first with saturated values.
115       for (int x = -1; x <= block_width * 2; x++) {
116         if (i == 0) {
117           above_row_[x] = mask_;
118         } else {
119           above_row_[x] = rnd.Rand16() & mask_;
120         }
121       }
122       for (int y = 0; y < block_height; y++) {
123         if (i == 0) {
124           left_col_[y] = mask_;
125         } else {
126           left_col_[y] = rnd.Rand16() & mask_;
127         }
128       }
129 
130       aom_usec_timer c_timer_;
131       aom_usec_timer_start(&c_timer_);
132 
133       PredictRefSpeedTest(numIter);
134 
135       aom_usec_timer_mark(&c_timer_);
136 
137       aom_usec_timer simd_timer_;
138       aom_usec_timer_start(&simd_timer_);
139 
140       PredictFncSpeedTest(numIter);
141 
142       aom_usec_timer_mark(&simd_timer_);
143 
144       c_sum_time += static_cast<int>(aom_usec_timer_elapsed(&c_timer_));
145       simd_sum_time += static_cast<int>(aom_usec_timer_elapsed(&simd_timer_));
146 
147       CheckPrediction(i, &error_count);
148     }
149 
150     printf(
151         "blockWxH = %d x %d c_time = %d \t simd_time = %d \t Gain = %4.2f \n",
152         block_width, block_height, c_sum_time, simd_sum_time,
153         (static_cast<float>(c_sum_time) / static_cast<float>(simd_sum_time)));
154     ASSERT_EQ(0, error_count);
155   }
156 
157  protected:
SetUp()158   void SetUp() override {
159     params_ = this->GetParam();
160     stride_ = params_.block_width * 3;
161     mask_ = (1 << params_.bit_depth) - 1;
162   }
163 
164   virtual void Predict() = 0;
165 
166   virtual void PredictRefSpeedTest(int num) = 0;
167   virtual void PredictFncSpeedTest(int num) = 0;
168 
CheckPrediction(int test_case_number,int * error_count) const169   void CheckPrediction(int test_case_number, int *error_count) const {
170     // For each pixel ensure that the calculated value is the same as reference.
171     const int block_width = params_.block_width;
172     const int block_height = params_.block_height;
173     for (int y = 0; y < block_height; y++) {
174       for (int x = 0; x < block_width; x++) {
175         *error_count += ref_dst_[x + y * stride_] != dst_[x + y * stride_];
176         if (*error_count == 1) {
177           ASSERT_EQ(ref_dst_[x + y * stride_], dst_[x + y * stride_])
178               << " Failed on Test Case Number " << test_case_number
179               << " location: x = " << x << " y = " << y;
180         }
181       }
182     }
183   }
184 
185   Pixel *above_row_;
186   Pixel *left_col_;
187   Pixel *dst_;
188   Pixel *ref_dst_;
189   ptrdiff_t stride_;
190   int mask_;
191 
192   IntraPredFunc<FuncType> params_;
193 };
194 
195 #if CONFIG_AV1_HIGHBITDEPTH
196 class HighbdIntraPredTest : public AV1IntraPredTest<HighbdIntraPred, uint16_t> {
197  protected:
Predict()198   void Predict() override {
199     const int bit_depth = params_.bit_depth;
200     params_.ref_fn(ref_dst_, stride_, above_row_, left_col_, bit_depth);
201     API_REGISTER_STATE_CHECK(
202         params_.pred_fn(dst_, stride_, above_row_, left_col_, bit_depth));
203   }
PredictRefSpeedTest(int num)204   void PredictRefSpeedTest(int num) override {
205     const int bit_depth = params_.bit_depth;
206     for (int i = 0; i < num; i++) {
207       params_.ref_fn(ref_dst_, stride_, above_row_, left_col_, bit_depth);
208     }
209   }
PredictFncSpeedTest(int num)210   void PredictFncSpeedTest(int num) override {
211     const int bit_depth = params_.bit_depth;
212     for (int i = 0; i < num; i++) {
213       params_.pred_fn(dst_, stride_, above_row_, left_col_, bit_depth);
214     }
215   }
216 };
217 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(HighbdIntraPredTest);
218 
219 #endif
220 
221 class LowbdIntraPredTest : public AV1IntraPredTest<IntraPred, uint8_t> {
222  protected:
Predict()223   void Predict() override {
224     params_.ref_fn(ref_dst_, stride_, above_row_, left_col_);
225     API_REGISTER_STATE_CHECK(
226         params_.pred_fn(dst_, stride_, above_row_, left_col_));
227   }
PredictRefSpeedTest(int num)228   void PredictRefSpeedTest(int num) override {
229     for (int i = 0; i < num; i++) {
230       params_.ref_fn(ref_dst_, stride_, above_row_, left_col_);
231     }
232   }
PredictFncSpeedTest(int num)233   void PredictFncSpeedTest(int num) override {
234     for (int i = 0; i < num; i++) {
235       params_.pred_fn(dst_, stride_, above_row_, left_col_);
236     }
237   }
238 };
239 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(LowbdIntraPredTest);
240 
241 #if CONFIG_AV1_HIGHBITDEPTH
TEST_P(HighbdIntraPredTest,Bitexact)242 TEST_P(HighbdIntraPredTest, Bitexact) {
243   // max block size is 64
244   DECLARE_ALIGNED(16, uint16_t, left_col[2 * 64]);
245   DECLARE_ALIGNED(16, uint16_t, above_data[2 * 64 + 64]);
246   DECLARE_ALIGNED(16, uint16_t, dst[3 * 64 * 64]);
247   DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 64 * 64]);
248   av1_zero(left_col);
249   av1_zero(above_data);
250   RunTest(left_col, above_data, dst, ref_dst);
251 }
252 
TEST_P(HighbdIntraPredTest,DISABLED_Speed)253 TEST_P(HighbdIntraPredTest, DISABLED_Speed) {
254   // max block size is 64
255   DECLARE_ALIGNED(16, uint16_t, left_col[2 * 64]);
256   DECLARE_ALIGNED(16, uint16_t, above_data[2 * 64 + 64]);
257   DECLARE_ALIGNED(16, uint16_t, dst[3 * 64 * 64]);
258   DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 64 * 64]);
259   av1_zero(left_col);
260   av1_zero(above_data);
261   RunSpeedTest(left_col, above_data, dst, ref_dst);
262 }
263 #endif
264 
TEST_P(LowbdIntraPredTest,Bitexact)265 TEST_P(LowbdIntraPredTest, Bitexact) {
266   // max block size is 64
267   DECLARE_ALIGNED(16, uint8_t, left_col[2 * 64]);
268   DECLARE_ALIGNED(16, uint8_t, above_data[2 * 64 + 64]);
269   DECLARE_ALIGNED(16, uint8_t, dst[3 * 64 * 64]);
270   DECLARE_ALIGNED(16, uint8_t, ref_dst[3 * 64 * 64]);
271   av1_zero(left_col);
272   av1_zero(above_data);
273   RunTest(left_col, above_data, dst, ref_dst);
274 }
TEST_P(LowbdIntraPredTest,DISABLED_Speed)275 TEST_P(LowbdIntraPredTest, DISABLED_Speed) {
276   // max block size is 64
277   DECLARE_ALIGNED(16, uint8_t, left_col[2 * 64]);
278   DECLARE_ALIGNED(16, uint8_t, above_data[2 * 64 + 64]);
279   DECLARE_ALIGNED(16, uint8_t, dst[3 * 64 * 64]);
280   DECLARE_ALIGNED(16, uint8_t, ref_dst[3 * 64 * 64]);
281   av1_zero(left_col);
282   av1_zero(above_data);
283   RunSpeedTest(left_col, above_data, dst, ref_dst);
284 }
285 
286 #if CONFIG_AV1_HIGHBITDEPTH
287 // -----------------------------------------------------------------------------
288 // High Bit Depth Tests
289 #define highbd_entry(type, width, height, opt, bd)                          \
290   IntraPredFunc<HighbdIntraPred>(                                           \
291       &aom_highbd_##type##_predictor_##width##x##height##_##opt,            \
292       &aom_highbd_##type##_predictor_##width##x##height##_c, width, height, \
293       bd)
294 
295 #if !CONFIG_REALTIME_ONLY || CONFIG_AV1_DECODER
296 #define highbd_intrapred(type, opt, bd)                                        \
297   highbd_entry(type, 4, 4, opt, bd), highbd_entry(type, 4, 8, opt, bd),        \
298       highbd_entry(type, 4, 16, opt, bd), highbd_entry(type, 8, 4, opt, bd),   \
299       highbd_entry(type, 8, 8, opt, bd), highbd_entry(type, 8, 16, opt, bd),   \
300       highbd_entry(type, 8, 32, opt, bd), highbd_entry(type, 16, 4, opt, bd),  \
301       highbd_entry(type, 16, 8, opt, bd), highbd_entry(type, 16, 16, opt, bd), \
302       highbd_entry(type, 16, 32, opt, bd),                                     \
303       highbd_entry(type, 16, 64, opt, bd), highbd_entry(type, 32, 8, opt, bd), \
304       highbd_entry(type, 32, 16, opt, bd),                                     \
305       highbd_entry(type, 32, 32, opt, bd),                                     \
306       highbd_entry(type, 32, 64, opt, bd),                                     \
307       highbd_entry(type, 64, 16, opt, bd),                                     \
308       highbd_entry(type, 64, 32, opt, bd), highbd_entry(type, 64, 64, opt, bd)
309 #else
310 #define highbd_intrapred(type, opt, bd)                                       \
311   highbd_entry(type, 4, 4, opt, bd), highbd_entry(type, 4, 8, opt, bd),       \
312       highbd_entry(type, 8, 4, opt, bd), highbd_entry(type, 8, 8, opt, bd),   \
313       highbd_entry(type, 8, 16, opt, bd), highbd_entry(type, 16, 8, opt, bd), \
314       highbd_entry(type, 16, 16, opt, bd),                                    \
315       highbd_entry(type, 16, 32, opt, bd),                                    \
316       highbd_entry(type, 32, 16, opt, bd),                                    \
317       highbd_entry(type, 32, 32, opt, bd),                                    \
318       highbd_entry(type, 32, 64, opt, bd),                                    \
319       highbd_entry(type, 64, 32, opt, bd), highbd_entry(type, 64, 64, opt, bd)
320 #endif  // !CONFIG_REALTIME_ONLY || CONFIG_AV1_DECODER
321 #endif  // CONFIG_AV1_HIGHBITDEPTH
322 
323 // ---------------------------------------------------------------------------
324 // Low Bit Depth Tests
325 
326 #define lowbd_entry(type, width, height, opt)                                  \
327   IntraPredFunc<IntraPred>(&aom_##type##_predictor_##width##x##height##_##opt, \
328                            &aom_##type##_predictor_##width##x##height##_c,     \
329                            width, height, 8)
330 
331 #if !CONFIG_REALTIME_ONLY || CONFIG_AV1_DECODER
332 #define lowbd_intrapred(type, opt)                                    \
333   lowbd_entry(type, 4, 4, opt), lowbd_entry(type, 4, 8, opt),         \
334       lowbd_entry(type, 4, 16, opt), lowbd_entry(type, 8, 4, opt),    \
335       lowbd_entry(type, 8, 8, opt), lowbd_entry(type, 8, 16, opt),    \
336       lowbd_entry(type, 8, 32, opt), lowbd_entry(type, 16, 4, opt),   \
337       lowbd_entry(type, 16, 8, opt), lowbd_entry(type, 16, 16, opt),  \
338       lowbd_entry(type, 16, 32, opt), lowbd_entry(type, 16, 64, opt), \
339       lowbd_entry(type, 32, 8, opt), lowbd_entry(type, 32, 16, opt),  \
340       lowbd_entry(type, 32, 32, opt), lowbd_entry(type, 32, 64, opt), \
341       lowbd_entry(type, 64, 16, opt), lowbd_entry(type, 64, 32, opt), \
342       lowbd_entry(type, 64, 64, opt)
343 #else
344 #define lowbd_intrapred(type, opt)                                    \
345   lowbd_entry(type, 4, 4, opt), lowbd_entry(type, 4, 8, opt),         \
346       lowbd_entry(type, 8, 4, opt), lowbd_entry(type, 8, 8, opt),     \
347       lowbd_entry(type, 8, 16, opt), lowbd_entry(type, 16, 8, opt),   \
348       lowbd_entry(type, 16, 16, opt), lowbd_entry(type, 16, 32, opt), \
349       lowbd_entry(type, 32, 16, opt), lowbd_entry(type, 32, 32, opt), \
350       lowbd_entry(type, 32, 64, opt), lowbd_entry(type, 64, 32, opt), \
351       lowbd_entry(type, 64, 64, opt)
352 #endif  // !CONFIG_REALTIME_ONLY || CONFIG_AV1_DECODER
353 
354 #if HAVE_SSE2
355 const IntraPredFunc<IntraPred> LowbdIntraPredTestVector[] = {
356   lowbd_intrapred(dc, sse2),      lowbd_intrapred(dc_top, sse2),
357   lowbd_intrapred(dc_left, sse2), lowbd_intrapred(dc_128, sse2),
358   lowbd_intrapred(v, sse2),       lowbd_intrapred(h, sse2),
359 };
360 
361 INSTANTIATE_TEST_SUITE_P(SSE2, LowbdIntraPredTest,
362                          ::testing::ValuesIn(LowbdIntraPredTestVector));
363 #endif  // HAVE_SSE2
364 
365 #if HAVE_NEON
366 const IntraPredFunc<IntraPred> LowbdIntraPredTestVectorNeon[] = {
367   lowbd_intrapred(dc, neon),       lowbd_intrapred(dc_top, neon),
368   lowbd_intrapred(dc_left, neon),  lowbd_intrapred(dc_128, neon),
369   lowbd_intrapred(v, neon),        lowbd_intrapred(h, neon),
370   lowbd_intrapred(smooth, neon),   lowbd_intrapred(smooth_v, neon),
371   lowbd_intrapred(smooth_h, neon), lowbd_intrapred(paeth, neon),
372 };
373 
374 INSTANTIATE_TEST_SUITE_P(NEON, LowbdIntraPredTest,
375                          ::testing::ValuesIn(LowbdIntraPredTestVectorNeon));
376 #endif  // HAVE_NEON
377 
378 #if HAVE_SSSE3
379 const IntraPredFunc<IntraPred> LowbdIntraPredTestVectorSsse3[] = {
380   lowbd_intrapred(paeth, ssse3),
381   lowbd_intrapred(smooth, ssse3),
382   lowbd_intrapred(smooth_v, ssse3),
383   lowbd_intrapred(smooth_h, ssse3),
384 };
385 
386 INSTANTIATE_TEST_SUITE_P(SSSE3, LowbdIntraPredTest,
387                          ::testing::ValuesIn(LowbdIntraPredTestVectorSsse3));
388 #endif  // HAVE_SSSE3
389 
390 #if HAVE_AVX2
391 const IntraPredFunc<IntraPred> LowbdIntraPredTestVectorAvx2[] = {
392 #if !CONFIG_REALTIME_ONLY || CONFIG_AV1_DECODER
393   lowbd_entry(dc, 32, 16, avx2),      lowbd_entry(dc, 32, 32, avx2),
394   lowbd_entry(dc, 32, 64, avx2),      lowbd_entry(dc, 64, 16, avx2),
395   lowbd_entry(dc, 64, 32, avx2),      lowbd_entry(dc, 64, 64, avx2),
396 
397   lowbd_entry(dc_top, 32, 16, avx2),  lowbd_entry(dc_top, 32, 32, avx2),
398   lowbd_entry(dc_top, 32, 64, avx2),  lowbd_entry(dc_top, 64, 16, avx2),
399   lowbd_entry(dc_top, 64, 32, avx2),  lowbd_entry(dc_top, 64, 64, avx2),
400 
401   lowbd_entry(dc_left, 32, 16, avx2), lowbd_entry(dc_left, 32, 32, avx2),
402   lowbd_entry(dc_left, 32, 64, avx2), lowbd_entry(dc_left, 64, 16, avx2),
403   lowbd_entry(dc_left, 64, 32, avx2), lowbd_entry(dc_left, 64, 64, avx2),
404 
405   lowbd_entry(dc_128, 32, 16, avx2),  lowbd_entry(dc_128, 32, 32, avx2),
406   lowbd_entry(dc_128, 32, 64, avx2),  lowbd_entry(dc_128, 64, 16, avx2),
407   lowbd_entry(dc_128, 64, 32, avx2),  lowbd_entry(dc_128, 64, 64, avx2),
408 
409   lowbd_entry(v, 32, 16, avx2),       lowbd_entry(v, 32, 32, avx2),
410   lowbd_entry(v, 32, 64, avx2),       lowbd_entry(v, 64, 16, avx2),
411   lowbd_entry(v, 64, 32, avx2),       lowbd_entry(v, 64, 64, avx2),
412 
413   lowbd_entry(h, 32, 32, avx2),
414 
415   lowbd_entry(paeth, 16, 8, avx2),    lowbd_entry(paeth, 16, 16, avx2),
416   lowbd_entry(paeth, 16, 32, avx2),   lowbd_entry(paeth, 32, 16, avx2),
417   lowbd_entry(paeth, 32, 32, avx2),   lowbd_entry(paeth, 32, 64, avx2),
418   lowbd_entry(paeth, 64, 32, avx2),   lowbd_entry(paeth, 64, 64, avx2),
419 #else
420   lowbd_entry(dc, 32, 16, avx2),      lowbd_entry(dc, 32, 32, avx2),
421   lowbd_entry(dc, 32, 64, avx2),      lowbd_entry(dc, 64, 32, avx2),
422   lowbd_entry(dc, 64, 64, avx2),
423 
424   lowbd_entry(dc_top, 32, 16, avx2),  lowbd_entry(dc_top, 32, 32, avx2),
425   lowbd_entry(dc_top, 32, 64, avx2),  lowbd_entry(dc_top, 64, 32, avx2),
426   lowbd_entry(dc_top, 64, 64, avx2),
427 
428   lowbd_entry(dc_left, 32, 16, avx2), lowbd_entry(dc_left, 32, 32, avx2),
429   lowbd_entry(dc_left, 32, 64, avx2), lowbd_entry(dc_left, 64, 32, avx2),
430   lowbd_entry(dc_left, 64, 64, avx2),
431 
432   lowbd_entry(dc_128, 32, 16, avx2),  lowbd_entry(dc_128, 32, 32, avx2),
433   lowbd_entry(dc_128, 32, 64, avx2),  lowbd_entry(dc_128, 64, 32, avx2),
434   lowbd_entry(dc_128, 64, 64, avx2),
435 
436   lowbd_entry(v, 32, 16, avx2),       lowbd_entry(v, 32, 32, avx2),
437   lowbd_entry(v, 32, 64, avx2),       lowbd_entry(v, 64, 32, avx2),
438   lowbd_entry(v, 64, 64, avx2),
439 
440   lowbd_entry(h, 32, 32, avx2),
441 
442   lowbd_entry(paeth, 16, 8, avx2),    lowbd_entry(paeth, 16, 16, avx2),
443   lowbd_entry(paeth, 16, 32, avx2),   lowbd_entry(paeth, 32, 16, avx2),
444   lowbd_entry(paeth, 32, 32, avx2),   lowbd_entry(paeth, 32, 64, avx2),
445   lowbd_entry(paeth, 64, 32, avx2),   lowbd_entry(paeth, 64, 64, avx2),
446 #endif  // !CONFIG_REALTIME_ONLY || CONFIG_AV1_DECODER
447 };
448 
449 INSTANTIATE_TEST_SUITE_P(AVX2, LowbdIntraPredTest,
450                          ::testing::ValuesIn(LowbdIntraPredTestVectorAvx2));
451 #endif  // HAVE_AVX2
452 
453 #if CONFIG_AV1_HIGHBITDEPTH
454 #if HAVE_NEON
455 const IntraPredFunc<HighbdIntraPred> HighbdIntraPredTestVectorNeon[] = {
456   highbd_intrapred(dc, neon, 12),       highbd_intrapred(dc_top, neon, 12),
457   highbd_intrapred(dc_left, neon, 12),  highbd_intrapred(dc_128, neon, 12),
458   highbd_intrapred(v, neon, 12),        highbd_intrapred(h, neon, 12),
459   highbd_intrapred(paeth, neon, 12),    highbd_intrapred(smooth, neon, 12),
460   highbd_intrapred(smooth_v, neon, 12), highbd_intrapred(smooth_h, neon, 12),
461 };
462 
463 INSTANTIATE_TEST_SUITE_P(NEON, HighbdIntraPredTest,
464                          ::testing::ValuesIn(HighbdIntraPredTestVectorNeon));
465 #endif  // HAVE_NEON
466 
467 #if HAVE_SSE2
468 const IntraPredFunc<HighbdIntraPred> HighbdIntraPredTestVectorSse2[] = {
469   highbd_entry(dc, 4, 4, sse2, 12),
470   highbd_entry(dc, 4, 8, sse2, 12),
471   highbd_entry(dc, 8, 4, sse2, 12),
472   highbd_entry(dc, 8, 8, sse2, 12),
473   highbd_entry(dc, 8, 16, sse2, 12),
474   highbd_entry(dc, 16, 8, sse2, 12),
475   highbd_entry(dc, 16, 16, sse2, 12),
476   highbd_entry(dc, 16, 32, sse2, 12),
477   highbd_entry(dc, 32, 16, sse2, 12),
478   highbd_entry(dc, 32, 32, sse2, 12),
479 
480   highbd_entry(dc_top, 4, 4, sse2, 12),
481   highbd_entry(dc_top, 4, 8, sse2, 12),
482   highbd_entry(dc_top, 8, 4, sse2, 12),
483   highbd_entry(dc_top, 8, 8, sse2, 12),
484   highbd_entry(dc_top, 8, 16, sse2, 12),
485   highbd_entry(dc_top, 16, 8, sse2, 12),
486   highbd_entry(dc_top, 16, 16, sse2, 12),
487   highbd_entry(dc_top, 16, 32, sse2, 12),
488   highbd_entry(dc_top, 32, 16, sse2, 12),
489   highbd_entry(dc_top, 32, 32, sse2, 12),
490 
491   highbd_entry(dc_left, 4, 4, sse2, 12),
492   highbd_entry(dc_left, 4, 8, sse2, 12),
493   highbd_entry(dc_left, 8, 4, sse2, 12),
494   highbd_entry(dc_left, 8, 8, sse2, 12),
495   highbd_entry(dc_left, 8, 16, sse2, 12),
496   highbd_entry(dc_left, 16, 8, sse2, 12),
497   highbd_entry(dc_left, 16, 16, sse2, 12),
498   highbd_entry(dc_left, 16, 32, sse2, 12),
499   highbd_entry(dc_left, 32, 16, sse2, 12),
500   highbd_entry(dc_left, 32, 32, sse2, 12),
501 
502   highbd_entry(dc_128, 4, 4, sse2, 12),
503   highbd_entry(dc_128, 4, 8, sse2, 12),
504   highbd_entry(dc_128, 8, 4, sse2, 12),
505   highbd_entry(dc_128, 8, 8, sse2, 12),
506   highbd_entry(dc_128, 8, 16, sse2, 12),
507   highbd_entry(dc_128, 16, 8, sse2, 12),
508   highbd_entry(dc_128, 16, 16, sse2, 12),
509   highbd_entry(dc_128, 16, 32, sse2, 12),
510   highbd_entry(dc_128, 32, 16, sse2, 12),
511   highbd_entry(dc_128, 32, 32, sse2, 12),
512 
513   highbd_entry(v, 4, 4, sse2, 12),
514   highbd_entry(v, 4, 8, sse2, 12),
515   highbd_entry(v, 8, 4, sse2, 12),
516   highbd_entry(v, 8, 8, sse2, 12),
517   highbd_entry(v, 8, 16, sse2, 12),
518   highbd_entry(v, 16, 8, sse2, 12),
519   highbd_entry(v, 16, 16, sse2, 12),
520   highbd_entry(v, 16, 32, sse2, 12),
521   highbd_entry(v, 32, 16, sse2, 12),
522   highbd_entry(v, 32, 32, sse2, 12),
523 
524   highbd_entry(h, 4, 4, sse2, 12),
525   highbd_entry(h, 4, 8, sse2, 12),
526   highbd_entry(h, 8, 4, sse2, 12),
527   highbd_entry(h, 8, 8, sse2, 12),
528   highbd_entry(h, 8, 16, sse2, 12),
529   highbd_entry(h, 16, 8, sse2, 12),
530   highbd_entry(h, 16, 16, sse2, 12),
531   highbd_entry(h, 16, 32, sse2, 12),
532   highbd_entry(h, 32, 16, sse2, 12),
533   highbd_entry(h, 32, 32, sse2, 12),
534 };
535 
536 INSTANTIATE_TEST_SUITE_P(SSE2, HighbdIntraPredTest,
537                          ::testing::ValuesIn(HighbdIntraPredTestVectorSse2));
538 #endif  // HAVE_SSE2
539 #endif  // CONFIG_AV1_HIGHBITDEPTH
540 }  // namespace
541