Merge "vp8: [loongson] optimize sixtap predict with mmi"
[platform/upstream/libvpx.git] / test / vp9_intrapred_test.cc
1 /*
2  *  Copyright (c) 2014 The WebM project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10
11 #include <string>
12
13 #include "third_party/googletest/src/include/gtest/gtest.h"
14
15 #include "./vpx_config.h"
16 #include "./vpx_dsp_rtcd.h"
17 #include "test/acm_random.h"
18 #include "test/clear_system_state.h"
19 #include "test/register_state_check.h"
20 #include "test/util.h"
21 #include "vp9/common/vp9_blockd.h"
22 #include "vp9/common/vp9_pred_common.h"
23 #include "vpx_mem/vpx_mem.h"
24
25 namespace {
26
27 using libvpx_test::ACMRandom;
28
29 const int count_test_block = 100000;
30
31 typedef void (*IntraPredFunc)(uint8_t *dst, ptrdiff_t stride,
32                               const uint8_t *above, const uint8_t *left);
33
34 struct IntraPredParam {
35   IntraPredParam(IntraPredFunc pred = NULL, IntraPredFunc ref = NULL,
36                  int block_size_value = 0, int bit_depth_value = 0)
37       : pred_fn(pred), ref_fn(ref), block_size(block_size_value),
38         bit_depth(bit_depth_value) {}
39
40   IntraPredFunc pred_fn;
41   IntraPredFunc ref_fn;
42   int block_size;
43   int bit_depth;
44 };
45
46 template <typename Pixel, typename PredParam>
47 class IntraPredTest : public ::testing::TestWithParam<PredParam> {
48  public:
49   void RunTest(Pixel *left_col, Pixel *above_data, Pixel *dst, Pixel *ref_dst) {
50     ACMRandom rnd(ACMRandom::DeterministicSeed());
51     const int block_size = params_.block_size;
52     above_row_ = above_data + 16;
53     left_col_ = left_col;
54     dst_ = dst;
55     ref_dst_ = ref_dst;
56     int error_count = 0;
57     for (int i = 0; i < count_test_block; ++i) {
58       // Fill edges with random data, try first with saturated values.
59       for (int x = -1; x < block_size; x++) {
60         if (i == 0) {
61           above_row_[x] = mask_;
62         } else {
63           above_row_[x] = rnd.Rand16() & mask_;
64         }
65       }
66       for (int x = block_size; x < 2 * block_size; x++) {
67         above_row_[x] = above_row_[block_size - 1];
68       }
69       for (int y = 0; y < block_size; y++) {
70         if (i == 0) {
71           left_col_[y] = mask_;
72         } else {
73           left_col_[y] = rnd.Rand16() & mask_;
74         }
75       }
76       Predict();
77       CheckPrediction(i, &error_count);
78     }
79     ASSERT_EQ(0, error_count);
80   }
81
82  protected:
83   virtual void SetUp() {
84     params_ = this->GetParam();
85     stride_ = params_.block_size * 3;
86     mask_ = (1 << params_.bit_depth) - 1;
87   }
88
89   void Predict();
90
91   void CheckPrediction(int test_case_number, int *error_count) const {
92     // For each pixel ensure that the calculated value is the same as reference.
93     const int block_size = params_.block_size;
94     for (int y = 0; y < block_size; y++) {
95       for (int x = 0; x < block_size; x++) {
96         *error_count += ref_dst_[x + y * stride_] != dst_[x + y * stride_];
97         if (*error_count == 1) {
98           ASSERT_EQ(ref_dst_[x + y * stride_], dst_[x + y * stride_])
99               << " Failed on Test Case Number " << test_case_number;
100         }
101       }
102     }
103   }
104
105   Pixel *above_row_;
106   Pixel *left_col_;
107   Pixel *dst_;
108   Pixel *ref_dst_;
109   ptrdiff_t stride_;
110   int mask_;
111
112   PredParam params_;
113 };
114
115 template <>
116 void IntraPredTest<uint8_t, IntraPredParam>::Predict() {
117   params_.ref_fn(ref_dst_, stride_, above_row_, left_col_);
118   ASM_REGISTER_STATE_CHECK(
119       params_.pred_fn(dst_, stride_, above_row_, left_col_));
120 }
121
122 typedef IntraPredTest<uint8_t, IntraPredParam> VP9IntraPredTest;
123
124 TEST_P(VP9IntraPredTest, IntraPredTests) {
125   // max block size is 32
126   DECLARE_ALIGNED(16, uint8_t, left_col[2 * 32]);
127   DECLARE_ALIGNED(16, uint8_t, above_data[2 * 32 + 32]);
128   DECLARE_ALIGNED(16, uint8_t, dst[3 * 32 * 32]);
129   DECLARE_ALIGNED(16, uint8_t, ref_dst[3 * 32 * 32]);
130   RunTest(left_col, above_data, dst, ref_dst);
131 }
132
133 #if HAVE_SSE2
134 INSTANTIATE_TEST_CASE_P(
135     SSE2, VP9IntraPredTest,
136     ::testing::Values(
137         IntraPredParam(&vpx_d45_predictor_4x4_sse2, &vpx_d45_predictor_4x4_c, 4,
138                        8),
139         IntraPredParam(&vpx_d45_predictor_8x8_sse2, &vpx_d45_predictor_8x8_c, 8,
140                        8),
141         IntraPredParam(&vpx_d207_predictor_4x4_sse2, &vpx_d207_predictor_4x4_c,
142                        4, 8),
143         IntraPredParam(&vpx_dc_128_predictor_4x4_sse2,
144                        &vpx_dc_128_predictor_4x4_c, 4, 8),
145         IntraPredParam(&vpx_dc_128_predictor_8x8_sse2,
146                        &vpx_dc_128_predictor_8x8_c, 8, 8),
147         IntraPredParam(&vpx_dc_128_predictor_16x16_sse2,
148                        &vpx_dc_128_predictor_16x16_c, 16, 8),
149         IntraPredParam(&vpx_dc_128_predictor_32x32_sse2,
150                        &vpx_dc_128_predictor_32x32_c, 32, 8),
151         IntraPredParam(&vpx_dc_left_predictor_4x4_sse2,
152                        &vpx_dc_left_predictor_4x4_c, 4, 8),
153         IntraPredParam(&vpx_dc_left_predictor_8x8_sse2,
154                        &vpx_dc_left_predictor_8x8_c, 8, 8),
155         IntraPredParam(&vpx_dc_left_predictor_16x16_sse2,
156                        &vpx_dc_left_predictor_16x16_c, 16, 8),
157         IntraPredParam(&vpx_dc_left_predictor_32x32_sse2,
158                        &vpx_dc_left_predictor_32x32_c, 32, 8),
159         IntraPredParam(&vpx_dc_predictor_4x4_sse2, &vpx_dc_predictor_4x4_c, 4,
160                        8),
161         IntraPredParam(&vpx_dc_predictor_8x8_sse2, &vpx_dc_predictor_8x8_c, 8,
162                        8),
163         IntraPredParam(&vpx_dc_predictor_16x16_sse2, &vpx_dc_predictor_16x16_c,
164                        16, 8),
165         IntraPredParam(&vpx_dc_predictor_32x32_sse2, &vpx_dc_predictor_32x32_c,
166                        32, 8),
167         IntraPredParam(&vpx_dc_top_predictor_4x4_sse2,
168                        &vpx_dc_top_predictor_4x4_c, 4, 8),
169         IntraPredParam(&vpx_dc_top_predictor_8x8_sse2,
170                        &vpx_dc_top_predictor_8x8_c, 8, 8),
171         IntraPredParam(&vpx_dc_top_predictor_16x16_sse2,
172                        &vpx_dc_top_predictor_16x16_c, 16, 8),
173         IntraPredParam(&vpx_dc_top_predictor_32x32_sse2,
174                        &vpx_dc_top_predictor_32x32_c, 32, 8),
175         IntraPredParam(&vpx_h_predictor_4x4_sse2, &vpx_h_predictor_4x4_c, 4, 8),
176         IntraPredParam(&vpx_h_predictor_8x8_sse2, &vpx_h_predictor_8x8_c, 8, 8),
177         IntraPredParam(&vpx_h_predictor_16x16_sse2, &vpx_h_predictor_16x16_c,
178                        16, 8),
179         IntraPredParam(&vpx_h_predictor_32x32_sse2, &vpx_h_predictor_32x32_c,
180                        32, 8),
181         IntraPredParam(&vpx_tm_predictor_4x4_sse2, &vpx_tm_predictor_4x4_c, 4,
182                        8),
183         IntraPredParam(&vpx_tm_predictor_8x8_sse2, &vpx_tm_predictor_8x8_c, 8,
184                        8),
185         IntraPredParam(&vpx_tm_predictor_16x16_sse2, &vpx_tm_predictor_16x16_c,
186                        16, 8),
187         IntraPredParam(&vpx_tm_predictor_32x32_sse2, &vpx_tm_predictor_32x32_c,
188                        32, 8),
189         IntraPredParam(&vpx_v_predictor_4x4_sse2, &vpx_v_predictor_4x4_c, 4, 8),
190         IntraPredParam(&vpx_v_predictor_8x8_sse2, &vpx_v_predictor_8x8_c, 8, 8),
191         IntraPredParam(&vpx_v_predictor_16x16_sse2, &vpx_v_predictor_16x16_c,
192                        16, 8),
193         IntraPredParam(&vpx_v_predictor_32x32_sse2, &vpx_v_predictor_32x32_c,
194                        32, 8)));
195 #endif  // HAVE_SSE2
196
197 #if HAVE_SSSE3
198 INSTANTIATE_TEST_CASE_P(
199     SSSE3, VP9IntraPredTest,
200     ::testing::Values(IntraPredParam(&vpx_d45_predictor_16x16_ssse3,
201                                      &vpx_d45_predictor_16x16_c, 16, 8),
202                       IntraPredParam(&vpx_d45_predictor_32x32_ssse3,
203                                      &vpx_d45_predictor_32x32_c, 32, 8),
204                       IntraPredParam(&vpx_d63_predictor_4x4_ssse3,
205                                      &vpx_d63_predictor_4x4_c, 4, 8),
206                       IntraPredParam(&vpx_d63_predictor_8x8_ssse3,
207                                      &vpx_d63_predictor_8x8_c, 8, 8),
208                       IntraPredParam(&vpx_d63_predictor_16x16_ssse3,
209                                      &vpx_d63_predictor_16x16_c, 16, 8),
210                       IntraPredParam(&vpx_d63_predictor_32x32_ssse3,
211                                      &vpx_d63_predictor_32x32_c, 32, 8),
212                       IntraPredParam(&vpx_d153_predictor_4x4_ssse3,
213                                      &vpx_d153_predictor_4x4_c, 4, 8),
214                       IntraPredParam(&vpx_d153_predictor_8x8_ssse3,
215                                      &vpx_d153_predictor_8x8_c, 8, 8),
216                       IntraPredParam(&vpx_d153_predictor_16x16_ssse3,
217                                      &vpx_d153_predictor_16x16_c, 16, 8),
218                       IntraPredParam(&vpx_d153_predictor_32x32_ssse3,
219                                      &vpx_d153_predictor_32x32_c, 32, 8),
220                       IntraPredParam(&vpx_d207_predictor_8x8_ssse3,
221                                      &vpx_d207_predictor_8x8_c, 8, 8),
222                       IntraPredParam(&vpx_d207_predictor_16x16_ssse3,
223                                      &vpx_d207_predictor_16x16_c, 16, 8),
224                       IntraPredParam(&vpx_d207_predictor_32x32_ssse3,
225                                      &vpx_d207_predictor_32x32_c, 32, 8)));
226 #endif  // HAVE_SSSE3
227
228 #if HAVE_NEON
229 INSTANTIATE_TEST_CASE_P(
230     NEON, VP9IntraPredTest,
231     ::testing::Values(
232         IntraPredParam(&vpx_d45_predictor_4x4_neon, &vpx_d45_predictor_4x4_c, 4,
233                        8),
234         IntraPredParam(&vpx_d45_predictor_8x8_neon, &vpx_d45_predictor_8x8_c, 8,
235                        8),
236         IntraPredParam(&vpx_d45_predictor_16x16_neon,
237                        &vpx_d45_predictor_16x16_c, 16, 8),
238         IntraPredParam(&vpx_d45_predictor_32x32_neon,
239                        &vpx_d45_predictor_32x32_c, 32, 8),
240         IntraPredParam(&vpx_d135_predictor_4x4_neon, &vpx_d135_predictor_4x4_c,
241                        4, 8),
242         IntraPredParam(&vpx_d135_predictor_8x8_neon, &vpx_d135_predictor_8x8_c,
243                        8, 8),
244         IntraPredParam(&vpx_d135_predictor_16x16_neon,
245                        &vpx_d135_predictor_16x16_c, 16, 8),
246         IntraPredParam(&vpx_d135_predictor_32x32_neon,
247                        &vpx_d135_predictor_32x32_c, 32, 8),
248         IntraPredParam(&vpx_dc_128_predictor_4x4_neon,
249                        &vpx_dc_128_predictor_4x4_c, 4, 8),
250         IntraPredParam(&vpx_dc_128_predictor_8x8_neon,
251                        &vpx_dc_128_predictor_8x8_c, 8, 8),
252         IntraPredParam(&vpx_dc_128_predictor_16x16_neon,
253                        &vpx_dc_128_predictor_16x16_c, 16, 8),
254         IntraPredParam(&vpx_dc_128_predictor_32x32_neon,
255                        &vpx_dc_128_predictor_32x32_c, 32, 8),
256         IntraPredParam(&vpx_dc_left_predictor_4x4_neon,
257                        &vpx_dc_left_predictor_4x4_c, 4, 8),
258         IntraPredParam(&vpx_dc_left_predictor_8x8_neon,
259                        &vpx_dc_left_predictor_8x8_c, 8, 8),
260         IntraPredParam(&vpx_dc_left_predictor_16x16_neon,
261                        &vpx_dc_left_predictor_16x16_c, 16, 8),
262         IntraPredParam(&vpx_dc_left_predictor_32x32_neon,
263                        &vpx_dc_left_predictor_32x32_c, 32, 8),
264         IntraPredParam(&vpx_dc_predictor_4x4_neon, &vpx_dc_predictor_4x4_c, 4,
265                        8),
266         IntraPredParam(&vpx_dc_predictor_8x8_neon, &vpx_dc_predictor_8x8_c, 8,
267                        8),
268         IntraPredParam(&vpx_dc_predictor_16x16_neon, &vpx_dc_predictor_16x16_c,
269                        16, 8),
270         IntraPredParam(&vpx_dc_predictor_32x32_neon, &vpx_dc_predictor_32x32_c,
271                        32, 8),
272         IntraPredParam(&vpx_dc_top_predictor_4x4_neon,
273                        &vpx_dc_top_predictor_4x4_c, 4, 8),
274         IntraPredParam(&vpx_dc_top_predictor_8x8_neon,
275                        &vpx_dc_top_predictor_8x8_c, 8, 8),
276         IntraPredParam(&vpx_dc_top_predictor_16x16_neon,
277                        &vpx_dc_top_predictor_16x16_c, 16, 8),
278         IntraPredParam(&vpx_dc_top_predictor_32x32_neon,
279                        &vpx_dc_top_predictor_32x32_c, 32, 8),
280         IntraPredParam(&vpx_h_predictor_4x4_neon, &vpx_h_predictor_4x4_c, 4, 8),
281         IntraPredParam(&vpx_h_predictor_8x8_neon, &vpx_h_predictor_8x8_c, 8, 8),
282         IntraPredParam(&vpx_h_predictor_16x16_neon, &vpx_h_predictor_16x16_c,
283                        16, 8),
284         IntraPredParam(&vpx_h_predictor_32x32_neon, &vpx_h_predictor_32x32_c,
285                        32, 8),
286         IntraPredParam(&vpx_tm_predictor_4x4_neon, &vpx_tm_predictor_4x4_c, 4,
287                        8),
288         IntraPredParam(&vpx_tm_predictor_8x8_neon, &vpx_tm_predictor_8x8_c, 8,
289                        8),
290         IntraPredParam(&vpx_tm_predictor_16x16_neon, &vpx_tm_predictor_16x16_c,
291                        16, 8),
292         IntraPredParam(&vpx_tm_predictor_32x32_neon, &vpx_tm_predictor_32x32_c,
293                        32, 8),
294         IntraPredParam(&vpx_v_predictor_4x4_neon, &vpx_v_predictor_4x4_c, 4, 8),
295         IntraPredParam(&vpx_v_predictor_8x8_neon, &vpx_v_predictor_8x8_c, 8, 8),
296         IntraPredParam(&vpx_v_predictor_16x16_neon, &vpx_v_predictor_16x16_c,
297                        16, 8),
298         IntraPredParam(&vpx_v_predictor_32x32_neon, &vpx_v_predictor_32x32_c,
299                        32, 8)));
300 #endif  // HAVE_NEON
301
302 #if HAVE_DSPR2
303 INSTANTIATE_TEST_CASE_P(
304     DSPR2, VP9IntraPredTest,
305     ::testing::Values(IntraPredParam(&vpx_dc_predictor_4x4_dspr2,
306                                      &vpx_dc_predictor_4x4_c, 4, 8),
307                       IntraPredParam(&vpx_dc_predictor_8x8_dspr2,
308                                      &vpx_dc_predictor_8x8_c, 8, 8),
309                       IntraPredParam(&vpx_dc_predictor_16x16_dspr2,
310                                      &vpx_dc_predictor_16x16_c, 16, 8),
311                       IntraPredParam(&vpx_h_predictor_4x4_dspr2,
312                                      &vpx_h_predictor_4x4_c, 4, 8),
313                       IntraPredParam(&vpx_h_predictor_8x8_dspr2,
314                                      &vpx_h_predictor_8x8_c, 8, 8),
315                       IntraPredParam(&vpx_h_predictor_16x16_dspr2,
316                                      &vpx_h_predictor_16x16_c, 16, 8),
317                       IntraPredParam(&vpx_tm_predictor_4x4_dspr2,
318                                      &vpx_tm_predictor_4x4_c, 4, 8),
319                       IntraPredParam(&vpx_tm_predictor_8x8_dspr2,
320                                      &vpx_tm_predictor_8x8_c, 8, 8)));
321 #endif  // HAVE_DSPR2
322
323 #if HAVE_MSA
324 INSTANTIATE_TEST_CASE_P(
325     MSA, VP9IntraPredTest,
326     ::testing::Values(
327         IntraPredParam(&vpx_dc_128_predictor_4x4_msa,
328                        &vpx_dc_128_predictor_4x4_c, 4, 8),
329         IntraPredParam(&vpx_dc_128_predictor_8x8_msa,
330                        &vpx_dc_128_predictor_8x8_c, 8, 8),
331         IntraPredParam(&vpx_dc_128_predictor_16x16_msa,
332                        &vpx_dc_128_predictor_16x16_c, 16, 8),
333         IntraPredParam(&vpx_dc_128_predictor_32x32_msa,
334                        &vpx_dc_128_predictor_32x32_c, 32, 8),
335         IntraPredParam(&vpx_dc_left_predictor_4x4_msa,
336                        &vpx_dc_left_predictor_4x4_c, 4, 8),
337         IntraPredParam(&vpx_dc_left_predictor_8x8_msa,
338                        &vpx_dc_left_predictor_8x8_c, 8, 8),
339         IntraPredParam(&vpx_dc_left_predictor_16x16_msa,
340                        &vpx_dc_left_predictor_16x16_c, 16, 8),
341         IntraPredParam(&vpx_dc_left_predictor_32x32_msa,
342                        &vpx_dc_left_predictor_32x32_c, 32, 8),
343         IntraPredParam(&vpx_dc_predictor_4x4_msa, &vpx_dc_predictor_4x4_c, 4,
344                        8),
345         IntraPredParam(&vpx_dc_predictor_8x8_msa, &vpx_dc_predictor_8x8_c, 8,
346                        8),
347         IntraPredParam(&vpx_dc_predictor_16x16_msa, &vpx_dc_predictor_16x16_c,
348                        16, 8),
349         IntraPredParam(&vpx_dc_predictor_32x32_msa, &vpx_dc_predictor_32x32_c,
350                        32, 8),
351         IntraPredParam(&vpx_dc_top_predictor_4x4_msa,
352                        &vpx_dc_top_predictor_4x4_c, 4, 8),
353         IntraPredParam(&vpx_dc_top_predictor_8x8_msa,
354                        &vpx_dc_top_predictor_8x8_c, 8, 8),
355         IntraPredParam(&vpx_dc_top_predictor_16x16_msa,
356                        &vpx_dc_top_predictor_16x16_c, 16, 8),
357         IntraPredParam(&vpx_dc_top_predictor_32x32_msa,
358                        &vpx_dc_top_predictor_32x32_c, 32, 8),
359         IntraPredParam(&vpx_h_predictor_4x4_msa, &vpx_h_predictor_4x4_c, 4, 8),
360         IntraPredParam(&vpx_h_predictor_8x8_msa, &vpx_h_predictor_8x8_c, 8, 8),
361         IntraPredParam(&vpx_h_predictor_16x16_msa, &vpx_h_predictor_16x16_c, 16,
362                        8),
363         IntraPredParam(&vpx_h_predictor_32x32_msa, &vpx_h_predictor_32x32_c, 32,
364                        8),
365         IntraPredParam(&vpx_tm_predictor_4x4_msa, &vpx_tm_predictor_4x4_c, 4,
366                        8),
367         IntraPredParam(&vpx_tm_predictor_8x8_msa, &vpx_tm_predictor_8x8_c, 8,
368                        8),
369         IntraPredParam(&vpx_tm_predictor_16x16_msa, &vpx_tm_predictor_16x16_c,
370                        16, 8),
371         IntraPredParam(&vpx_tm_predictor_32x32_msa, &vpx_tm_predictor_32x32_c,
372                        32, 8),
373         IntraPredParam(&vpx_v_predictor_4x4_msa, &vpx_v_predictor_4x4_c, 4, 8),
374         IntraPredParam(&vpx_v_predictor_8x8_msa, &vpx_v_predictor_8x8_c, 8, 8),
375         IntraPredParam(&vpx_v_predictor_16x16_msa, &vpx_v_predictor_16x16_c, 16,
376                        8),
377         IntraPredParam(&vpx_v_predictor_32x32_msa, &vpx_v_predictor_32x32_c, 32,
378                        8)));
379 #endif  // HAVE_MSA
380
381 #if HAVE_VSX
382 INSTANTIATE_TEST_CASE_P(
383     VSX, VP9IntraPredTest,
384     ::testing::Values(
385         IntraPredParam(&vpx_d45_predictor_8x8_vsx, &vpx_d45_predictor_8x8_c, 8,
386                        8),
387         IntraPredParam(&vpx_d45_predictor_16x16_vsx, &vpx_d45_predictor_16x16_c,
388                        16, 8),
389         IntraPredParam(&vpx_d45_predictor_32x32_vsx, &vpx_d45_predictor_32x32_c,
390                        32, 8),
391         IntraPredParam(&vpx_d63_predictor_8x8_vsx, &vpx_d63_predictor_8x8_c, 8,
392                        8),
393         IntraPredParam(&vpx_d63_predictor_16x16_vsx, &vpx_d63_predictor_16x16_c,
394                        16, 8),
395         IntraPredParam(&vpx_d63_predictor_32x32_vsx, &vpx_d63_predictor_32x32_c,
396                        32, 8),
397         IntraPredParam(&vpx_dc_128_predictor_16x16_vsx,
398                        &vpx_dc_128_predictor_16x16_c, 16, 8),
399         IntraPredParam(&vpx_dc_128_predictor_32x32_vsx,
400                        &vpx_dc_128_predictor_32x32_c, 32, 8),
401         IntraPredParam(&vpx_dc_left_predictor_16x16_vsx,
402                        &vpx_dc_left_predictor_16x16_c, 16, 8),
403         IntraPredParam(&vpx_dc_left_predictor_32x32_vsx,
404                        &vpx_dc_left_predictor_32x32_c, 32, 8),
405         IntraPredParam(&vpx_dc_predictor_8x8_vsx, &vpx_dc_predictor_8x8_c, 8,
406                        8),
407         IntraPredParam(&vpx_dc_predictor_16x16_vsx, &vpx_dc_predictor_16x16_c,
408                        16, 8),
409         IntraPredParam(&vpx_dc_predictor_32x32_vsx, &vpx_dc_predictor_32x32_c,
410                        32, 8),
411         IntraPredParam(&vpx_dc_top_predictor_16x16_vsx,
412                        &vpx_dc_top_predictor_16x16_c, 16, 8),
413         IntraPredParam(&vpx_dc_top_predictor_32x32_vsx,
414                        &vpx_dc_top_predictor_32x32_c, 32, 8),
415         IntraPredParam(&vpx_h_predictor_4x4_vsx, &vpx_h_predictor_4x4_c, 4, 8),
416         IntraPredParam(&vpx_h_predictor_8x8_vsx, &vpx_h_predictor_8x8_c, 8, 8),
417         IntraPredParam(&vpx_h_predictor_16x16_vsx, &vpx_h_predictor_16x16_c, 16,
418                        8),
419         IntraPredParam(&vpx_h_predictor_32x32_vsx, &vpx_h_predictor_32x32_c, 32,
420                        8),
421         IntraPredParam(&vpx_tm_predictor_4x4_vsx, &vpx_tm_predictor_4x4_c, 4,
422                        8),
423         IntraPredParam(&vpx_tm_predictor_8x8_vsx, &vpx_tm_predictor_8x8_c, 8,
424                        8),
425         IntraPredParam(&vpx_tm_predictor_16x16_vsx, &vpx_tm_predictor_16x16_c,
426                        16, 8),
427         IntraPredParam(&vpx_tm_predictor_32x32_vsx, &vpx_tm_predictor_32x32_c,
428                        32, 8),
429         IntraPredParam(&vpx_v_predictor_16x16_vsx, &vpx_v_predictor_16x16_c, 16,
430                        8),
431         IntraPredParam(&vpx_v_predictor_32x32_vsx, &vpx_v_predictor_32x32_c, 32,
432                        8)));
433 #endif  // HAVE_VSX
434
435 #if CONFIG_VP9_HIGHBITDEPTH
436 typedef void (*HighbdIntraPred)(uint16_t *dst, ptrdiff_t stride,
437                                 const uint16_t *above, const uint16_t *left,
438                                 int bps);
439 struct HighbdIntraPredParam {
440   HighbdIntraPredParam(HighbdIntraPred pred = NULL, HighbdIntraPred ref = NULL,
441                        int block_size_value = 0, int bit_depth_value = 0)
442       : pred_fn(pred), ref_fn(ref), block_size(block_size_value),
443         bit_depth(bit_depth_value) {}
444
445   HighbdIntraPred pred_fn;
446   HighbdIntraPred ref_fn;
447   int block_size;
448   int bit_depth;
449 };
450
451 template <>
452 void IntraPredTest<uint16_t, HighbdIntraPredParam>::Predict() {
453   const int bit_depth = params_.bit_depth;
454   params_.ref_fn(ref_dst_, stride_, above_row_, left_col_, bit_depth);
455   ASM_REGISTER_STATE_CHECK(
456       params_.pred_fn(dst_, stride_, above_row_, left_col_, bit_depth));
457 }
458
459 typedef IntraPredTest<uint16_t, HighbdIntraPredParam> VP9HighbdIntraPredTest;
460
461 TEST_P(VP9HighbdIntraPredTest, HighbdIntraPredTests) {
462   // max block size is 32
463   DECLARE_ALIGNED(16, uint16_t, left_col[2 * 32]);
464   DECLARE_ALIGNED(16, uint16_t, above_data[2 * 32 + 32]);
465   DECLARE_ALIGNED(16, uint16_t, dst[3 * 32 * 32]);
466   DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 32 * 32]);
467   RunTest(left_col, above_data, dst, ref_dst);
468 }
469
470 #if HAVE_SSE2
471 INSTANTIATE_TEST_CASE_P(
472     SSE2_TO_C_8, VP9HighbdIntraPredTest,
473     ::testing::Values(
474         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
475                              &vpx_highbd_dc_128_predictor_4x4_c, 4, 8),
476         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
477                              &vpx_highbd_dc_128_predictor_8x8_c, 8, 8),
478         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
479                              &vpx_highbd_dc_128_predictor_16x16_c, 16, 8),
480         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
481                              &vpx_highbd_dc_128_predictor_32x32_c, 32, 8),
482         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
483                              &vpx_highbd_dc_left_predictor_4x4_c, 4, 8),
484         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
485                              &vpx_highbd_dc_left_predictor_8x8_c, 8, 8),
486         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
487                              &vpx_highbd_dc_left_predictor_16x16_c, 16, 8),
488         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
489                              &vpx_highbd_dc_left_predictor_32x32_c, 32, 8),
490         HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
491                              &vpx_highbd_dc_predictor_4x4_c, 4, 8),
492         HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
493                              &vpx_highbd_dc_predictor_8x8_c, 8, 8),
494         HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
495                              &vpx_highbd_dc_predictor_16x16_c, 16, 8),
496         HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
497                              &vpx_highbd_dc_predictor_32x32_c, 32, 8),
498         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
499                              &vpx_highbd_dc_top_predictor_4x4_c, 4, 8),
500         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
501                              &vpx_highbd_dc_top_predictor_8x8_c, 8, 8),
502         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
503                              &vpx_highbd_dc_top_predictor_16x16_c, 16, 8),
504         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
505                              &vpx_highbd_dc_top_predictor_32x32_c, 32, 8),
506         HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
507                              &vpx_highbd_tm_predictor_4x4_c, 4, 8),
508         HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
509                              &vpx_highbd_tm_predictor_8x8_c, 8, 8),
510         HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
511                              &vpx_highbd_tm_predictor_16x16_c, 16, 8),
512         HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
513                              &vpx_highbd_tm_predictor_32x32_c, 32, 8),
514         HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
515                              &vpx_highbd_h_predictor_4x4_c, 4, 8),
516         HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
517                              &vpx_highbd_h_predictor_8x8_c, 8, 8),
518         HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
519                              &vpx_highbd_h_predictor_16x16_c, 16, 8),
520         HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
521                              &vpx_highbd_h_predictor_32x32_c, 32, 8),
522         HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
523                              &vpx_highbd_v_predictor_4x4_c, 4, 8),
524         HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
525                              &vpx_highbd_v_predictor_8x8_c, 8, 8),
526         HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
527                              &vpx_highbd_v_predictor_16x16_c, 16, 8),
528         HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
529                              &vpx_highbd_v_predictor_32x32_c, 32, 8)));
530
531 INSTANTIATE_TEST_CASE_P(
532     SSE2_TO_C_10, VP9HighbdIntraPredTest,
533     ::testing::Values(
534         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
535                              &vpx_highbd_dc_128_predictor_4x4_c, 4, 10),
536         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
537                              &vpx_highbd_dc_128_predictor_8x8_c, 8, 10),
538         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
539                              &vpx_highbd_dc_128_predictor_16x16_c, 16, 10),
540         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
541                              &vpx_highbd_dc_128_predictor_32x32_c, 32, 10),
542         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
543                              &vpx_highbd_dc_left_predictor_4x4_c, 4, 10),
544         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
545                              &vpx_highbd_dc_left_predictor_8x8_c, 8, 10),
546         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
547                              &vpx_highbd_dc_left_predictor_16x16_c, 16, 10),
548         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
549                              &vpx_highbd_dc_left_predictor_32x32_c, 32, 10),
550         HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
551                              &vpx_highbd_dc_predictor_4x4_c, 4, 10),
552         HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
553                              &vpx_highbd_dc_predictor_8x8_c, 8, 10),
554         HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
555                              &vpx_highbd_dc_predictor_16x16_c, 16, 10),
556         HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
557                              &vpx_highbd_dc_predictor_32x32_c, 32, 10),
558         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
559                              &vpx_highbd_dc_top_predictor_4x4_c, 4, 10),
560         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
561                              &vpx_highbd_dc_top_predictor_8x8_c, 8, 10),
562         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
563                              &vpx_highbd_dc_top_predictor_16x16_c, 16, 10),
564         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
565                              &vpx_highbd_dc_top_predictor_32x32_c, 32, 10),
566         HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
567                              &vpx_highbd_tm_predictor_4x4_c, 4, 10),
568         HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
569                              &vpx_highbd_tm_predictor_8x8_c, 8, 10),
570         HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
571                              &vpx_highbd_tm_predictor_16x16_c, 16, 10),
572         HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
573                              &vpx_highbd_tm_predictor_32x32_c, 32, 10),
574         HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
575                              &vpx_highbd_h_predictor_4x4_c, 4, 10),
576         HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
577                              &vpx_highbd_h_predictor_8x8_c, 8, 10),
578         HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
579                              &vpx_highbd_h_predictor_16x16_c, 16, 10),
580         HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
581                              &vpx_highbd_h_predictor_32x32_c, 32, 10),
582         HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
583                              &vpx_highbd_v_predictor_4x4_c, 4, 10),
584         HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
585                              &vpx_highbd_v_predictor_8x8_c, 8, 10),
586         HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
587                              &vpx_highbd_v_predictor_16x16_c, 16, 10),
588         HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
589                              &vpx_highbd_v_predictor_32x32_c, 32, 10)));
590
591 INSTANTIATE_TEST_CASE_P(
592     SSE2_TO_C_12, VP9HighbdIntraPredTest,
593     ::testing::Values(
594         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
595                              &vpx_highbd_dc_128_predictor_4x4_c, 4, 12),
596         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
597                              &vpx_highbd_dc_128_predictor_8x8_c, 8, 12),
598         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
599                              &vpx_highbd_dc_128_predictor_16x16_c, 16, 12),
600         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
601                              &vpx_highbd_dc_128_predictor_32x32_c, 32, 12),
602         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
603                              &vpx_highbd_dc_left_predictor_4x4_c, 4, 12),
604         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
605                              &vpx_highbd_dc_left_predictor_8x8_c, 8, 12),
606         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
607                              &vpx_highbd_dc_left_predictor_16x16_c, 16, 12),
608         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
609                              &vpx_highbd_dc_left_predictor_32x32_c, 32, 12),
610         HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
611                              &vpx_highbd_dc_predictor_4x4_c, 4, 12),
612         HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
613                              &vpx_highbd_dc_predictor_8x8_c, 8, 12),
614         HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
615                              &vpx_highbd_dc_predictor_16x16_c, 16, 12),
616         HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
617                              &vpx_highbd_dc_predictor_32x32_c, 32, 12),
618         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
619                              &vpx_highbd_dc_top_predictor_4x4_c, 4, 12),
620         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
621                              &vpx_highbd_dc_top_predictor_8x8_c, 8, 12),
622         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
623                              &vpx_highbd_dc_top_predictor_16x16_c, 16, 12),
624         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
625                              &vpx_highbd_dc_top_predictor_32x32_c, 32, 12),
626         HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
627                              &vpx_highbd_tm_predictor_4x4_c, 4, 12),
628         HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
629                              &vpx_highbd_tm_predictor_8x8_c, 8, 12),
630         HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
631                              &vpx_highbd_tm_predictor_16x16_c, 16, 12),
632         HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
633                              &vpx_highbd_tm_predictor_32x32_c, 32, 12),
634         HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
635                              &vpx_highbd_h_predictor_4x4_c, 4, 12),
636         HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
637                              &vpx_highbd_h_predictor_8x8_c, 8, 12),
638         HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
639                              &vpx_highbd_h_predictor_16x16_c, 16, 12),
640         HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
641                              &vpx_highbd_h_predictor_32x32_c, 32, 12),
642         HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
643                              &vpx_highbd_v_predictor_4x4_c, 4, 12),
644         HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
645                              &vpx_highbd_v_predictor_8x8_c, 8, 12),
646         HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
647                              &vpx_highbd_v_predictor_16x16_c, 16, 12),
648         HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
649                              &vpx_highbd_v_predictor_32x32_c, 32, 12)));
650 #endif  // HAVE_SSE2
651
652 #if HAVE_NEON
653 INSTANTIATE_TEST_CASE_P(
654     NEON_TO_C_8, VP9HighbdIntraPredTest,
655     ::testing::Values(
656         HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
657                              &vpx_highbd_d45_predictor_4x4_c, 4, 8),
658         HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
659                              &vpx_highbd_d45_predictor_8x8_c, 8, 8),
660         HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
661                              &vpx_highbd_d45_predictor_16x16_c, 16, 8),
662         HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
663                              &vpx_highbd_d45_predictor_32x32_c, 32, 8),
664         HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
665                              &vpx_highbd_d135_predictor_4x4_c, 4, 8),
666         HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
667                              &vpx_highbd_d135_predictor_8x8_c, 8, 8),
668         HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
669                              &vpx_highbd_d135_predictor_16x16_c, 16, 8),
670         HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
671                              &vpx_highbd_d135_predictor_32x32_c, 32, 8),
672         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
673                              &vpx_highbd_dc_128_predictor_4x4_c, 4, 8),
674         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
675                              &vpx_highbd_dc_128_predictor_8x8_c, 8, 8),
676         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
677                              &vpx_highbd_dc_128_predictor_16x16_c, 16, 8),
678         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
679                              &vpx_highbd_dc_128_predictor_32x32_c, 32, 8),
680         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
681                              &vpx_highbd_dc_left_predictor_4x4_c, 4, 8),
682         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
683                              &vpx_highbd_dc_left_predictor_8x8_c, 8, 8),
684         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
685                              &vpx_highbd_dc_left_predictor_16x16_c, 16, 8),
686         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
687                              &vpx_highbd_dc_left_predictor_32x32_c, 32, 8),
688         HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
689                              &vpx_highbd_dc_predictor_4x4_c, 4, 8),
690         HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
691                              &vpx_highbd_dc_predictor_8x8_c, 8, 8),
692         HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
693                              &vpx_highbd_dc_predictor_16x16_c, 16, 8),
694         HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
695                              &vpx_highbd_dc_predictor_32x32_c, 32, 8),
696         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
697                              &vpx_highbd_dc_top_predictor_4x4_c, 4, 8),
698         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
699                              &vpx_highbd_dc_top_predictor_8x8_c, 8, 8),
700         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
701                              &vpx_highbd_dc_top_predictor_16x16_c, 16, 8),
702         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
703                              &vpx_highbd_dc_top_predictor_32x32_c, 32, 8),
704         HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
705                              &vpx_highbd_h_predictor_4x4_c, 4, 8),
706         HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
707                              &vpx_highbd_h_predictor_8x8_c, 8, 8),
708         HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
709                              &vpx_highbd_h_predictor_16x16_c, 16, 8),
710         HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
711                              &vpx_highbd_h_predictor_32x32_c, 32, 8),
712         HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
713                              &vpx_highbd_tm_predictor_4x4_c, 4, 8),
714         HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
715                              &vpx_highbd_tm_predictor_8x8_c, 8, 8),
716         HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
717                              &vpx_highbd_tm_predictor_16x16_c, 16, 8),
718         HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
719                              &vpx_highbd_tm_predictor_32x32_c, 32, 8),
720         HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
721                              &vpx_highbd_v_predictor_4x4_c, 4, 8),
722         HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
723                              &vpx_highbd_v_predictor_8x8_c, 8, 8),
724         HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
725                              &vpx_highbd_v_predictor_16x16_c, 16, 8),
726         HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
727                              &vpx_highbd_v_predictor_32x32_c, 32, 8)));
728
729 INSTANTIATE_TEST_CASE_P(
730     NEON_TO_C_10, VP9HighbdIntraPredTest,
731     ::testing::Values(
732         HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
733                              &vpx_highbd_d45_predictor_4x4_c, 4, 10),
734         HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
735                              &vpx_highbd_d45_predictor_8x8_c, 8, 10),
736         HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
737                              &vpx_highbd_d45_predictor_16x16_c, 16, 10),
738         HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
739                              &vpx_highbd_d45_predictor_32x32_c, 32, 10),
740         HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
741                              &vpx_highbd_d135_predictor_4x4_c, 4, 10),
742         HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
743                              &vpx_highbd_d135_predictor_8x8_c, 8, 10),
744         HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
745                              &vpx_highbd_d135_predictor_16x16_c, 16, 10),
746         HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
747                              &vpx_highbd_d135_predictor_32x32_c, 32, 10),
748         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
749                              &vpx_highbd_dc_128_predictor_4x4_c, 4, 10),
750         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
751                              &vpx_highbd_dc_128_predictor_8x8_c, 8, 10),
752         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
753                              &vpx_highbd_dc_128_predictor_16x16_c, 16, 10),
754         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
755                              &vpx_highbd_dc_128_predictor_32x32_c, 32, 10),
756         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
757                              &vpx_highbd_dc_left_predictor_4x4_c, 4, 10),
758         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
759                              &vpx_highbd_dc_left_predictor_8x8_c, 8, 10),
760         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
761                              &vpx_highbd_dc_left_predictor_16x16_c, 16, 10),
762         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
763                              &vpx_highbd_dc_left_predictor_32x32_c, 32, 10),
764         HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
765                              &vpx_highbd_dc_predictor_4x4_c, 4, 10),
766         HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
767                              &vpx_highbd_dc_predictor_8x8_c, 8, 10),
768         HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
769                              &vpx_highbd_dc_predictor_16x16_c, 16, 10),
770         HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
771                              &vpx_highbd_dc_predictor_32x32_c, 32, 10),
772         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
773                              &vpx_highbd_dc_top_predictor_4x4_c, 4, 10),
774         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
775                              &vpx_highbd_dc_top_predictor_8x8_c, 8, 10),
776         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
777                              &vpx_highbd_dc_top_predictor_16x16_c, 16, 10),
778         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
779                              &vpx_highbd_dc_top_predictor_32x32_c, 32, 10),
780         HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
781                              &vpx_highbd_h_predictor_4x4_c, 4, 10),
782         HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
783                              &vpx_highbd_h_predictor_8x8_c, 8, 10),
784         HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
785                              &vpx_highbd_h_predictor_16x16_c, 16, 10),
786         HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
787                              &vpx_highbd_h_predictor_32x32_c, 32, 10),
788         HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
789                              &vpx_highbd_tm_predictor_4x4_c, 4, 10),
790         HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
791                              &vpx_highbd_tm_predictor_8x8_c, 8, 10),
792         HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
793                              &vpx_highbd_tm_predictor_16x16_c, 16, 10),
794         HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
795                              &vpx_highbd_tm_predictor_32x32_c, 32, 10),
796         HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
797                              &vpx_highbd_v_predictor_4x4_c, 4, 10),
798         HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
799                              &vpx_highbd_v_predictor_8x8_c, 8, 10),
800         HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
801                              &vpx_highbd_v_predictor_16x16_c, 16, 10),
802         HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
803                              &vpx_highbd_v_predictor_32x32_c, 32, 10)));
804
805 INSTANTIATE_TEST_CASE_P(
806     NEON_TO_C_12, VP9HighbdIntraPredTest,
807     ::testing::Values(
808         HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
809                              &vpx_highbd_d45_predictor_4x4_c, 4, 12),
810         HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
811                              &vpx_highbd_d45_predictor_8x8_c, 8, 12),
812         HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
813                              &vpx_highbd_d45_predictor_16x16_c, 16, 12),
814         HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
815                              &vpx_highbd_d45_predictor_32x32_c, 32, 12),
816         HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
817                              &vpx_highbd_d135_predictor_4x4_c, 4, 12),
818         HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
819                              &vpx_highbd_d135_predictor_8x8_c, 8, 12),
820         HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
821                              &vpx_highbd_d135_predictor_16x16_c, 16, 12),
822         HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
823                              &vpx_highbd_d135_predictor_32x32_c, 32, 12),
824         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
825                              &vpx_highbd_dc_128_predictor_4x4_c, 4, 12),
826         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
827                              &vpx_highbd_dc_128_predictor_8x8_c, 8, 12),
828         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
829                              &vpx_highbd_dc_128_predictor_16x16_c, 16, 12),
830         HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
831                              &vpx_highbd_dc_128_predictor_32x32_c, 32, 12),
832         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
833                              &vpx_highbd_dc_left_predictor_4x4_c, 4, 12),
834         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
835                              &vpx_highbd_dc_left_predictor_8x8_c, 8, 12),
836         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
837                              &vpx_highbd_dc_left_predictor_16x16_c, 16, 12),
838         HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
839                              &vpx_highbd_dc_left_predictor_32x32_c, 32, 12),
840         HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
841                              &vpx_highbd_dc_predictor_4x4_c, 4, 12),
842         HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
843                              &vpx_highbd_dc_predictor_8x8_c, 8, 12),
844         HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
845                              &vpx_highbd_dc_predictor_16x16_c, 16, 12),
846         HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
847                              &vpx_highbd_dc_predictor_32x32_c, 32, 12),
848         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
849                              &vpx_highbd_dc_top_predictor_4x4_c, 4, 12),
850         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
851                              &vpx_highbd_dc_top_predictor_8x8_c, 8, 12),
852         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
853                              &vpx_highbd_dc_top_predictor_16x16_c, 16, 12),
854         HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
855                              &vpx_highbd_dc_top_predictor_32x32_c, 32, 12),
856         HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
857                              &vpx_highbd_h_predictor_4x4_c, 4, 12),
858         HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
859                              &vpx_highbd_h_predictor_8x8_c, 8, 12),
860         HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
861                              &vpx_highbd_h_predictor_16x16_c, 16, 12),
862         HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
863                              &vpx_highbd_h_predictor_32x32_c, 32, 12),
864         HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
865                              &vpx_highbd_tm_predictor_4x4_c, 4, 12),
866         HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
867                              &vpx_highbd_tm_predictor_8x8_c, 8, 12),
868         HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
869                              &vpx_highbd_tm_predictor_16x16_c, 16, 12),
870         HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
871                              &vpx_highbd_tm_predictor_32x32_c, 32, 12),
872         HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
873                              &vpx_highbd_v_predictor_4x4_c, 4, 12),
874         HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
875                              &vpx_highbd_v_predictor_8x8_c, 8, 12),
876         HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
877                              &vpx_highbd_v_predictor_16x16_c, 16, 12),
878         HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
879                              &vpx_highbd_v_predictor_32x32_c, 32, 12)));
880 #endif  // HAVE_NEON
881
882 #endif  // CONFIG_VP9_HIGHBITDEPTH
883 }  // namespace