2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved.
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.
13 #include "third_party/googletest/src/include/gtest/gtest.h"
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"
27 using libvpx_test::ACMRandom;
29 const int count_test_block = 100000;
31 typedef void (*IntraPredFunc)(uint8_t *dst, ptrdiff_t stride,
32 const uint8_t *above, const uint8_t *left);
34 struct IntraPredParam {
35 IntraPredParam(IntraPredFunc pred = nullptr, IntraPredFunc ref = nullptr,
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) {}
40 IntraPredFunc pred_fn;
46 template <typename Pixel, typename PredParam>
47 class IntraPredTest : public ::testing::TestWithParam<PredParam> {
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;
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++) {
61 above_row_[x] = mask_;
63 above_row_[x] = rnd.Rand16() & mask_;
66 for (int x = block_size; x < 2 * block_size; x++) {
67 above_row_[x] = above_row_[block_size - 1];
69 for (int y = 0; y < block_size; y++) {
73 left_col_[y] = rnd.Rand16() & mask_;
77 CheckPrediction(i, &error_count);
79 ASSERT_EQ(0, error_count);
83 virtual void SetUp() {
84 params_ = this->GetParam();
85 stride_ = params_.block_size * 3;
86 mask_ = (1 << params_.bit_depth) - 1;
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;
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_));
122 typedef IntraPredTest<uint8_t, IntraPredParam> VP9IntraPredTest;
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);
133 // Instantiate a token test to avoid -Wuninitialized warnings when none of the
134 // other tests are enabled.
135 INSTANTIATE_TEST_SUITE_P(
137 ::testing::Values(IntraPredParam(&vpx_d45_predictor_4x4_c,
138 &vpx_d45_predictor_4x4_c, 4, 8)));
140 INSTANTIATE_TEST_SUITE_P(
141 SSE2, VP9IntraPredTest,
143 IntraPredParam(&vpx_d45_predictor_4x4_sse2, &vpx_d45_predictor_4x4_c, 4,
145 IntraPredParam(&vpx_d45_predictor_8x8_sse2, &vpx_d45_predictor_8x8_c, 8,
147 IntraPredParam(&vpx_d207_predictor_4x4_sse2, &vpx_d207_predictor_4x4_c,
149 IntraPredParam(&vpx_dc_128_predictor_4x4_sse2,
150 &vpx_dc_128_predictor_4x4_c, 4, 8),
151 IntraPredParam(&vpx_dc_128_predictor_8x8_sse2,
152 &vpx_dc_128_predictor_8x8_c, 8, 8),
153 IntraPredParam(&vpx_dc_128_predictor_16x16_sse2,
154 &vpx_dc_128_predictor_16x16_c, 16, 8),
155 IntraPredParam(&vpx_dc_128_predictor_32x32_sse2,
156 &vpx_dc_128_predictor_32x32_c, 32, 8),
157 IntraPredParam(&vpx_dc_left_predictor_4x4_sse2,
158 &vpx_dc_left_predictor_4x4_c, 4, 8),
159 IntraPredParam(&vpx_dc_left_predictor_8x8_sse2,
160 &vpx_dc_left_predictor_8x8_c, 8, 8),
161 IntraPredParam(&vpx_dc_left_predictor_16x16_sse2,
162 &vpx_dc_left_predictor_16x16_c, 16, 8),
163 IntraPredParam(&vpx_dc_left_predictor_32x32_sse2,
164 &vpx_dc_left_predictor_32x32_c, 32, 8),
165 IntraPredParam(&vpx_dc_predictor_4x4_sse2, &vpx_dc_predictor_4x4_c, 4,
167 IntraPredParam(&vpx_dc_predictor_8x8_sse2, &vpx_dc_predictor_8x8_c, 8,
169 IntraPredParam(&vpx_dc_predictor_16x16_sse2, &vpx_dc_predictor_16x16_c,
171 IntraPredParam(&vpx_dc_predictor_32x32_sse2, &vpx_dc_predictor_32x32_c,
173 IntraPredParam(&vpx_dc_top_predictor_4x4_sse2,
174 &vpx_dc_top_predictor_4x4_c, 4, 8),
175 IntraPredParam(&vpx_dc_top_predictor_8x8_sse2,
176 &vpx_dc_top_predictor_8x8_c, 8, 8),
177 IntraPredParam(&vpx_dc_top_predictor_16x16_sse2,
178 &vpx_dc_top_predictor_16x16_c, 16, 8),
179 IntraPredParam(&vpx_dc_top_predictor_32x32_sse2,
180 &vpx_dc_top_predictor_32x32_c, 32, 8),
181 IntraPredParam(&vpx_h_predictor_4x4_sse2, &vpx_h_predictor_4x4_c, 4, 8),
182 IntraPredParam(&vpx_h_predictor_8x8_sse2, &vpx_h_predictor_8x8_c, 8, 8),
183 IntraPredParam(&vpx_h_predictor_16x16_sse2, &vpx_h_predictor_16x16_c,
185 IntraPredParam(&vpx_h_predictor_32x32_sse2, &vpx_h_predictor_32x32_c,
187 IntraPredParam(&vpx_tm_predictor_4x4_sse2, &vpx_tm_predictor_4x4_c, 4,
189 IntraPredParam(&vpx_tm_predictor_8x8_sse2, &vpx_tm_predictor_8x8_c, 8,
191 IntraPredParam(&vpx_tm_predictor_16x16_sse2, &vpx_tm_predictor_16x16_c,
193 IntraPredParam(&vpx_tm_predictor_32x32_sse2, &vpx_tm_predictor_32x32_c,
195 IntraPredParam(&vpx_v_predictor_4x4_sse2, &vpx_v_predictor_4x4_c, 4, 8),
196 IntraPredParam(&vpx_v_predictor_8x8_sse2, &vpx_v_predictor_8x8_c, 8, 8),
197 IntraPredParam(&vpx_v_predictor_16x16_sse2, &vpx_v_predictor_16x16_c,
199 IntraPredParam(&vpx_v_predictor_32x32_sse2, &vpx_v_predictor_32x32_c,
204 INSTANTIATE_TEST_SUITE_P(
205 SSSE3, VP9IntraPredTest,
206 ::testing::Values(IntraPredParam(&vpx_d45_predictor_16x16_ssse3,
207 &vpx_d45_predictor_16x16_c, 16, 8),
208 IntraPredParam(&vpx_d45_predictor_32x32_ssse3,
209 &vpx_d45_predictor_32x32_c, 32, 8),
210 IntraPredParam(&vpx_d63_predictor_4x4_ssse3,
211 &vpx_d63_predictor_4x4_c, 4, 8),
212 IntraPredParam(&vpx_d63_predictor_8x8_ssse3,
213 &vpx_d63_predictor_8x8_c, 8, 8),
214 IntraPredParam(&vpx_d63_predictor_16x16_ssse3,
215 &vpx_d63_predictor_16x16_c, 16, 8),
216 IntraPredParam(&vpx_d63_predictor_32x32_ssse3,
217 &vpx_d63_predictor_32x32_c, 32, 8),
218 IntraPredParam(&vpx_d153_predictor_4x4_ssse3,
219 &vpx_d153_predictor_4x4_c, 4, 8),
220 IntraPredParam(&vpx_d153_predictor_8x8_ssse3,
221 &vpx_d153_predictor_8x8_c, 8, 8),
222 IntraPredParam(&vpx_d153_predictor_16x16_ssse3,
223 &vpx_d153_predictor_16x16_c, 16, 8),
224 IntraPredParam(&vpx_d153_predictor_32x32_ssse3,
225 &vpx_d153_predictor_32x32_c, 32, 8),
226 IntraPredParam(&vpx_d207_predictor_8x8_ssse3,
227 &vpx_d207_predictor_8x8_c, 8, 8),
228 IntraPredParam(&vpx_d207_predictor_16x16_ssse3,
229 &vpx_d207_predictor_16x16_c, 16, 8),
230 IntraPredParam(&vpx_d207_predictor_32x32_ssse3,
231 &vpx_d207_predictor_32x32_c, 32, 8)));
235 INSTANTIATE_TEST_SUITE_P(
236 NEON, VP9IntraPredTest,
238 IntraPredParam(&vpx_d45_predictor_4x4_neon, &vpx_d45_predictor_4x4_c, 4,
240 IntraPredParam(&vpx_d45_predictor_8x8_neon, &vpx_d45_predictor_8x8_c, 8,
242 IntraPredParam(&vpx_d45_predictor_16x16_neon,
243 &vpx_d45_predictor_16x16_c, 16, 8),
244 IntraPredParam(&vpx_d45_predictor_32x32_neon,
245 &vpx_d45_predictor_32x32_c, 32, 8),
246 IntraPredParam(&vpx_d135_predictor_4x4_neon, &vpx_d135_predictor_4x4_c,
248 IntraPredParam(&vpx_d135_predictor_8x8_neon, &vpx_d135_predictor_8x8_c,
250 IntraPredParam(&vpx_d135_predictor_16x16_neon,
251 &vpx_d135_predictor_16x16_c, 16, 8),
252 IntraPredParam(&vpx_d135_predictor_32x32_neon,
253 &vpx_d135_predictor_32x32_c, 32, 8),
254 IntraPredParam(&vpx_dc_128_predictor_4x4_neon,
255 &vpx_dc_128_predictor_4x4_c, 4, 8),
256 IntraPredParam(&vpx_dc_128_predictor_8x8_neon,
257 &vpx_dc_128_predictor_8x8_c, 8, 8),
258 IntraPredParam(&vpx_dc_128_predictor_16x16_neon,
259 &vpx_dc_128_predictor_16x16_c, 16, 8),
260 IntraPredParam(&vpx_dc_128_predictor_32x32_neon,
261 &vpx_dc_128_predictor_32x32_c, 32, 8),
262 IntraPredParam(&vpx_dc_left_predictor_4x4_neon,
263 &vpx_dc_left_predictor_4x4_c, 4, 8),
264 IntraPredParam(&vpx_dc_left_predictor_8x8_neon,
265 &vpx_dc_left_predictor_8x8_c, 8, 8),
266 IntraPredParam(&vpx_dc_left_predictor_16x16_neon,
267 &vpx_dc_left_predictor_16x16_c, 16, 8),
268 IntraPredParam(&vpx_dc_left_predictor_32x32_neon,
269 &vpx_dc_left_predictor_32x32_c, 32, 8),
270 IntraPredParam(&vpx_dc_predictor_4x4_neon, &vpx_dc_predictor_4x4_c, 4,
272 IntraPredParam(&vpx_dc_predictor_8x8_neon, &vpx_dc_predictor_8x8_c, 8,
274 IntraPredParam(&vpx_dc_predictor_16x16_neon, &vpx_dc_predictor_16x16_c,
276 IntraPredParam(&vpx_dc_predictor_32x32_neon, &vpx_dc_predictor_32x32_c,
278 IntraPredParam(&vpx_dc_top_predictor_4x4_neon,
279 &vpx_dc_top_predictor_4x4_c, 4, 8),
280 IntraPredParam(&vpx_dc_top_predictor_8x8_neon,
281 &vpx_dc_top_predictor_8x8_c, 8, 8),
282 IntraPredParam(&vpx_dc_top_predictor_16x16_neon,
283 &vpx_dc_top_predictor_16x16_c, 16, 8),
284 IntraPredParam(&vpx_dc_top_predictor_32x32_neon,
285 &vpx_dc_top_predictor_32x32_c, 32, 8),
286 IntraPredParam(&vpx_h_predictor_4x4_neon, &vpx_h_predictor_4x4_c, 4, 8),
287 IntraPredParam(&vpx_h_predictor_8x8_neon, &vpx_h_predictor_8x8_c, 8, 8),
288 IntraPredParam(&vpx_h_predictor_16x16_neon, &vpx_h_predictor_16x16_c,
290 IntraPredParam(&vpx_h_predictor_32x32_neon, &vpx_h_predictor_32x32_c,
292 IntraPredParam(&vpx_tm_predictor_4x4_neon, &vpx_tm_predictor_4x4_c, 4,
294 IntraPredParam(&vpx_tm_predictor_8x8_neon, &vpx_tm_predictor_8x8_c, 8,
296 IntraPredParam(&vpx_tm_predictor_16x16_neon, &vpx_tm_predictor_16x16_c,
298 IntraPredParam(&vpx_tm_predictor_32x32_neon, &vpx_tm_predictor_32x32_c,
300 IntraPredParam(&vpx_v_predictor_4x4_neon, &vpx_v_predictor_4x4_c, 4, 8),
301 IntraPredParam(&vpx_v_predictor_8x8_neon, &vpx_v_predictor_8x8_c, 8, 8),
302 IntraPredParam(&vpx_v_predictor_16x16_neon, &vpx_v_predictor_16x16_c,
304 IntraPredParam(&vpx_v_predictor_32x32_neon, &vpx_v_predictor_32x32_c,
309 INSTANTIATE_TEST_SUITE_P(
310 DSPR2, VP9IntraPredTest,
311 ::testing::Values(IntraPredParam(&vpx_dc_predictor_4x4_dspr2,
312 &vpx_dc_predictor_4x4_c, 4, 8),
313 IntraPredParam(&vpx_dc_predictor_8x8_dspr2,
314 &vpx_dc_predictor_8x8_c, 8, 8),
315 IntraPredParam(&vpx_dc_predictor_16x16_dspr2,
316 &vpx_dc_predictor_16x16_c, 16, 8),
317 IntraPredParam(&vpx_h_predictor_4x4_dspr2,
318 &vpx_h_predictor_4x4_c, 4, 8),
319 IntraPredParam(&vpx_h_predictor_8x8_dspr2,
320 &vpx_h_predictor_8x8_c, 8, 8),
321 IntraPredParam(&vpx_h_predictor_16x16_dspr2,
322 &vpx_h_predictor_16x16_c, 16, 8),
323 IntraPredParam(&vpx_tm_predictor_4x4_dspr2,
324 &vpx_tm_predictor_4x4_c, 4, 8),
325 IntraPredParam(&vpx_tm_predictor_8x8_dspr2,
326 &vpx_tm_predictor_8x8_c, 8, 8)));
330 INSTANTIATE_TEST_SUITE_P(
331 MSA, VP9IntraPredTest,
333 IntraPredParam(&vpx_dc_128_predictor_4x4_msa,
334 &vpx_dc_128_predictor_4x4_c, 4, 8),
335 IntraPredParam(&vpx_dc_128_predictor_8x8_msa,
336 &vpx_dc_128_predictor_8x8_c, 8, 8),
337 IntraPredParam(&vpx_dc_128_predictor_16x16_msa,
338 &vpx_dc_128_predictor_16x16_c, 16, 8),
339 IntraPredParam(&vpx_dc_128_predictor_32x32_msa,
340 &vpx_dc_128_predictor_32x32_c, 32, 8),
341 IntraPredParam(&vpx_dc_left_predictor_4x4_msa,
342 &vpx_dc_left_predictor_4x4_c, 4, 8),
343 IntraPredParam(&vpx_dc_left_predictor_8x8_msa,
344 &vpx_dc_left_predictor_8x8_c, 8, 8),
345 IntraPredParam(&vpx_dc_left_predictor_16x16_msa,
346 &vpx_dc_left_predictor_16x16_c, 16, 8),
347 IntraPredParam(&vpx_dc_left_predictor_32x32_msa,
348 &vpx_dc_left_predictor_32x32_c, 32, 8),
349 IntraPredParam(&vpx_dc_predictor_4x4_msa, &vpx_dc_predictor_4x4_c, 4,
351 IntraPredParam(&vpx_dc_predictor_8x8_msa, &vpx_dc_predictor_8x8_c, 8,
353 IntraPredParam(&vpx_dc_predictor_16x16_msa, &vpx_dc_predictor_16x16_c,
355 IntraPredParam(&vpx_dc_predictor_32x32_msa, &vpx_dc_predictor_32x32_c,
357 IntraPredParam(&vpx_dc_top_predictor_4x4_msa,
358 &vpx_dc_top_predictor_4x4_c, 4, 8),
359 IntraPredParam(&vpx_dc_top_predictor_8x8_msa,
360 &vpx_dc_top_predictor_8x8_c, 8, 8),
361 IntraPredParam(&vpx_dc_top_predictor_16x16_msa,
362 &vpx_dc_top_predictor_16x16_c, 16, 8),
363 IntraPredParam(&vpx_dc_top_predictor_32x32_msa,
364 &vpx_dc_top_predictor_32x32_c, 32, 8),
365 IntraPredParam(&vpx_h_predictor_4x4_msa, &vpx_h_predictor_4x4_c, 4, 8),
366 IntraPredParam(&vpx_h_predictor_8x8_msa, &vpx_h_predictor_8x8_c, 8, 8),
367 IntraPredParam(&vpx_h_predictor_16x16_msa, &vpx_h_predictor_16x16_c, 16,
369 IntraPredParam(&vpx_h_predictor_32x32_msa, &vpx_h_predictor_32x32_c, 32,
371 IntraPredParam(&vpx_tm_predictor_4x4_msa, &vpx_tm_predictor_4x4_c, 4,
373 IntraPredParam(&vpx_tm_predictor_8x8_msa, &vpx_tm_predictor_8x8_c, 8,
375 IntraPredParam(&vpx_tm_predictor_16x16_msa, &vpx_tm_predictor_16x16_c,
377 IntraPredParam(&vpx_tm_predictor_32x32_msa, &vpx_tm_predictor_32x32_c,
379 IntraPredParam(&vpx_v_predictor_4x4_msa, &vpx_v_predictor_4x4_c, 4, 8),
380 IntraPredParam(&vpx_v_predictor_8x8_msa, &vpx_v_predictor_8x8_c, 8, 8),
381 IntraPredParam(&vpx_v_predictor_16x16_msa, &vpx_v_predictor_16x16_c, 16,
383 IntraPredParam(&vpx_v_predictor_32x32_msa, &vpx_v_predictor_32x32_c, 32,
387 // TODO(crbug.com/webm/1522): Fix test failures.
389 IntraPredParam(&vpx_d45_predictor_8x8_vsx, &vpx_d45_predictor_8x8_c, 8,
391 IntraPredParam(&vpx_d63_predictor_8x8_vsx, &vpx_d63_predictor_8x8_c, 8,
393 IntraPredParam(&vpx_dc_predictor_8x8_vsx, &vpx_dc_predictor_8x8_c, 8,
395 IntraPredParam(&vpx_h_predictor_4x4_vsx, &vpx_h_predictor_4x4_c, 4, 8),
396 IntraPredParam(&vpx_h_predictor_8x8_vsx, &vpx_h_predictor_8x8_c, 8, 8),
397 IntraPredParam(&vpx_tm_predictor_4x4_vsx, &vpx_tm_predictor_4x4_c, 4,
399 IntraPredParam(&vpx_tm_predictor_8x8_vsx, &vpx_tm_predictor_8x8_c, 8,
404 INSTANTIATE_TEST_SUITE_P(
405 VSX, VP9IntraPredTest,
406 ::testing::Values(IntraPredParam(&vpx_d45_predictor_16x16_vsx,
407 &vpx_d45_predictor_16x16_c, 16, 8),
408 IntraPredParam(&vpx_d45_predictor_32x32_vsx,
409 &vpx_d45_predictor_32x32_c, 32, 8),
410 IntraPredParam(&vpx_d63_predictor_16x16_vsx,
411 &vpx_d63_predictor_16x16_c, 16, 8),
412 IntraPredParam(&vpx_d63_predictor_32x32_vsx,
413 &vpx_d63_predictor_32x32_c, 32, 8),
414 IntraPredParam(&vpx_dc_128_predictor_16x16_vsx,
415 &vpx_dc_128_predictor_16x16_c, 16, 8),
416 IntraPredParam(&vpx_dc_128_predictor_32x32_vsx,
417 &vpx_dc_128_predictor_32x32_c, 32, 8),
418 IntraPredParam(&vpx_dc_left_predictor_16x16_vsx,
419 &vpx_dc_left_predictor_16x16_c, 16, 8),
420 IntraPredParam(&vpx_dc_left_predictor_32x32_vsx,
421 &vpx_dc_left_predictor_32x32_c, 32, 8),
422 IntraPredParam(&vpx_dc_predictor_16x16_vsx,
423 &vpx_dc_predictor_16x16_c, 16, 8),
424 IntraPredParam(&vpx_dc_predictor_32x32_vsx,
425 &vpx_dc_predictor_32x32_c, 32, 8),
426 IntraPredParam(&vpx_dc_top_predictor_16x16_vsx,
427 &vpx_dc_top_predictor_16x16_c, 16, 8),
428 IntraPredParam(&vpx_dc_top_predictor_32x32_vsx,
429 &vpx_dc_top_predictor_32x32_c, 32, 8),
430 IntraPredParam(&vpx_h_predictor_16x16_vsx,
431 &vpx_h_predictor_16x16_c, 16, 8),
432 IntraPredParam(&vpx_h_predictor_32x32_vsx,
433 &vpx_h_predictor_32x32_c, 32, 8),
434 IntraPredParam(&vpx_tm_predictor_16x16_vsx,
435 &vpx_tm_predictor_16x16_c, 16, 8),
436 IntraPredParam(&vpx_tm_predictor_32x32_vsx,
437 &vpx_tm_predictor_32x32_c, 32, 8),
438 IntraPredParam(&vpx_v_predictor_16x16_vsx,
439 &vpx_v_predictor_16x16_c, 16, 8),
440 IntraPredParam(&vpx_v_predictor_32x32_vsx,
441 &vpx_v_predictor_32x32_c, 32, 8)));
444 #if CONFIG_VP9_HIGHBITDEPTH
445 typedef void (*HighbdIntraPred)(uint16_t *dst, ptrdiff_t stride,
446 const uint16_t *above, const uint16_t *left,
448 struct HighbdIntraPredParam {
449 HighbdIntraPredParam(HighbdIntraPred pred = nullptr,
450 HighbdIntraPred ref = nullptr, int block_size_value = 0,
451 int bit_depth_value = 0)
452 : pred_fn(pred), ref_fn(ref), block_size(block_size_value),
453 bit_depth(bit_depth_value) {}
455 HighbdIntraPred pred_fn;
456 HighbdIntraPred ref_fn;
461 #if HAVE_SSSE3 || HAVE_NEON || HAVE_SSE2
463 void IntraPredTest<uint16_t, HighbdIntraPredParam>::Predict() {
464 const int bit_depth = params_.bit_depth;
465 params_.ref_fn(ref_dst_, stride_, above_row_, left_col_, bit_depth);
466 ASM_REGISTER_STATE_CHECK(
467 params_.pred_fn(dst_, stride_, above_row_, left_col_, bit_depth));
470 typedef IntraPredTest<uint16_t, HighbdIntraPredParam> VP9HighbdIntraPredTest;
471 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VP9HighbdIntraPredTest);
473 TEST_P(VP9HighbdIntraPredTest, HighbdIntraPredTests) {
474 // max block size is 32
475 DECLARE_ALIGNED(16, uint16_t, left_col[2 * 32]);
476 DECLARE_ALIGNED(16, uint16_t, above_data[2 * 32 + 32]);
477 DECLARE_ALIGNED(16, uint16_t, dst[3 * 32 * 32]);
478 DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 32 * 32]);
479 RunTest(left_col, above_data, dst, ref_dst);
484 INSTANTIATE_TEST_SUITE_P(
485 SSSE3_TO_C_8, VP9HighbdIntraPredTest,
487 HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_ssse3,
488 &vpx_highbd_d45_predictor_4x4_c, 4, 8),
489 HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_ssse3,
490 &vpx_highbd_d45_predictor_8x8_c, 8, 8),
491 HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_ssse3,
492 &vpx_highbd_d45_predictor_16x16_c, 16, 8),
493 HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_ssse3,
494 &vpx_highbd_d45_predictor_32x32_c, 32, 8),
495 HighbdIntraPredParam(&vpx_highbd_d63_predictor_8x8_ssse3,
496 &vpx_highbd_d63_predictor_8x8_c, 8, 8),
497 HighbdIntraPredParam(&vpx_highbd_d63_predictor_16x16_ssse3,
498 &vpx_highbd_d63_predictor_16x16_c, 16, 8),
499 HighbdIntraPredParam(&vpx_highbd_d63_predictor_32x32_c,
500 &vpx_highbd_d63_predictor_32x32_ssse3, 32, 8),
501 HighbdIntraPredParam(&vpx_highbd_d117_predictor_8x8_ssse3,
502 &vpx_highbd_d117_predictor_8x8_c, 8, 8),
503 HighbdIntraPredParam(&vpx_highbd_d117_predictor_16x16_ssse3,
504 &vpx_highbd_d117_predictor_16x16_c, 16, 8),
505 HighbdIntraPredParam(&vpx_highbd_d117_predictor_32x32_c,
506 &vpx_highbd_d117_predictor_32x32_ssse3, 32, 8),
507 HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_ssse3,
508 &vpx_highbd_d135_predictor_8x8_c, 8, 8),
509 HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_ssse3,
510 &vpx_highbd_d135_predictor_16x16_c, 16, 8),
511 HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_ssse3,
512 &vpx_highbd_d135_predictor_32x32_c, 32, 8),
513 HighbdIntraPredParam(&vpx_highbd_d153_predictor_8x8_ssse3,
514 &vpx_highbd_d153_predictor_8x8_c, 8, 8),
515 HighbdIntraPredParam(&vpx_highbd_d153_predictor_16x16_ssse3,
516 &vpx_highbd_d153_predictor_16x16_c, 16, 8),
517 HighbdIntraPredParam(&vpx_highbd_d153_predictor_32x32_ssse3,
518 &vpx_highbd_d153_predictor_32x32_c, 32, 8),
519 HighbdIntraPredParam(&vpx_highbd_d207_predictor_8x8_ssse3,
520 &vpx_highbd_d207_predictor_8x8_c, 8, 8),
521 HighbdIntraPredParam(&vpx_highbd_d207_predictor_16x16_ssse3,
522 &vpx_highbd_d207_predictor_16x16_c, 16, 8),
523 HighbdIntraPredParam(&vpx_highbd_d207_predictor_32x32_ssse3,
524 &vpx_highbd_d207_predictor_32x32_c, 32, 8)));
526 INSTANTIATE_TEST_SUITE_P(
527 SSSE3_TO_C_10, VP9HighbdIntraPredTest,
529 HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_ssse3,
530 &vpx_highbd_d45_predictor_4x4_c, 4, 10),
531 HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_ssse3,
532 &vpx_highbd_d45_predictor_8x8_c, 8, 10),
533 HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_ssse3,
534 &vpx_highbd_d45_predictor_16x16_c, 16, 10),
535 HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_ssse3,
536 &vpx_highbd_d45_predictor_32x32_c, 32, 10),
537 HighbdIntraPredParam(&vpx_highbd_d63_predictor_8x8_ssse3,
538 &vpx_highbd_d63_predictor_8x8_c, 8, 10),
539 HighbdIntraPredParam(&vpx_highbd_d63_predictor_16x16_ssse3,
540 &vpx_highbd_d63_predictor_16x16_c, 16, 10),
541 HighbdIntraPredParam(&vpx_highbd_d63_predictor_32x32_c,
542 &vpx_highbd_d63_predictor_32x32_ssse3, 32, 10),
543 HighbdIntraPredParam(&vpx_highbd_d117_predictor_8x8_ssse3,
544 &vpx_highbd_d117_predictor_8x8_c, 8, 10),
545 HighbdIntraPredParam(&vpx_highbd_d117_predictor_16x16_ssse3,
546 &vpx_highbd_d117_predictor_16x16_c, 16, 10),
547 HighbdIntraPredParam(&vpx_highbd_d117_predictor_32x32_c,
548 &vpx_highbd_d117_predictor_32x32_ssse3, 32, 10),
549 HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_ssse3,
550 &vpx_highbd_d135_predictor_8x8_c, 8, 10),
551 HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_ssse3,
552 &vpx_highbd_d135_predictor_16x16_c, 16, 10),
553 HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_ssse3,
554 &vpx_highbd_d135_predictor_32x32_c, 32, 10),
555 HighbdIntraPredParam(&vpx_highbd_d153_predictor_8x8_ssse3,
556 &vpx_highbd_d153_predictor_8x8_c, 8, 10),
557 HighbdIntraPredParam(&vpx_highbd_d153_predictor_16x16_ssse3,
558 &vpx_highbd_d153_predictor_16x16_c, 16, 10),
559 HighbdIntraPredParam(&vpx_highbd_d153_predictor_32x32_ssse3,
560 &vpx_highbd_d153_predictor_32x32_c, 32, 10),
561 HighbdIntraPredParam(&vpx_highbd_d207_predictor_8x8_ssse3,
562 &vpx_highbd_d207_predictor_8x8_c, 8, 10),
563 HighbdIntraPredParam(&vpx_highbd_d207_predictor_16x16_ssse3,
564 &vpx_highbd_d207_predictor_16x16_c, 16, 10),
565 HighbdIntraPredParam(&vpx_highbd_d207_predictor_32x32_ssse3,
566 &vpx_highbd_d207_predictor_32x32_c, 32, 10)));
568 INSTANTIATE_TEST_SUITE_P(
569 SSSE3_TO_C_12, VP9HighbdIntraPredTest,
571 HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_ssse3,
572 &vpx_highbd_d45_predictor_4x4_c, 4, 12),
573 HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_ssse3,
574 &vpx_highbd_d45_predictor_8x8_c, 8, 12),
575 HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_ssse3,
576 &vpx_highbd_d45_predictor_16x16_c, 16, 12),
577 HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_ssse3,
578 &vpx_highbd_d45_predictor_32x32_c, 32, 12),
579 HighbdIntraPredParam(&vpx_highbd_d63_predictor_8x8_ssse3,
580 &vpx_highbd_d63_predictor_8x8_c, 8, 12),
581 HighbdIntraPredParam(&vpx_highbd_d63_predictor_16x16_ssse3,
582 &vpx_highbd_d63_predictor_16x16_c, 16, 12),
583 HighbdIntraPredParam(&vpx_highbd_d63_predictor_32x32_c,
584 &vpx_highbd_d63_predictor_32x32_ssse3, 32, 12),
585 HighbdIntraPredParam(&vpx_highbd_d117_predictor_8x8_ssse3,
586 &vpx_highbd_d117_predictor_8x8_c, 8, 12),
587 HighbdIntraPredParam(&vpx_highbd_d117_predictor_16x16_ssse3,
588 &vpx_highbd_d117_predictor_16x16_c, 16, 12),
589 HighbdIntraPredParam(&vpx_highbd_d117_predictor_32x32_c,
590 &vpx_highbd_d117_predictor_32x32_ssse3, 32, 12),
591 HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_ssse3,
592 &vpx_highbd_d135_predictor_8x8_c, 8, 12),
593 HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_ssse3,
594 &vpx_highbd_d135_predictor_16x16_c, 16, 12),
595 HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_ssse3,
596 &vpx_highbd_d135_predictor_32x32_c, 32, 12),
597 HighbdIntraPredParam(&vpx_highbd_d153_predictor_8x8_ssse3,
598 &vpx_highbd_d153_predictor_8x8_c, 8, 12),
599 HighbdIntraPredParam(&vpx_highbd_d153_predictor_16x16_ssse3,
600 &vpx_highbd_d153_predictor_16x16_c, 16, 12),
601 HighbdIntraPredParam(&vpx_highbd_d153_predictor_32x32_ssse3,
602 &vpx_highbd_d153_predictor_32x32_c, 32, 12),
603 HighbdIntraPredParam(&vpx_highbd_d207_predictor_8x8_ssse3,
604 &vpx_highbd_d207_predictor_8x8_c, 8, 12),
605 HighbdIntraPredParam(&vpx_highbd_d207_predictor_16x16_ssse3,
606 &vpx_highbd_d207_predictor_16x16_c, 16, 12),
607 HighbdIntraPredParam(&vpx_highbd_d207_predictor_32x32_ssse3,
608 &vpx_highbd_d207_predictor_32x32_c, 32, 12)));
612 INSTANTIATE_TEST_SUITE_P(
613 SSE2_TO_C_8, VP9HighbdIntraPredTest,
615 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
616 &vpx_highbd_dc_128_predictor_4x4_c, 4, 8),
617 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
618 &vpx_highbd_dc_128_predictor_8x8_c, 8, 8),
619 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
620 &vpx_highbd_dc_128_predictor_16x16_c, 16, 8),
621 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
622 &vpx_highbd_dc_128_predictor_32x32_c, 32, 8),
623 HighbdIntraPredParam(&vpx_highbd_d63_predictor_4x4_sse2,
624 &vpx_highbd_d63_predictor_4x4_c, 4, 8),
625 HighbdIntraPredParam(&vpx_highbd_d117_predictor_4x4_sse2,
626 &vpx_highbd_d117_predictor_4x4_c, 4, 8),
627 HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_sse2,
628 &vpx_highbd_d135_predictor_4x4_c, 4, 8),
629 HighbdIntraPredParam(&vpx_highbd_d153_predictor_4x4_sse2,
630 &vpx_highbd_d153_predictor_4x4_c, 4, 8),
631 HighbdIntraPredParam(&vpx_highbd_d207_predictor_4x4_sse2,
632 &vpx_highbd_d207_predictor_4x4_c, 4, 8),
633 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
634 &vpx_highbd_dc_left_predictor_4x4_c, 4, 8),
635 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
636 &vpx_highbd_dc_left_predictor_8x8_c, 8, 8),
637 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
638 &vpx_highbd_dc_left_predictor_16x16_c, 16, 8),
639 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
640 &vpx_highbd_dc_left_predictor_32x32_c, 32, 8),
641 HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
642 &vpx_highbd_dc_predictor_4x4_c, 4, 8),
643 HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
644 &vpx_highbd_dc_predictor_8x8_c, 8, 8),
645 HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
646 &vpx_highbd_dc_predictor_16x16_c, 16, 8),
647 HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
648 &vpx_highbd_dc_predictor_32x32_c, 32, 8),
649 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
650 &vpx_highbd_dc_top_predictor_4x4_c, 4, 8),
651 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
652 &vpx_highbd_dc_top_predictor_8x8_c, 8, 8),
653 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
654 &vpx_highbd_dc_top_predictor_16x16_c, 16, 8),
655 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
656 &vpx_highbd_dc_top_predictor_32x32_c, 32, 8),
657 HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
658 &vpx_highbd_tm_predictor_4x4_c, 4, 8),
659 HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
660 &vpx_highbd_tm_predictor_8x8_c, 8, 8),
661 HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
662 &vpx_highbd_tm_predictor_16x16_c, 16, 8),
663 HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
664 &vpx_highbd_tm_predictor_32x32_c, 32, 8),
665 HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
666 &vpx_highbd_h_predictor_4x4_c, 4, 8),
667 HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
668 &vpx_highbd_h_predictor_8x8_c, 8, 8),
669 HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
670 &vpx_highbd_h_predictor_16x16_c, 16, 8),
671 HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
672 &vpx_highbd_h_predictor_32x32_c, 32, 8),
673 HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
674 &vpx_highbd_v_predictor_4x4_c, 4, 8),
675 HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
676 &vpx_highbd_v_predictor_8x8_c, 8, 8),
677 HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
678 &vpx_highbd_v_predictor_16x16_c, 16, 8),
679 HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
680 &vpx_highbd_v_predictor_32x32_c, 32, 8)));
682 INSTANTIATE_TEST_SUITE_P(
683 SSE2_TO_C_10, VP9HighbdIntraPredTest,
685 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
686 &vpx_highbd_dc_128_predictor_4x4_c, 4, 10),
687 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
688 &vpx_highbd_dc_128_predictor_8x8_c, 8, 10),
689 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
690 &vpx_highbd_dc_128_predictor_16x16_c, 16, 10),
691 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
692 &vpx_highbd_dc_128_predictor_32x32_c, 32, 10),
693 HighbdIntraPredParam(&vpx_highbd_d63_predictor_4x4_sse2,
694 &vpx_highbd_d63_predictor_4x4_c, 4, 10),
695 HighbdIntraPredParam(&vpx_highbd_d117_predictor_4x4_sse2,
696 &vpx_highbd_d117_predictor_4x4_c, 4, 10),
697 HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_sse2,
698 &vpx_highbd_d135_predictor_4x4_c, 4, 10),
699 HighbdIntraPredParam(&vpx_highbd_d153_predictor_4x4_sse2,
700 &vpx_highbd_d153_predictor_4x4_c, 4, 10),
701 HighbdIntraPredParam(&vpx_highbd_d207_predictor_4x4_sse2,
702 &vpx_highbd_d207_predictor_4x4_c, 4, 10),
703 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
704 &vpx_highbd_dc_left_predictor_4x4_c, 4, 10),
705 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
706 &vpx_highbd_dc_left_predictor_8x8_c, 8, 10),
707 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
708 &vpx_highbd_dc_left_predictor_16x16_c, 16, 10),
709 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
710 &vpx_highbd_dc_left_predictor_32x32_c, 32, 10),
711 HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
712 &vpx_highbd_dc_predictor_4x4_c, 4, 10),
713 HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
714 &vpx_highbd_dc_predictor_8x8_c, 8, 10),
715 HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
716 &vpx_highbd_dc_predictor_16x16_c, 16, 10),
717 HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
718 &vpx_highbd_dc_predictor_32x32_c, 32, 10),
719 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
720 &vpx_highbd_dc_top_predictor_4x4_c, 4, 10),
721 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
722 &vpx_highbd_dc_top_predictor_8x8_c, 8, 10),
723 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
724 &vpx_highbd_dc_top_predictor_16x16_c, 16, 10),
725 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
726 &vpx_highbd_dc_top_predictor_32x32_c, 32, 10),
727 HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
728 &vpx_highbd_tm_predictor_4x4_c, 4, 10),
729 HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
730 &vpx_highbd_tm_predictor_8x8_c, 8, 10),
731 HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
732 &vpx_highbd_tm_predictor_16x16_c, 16, 10),
733 HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
734 &vpx_highbd_tm_predictor_32x32_c, 32, 10),
735 HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
736 &vpx_highbd_h_predictor_4x4_c, 4, 10),
737 HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
738 &vpx_highbd_h_predictor_8x8_c, 8, 10),
739 HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
740 &vpx_highbd_h_predictor_16x16_c, 16, 10),
741 HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
742 &vpx_highbd_h_predictor_32x32_c, 32, 10),
743 HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
744 &vpx_highbd_v_predictor_4x4_c, 4, 10),
745 HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
746 &vpx_highbd_v_predictor_8x8_c, 8, 10),
747 HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
748 &vpx_highbd_v_predictor_16x16_c, 16, 10),
749 HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
750 &vpx_highbd_v_predictor_32x32_c, 32, 10)));
752 INSTANTIATE_TEST_SUITE_P(
753 SSE2_TO_C_12, VP9HighbdIntraPredTest,
755 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
756 &vpx_highbd_dc_128_predictor_4x4_c, 4, 12),
757 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
758 &vpx_highbd_dc_128_predictor_8x8_c, 8, 12),
759 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
760 &vpx_highbd_dc_128_predictor_16x16_c, 16, 12),
761 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
762 &vpx_highbd_dc_128_predictor_32x32_c, 32, 12),
763 HighbdIntraPredParam(&vpx_highbd_d63_predictor_4x4_sse2,
764 &vpx_highbd_d63_predictor_4x4_c, 4, 12),
765 HighbdIntraPredParam(&vpx_highbd_d117_predictor_4x4_sse2,
766 &vpx_highbd_d117_predictor_4x4_c, 4, 12),
767 HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_sse2,
768 &vpx_highbd_d135_predictor_4x4_c, 4, 12),
769 HighbdIntraPredParam(&vpx_highbd_d153_predictor_4x4_sse2,
770 &vpx_highbd_d153_predictor_4x4_c, 4, 12),
771 HighbdIntraPredParam(&vpx_highbd_d207_predictor_4x4_sse2,
772 &vpx_highbd_d207_predictor_4x4_c, 4, 12),
773 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
774 &vpx_highbd_dc_left_predictor_4x4_c, 4, 12),
775 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
776 &vpx_highbd_dc_left_predictor_8x8_c, 8, 12),
777 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
778 &vpx_highbd_dc_left_predictor_16x16_c, 16, 12),
779 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
780 &vpx_highbd_dc_left_predictor_32x32_c, 32, 12),
781 HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
782 &vpx_highbd_dc_predictor_4x4_c, 4, 12),
783 HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
784 &vpx_highbd_dc_predictor_8x8_c, 8, 12),
785 HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
786 &vpx_highbd_dc_predictor_16x16_c, 16, 12),
787 HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
788 &vpx_highbd_dc_predictor_32x32_c, 32, 12),
789 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
790 &vpx_highbd_dc_top_predictor_4x4_c, 4, 12),
791 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
792 &vpx_highbd_dc_top_predictor_8x8_c, 8, 12),
793 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
794 &vpx_highbd_dc_top_predictor_16x16_c, 16, 12),
795 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
796 &vpx_highbd_dc_top_predictor_32x32_c, 32, 12),
797 HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
798 &vpx_highbd_tm_predictor_4x4_c, 4, 12),
799 HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
800 &vpx_highbd_tm_predictor_8x8_c, 8, 12),
801 HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
802 &vpx_highbd_tm_predictor_16x16_c, 16, 12),
803 HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
804 &vpx_highbd_tm_predictor_32x32_c, 32, 12),
805 HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
806 &vpx_highbd_h_predictor_4x4_c, 4, 12),
807 HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
808 &vpx_highbd_h_predictor_8x8_c, 8, 12),
809 HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
810 &vpx_highbd_h_predictor_16x16_c, 16, 12),
811 HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
812 &vpx_highbd_h_predictor_32x32_c, 32, 12),
813 HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
814 &vpx_highbd_v_predictor_4x4_c, 4, 12),
815 HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
816 &vpx_highbd_v_predictor_8x8_c, 8, 12),
817 HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
818 &vpx_highbd_v_predictor_16x16_c, 16, 12),
819 HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
820 &vpx_highbd_v_predictor_32x32_c, 32, 12)));
824 INSTANTIATE_TEST_SUITE_P(
825 NEON_TO_C_8, VP9HighbdIntraPredTest,
827 HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
828 &vpx_highbd_d45_predictor_4x4_c, 4, 8),
829 HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
830 &vpx_highbd_d45_predictor_8x8_c, 8, 8),
831 HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
832 &vpx_highbd_d45_predictor_16x16_c, 16, 8),
833 HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
834 &vpx_highbd_d45_predictor_32x32_c, 32, 8),
835 HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
836 &vpx_highbd_d135_predictor_4x4_c, 4, 8),
837 HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
838 &vpx_highbd_d135_predictor_8x8_c, 8, 8),
839 HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
840 &vpx_highbd_d135_predictor_16x16_c, 16, 8),
841 HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
842 &vpx_highbd_d135_predictor_32x32_c, 32, 8),
843 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
844 &vpx_highbd_dc_128_predictor_4x4_c, 4, 8),
845 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
846 &vpx_highbd_dc_128_predictor_8x8_c, 8, 8),
847 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
848 &vpx_highbd_dc_128_predictor_16x16_c, 16, 8),
849 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
850 &vpx_highbd_dc_128_predictor_32x32_c, 32, 8),
851 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
852 &vpx_highbd_dc_left_predictor_4x4_c, 4, 8),
853 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
854 &vpx_highbd_dc_left_predictor_8x8_c, 8, 8),
855 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
856 &vpx_highbd_dc_left_predictor_16x16_c, 16, 8),
857 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
858 &vpx_highbd_dc_left_predictor_32x32_c, 32, 8),
859 HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
860 &vpx_highbd_dc_predictor_4x4_c, 4, 8),
861 HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
862 &vpx_highbd_dc_predictor_8x8_c, 8, 8),
863 HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
864 &vpx_highbd_dc_predictor_16x16_c, 16, 8),
865 HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
866 &vpx_highbd_dc_predictor_32x32_c, 32, 8),
867 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
868 &vpx_highbd_dc_top_predictor_4x4_c, 4, 8),
869 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
870 &vpx_highbd_dc_top_predictor_8x8_c, 8, 8),
871 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
872 &vpx_highbd_dc_top_predictor_16x16_c, 16, 8),
873 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
874 &vpx_highbd_dc_top_predictor_32x32_c, 32, 8),
875 HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
876 &vpx_highbd_h_predictor_4x4_c, 4, 8),
877 HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
878 &vpx_highbd_h_predictor_8x8_c, 8, 8),
879 HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
880 &vpx_highbd_h_predictor_16x16_c, 16, 8),
881 HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
882 &vpx_highbd_h_predictor_32x32_c, 32, 8),
883 HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
884 &vpx_highbd_tm_predictor_4x4_c, 4, 8),
885 HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
886 &vpx_highbd_tm_predictor_8x8_c, 8, 8),
887 HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
888 &vpx_highbd_tm_predictor_16x16_c, 16, 8),
889 HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
890 &vpx_highbd_tm_predictor_32x32_c, 32, 8),
891 HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
892 &vpx_highbd_v_predictor_4x4_c, 4, 8),
893 HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
894 &vpx_highbd_v_predictor_8x8_c, 8, 8),
895 HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
896 &vpx_highbd_v_predictor_16x16_c, 16, 8),
897 HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
898 &vpx_highbd_v_predictor_32x32_c, 32, 8)));
900 INSTANTIATE_TEST_SUITE_P(
901 NEON_TO_C_10, VP9HighbdIntraPredTest,
903 HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
904 &vpx_highbd_d45_predictor_4x4_c, 4, 10),
905 HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
906 &vpx_highbd_d45_predictor_8x8_c, 8, 10),
907 HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
908 &vpx_highbd_d45_predictor_16x16_c, 16, 10),
909 HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
910 &vpx_highbd_d45_predictor_32x32_c, 32, 10),
911 HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
912 &vpx_highbd_d135_predictor_4x4_c, 4, 10),
913 HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
914 &vpx_highbd_d135_predictor_8x8_c, 8, 10),
915 HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
916 &vpx_highbd_d135_predictor_16x16_c, 16, 10),
917 HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
918 &vpx_highbd_d135_predictor_32x32_c, 32, 10),
919 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
920 &vpx_highbd_dc_128_predictor_4x4_c, 4, 10),
921 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
922 &vpx_highbd_dc_128_predictor_8x8_c, 8, 10),
923 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
924 &vpx_highbd_dc_128_predictor_16x16_c, 16, 10),
925 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
926 &vpx_highbd_dc_128_predictor_32x32_c, 32, 10),
927 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
928 &vpx_highbd_dc_left_predictor_4x4_c, 4, 10),
929 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
930 &vpx_highbd_dc_left_predictor_8x8_c, 8, 10),
931 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
932 &vpx_highbd_dc_left_predictor_16x16_c, 16, 10),
933 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
934 &vpx_highbd_dc_left_predictor_32x32_c, 32, 10),
935 HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
936 &vpx_highbd_dc_predictor_4x4_c, 4, 10),
937 HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
938 &vpx_highbd_dc_predictor_8x8_c, 8, 10),
939 HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
940 &vpx_highbd_dc_predictor_16x16_c, 16, 10),
941 HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
942 &vpx_highbd_dc_predictor_32x32_c, 32, 10),
943 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
944 &vpx_highbd_dc_top_predictor_4x4_c, 4, 10),
945 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
946 &vpx_highbd_dc_top_predictor_8x8_c, 8, 10),
947 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
948 &vpx_highbd_dc_top_predictor_16x16_c, 16, 10),
949 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
950 &vpx_highbd_dc_top_predictor_32x32_c, 32, 10),
951 HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
952 &vpx_highbd_h_predictor_4x4_c, 4, 10),
953 HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
954 &vpx_highbd_h_predictor_8x8_c, 8, 10),
955 HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
956 &vpx_highbd_h_predictor_16x16_c, 16, 10),
957 HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
958 &vpx_highbd_h_predictor_32x32_c, 32, 10),
959 HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
960 &vpx_highbd_tm_predictor_4x4_c, 4, 10),
961 HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
962 &vpx_highbd_tm_predictor_8x8_c, 8, 10),
963 HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
964 &vpx_highbd_tm_predictor_16x16_c, 16, 10),
965 HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
966 &vpx_highbd_tm_predictor_32x32_c, 32, 10),
967 HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
968 &vpx_highbd_v_predictor_4x4_c, 4, 10),
969 HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
970 &vpx_highbd_v_predictor_8x8_c, 8, 10),
971 HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
972 &vpx_highbd_v_predictor_16x16_c, 16, 10),
973 HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
974 &vpx_highbd_v_predictor_32x32_c, 32, 10)));
976 INSTANTIATE_TEST_SUITE_P(
977 NEON_TO_C_12, VP9HighbdIntraPredTest,
979 HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
980 &vpx_highbd_d45_predictor_4x4_c, 4, 12),
981 HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
982 &vpx_highbd_d45_predictor_8x8_c, 8, 12),
983 HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
984 &vpx_highbd_d45_predictor_16x16_c, 16, 12),
985 HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
986 &vpx_highbd_d45_predictor_32x32_c, 32, 12),
987 HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
988 &vpx_highbd_d135_predictor_4x4_c, 4, 12),
989 HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
990 &vpx_highbd_d135_predictor_8x8_c, 8, 12),
991 HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
992 &vpx_highbd_d135_predictor_16x16_c, 16, 12),
993 HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
994 &vpx_highbd_d135_predictor_32x32_c, 32, 12),
995 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
996 &vpx_highbd_dc_128_predictor_4x4_c, 4, 12),
997 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
998 &vpx_highbd_dc_128_predictor_8x8_c, 8, 12),
999 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
1000 &vpx_highbd_dc_128_predictor_16x16_c, 16, 12),
1001 HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
1002 &vpx_highbd_dc_128_predictor_32x32_c, 32, 12),
1003 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
1004 &vpx_highbd_dc_left_predictor_4x4_c, 4, 12),
1005 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
1006 &vpx_highbd_dc_left_predictor_8x8_c, 8, 12),
1007 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
1008 &vpx_highbd_dc_left_predictor_16x16_c, 16, 12),
1009 HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
1010 &vpx_highbd_dc_left_predictor_32x32_c, 32, 12),
1011 HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
1012 &vpx_highbd_dc_predictor_4x4_c, 4, 12),
1013 HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
1014 &vpx_highbd_dc_predictor_8x8_c, 8, 12),
1015 HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
1016 &vpx_highbd_dc_predictor_16x16_c, 16, 12),
1017 HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
1018 &vpx_highbd_dc_predictor_32x32_c, 32, 12),
1019 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
1020 &vpx_highbd_dc_top_predictor_4x4_c, 4, 12),
1021 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
1022 &vpx_highbd_dc_top_predictor_8x8_c, 8, 12),
1023 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
1024 &vpx_highbd_dc_top_predictor_16x16_c, 16, 12),
1025 HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
1026 &vpx_highbd_dc_top_predictor_32x32_c, 32, 12),
1027 HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
1028 &vpx_highbd_h_predictor_4x4_c, 4, 12),
1029 HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
1030 &vpx_highbd_h_predictor_8x8_c, 8, 12),
1031 HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
1032 &vpx_highbd_h_predictor_16x16_c, 16, 12),
1033 HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
1034 &vpx_highbd_h_predictor_32x32_c, 32, 12),
1035 HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
1036 &vpx_highbd_tm_predictor_4x4_c, 4, 12),
1037 HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
1038 &vpx_highbd_tm_predictor_8x8_c, 8, 12),
1039 HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
1040 &vpx_highbd_tm_predictor_16x16_c, 16, 12),
1041 HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
1042 &vpx_highbd_tm_predictor_32x32_c, 32, 12),
1043 HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
1044 &vpx_highbd_v_predictor_4x4_c, 4, 12),
1045 HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
1046 &vpx_highbd_v_predictor_8x8_c, 8, 12),
1047 HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
1048 &vpx_highbd_v_predictor_16x16_c, 16, 12),
1049 HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
1050 &vpx_highbd_v_predictor_32x32_c, 32, 12)));
1053 #endif // CONFIG_VP9_HIGHBITDEPTH