Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 1 | /* |
Yaowu Xu | 2ab7ff0 | 2016-09-02 12:04:54 -0700 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 3 | * |
Yaowu Xu | 2ab7ff0 | 2016-09-02 12:04:54 -0700 | [diff] [blame] | 4 | * This source code is subject to the terms of the BSD 2 Clause License and |
| 5 | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
| 6 | * was not distributed with this source code in the LICENSE file, you can |
| 7 | * obtain it at www.aomedia.org/license/software. If the Alliance for Open |
| 8 | * Media Patent License 1.0 was not distributed with this source code in the |
| 9 | * PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 10 | */ |
| 11 | |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 12 | #include "third_party/googletest/src/googletest/include/gtest/gtest.h" |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 13 | #include "test/acm_random.h" |
| 14 | |
| 15 | #include "test/function_equivalence_test.h" |
| 16 | #include "test/register_state_check.h" |
| 17 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 18 | #include "./aom_config.h" |
| 19 | #include "./aom_dsp_rtcd.h" |
| 20 | #include "aom/aom_integer.h" |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 21 | |
| 22 | #define MAX_SB_SQUARE (MAX_SB_SIZE * MAX_SB_SIZE) |
| 23 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 24 | using libaom_test::ACMRandom; |
| 25 | using libaom_test::FunctionEquivalenceTest; |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 26 | |
| 27 | namespace { |
| 28 | |
| 29 | static const int kIterations = 1000; |
| 30 | static const int kMaskMax = 64; |
| 31 | |
| 32 | typedef unsigned int (*ObmcVarF)(const uint8_t *pre, int pre_stride, |
| 33 | const int32_t *wsrc, const int32_t *mask, |
| 34 | unsigned int *sse); |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 35 | typedef libaom_test::FuncParam<ObmcVarF> TestFuncs; |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 36 | |
| 37 | //////////////////////////////////////////////////////////////////////////////// |
| 38 | // 8 bit |
| 39 | //////////////////////////////////////////////////////////////////////////////// |
| 40 | |
| 41 | class ObmcVarianceTest : public FunctionEquivalenceTest<ObmcVarF> {}; |
| 42 | |
| 43 | TEST_P(ObmcVarianceTest, RandomValues) { |
| 44 | DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]); |
| 45 | DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]); |
| 46 | DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]); |
| 47 | |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 48 | for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) { |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 49 | const int pre_stride = this->rng_(MAX_SB_SIZE + 1); |
| 50 | |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 51 | for (int i = 0; i < MAX_SB_SQUARE; ++i) { |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 52 | pre[i] = this->rng_.Rand8(); |
| 53 | wsrc[i] = this->rng_.Rand8() * this->rng_(kMaskMax * kMaskMax + 1); |
| 54 | mask[i] = this->rng_(kMaskMax * kMaskMax + 1); |
| 55 | } |
| 56 | |
| 57 | unsigned int ref_sse, tst_sse; |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 58 | const unsigned int ref_res = |
| 59 | params_.ref_func(pre, pre_stride, wsrc, mask, &ref_sse); |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 60 | unsigned int tst_res; |
| 61 | ASM_REGISTER_STATE_CHECK( |
| 62 | tst_res = params_.tst_func(pre, pre_stride, wsrc, mask, &tst_sse)); |
| 63 | |
| 64 | ASSERT_EQ(ref_res, tst_res); |
| 65 | ASSERT_EQ(ref_sse, tst_sse); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | TEST_P(ObmcVarianceTest, ExtremeValues) { |
| 70 | DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]); |
| 71 | DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]); |
| 72 | DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]); |
| 73 | |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 74 | for (int iter = 0; iter < MAX_SB_SIZE && !HasFatalFailure(); ++iter) { |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 75 | const int pre_stride = iter; |
| 76 | |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 77 | for (int i = 0; i < MAX_SB_SQUARE; ++i) { |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 78 | pre[i] = UINT8_MAX; |
| 79 | wsrc[i] = UINT8_MAX * kMaskMax * kMaskMax; |
| 80 | mask[i] = kMaskMax * kMaskMax; |
| 81 | } |
| 82 | |
| 83 | unsigned int ref_sse, tst_sse; |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 84 | const unsigned int ref_res = |
| 85 | params_.ref_func(pre, pre_stride, wsrc, mask, &ref_sse); |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 86 | unsigned int tst_res; |
| 87 | ASM_REGISTER_STATE_CHECK( |
| 88 | tst_res = params_.tst_func(pre, pre_stride, wsrc, mask, &tst_sse)); |
| 89 | |
| 90 | ASSERT_EQ(ref_res, tst_res); |
| 91 | ASSERT_EQ(ref_sse, tst_sse); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | #if HAVE_SSE4_1 |
Tom Finegan | 29ba675 | 2017-01-31 16:30:55 -0800 | [diff] [blame] | 96 | #if CONFIG_MOTION_VAR |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 97 | const ObmcVarianceTest::ParamType sse4_functions[] = { |
| 98 | #if CONFIG_EXT_PARTITION |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 99 | TestFuncs(aom_obmc_variance128x128_c, aom_obmc_variance128x128_sse4_1), |
| 100 | TestFuncs(aom_obmc_variance128x64_c, aom_obmc_variance128x64_sse4_1), |
| 101 | TestFuncs(aom_obmc_variance64x128_c, aom_obmc_variance64x128_sse4_1), |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 102 | #endif // CONFIG_EXT_PARTITION |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 103 | TestFuncs(aom_obmc_variance64x64_c, aom_obmc_variance64x64_sse4_1), |
| 104 | TestFuncs(aom_obmc_variance64x32_c, aom_obmc_variance64x32_sse4_1), |
| 105 | TestFuncs(aom_obmc_variance32x64_c, aom_obmc_variance32x64_sse4_1), |
| 106 | TestFuncs(aom_obmc_variance32x32_c, aom_obmc_variance32x32_sse4_1), |
| 107 | TestFuncs(aom_obmc_variance32x16_c, aom_obmc_variance32x16_sse4_1), |
| 108 | TestFuncs(aom_obmc_variance16x32_c, aom_obmc_variance16x32_sse4_1), |
| 109 | TestFuncs(aom_obmc_variance16x16_c, aom_obmc_variance16x16_sse4_1), |
| 110 | TestFuncs(aom_obmc_variance16x8_c, aom_obmc_variance16x8_sse4_1), |
| 111 | TestFuncs(aom_obmc_variance8x16_c, aom_obmc_variance8x16_sse4_1), |
| 112 | TestFuncs(aom_obmc_variance8x8_c, aom_obmc_variance8x8_sse4_1), |
| 113 | TestFuncs(aom_obmc_variance8x4_c, aom_obmc_variance8x4_sse4_1), |
| 114 | TestFuncs(aom_obmc_variance4x8_c, aom_obmc_variance4x8_sse4_1), |
| 115 | TestFuncs(aom_obmc_variance4x4_c, aom_obmc_variance4x4_sse4_1) |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 116 | }; |
| 117 | |
Yaowu Xu | 685039d | 2016-12-07 10:56:39 -0800 | [diff] [blame] | 118 | INSTANTIATE_TEST_CASE_P(SSE4_1, ObmcVarianceTest, |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 119 | ::testing::ValuesIn(sse4_functions)); |
Tom Finegan | 29ba675 | 2017-01-31 16:30:55 -0800 | [diff] [blame] | 120 | #endif // CONFIG_MOTION_VAR |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 121 | #endif // HAVE_SSE4_1 |
| 122 | |
| 123 | //////////////////////////////////////////////////////////////////////////////// |
| 124 | // High bit-depth |
| 125 | //////////////////////////////////////////////////////////////////////////////// |
| 126 | |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 127 | #if CONFIG_HIGHBITDEPTH |
Jingning Han | a387b19 | 2016-07-14 10:11:32 -0700 | [diff] [blame] | 128 | class ObmcVarianceHBDTest : public FunctionEquivalenceTest<ObmcVarF> {}; |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 129 | |
| 130 | TEST_P(ObmcVarianceHBDTest, RandomValues) { |
| 131 | DECLARE_ALIGNED(32, uint16_t, pre[MAX_SB_SQUARE]); |
| 132 | DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]); |
| 133 | DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]); |
| 134 | |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 135 | for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) { |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 136 | const int pre_stride = this->rng_(MAX_SB_SIZE + 1); |
| 137 | |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 138 | for (int i = 0; i < MAX_SB_SQUARE; ++i) { |
Jingning Han | a387b19 | 2016-07-14 10:11:32 -0700 | [diff] [blame] | 139 | pre[i] = this->rng_(1 << params_.bit_depth); |
| 140 | wsrc[i] = this->rng_(1 << params_.bit_depth) * |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 141 | this->rng_(kMaskMax * kMaskMax + 1); |
| 142 | mask[i] = this->rng_(kMaskMax * kMaskMax + 1); |
| 143 | } |
| 144 | |
| 145 | unsigned int ref_sse, tst_sse; |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 146 | const unsigned int ref_res = params_.ref_func( |
| 147 | CONVERT_TO_BYTEPTR(pre), pre_stride, wsrc, mask, &ref_sse); |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 148 | unsigned int tst_res; |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 149 | ASM_REGISTER_STATE_CHECK(tst_res = params_.tst_func(CONVERT_TO_BYTEPTR(pre), |
| 150 | pre_stride, wsrc, mask, |
| 151 | &tst_sse)); |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 152 | |
| 153 | ASSERT_EQ(ref_res, tst_res); |
| 154 | ASSERT_EQ(ref_sse, tst_sse); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | TEST_P(ObmcVarianceHBDTest, ExtremeValues) { |
| 159 | DECLARE_ALIGNED(32, uint16_t, pre[MAX_SB_SQUARE]); |
| 160 | DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]); |
| 161 | DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]); |
| 162 | |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 163 | for (int iter = 0; iter < MAX_SB_SIZE && !HasFatalFailure(); ++iter) { |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 164 | const int pre_stride = iter; |
| 165 | |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 166 | for (int i = 0; i < MAX_SB_SQUARE; ++i) { |
Jingning Han | a387b19 | 2016-07-14 10:11:32 -0700 | [diff] [blame] | 167 | pre[i] = (1 << params_.bit_depth) - 1; |
| 168 | wsrc[i] = ((1 << params_.bit_depth) - 1) * kMaskMax * kMaskMax; |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 169 | mask[i] = kMaskMax * kMaskMax; |
| 170 | } |
| 171 | |
| 172 | unsigned int ref_sse, tst_sse; |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 173 | const unsigned int ref_res = params_.ref_func( |
| 174 | CONVERT_TO_BYTEPTR(pre), pre_stride, wsrc, mask, &ref_sse); |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 175 | unsigned int tst_res; |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 176 | ASM_REGISTER_STATE_CHECK(tst_res = params_.tst_func(CONVERT_TO_BYTEPTR(pre), |
| 177 | pre_stride, wsrc, mask, |
| 178 | &tst_sse)); |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 179 | |
| 180 | ASSERT_EQ(ref_res, tst_res); |
| 181 | ASSERT_EQ(ref_sse, tst_sse); |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | #if HAVE_SSE4_1 |
Tom Finegan | ce4bceb | 2017-02-03 11:02:53 -0800 | [diff] [blame] | 186 | #if CONFIG_MOTION_VAR |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 187 | ObmcVarianceHBDTest::ParamType sse4_functions_hbd[] = { |
| 188 | #if CONFIG_EXT_PARTITION |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 189 | TestFuncs(aom_highbd_obmc_variance128x128_c, |
| 190 | aom_highbd_obmc_variance128x128_sse4_1, 8), |
| 191 | TestFuncs(aom_highbd_obmc_variance128x64_c, |
| 192 | aom_highbd_obmc_variance128x64_sse4_1, 8), |
| 193 | TestFuncs(aom_highbd_obmc_variance64x128_c, |
| 194 | aom_highbd_obmc_variance64x128_sse4_1, 8), |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 195 | #endif // CONFIG_EXT_PARTITION |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 196 | TestFuncs(aom_highbd_obmc_variance64x64_c, |
| 197 | aom_highbd_obmc_variance64x64_sse4_1, 8), |
| 198 | TestFuncs(aom_highbd_obmc_variance64x32_c, |
| 199 | aom_highbd_obmc_variance64x32_sse4_1, 8), |
| 200 | TestFuncs(aom_highbd_obmc_variance32x64_c, |
| 201 | aom_highbd_obmc_variance32x64_sse4_1, 8), |
| 202 | TestFuncs(aom_highbd_obmc_variance32x32_c, |
| 203 | aom_highbd_obmc_variance32x32_sse4_1, 8), |
| 204 | TestFuncs(aom_highbd_obmc_variance32x16_c, |
| 205 | aom_highbd_obmc_variance32x16_sse4_1, 8), |
| 206 | TestFuncs(aom_highbd_obmc_variance16x32_c, |
| 207 | aom_highbd_obmc_variance16x32_sse4_1, 8), |
| 208 | TestFuncs(aom_highbd_obmc_variance16x16_c, |
| 209 | aom_highbd_obmc_variance16x16_sse4_1, 8), |
| 210 | TestFuncs(aom_highbd_obmc_variance16x8_c, aom_highbd_obmc_variance16x8_sse4_1, |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 211 | 8), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 212 | TestFuncs(aom_highbd_obmc_variance8x16_c, aom_highbd_obmc_variance8x16_sse4_1, |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 213 | 8), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 214 | TestFuncs(aom_highbd_obmc_variance8x8_c, aom_highbd_obmc_variance8x8_sse4_1, |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 215 | 8), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 216 | TestFuncs(aom_highbd_obmc_variance8x4_c, aom_highbd_obmc_variance8x4_sse4_1, |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 217 | 8), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 218 | TestFuncs(aom_highbd_obmc_variance4x8_c, aom_highbd_obmc_variance4x8_sse4_1, |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 219 | 8), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 220 | TestFuncs(aom_highbd_obmc_variance4x4_c, aom_highbd_obmc_variance4x4_sse4_1, |
clang-format | 3a826f1 | 2016-08-11 17:46:05 -0700 | [diff] [blame] | 221 | 8), |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 222 | #if CONFIG_EXT_PARTITION |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 223 | TestFuncs(aom_highbd_10_obmc_variance128x128_c, |
| 224 | aom_highbd_10_obmc_variance128x128_sse4_1, 10), |
| 225 | TestFuncs(aom_highbd_10_obmc_variance128x64_c, |
| 226 | aom_highbd_10_obmc_variance128x64_sse4_1, 10), |
| 227 | TestFuncs(aom_highbd_10_obmc_variance64x128_c, |
| 228 | aom_highbd_10_obmc_variance64x128_sse4_1, 10), |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 229 | #endif // CONFIG_EXT_PARTITION |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 230 | TestFuncs(aom_highbd_10_obmc_variance64x64_c, |
| 231 | aom_highbd_10_obmc_variance64x64_sse4_1, 10), |
| 232 | TestFuncs(aom_highbd_10_obmc_variance64x32_c, |
| 233 | aom_highbd_10_obmc_variance64x32_sse4_1, 10), |
| 234 | TestFuncs(aom_highbd_10_obmc_variance32x64_c, |
| 235 | aom_highbd_10_obmc_variance32x64_sse4_1, 10), |
| 236 | TestFuncs(aom_highbd_10_obmc_variance32x32_c, |
| 237 | aom_highbd_10_obmc_variance32x32_sse4_1, 10), |
| 238 | TestFuncs(aom_highbd_10_obmc_variance32x16_c, |
| 239 | aom_highbd_10_obmc_variance32x16_sse4_1, 10), |
| 240 | TestFuncs(aom_highbd_10_obmc_variance16x32_c, |
| 241 | aom_highbd_10_obmc_variance16x32_sse4_1, 10), |
| 242 | TestFuncs(aom_highbd_10_obmc_variance16x16_c, |
| 243 | aom_highbd_10_obmc_variance16x16_sse4_1, 10), |
| 244 | TestFuncs(aom_highbd_10_obmc_variance16x8_c, |
| 245 | aom_highbd_10_obmc_variance16x8_sse4_1, 10), |
| 246 | TestFuncs(aom_highbd_10_obmc_variance8x16_c, |
| 247 | aom_highbd_10_obmc_variance8x16_sse4_1, 10), |
| 248 | TestFuncs(aom_highbd_10_obmc_variance8x8_c, |
| 249 | aom_highbd_10_obmc_variance8x8_sse4_1, 10), |
| 250 | TestFuncs(aom_highbd_10_obmc_variance8x4_c, |
| 251 | aom_highbd_10_obmc_variance8x4_sse4_1, 10), |
| 252 | TestFuncs(aom_highbd_10_obmc_variance4x8_c, |
| 253 | aom_highbd_10_obmc_variance4x8_sse4_1, 10), |
| 254 | TestFuncs(aom_highbd_10_obmc_variance4x4_c, |
| 255 | aom_highbd_10_obmc_variance4x4_sse4_1, 10), |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 256 | #if CONFIG_EXT_PARTITION |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 257 | TestFuncs(aom_highbd_12_obmc_variance128x128_c, |
| 258 | aom_highbd_12_obmc_variance128x128_sse4_1, 12), |
| 259 | TestFuncs(aom_highbd_12_obmc_variance128x64_c, |
| 260 | aom_highbd_12_obmc_variance128x64_sse4_1, 12), |
| 261 | TestFuncs(aom_highbd_12_obmc_variance64x128_c, |
| 262 | aom_highbd_12_obmc_variance64x128_sse4_1, 12), |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 263 | #endif // CONFIG_EXT_PARTITION |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 264 | TestFuncs(aom_highbd_12_obmc_variance64x64_c, |
| 265 | aom_highbd_12_obmc_variance64x64_sse4_1, 12), |
| 266 | TestFuncs(aom_highbd_12_obmc_variance64x32_c, |
| 267 | aom_highbd_12_obmc_variance64x32_sse4_1, 12), |
| 268 | TestFuncs(aom_highbd_12_obmc_variance32x64_c, |
| 269 | aom_highbd_12_obmc_variance32x64_sse4_1, 12), |
| 270 | TestFuncs(aom_highbd_12_obmc_variance32x32_c, |
| 271 | aom_highbd_12_obmc_variance32x32_sse4_1, 12), |
| 272 | TestFuncs(aom_highbd_12_obmc_variance32x16_c, |
| 273 | aom_highbd_12_obmc_variance32x16_sse4_1, 12), |
| 274 | TestFuncs(aom_highbd_12_obmc_variance16x32_c, |
| 275 | aom_highbd_12_obmc_variance16x32_sse4_1, 12), |
| 276 | TestFuncs(aom_highbd_12_obmc_variance16x16_c, |
| 277 | aom_highbd_12_obmc_variance16x16_sse4_1, 12), |
| 278 | TestFuncs(aom_highbd_12_obmc_variance16x8_c, |
| 279 | aom_highbd_12_obmc_variance16x8_sse4_1, 12), |
| 280 | TestFuncs(aom_highbd_12_obmc_variance8x16_c, |
| 281 | aom_highbd_12_obmc_variance8x16_sse4_1, 12), |
| 282 | TestFuncs(aom_highbd_12_obmc_variance8x8_c, |
| 283 | aom_highbd_12_obmc_variance8x8_sse4_1, 12), |
| 284 | TestFuncs(aom_highbd_12_obmc_variance8x4_c, |
| 285 | aom_highbd_12_obmc_variance8x4_sse4_1, 12), |
| 286 | TestFuncs(aom_highbd_12_obmc_variance4x8_c, |
| 287 | aom_highbd_12_obmc_variance4x8_sse4_1, 12), |
| 288 | TestFuncs(aom_highbd_12_obmc_variance4x4_c, |
| 289 | aom_highbd_12_obmc_variance4x4_sse4_1, 12) |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 290 | }; |
| 291 | |
Yaowu Xu | 685039d | 2016-12-07 10:56:39 -0800 | [diff] [blame] | 292 | INSTANTIATE_TEST_CASE_P(SSE4_1, ObmcVarianceHBDTest, |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 293 | ::testing::ValuesIn(sse4_functions_hbd)); |
Tom Finegan | ce4bceb | 2017-02-03 11:02:53 -0800 | [diff] [blame] | 294 | #endif // CONFIG_MOTION_VAR |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 295 | #endif // HAVE_SSE4_1 |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 296 | #endif // CONFIG_HIGHBITDEPTH |
Geza Lore | ebc2d34 | 2016-07-12 11:41:54 +0100 | [diff] [blame] | 297 | } // namespace |