2 * Copyright (c) 2012 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.
16 #include "third_party/googletest/src/include/gtest/gtest.h"
18 #include "./vp9_rtcd.h"
19 #include "./vpx_config.h"
20 #include "./vpx_dsp_rtcd.h"
22 #include "test/acm_random.h"
23 #include "test/clear_system_state.h"
24 #include "test/register_state_check.h"
25 #include "test/util.h"
26 #include "vpx/vpx_codec.h"
27 #include "vpx_mem/vpx_mem.h"
28 #include "vpx_ports/vpx_timer.h"
30 using libvpx_test::ACMRandom;
34 template <typename Pixel>
35 class AverageTestBase : public ::testing::Test {
37 AverageTestBase(int width, int height)
38 : width_(width), height_(height), source_data_(nullptr),
39 source_stride_(0), bit_depth_(8) {}
41 virtual void TearDown() {
42 vpx_free(source_data_);
43 source_data_ = nullptr;
44 libvpx_test::ClearSystemState();
48 // Handle blocks up to 4 blocks 64x64 with stride up to 128
49 static const int kDataAlignment = 16;
50 static const int kDataBlockSize = 64 * 128;
52 virtual void SetUp() {
53 source_data_ = reinterpret_cast<Pixel *>(
54 vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(source_data_[0])));
55 ASSERT_NE(source_data_, nullptr);
56 source_stride_ = (width_ + 31) & ~31;
58 rnd_.Reset(ACMRandom::DeterministicSeed());
62 static unsigned int ReferenceAverage8x8(const Pixel *source, int pitch) {
63 unsigned int average = 0;
64 for (int h = 0; h < 8; ++h) {
65 for (int w = 0; w < 8; ++w) average += source[h * pitch + w];
67 return ((average + 32) >> 6);
70 static unsigned int ReferenceAverage4x4(const Pixel *source, int pitch) {
71 unsigned int average = 0;
72 for (int h = 0; h < 4; ++h) {
73 for (int w = 0; w < 4; ++w) average += source[h * pitch + w];
75 return ((average + 8) >> 4);
78 void FillConstant(Pixel fill_constant) {
79 for (int i = 0; i < width_ * height_; ++i) {
80 source_data_[i] = fill_constant;
85 for (int i = 0; i < width_ * height_; ++i) {
86 source_data_[i] = rnd_.Rand16() & ((1 << bit_depth_) - 1);
97 typedef unsigned int (*AverageFunction)(const uint8_t *s, int pitch);
99 typedef std::tuple<int, int, int, int, AverageFunction> AvgFunc;
101 class AverageTest : public AverageTestBase<uint8_t>,
102 public ::testing::WithParamInterface<AvgFunc> {
104 AverageTest() : AverageTestBase(GET_PARAM(0), GET_PARAM(1)) {}
107 void CheckAverages() {
108 const int block_size = GET_PARAM(3);
109 unsigned int expected = 0;
110 if (block_size == 8) {
112 ReferenceAverage8x8(source_data_ + GET_PARAM(2), source_stride_);
113 } else if (block_size == 4) {
115 ReferenceAverage4x4(source_data_ + GET_PARAM(2), source_stride_);
118 ASM_REGISTER_STATE_CHECK(
119 GET_PARAM(4)(source_data_ + GET_PARAM(2), source_stride_));
120 unsigned int actual =
121 GET_PARAM(4)(source_data_ + GET_PARAM(2), source_stride_);
123 EXPECT_EQ(expected, actual);
127 #if CONFIG_VP9_HIGHBITDEPTH
128 class AverageTestHBD : public AverageTestBase<uint16_t>,
129 public ::testing::WithParamInterface<AvgFunc> {
131 AverageTestHBD() : AverageTestBase(GET_PARAM(0), GET_PARAM(1)) {}
134 void CheckAverages() {
135 const int block_size = GET_PARAM(3);
136 unsigned int expected = 0;
137 if (block_size == 8) {
139 ReferenceAverage8x8(source_data_ + GET_PARAM(2), source_stride_);
140 } else if (block_size == 4) {
142 ReferenceAverage4x4(source_data_ + GET_PARAM(2), source_stride_);
145 ASM_REGISTER_STATE_CHECK(GET_PARAM(4)(
146 CONVERT_TO_BYTEPTR(source_data_ + GET_PARAM(2)), source_stride_));
147 unsigned int actual = GET_PARAM(4)(
148 CONVERT_TO_BYTEPTR(source_data_ + GET_PARAM(2)), source_stride_);
150 EXPECT_EQ(expected, actual);
153 #endif // CONFIG_VP9_HIGHBITDEPTH
155 #if HAVE_NEON || HAVE_SSE2 || HAVE_MSA
156 typedef void (*IntProRowFunc)(int16_t hbuf[16], uint8_t const *ref,
157 const int ref_stride, const int height);
159 typedef std::tuple<int, IntProRowFunc, IntProRowFunc> IntProRowParam;
161 class IntProRowTest : public AverageTestBase<uint8_t>,
162 public ::testing::WithParamInterface<IntProRowParam> {
165 : AverageTestBase(16, GET_PARAM(0)), hbuf_asm_(nullptr),
167 asm_func_ = GET_PARAM(1);
168 c_func_ = GET_PARAM(2);
172 virtual void SetUp() {
173 source_data_ = reinterpret_cast<uint8_t *>(
174 vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(source_data_[0])));
175 ASSERT_NE(source_data_, nullptr);
177 hbuf_asm_ = reinterpret_cast<int16_t *>(
178 vpx_memalign(kDataAlignment, sizeof(*hbuf_asm_) * 16));
179 hbuf_c_ = reinterpret_cast<int16_t *>(
180 vpx_memalign(kDataAlignment, sizeof(*hbuf_c_) * 16));
183 virtual void TearDown() {
184 vpx_free(source_data_);
185 source_data_ = nullptr;
192 void RunComparison() {
193 ASM_REGISTER_STATE_CHECK(c_func_(hbuf_c_, source_data_, 0, height_));
194 ASM_REGISTER_STATE_CHECK(asm_func_(hbuf_asm_, source_data_, 0, height_));
195 EXPECT_EQ(0, memcmp(hbuf_c_, hbuf_asm_, sizeof(*hbuf_c_) * 16))
196 << "Output mismatch";
200 IntProRowFunc asm_func_;
201 IntProRowFunc c_func_;
205 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(IntProRowTest);
207 typedef int16_t (*IntProColFunc)(uint8_t const *ref, const int width);
209 typedef std::tuple<int, IntProColFunc, IntProColFunc> IntProColParam;
211 class IntProColTest : public AverageTestBase<uint8_t>,
212 public ::testing::WithParamInterface<IntProColParam> {
214 IntProColTest() : AverageTestBase(GET_PARAM(0), 1), sum_asm_(0), sum_c_(0) {
215 asm_func_ = GET_PARAM(1);
216 c_func_ = GET_PARAM(2);
220 void RunComparison() {
221 ASM_REGISTER_STATE_CHECK(sum_c_ = c_func_(source_data_, width_));
222 ASM_REGISTER_STATE_CHECK(sum_asm_ = asm_func_(source_data_, width_));
223 EXPECT_EQ(sum_c_, sum_asm_) << "Output mismatch";
227 IntProColFunc asm_func_;
228 IntProColFunc c_func_;
232 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(IntProColTest);
233 #endif // HAVE_NEON || HAVE_SSE2 || HAVE_MSA
235 typedef int (*SatdFunc)(const tran_low_t *coeffs, int length);
236 typedef std::tuple<int, SatdFunc> SatdTestParam;
238 class SatdTest : public ::testing::Test,
239 public ::testing::WithParamInterface<SatdTestParam> {
241 virtual void SetUp() {
242 satd_size_ = GET_PARAM(0);
243 satd_func_ = GET_PARAM(1);
244 rnd_.Reset(ACMRandom::DeterministicSeed());
245 src_ = reinterpret_cast<tran_low_t *>(
246 vpx_memalign(16, sizeof(*src_) * satd_size_));
247 ASSERT_NE(src_, nullptr);
250 virtual void TearDown() {
251 libvpx_test::ClearSystemState();
255 void FillConstant(const tran_low_t val) {
256 for (int i = 0; i < satd_size_; ++i) src_[i] = val;
259 virtual void FillRandom() = 0;
261 void Check(const int expected) {
263 ASM_REGISTER_STATE_CHECK(total = satd_func_(src_, satd_size_));
264 EXPECT_EQ(expected, total);
267 tran_low_t *GetCoeff() const { return src_; }
277 class SatdLowbdTest : public SatdTest {
279 virtual void FillRandom() {
280 for (int i = 0; i < satd_size_; ++i) {
281 const int16_t tmp = rnd_.Rand16Signed();
282 src_[i] = (tran_low_t)tmp;
287 typedef int64_t (*BlockErrorFunc)(const tran_low_t *coeff,
288 const tran_low_t *dqcoeff, int block_size);
289 typedef std::tuple<int, BlockErrorFunc> BlockErrorTestFPParam;
291 class BlockErrorTestFP
292 : public ::testing::Test,
293 public ::testing::WithParamInterface<BlockErrorTestFPParam> {
295 virtual void SetUp() {
296 txfm_size_ = GET_PARAM(0);
297 block_error_func_ = GET_PARAM(1);
298 rnd_.Reset(ACMRandom::DeterministicSeed());
299 coeff_ = reinterpret_cast<tran_low_t *>(
300 vpx_memalign(16, sizeof(*coeff_) * txfm_size_));
301 dqcoeff_ = reinterpret_cast<tran_low_t *>(
302 vpx_memalign(16, sizeof(*dqcoeff_) * txfm_size_));
303 ASSERT_NE(coeff_, nullptr);
304 ASSERT_NE(dqcoeff_, nullptr);
307 virtual void TearDown() {
308 libvpx_test::ClearSystemState();
313 void FillConstant(const tran_low_t coeff_val, const tran_low_t dqcoeff_val) {
314 for (int i = 0; i < txfm_size_; ++i) coeff_[i] = coeff_val;
315 for (int i = 0; i < txfm_size_; ++i) dqcoeff_[i] = dqcoeff_val;
319 // Just two fixed seeds
321 for (int i = 0; i < txfm_size_; ++i) coeff_[i] = rnd_.Rand16() >> 1;
323 for (int i = 0; i < txfm_size_; ++i) dqcoeff_[i] = rnd_.Rand16() >> 1;
326 void Check(const int64_t expected) {
328 ASM_REGISTER_STATE_CHECK(
329 total = block_error_func_(coeff_, dqcoeff_, txfm_size_));
330 EXPECT_EQ(expected, total);
333 tran_low_t *GetCoeff() const { return coeff_; }
335 tran_low_t *GetDQCoeff() const { return dqcoeff_; }
341 tran_low_t *dqcoeff_;
342 BlockErrorFunc block_error_func_;
346 TEST_P(AverageTest, MinValue) {
351 TEST_P(AverageTest, MaxValue) {
356 TEST_P(AverageTest, Random) {
357 // The reference frame, but not the source frame, may be unaligned for
358 // certain types of searches.
359 for (int i = 0; i < 1000; i++) {
364 #if CONFIG_VP9_HIGHBITDEPTH
365 TEST_P(AverageTestHBD, MinValue) {
370 TEST_P(AverageTestHBD, MaxValue) {
371 FillConstant((1 << VPX_BITS_12) - 1);
375 TEST_P(AverageTestHBD, Random) {
376 bit_depth_ = VPX_BITS_12;
377 // The reference frame, but not the source frame, may be unaligned for
378 // certain types of searches.
379 for (int i = 0; i < 1000; i++) {
384 #endif // CONFIG_VP9_HIGHBITDEPTH
386 #if HAVE_NEON || HAVE_SSE2 || HAVE_MSA
387 TEST_P(IntProRowTest, MinValue) {
392 TEST_P(IntProRowTest, MaxValue) {
397 TEST_P(IntProRowTest, Random) {
402 TEST_P(IntProColTest, MinValue) {
407 TEST_P(IntProColTest, MaxValue) {
412 TEST_P(IntProColTest, Random) {
418 TEST_P(SatdLowbdTest, MinValue) {
419 const int kMin = -32640;
420 const int expected = -kMin * satd_size_;
425 TEST_P(SatdLowbdTest, MaxValue) {
426 const int kMax = 32640;
427 const int expected = kMax * satd_size_;
432 TEST_P(SatdLowbdTest, Random) {
434 switch (satd_size_) {
435 case 16: expected = 261036; break;
436 case 64: expected = 991732; break;
437 case 256: expected = 4136358; break;
438 case 1024: expected = 16677592; break;
440 FAIL() << "Invalid satd size (" << satd_size_
441 << ") valid: 16/64/256/1024";
447 TEST_P(SatdLowbdTest, DISABLED_Speed) {
448 const int kCountSpeedTestBlock = 20000;
449 vpx_usec_timer timer;
450 const int blocksize = GET_PARAM(0);
452 tran_low_t *coeff = GetCoeff();
454 vpx_usec_timer_start(&timer);
455 for (int i = 0; i < kCountSpeedTestBlock; ++i) {
456 GET_PARAM(1)(coeff, blocksize);
458 vpx_usec_timer_mark(&timer);
459 const int elapsed_time = static_cast<int>(vpx_usec_timer_elapsed(&timer));
460 printf("blocksize: %4d time: %4d us\n", blocksize, elapsed_time);
463 #if CONFIG_VP9_HIGHBITDEPTH
464 class SatdHighbdTest : public SatdTest {
466 virtual void FillRandom() {
467 for (int i = 0; i < satd_size_; ++i) {
468 src_[i] = rnd_.Rand20Signed();
473 TEST_P(SatdHighbdTest, MinValue) {
474 const int kMin = -524280;
475 const int expected = -kMin * satd_size_;
480 TEST_P(SatdHighbdTest, MaxValue) {
481 const int kMax = 524280;
482 const int expected = kMax * satd_size_;
487 TEST_P(SatdHighbdTest, Random) {
489 switch (satd_size_) {
490 case 16: expected = 5249712; break;
491 case 64: expected = 18362120; break;
492 case 256: expected = 66100520; break;
493 case 1024: expected = 266094734; break;
495 FAIL() << "Invalid satd size (" << satd_size_
496 << ") valid: 16/64/256/1024";
502 TEST_P(SatdHighbdTest, DISABLED_Speed) {
503 const int kCountSpeedTestBlock = 20000;
504 vpx_usec_timer timer;
505 const int blocksize = GET_PARAM(0);
507 tran_low_t *coeff = GetCoeff();
509 vpx_usec_timer_start(&timer);
510 for (int i = 0; i < kCountSpeedTestBlock; ++i) {
511 GET_PARAM(1)(coeff, blocksize);
513 vpx_usec_timer_mark(&timer);
514 const int elapsed_time = static_cast<int>(vpx_usec_timer_elapsed(&timer));
515 printf("blocksize: %4d time: %4d us\n", blocksize, elapsed_time);
517 #endif // CONFIG_VP9_HIGHBITDEPTH
519 TEST_P(BlockErrorTestFP, MinValue) {
520 const int64_t kMin = -32640;
521 const int64_t expected = kMin * kMin * txfm_size_;
522 FillConstant(kMin, 0);
526 TEST_P(BlockErrorTestFP, MaxValue) {
527 const int64_t kMax = 32640;
528 const int64_t expected = kMax * kMax * txfm_size_;
529 FillConstant(kMax, 0);
533 TEST_P(BlockErrorTestFP, Random) {
535 switch (txfm_size_) {
536 case 16: expected = 2051681432; break;
537 case 64: expected = 11075114379; break;
538 case 256: expected = 44386271116; break;
539 case 1024: expected = 184774996089; break;
541 FAIL() << "Invalid satd size (" << txfm_size_
542 << ") valid: 16/64/256/1024";
548 TEST_P(BlockErrorTestFP, DISABLED_Speed) {
549 const int kCountSpeedTestBlock = 20000;
550 vpx_usec_timer timer;
551 const int blocksize = GET_PARAM(0);
553 tran_low_t *coeff = GetCoeff();
554 tran_low_t *dqcoeff = GetDQCoeff();
556 vpx_usec_timer_start(&timer);
557 for (int i = 0; i < kCountSpeedTestBlock; ++i) {
558 GET_PARAM(1)(coeff, dqcoeff, blocksize);
560 vpx_usec_timer_mark(&timer);
561 const int elapsed_time = static_cast<int>(vpx_usec_timer_elapsed(&timer));
562 printf("blocksize: %4d time: %4d us\n", blocksize, elapsed_time);
565 using std::make_tuple;
567 INSTANTIATE_TEST_SUITE_P(
569 ::testing::Values(make_tuple(16, 16, 1, 8, &vpx_avg_8x8_c),
570 make_tuple(16, 16, 1, 4, &vpx_avg_4x4_c)));
572 #if CONFIG_VP9_HIGHBITDEPTH
573 INSTANTIATE_TEST_SUITE_P(
575 ::testing::Values(make_tuple(16, 16, 1, 8, &vpx_highbd_avg_8x8_c),
576 make_tuple(16, 16, 1, 4, &vpx_highbd_avg_4x4_c)));
579 INSTANTIATE_TEST_SUITE_P(
580 SSE2, AverageTestHBD,
581 ::testing::Values(make_tuple(16, 16, 1, 8, &vpx_highbd_avg_8x8_sse2),
582 make_tuple(16, 16, 1, 4, &vpx_highbd_avg_4x4_sse2)));
585 INSTANTIATE_TEST_SUITE_P(C, SatdHighbdTest,
586 ::testing::Values(make_tuple(16, &vpx_satd_c),
587 make_tuple(64, &vpx_satd_c),
588 make_tuple(256, &vpx_satd_c),
589 make_tuple(1024, &vpx_satd_c)));
590 #endif // CONFIG_VP9_HIGHBITDEPTH
592 INSTANTIATE_TEST_SUITE_P(C, SatdLowbdTest,
593 ::testing::Values(make_tuple(16, &vpx_satd_c),
594 make_tuple(64, &vpx_satd_c),
595 make_tuple(256, &vpx_satd_c),
596 make_tuple(1024, &vpx_satd_c)));
598 INSTANTIATE_TEST_SUITE_P(
600 ::testing::Values(make_tuple(16, &vp9_block_error_fp_c),
601 make_tuple(64, &vp9_block_error_fp_c),
602 make_tuple(256, &vp9_block_error_fp_c),
603 make_tuple(1024, &vp9_block_error_fp_c)));
606 INSTANTIATE_TEST_SUITE_P(
608 ::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_sse2),
609 make_tuple(16, 16, 5, 8, &vpx_avg_8x8_sse2),
610 make_tuple(32, 32, 15, 8, &vpx_avg_8x8_sse2),
611 make_tuple(16, 16, 0, 4, &vpx_avg_4x4_sse2),
612 make_tuple(16, 16, 5, 4, &vpx_avg_4x4_sse2),
613 make_tuple(32, 32, 15, 4, &vpx_avg_4x4_sse2)));
615 INSTANTIATE_TEST_SUITE_P(
617 ::testing::Values(make_tuple(16, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
618 make_tuple(32, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
619 make_tuple(64, &vpx_int_pro_row_sse2,
620 &vpx_int_pro_row_c)));
622 INSTANTIATE_TEST_SUITE_P(
624 ::testing::Values(make_tuple(16, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
625 make_tuple(32, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
626 make_tuple(64, &vpx_int_pro_col_sse2,
627 &vpx_int_pro_col_c)));
629 INSTANTIATE_TEST_SUITE_P(SSE2, SatdLowbdTest,
630 ::testing::Values(make_tuple(16, &vpx_satd_sse2),
631 make_tuple(64, &vpx_satd_sse2),
632 make_tuple(256, &vpx_satd_sse2),
633 make_tuple(1024, &vpx_satd_sse2)));
635 INSTANTIATE_TEST_SUITE_P(
636 SSE2, BlockErrorTestFP,
637 ::testing::Values(make_tuple(16, &vp9_block_error_fp_sse2),
638 make_tuple(64, &vp9_block_error_fp_sse2),
639 make_tuple(256, &vp9_block_error_fp_sse2),
640 make_tuple(1024, &vp9_block_error_fp_sse2)));
644 INSTANTIATE_TEST_SUITE_P(AVX2, SatdLowbdTest,
645 ::testing::Values(make_tuple(16, &vpx_satd_avx2),
646 make_tuple(64, &vpx_satd_avx2),
647 make_tuple(256, &vpx_satd_avx2),
648 make_tuple(1024, &vpx_satd_avx2)));
650 #if CONFIG_VP9_HIGHBITDEPTH
651 INSTANTIATE_TEST_SUITE_P(
652 AVX2, SatdHighbdTest,
653 ::testing::Values(make_tuple(16, &vpx_highbd_satd_avx2),
654 make_tuple(64, &vpx_highbd_satd_avx2),
655 make_tuple(256, &vpx_highbd_satd_avx2),
656 make_tuple(1024, &vpx_highbd_satd_avx2)));
657 #endif // CONFIG_VP9_HIGHBITDEPTH
659 INSTANTIATE_TEST_SUITE_P(
660 AVX2, BlockErrorTestFP,
661 ::testing::Values(make_tuple(16, &vp9_block_error_fp_avx2),
662 make_tuple(64, &vp9_block_error_fp_avx2),
663 make_tuple(256, &vp9_block_error_fp_avx2),
664 make_tuple(1024, &vp9_block_error_fp_avx2)));
668 INSTANTIATE_TEST_SUITE_P(
670 ::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_neon),
671 make_tuple(16, 16, 5, 8, &vpx_avg_8x8_neon),
672 make_tuple(32, 32, 15, 8, &vpx_avg_8x8_neon),
673 make_tuple(16, 16, 0, 4, &vpx_avg_4x4_neon),
674 make_tuple(16, 16, 5, 4, &vpx_avg_4x4_neon),
675 make_tuple(32, 32, 15, 4, &vpx_avg_4x4_neon)));
677 INSTANTIATE_TEST_SUITE_P(
679 ::testing::Values(make_tuple(16, &vpx_int_pro_row_neon, &vpx_int_pro_row_c),
680 make_tuple(32, &vpx_int_pro_row_neon, &vpx_int_pro_row_c),
681 make_tuple(64, &vpx_int_pro_row_neon,
682 &vpx_int_pro_row_c)));
684 INSTANTIATE_TEST_SUITE_P(
686 ::testing::Values(make_tuple(16, &vpx_int_pro_col_neon, &vpx_int_pro_col_c),
687 make_tuple(32, &vpx_int_pro_col_neon, &vpx_int_pro_col_c),
688 make_tuple(64, &vpx_int_pro_col_neon,
689 &vpx_int_pro_col_c)));
691 INSTANTIATE_TEST_SUITE_P(NEON, SatdLowbdTest,
692 ::testing::Values(make_tuple(16, &vpx_satd_neon),
693 make_tuple(64, &vpx_satd_neon),
694 make_tuple(256, &vpx_satd_neon),
695 make_tuple(1024, &vpx_satd_neon)));
697 // TODO(jianj): Remove the highbitdepth flag once the SIMD functions are
699 #if !CONFIG_VP9_HIGHBITDEPTH
700 INSTANTIATE_TEST_SUITE_P(
701 NEON, BlockErrorTestFP,
702 ::testing::Values(make_tuple(16, &vp9_block_error_fp_neon),
703 make_tuple(64, &vp9_block_error_fp_neon),
704 make_tuple(256, &vp9_block_error_fp_neon),
705 make_tuple(1024, &vp9_block_error_fp_neon)));
706 #endif // !CONFIG_VP9_HIGHBITDEPTH
710 INSTANTIATE_TEST_SUITE_P(
712 ::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_msa),
713 make_tuple(16, 16, 5, 8, &vpx_avg_8x8_msa),
714 make_tuple(32, 32, 15, 8, &vpx_avg_8x8_msa),
715 make_tuple(16, 16, 0, 4, &vpx_avg_4x4_msa),
716 make_tuple(16, 16, 5, 4, &vpx_avg_4x4_msa),
717 make_tuple(32, 32, 15, 4, &vpx_avg_4x4_msa)));
719 INSTANTIATE_TEST_SUITE_P(
721 ::testing::Values(make_tuple(16, &vpx_int_pro_row_msa, &vpx_int_pro_row_c),
722 make_tuple(32, &vpx_int_pro_row_msa, &vpx_int_pro_row_c),
723 make_tuple(64, &vpx_int_pro_row_msa,
724 &vpx_int_pro_row_c)));
726 INSTANTIATE_TEST_SUITE_P(
728 ::testing::Values(make_tuple(16, &vpx_int_pro_col_msa, &vpx_int_pro_col_c),
729 make_tuple(32, &vpx_int_pro_col_msa, &vpx_int_pro_col_c),
730 make_tuple(64, &vpx_int_pro_col_msa,
731 &vpx_int_pro_col_c)));
733 // TODO(jingning): Remove the highbitdepth flag once the SIMD functions are
735 #if !CONFIG_VP9_HIGHBITDEPTH
736 INSTANTIATE_TEST_SUITE_P(MSA, SatdLowbdTest,
737 ::testing::Values(make_tuple(16, &vpx_satd_msa),
738 make_tuple(64, &vpx_satd_msa),
739 make_tuple(256, &vpx_satd_msa),
740 make_tuple(1024, &vpx_satd_msa)));
741 #endif // !CONFIG_VP9_HIGHBITDEPTH