blob: 89470e2a55d9b8f57c3576360843370dfde983ab [file] [log] [blame]
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -08001/*
Yaowu Xubde4ac82016-11-28 15:26:06 -08002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -08003 *
Yaowu Xubde4ac82016-11-28 15:26:06 -08004 * 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.
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080010 */
11
12#include <math.h>
13#include <stdlib.h>
14#include <string.h>
15
Tom Finegan7a07ece2017-02-07 17:14:05 -080016#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080017#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
Yaowu Xuf883b422016-08-30 14:01:10 -070022#include "./aom_config.h"
23#include "./aom_dsp_rtcd.h"
24#include "aom/aom_codec.h"
25#include "aom/aom_integer.h"
26#include "aom_dsp/aom_filter.h"
27#include "aom_mem/aom_mem.h"
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080028
Yaowu Xuc27fc142016-08-22 16:08:15 -070029using libaom_test::ACMRandom;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080030
31namespace {
David Barker0aa39ff2017-05-23 12:53:08 +010032const int number_of_iterations = 200;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080033
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080034typedef unsigned int (*MaskedSubPixelVarianceFunc)(
David Barker0f3c94e2017-05-16 15:21:50 +010035 const uint8_t *src, int src_stride, int xoffset, int yoffset,
36 const uint8_t *ref, int ref_stride, const uint8_t *second_pred,
37 const uint8_t *msk, int msk_stride, int invert_mask, unsigned int *sse);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080038
clang-format3a826f12016-08-11 17:46:05 -070039typedef std::tr1::tuple<MaskedSubPixelVarianceFunc, MaskedSubPixelVarianceFunc>
40 MaskedSubPixelVarianceParam;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080041
clang-format3a826f12016-08-11 17:46:05 -070042class MaskedSubPixelVarianceTest
43 : public ::testing::TestWithParam<MaskedSubPixelVarianceParam> {
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080044 public:
45 virtual ~MaskedSubPixelVarianceTest() {}
46 virtual void SetUp() {
47 opt_func_ = GET_PARAM(0);
48 ref_func_ = GET_PARAM(1);
49 }
50
Yaowu Xuc27fc142016-08-22 16:08:15 -070051 virtual void TearDown() { libaom_test::ClearSystemState(); }
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080052
53 protected:
54 MaskedSubPixelVarianceFunc opt_func_;
55 MaskedSubPixelVarianceFunc ref_func_;
56};
57
58TEST_P(MaskedSubPixelVarianceTest, OperationCheck) {
59 unsigned int ref_ret, opt_ret;
60 unsigned int ref_sse, opt_sse;
61 ACMRandom rnd(ACMRandom::DeterministicSeed());
David Barker185575a2017-06-05 10:25:36 +010062 // Note: We pad out the input array to a multiple of 16 bytes wide, so that
63 // consecutive rows keep the 16-byte alignment.
64 DECLARE_ALIGNED(16, uint8_t, src_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16)]);
65 DECLARE_ALIGNED(16, uint8_t, ref_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16)]);
David Barker0f3c94e2017-05-16 15:21:50 +010066 DECLARE_ALIGNED(16, uint8_t,
David Barker185575a2017-06-05 10:25:36 +010067 second_pred_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16)]);
68 DECLARE_ALIGNED(16, uint8_t, msk_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16)]);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080069 int err_count = 0;
70 int first_failure = -1;
David Barker185575a2017-06-05 10:25:36 +010071 int src_stride = (MAX_SB_SIZE + 16);
72 int ref_stride = (MAX_SB_SIZE + 16);
73 int msk_stride = (MAX_SB_SIZE + 16);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080074 int xoffset;
75 int yoffset;
76
77 for (int i = 0; i < number_of_iterations; ++i) {
clang-format3a826f12016-08-11 17:46:05 -070078 int xoffsets[] = { 0, 4, rnd(BIL_SUBPEL_SHIFTS) };
79 int yoffsets[] = { 0, 4, rnd(BIL_SUBPEL_SHIFTS) };
David Barker185575a2017-06-05 10:25:36 +010080 for (int j = 0; j < (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16); j++) {
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080081 src_ptr[j] = rnd.Rand8();
82 ref_ptr[j] = rnd.Rand8();
David Barker0f3c94e2017-05-16 15:21:50 +010083 second_pred_ptr[j] = rnd.Rand8();
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080084 msk_ptr[j] = rnd(65);
85 }
86 for (int k = 0; k < 3; k++) {
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080087 for (int l = 0; l < 3; l++) {
88 xoffset = xoffsets[k];
89 yoffset = yoffsets[l];
David Barker0f3c94e2017-05-16 15:21:50 +010090 for (int invert_mask = 0; invert_mask < 2; ++invert_mask) {
David Barker0f3c94e2017-05-16 15:21:50 +010091 ref_ret = ref_func_(src_ptr, src_stride, xoffset, yoffset, ref_ptr,
92 ref_stride, second_pred_ptr, msk_ptr, msk_stride,
93 invert_mask, &ref_sse);
94 ASM_REGISTER_STATE_CHECK(
95 opt_ret = opt_func_(src_ptr, src_stride, xoffset, yoffset,
96 ref_ptr, ref_stride, second_pred_ptr, msk_ptr,
97 msk_stride, invert_mask, &opt_sse));
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -080098
David Barker0f3c94e2017-05-16 15:21:50 +010099 if (opt_ret != ref_ret || opt_sse != ref_sse) {
100 err_count++;
101 if (first_failure == -1) first_failure = i;
102 }
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800103 }
104 }
105 }
106 }
107
108 EXPECT_EQ(0, err_count)
clang-format3a826f12016-08-11 17:46:05 -0700109 << "Error: Masked Sub Pixel Variance Test OperationCheck,"
110 << "C output doesn't match SSSE3 output. "
111 << "First failed at test case " << first_failure;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800112}
113
114TEST_P(MaskedSubPixelVarianceTest, ExtremeValues) {
115 unsigned int ref_ret, opt_ret;
116 unsigned int ref_sse, opt_sse;
117 ACMRandom rnd(ACMRandom::DeterministicSeed());
David Barker185575a2017-06-05 10:25:36 +0100118 DECLARE_ALIGNED(16, uint8_t, src_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16)]);
119 DECLARE_ALIGNED(16, uint8_t, ref_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16)]);
David Barker0f3c94e2017-05-16 15:21:50 +0100120 DECLARE_ALIGNED(16, uint8_t,
David Barker185575a2017-06-05 10:25:36 +0100121 second_pred_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16)]);
122 DECLARE_ALIGNED(16, uint8_t, msk_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16)]);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800123 int first_failure_x = -1;
124 int first_failure_y = -1;
125 int err_count = 0;
126 int first_failure = -1;
David Barker185575a2017-06-05 10:25:36 +0100127 int src_stride = (MAX_SB_SIZE + 16);
128 int ref_stride = (MAX_SB_SIZE + 16);
129 int msk_stride = (MAX_SB_SIZE + 16);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800130
clang-format3a826f12016-08-11 17:46:05 -0700131 for (int xoffset = 0; xoffset < BIL_SUBPEL_SHIFTS; xoffset++) {
132 for (int yoffset = 0; yoffset < BIL_SUBPEL_SHIFTS; yoffset++) {
David Barker0f3c94e2017-05-16 15:21:50 +0100133 for (int i = 0; i < 16; ++i) {
clang-format3a826f12016-08-11 17:46:05 -0700134 memset(src_ptr, (i & 0x1) ? 255 : 0,
David Barker185575a2017-06-05 10:25:36 +0100135 (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16));
clang-format3a826f12016-08-11 17:46:05 -0700136 memset(ref_ptr, (i & 0x2) ? 255 : 0,
David Barker185575a2017-06-05 10:25:36 +0100137 (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16));
David Barker0f3c94e2017-05-16 15:21:50 +0100138 memset(second_pred_ptr, (i & 0x4) ? 255 : 0,
David Barker185575a2017-06-05 10:25:36 +0100139 (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16));
David Barker0f3c94e2017-05-16 15:21:50 +0100140 memset(msk_ptr, (i & 0x8) ? 64 : 0,
David Barker185575a2017-06-05 10:25:36 +0100141 (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 16));
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800142
David Barker0f3c94e2017-05-16 15:21:50 +0100143 for (int invert_mask = 0; invert_mask < 2; ++invert_mask) {
144 ref_ret = ref_func_(src_ptr, src_stride, xoffset, yoffset, ref_ptr,
145 ref_stride, second_pred_ptr, msk_ptr, msk_stride,
146 invert_mask, &ref_sse);
147 ASM_REGISTER_STATE_CHECK(
148 opt_ret = opt_func_(src_ptr, src_stride, xoffset, yoffset,
149 ref_ptr, ref_stride, second_pred_ptr, msk_ptr,
150 msk_stride, invert_mask, &opt_sse));
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800151
David Barker0f3c94e2017-05-16 15:21:50 +0100152 if (opt_ret != ref_ret || opt_sse != ref_sse) {
153 err_count++;
154 if (first_failure == -1) {
155 first_failure = i;
156 first_failure_x = xoffset;
157 first_failure_y = yoffset;
158 }
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800159 }
160 }
161 }
162 }
163 }
164
clang-format3a826f12016-08-11 17:46:05 -0700165 EXPECT_EQ(0, err_count) << "Error: Masked Variance Test ExtremeValues,"
166 << "C output doesn't match SSSE3 output. "
167 << "First failed at test case " << first_failure
168 << " x_offset = " << first_failure_x
169 << " y_offset = " << first_failure_y;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800170}
171
clang-format3a826f12016-08-11 17:46:05 -0700172typedef std::tr1::tuple<MaskedSubPixelVarianceFunc, MaskedSubPixelVarianceFunc,
clang-format67948d32016-09-07 22:40:40 -0700173 aom_bit_depth_t>
174 HighbdMaskedSubPixelVarianceParam;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800175
clang-format3a826f12016-08-11 17:46:05 -0700176class HighbdMaskedSubPixelVarianceTest
177 : public ::testing::TestWithParam<HighbdMaskedSubPixelVarianceParam> {
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800178 public:
179 virtual ~HighbdMaskedSubPixelVarianceTest() {}
180 virtual void SetUp() {
181 opt_func_ = GET_PARAM(0);
182 ref_func_ = GET_PARAM(1);
183 bit_depth_ = GET_PARAM(2);
184 }
185
Yaowu Xuc27fc142016-08-22 16:08:15 -0700186 virtual void TearDown() { libaom_test::ClearSystemState(); }
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800187
188 protected:
189 MaskedSubPixelVarianceFunc opt_func_;
190 MaskedSubPixelVarianceFunc ref_func_;
Yaowu Xuf883b422016-08-30 14:01:10 -0700191 aom_bit_depth_t bit_depth_;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800192};
193
194TEST_P(HighbdMaskedSubPixelVarianceTest, OperationCheck) {
195 unsigned int ref_ret, opt_ret;
196 unsigned int ref_sse, opt_sse;
197 ACMRandom rnd(ACMRandom::DeterministicSeed());
David Barker185575a2017-06-05 10:25:36 +0100198 DECLARE_ALIGNED(16, uint16_t, src_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8)]);
199 DECLARE_ALIGNED(16, uint16_t, ref_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8)]);
David Barker0f3c94e2017-05-16 15:21:50 +0100200 DECLARE_ALIGNED(16, uint16_t,
David Barker185575a2017-06-05 10:25:36 +0100201 second_pred_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8)]);
202 DECLARE_ALIGNED(16, uint8_t, msk_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8)]);
clang-format3a826f12016-08-11 17:46:05 -0700203 uint8_t *src8_ptr = CONVERT_TO_BYTEPTR(src_ptr);
204 uint8_t *ref8_ptr = CONVERT_TO_BYTEPTR(ref_ptr);
David Barker0f3c94e2017-05-16 15:21:50 +0100205 uint8_t *second_pred8_ptr = CONVERT_TO_BYTEPTR(second_pred_ptr);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800206 int err_count = 0;
207 int first_failure = -1;
208 int first_failure_x = -1;
209 int first_failure_y = -1;
David Barker185575a2017-06-05 10:25:36 +0100210 int src_stride = (MAX_SB_SIZE + 8);
211 int ref_stride = (MAX_SB_SIZE + 8);
212 int msk_stride = (MAX_SB_SIZE + 8);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800213 int xoffset, yoffset;
214
215 for (int i = 0; i < number_of_iterations; ++i) {
David Barker185575a2017-06-05 10:25:36 +0100216 for (int j = 0; j < (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8); j++) {
David Barker0aa39ff2017-05-23 12:53:08 +0100217 src_ptr[j] = rnd.Rand16() & ((1 << bit_depth_) - 1);
218 ref_ptr[j] = rnd.Rand16() & ((1 << bit_depth_) - 1);
219 second_pred_ptr[j] = rnd.Rand16() & ((1 << bit_depth_) - 1);
220 msk_ptr[j] = rnd(65);
221 }
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800222 for (xoffset = 0; xoffset < BIL_SUBPEL_SHIFTS; xoffset++) {
223 for (yoffset = 0; yoffset < BIL_SUBPEL_SHIFTS; yoffset++) {
David Barker0f3c94e2017-05-16 15:21:50 +0100224 for (int invert_mask = 0; invert_mask < 2; ++invert_mask) {
225 ref_ret = ref_func_(src8_ptr, src_stride, xoffset, yoffset, ref8_ptr,
226 ref_stride, second_pred8_ptr, msk_ptr, msk_stride,
227 invert_mask, &ref_sse);
228 ASM_REGISTER_STATE_CHECK(
229 opt_ret = opt_func_(src8_ptr, src_stride, xoffset, yoffset,
230 ref8_ptr, ref_stride, second_pred8_ptr,
231 msk_ptr, msk_stride, invert_mask, &opt_sse));
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800232
David Barker0f3c94e2017-05-16 15:21:50 +0100233 if (opt_ret != ref_ret || opt_sse != ref_sse) {
234 err_count++;
235 if (first_failure == -1) {
236 first_failure = i;
237 first_failure_x = xoffset;
238 first_failure_y = yoffset;
239 }
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800240 }
241 }
242 }
243 }
244 }
245
246 EXPECT_EQ(0, err_count)
clang-format3a826f12016-08-11 17:46:05 -0700247 << "Error: Masked Sub Pixel Variance Test OperationCheck,"
248 << "C output doesn't match SSSE3 output. "
249 << "First failed at test case " << first_failure
250 << " x_offset = " << first_failure_x << " y_offset = " << first_failure_y;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800251}
252
253TEST_P(HighbdMaskedSubPixelVarianceTest, ExtremeValues) {
254 unsigned int ref_ret, opt_ret;
255 unsigned int ref_sse, opt_sse;
256 ACMRandom rnd(ACMRandom::DeterministicSeed());
David Barker185575a2017-06-05 10:25:36 +0100257 DECLARE_ALIGNED(16, uint16_t, src_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8)]);
258 DECLARE_ALIGNED(16, uint16_t, ref_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8)]);
259 DECLARE_ALIGNED(16, uint8_t, msk_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8)]);
David Barker0f3c94e2017-05-16 15:21:50 +0100260 DECLARE_ALIGNED(16, uint16_t,
David Barker185575a2017-06-05 10:25:36 +0100261 second_pred_ptr[(MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8)]);
clang-format3a826f12016-08-11 17:46:05 -0700262 uint8_t *src8_ptr = CONVERT_TO_BYTEPTR(src_ptr);
263 uint8_t *ref8_ptr = CONVERT_TO_BYTEPTR(ref_ptr);
David Barker0f3c94e2017-05-16 15:21:50 +0100264 uint8_t *second_pred8_ptr = CONVERT_TO_BYTEPTR(second_pred_ptr);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800265 int first_failure_x = -1;
266 int first_failure_y = -1;
267 int err_count = 0;
268 int first_failure = -1;
David Barker185575a2017-06-05 10:25:36 +0100269 int src_stride = (MAX_SB_SIZE + 8);
270 int ref_stride = (MAX_SB_SIZE + 8);
271 int msk_stride = (MAX_SB_SIZE + 8);
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800272
clang-format3a826f12016-08-11 17:46:05 -0700273 for (int xoffset = 0; xoffset < BIL_SUBPEL_SHIFTS; xoffset++) {
274 for (int yoffset = 0; yoffset < BIL_SUBPEL_SHIFTS; yoffset++) {
David Barker0f3c94e2017-05-16 15:21:50 +0100275 for (int i = 0; i < 16; ++i) {
Yaowu Xuf883b422016-08-30 14:01:10 -0700276 aom_memset16(src_ptr, (i & 0x1) ? ((1 << bit_depth_) - 1) : 0,
David Barker185575a2017-06-05 10:25:36 +0100277 (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8));
Yaowu Xuf883b422016-08-30 14:01:10 -0700278 aom_memset16(ref_ptr, (i & 0x2) ? ((1 << bit_depth_) - 1) : 0,
David Barker185575a2017-06-05 10:25:36 +0100279 (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8));
David Barker0f3c94e2017-05-16 15:21:50 +0100280 aom_memset16(second_pred_ptr, (i & 0x4) ? ((1 << bit_depth_) - 1) : 0,
David Barker185575a2017-06-05 10:25:36 +0100281 (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8));
David Barker0f3c94e2017-05-16 15:21:50 +0100282 memset(msk_ptr, (i & 0x8) ? 64 : 0,
David Barker185575a2017-06-05 10:25:36 +0100283 (MAX_SB_SIZE + 1) * (MAX_SB_SIZE + 8));
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800284
David Barker0f3c94e2017-05-16 15:21:50 +0100285 for (int invert_mask = 0; invert_mask < 2; ++invert_mask) {
286 ref_ret = ref_func_(src8_ptr, src_stride, xoffset, yoffset, ref8_ptr,
287 ref_stride, second_pred8_ptr, msk_ptr, msk_stride,
288 invert_mask, &ref_sse);
289 ASM_REGISTER_STATE_CHECK(
290 opt_ret = opt_func_(src8_ptr, src_stride, xoffset, yoffset,
291 ref8_ptr, ref_stride, second_pred8_ptr,
292 msk_ptr, msk_stride, invert_mask, &opt_sse));
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800293
David Barker0f3c94e2017-05-16 15:21:50 +0100294 if (opt_ret != ref_ret || opt_sse != ref_sse) {
295 err_count++;
296 if (first_failure == -1) {
297 first_failure = i;
298 first_failure_x = xoffset;
299 first_failure_y = yoffset;
300 }
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800301 }
302 }
303 }
304 }
305 }
306
clang-format3a826f12016-08-11 17:46:05 -0700307 EXPECT_EQ(0, err_count) << "Error: Masked Variance Test ExtremeValues,"
308 << "C output doesn't match SSSE3 output. "
309 << "First failed at test case " << first_failure
310 << " x_offset = " << first_failure_x
311 << " y_offset = " << first_failure_y;
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800312}
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800313
314using std::tr1::make_tuple;
315
David Barker0aa39ff2017-05-23 12:53:08 +0100316#if HAVE_SSSE3
Yaowu Xu28c779b2017-06-03 08:40:49 -0700317
318const MaskedSubPixelVarianceParam sub_pel_var_test[] = {
Yaowu Xu28c779b2017-06-03 08:40:49 -0700319 make_tuple(&aom_masked_sub_pixel_variance128x128_ssse3,
320 &aom_masked_sub_pixel_variance128x128_c),
321 make_tuple(&aom_masked_sub_pixel_variance128x64_ssse3,
322 &aom_masked_sub_pixel_variance128x64_c),
323 make_tuple(&aom_masked_sub_pixel_variance64x128_ssse3,
324 &aom_masked_sub_pixel_variance64x128_c),
Yaowu Xu28c779b2017-06-03 08:40:49 -0700325 make_tuple(&aom_masked_sub_pixel_variance64x64_ssse3,
326 &aom_masked_sub_pixel_variance64x64_c),
327 make_tuple(&aom_masked_sub_pixel_variance64x32_ssse3,
328 &aom_masked_sub_pixel_variance64x32_c),
329 make_tuple(&aom_masked_sub_pixel_variance32x64_ssse3,
330 &aom_masked_sub_pixel_variance32x64_c),
331 make_tuple(&aom_masked_sub_pixel_variance32x32_ssse3,
332 &aom_masked_sub_pixel_variance32x32_c),
333 make_tuple(&aom_masked_sub_pixel_variance32x16_ssse3,
334 &aom_masked_sub_pixel_variance32x16_c),
335 make_tuple(&aom_masked_sub_pixel_variance16x32_ssse3,
336 &aom_masked_sub_pixel_variance16x32_c),
337 make_tuple(&aom_masked_sub_pixel_variance16x16_ssse3,
338 &aom_masked_sub_pixel_variance16x16_c),
339 make_tuple(&aom_masked_sub_pixel_variance16x8_ssse3,
340 &aom_masked_sub_pixel_variance16x8_c),
341 make_tuple(&aom_masked_sub_pixel_variance8x16_ssse3,
342 &aom_masked_sub_pixel_variance8x16_c),
343 make_tuple(&aom_masked_sub_pixel_variance8x8_ssse3,
344 &aom_masked_sub_pixel_variance8x8_c),
345 make_tuple(&aom_masked_sub_pixel_variance8x4_ssse3,
346 &aom_masked_sub_pixel_variance8x4_c),
347 make_tuple(&aom_masked_sub_pixel_variance4x8_ssse3,
348 &aom_masked_sub_pixel_variance4x8_c),
349 make_tuple(&aom_masked_sub_pixel_variance4x4_ssse3,
350 &aom_masked_sub_pixel_variance4x4_c)
351};
352
353INSTANTIATE_TEST_CASE_P(SSSE3_C_COMPARE, MaskedSubPixelVarianceTest,
354 ::testing::ValuesIn(sub_pel_var_test));
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800355
Yaowu Xu28c779b2017-06-03 08:40:49 -0700356const HighbdMaskedSubPixelVarianceParam hbd_sub_pel_var_test[] = {
Yaowu Xu28c779b2017-06-03 08:40:49 -0700357 make_tuple(&aom_highbd_8_masked_sub_pixel_variance128x128_ssse3,
358 &aom_highbd_8_masked_sub_pixel_variance128x128_c, AOM_BITS_8),
359 make_tuple(&aom_highbd_8_masked_sub_pixel_variance128x64_ssse3,
360 &aom_highbd_8_masked_sub_pixel_variance128x64_c, AOM_BITS_8),
361 make_tuple(&aom_highbd_8_masked_sub_pixel_variance64x128_ssse3,
362 &aom_highbd_8_masked_sub_pixel_variance64x128_c, AOM_BITS_8),
Yaowu Xu28c779b2017-06-03 08:40:49 -0700363 make_tuple(&aom_highbd_8_masked_sub_pixel_variance64x64_ssse3,
364 &aom_highbd_8_masked_sub_pixel_variance64x64_c, AOM_BITS_8),
365 make_tuple(&aom_highbd_8_masked_sub_pixel_variance64x32_ssse3,
366 &aom_highbd_8_masked_sub_pixel_variance64x32_c, AOM_BITS_8),
367 make_tuple(&aom_highbd_8_masked_sub_pixel_variance32x64_ssse3,
368 &aom_highbd_8_masked_sub_pixel_variance32x64_c, AOM_BITS_8),
369 make_tuple(&aom_highbd_8_masked_sub_pixel_variance32x32_ssse3,
370 &aom_highbd_8_masked_sub_pixel_variance32x32_c, AOM_BITS_8),
371 make_tuple(&aom_highbd_8_masked_sub_pixel_variance32x16_ssse3,
372 &aom_highbd_8_masked_sub_pixel_variance32x16_c, AOM_BITS_8),
373 make_tuple(&aom_highbd_8_masked_sub_pixel_variance16x32_ssse3,
374 &aom_highbd_8_masked_sub_pixel_variance16x32_c, AOM_BITS_8),
375 make_tuple(&aom_highbd_8_masked_sub_pixel_variance16x16_ssse3,
376 &aom_highbd_8_masked_sub_pixel_variance16x16_c, AOM_BITS_8),
377 make_tuple(&aom_highbd_8_masked_sub_pixel_variance16x8_ssse3,
378 &aom_highbd_8_masked_sub_pixel_variance16x8_c, AOM_BITS_8),
379 make_tuple(&aom_highbd_8_masked_sub_pixel_variance8x16_ssse3,
380 &aom_highbd_8_masked_sub_pixel_variance8x16_c, AOM_BITS_8),
381 make_tuple(&aom_highbd_8_masked_sub_pixel_variance8x8_ssse3,
382 &aom_highbd_8_masked_sub_pixel_variance8x8_c, AOM_BITS_8),
383 make_tuple(&aom_highbd_8_masked_sub_pixel_variance8x4_ssse3,
384 &aom_highbd_8_masked_sub_pixel_variance8x4_c, AOM_BITS_8),
385 make_tuple(&aom_highbd_8_masked_sub_pixel_variance4x8_ssse3,
386 &aom_highbd_8_masked_sub_pixel_variance4x8_c, AOM_BITS_8),
387 make_tuple(&aom_highbd_8_masked_sub_pixel_variance4x4_ssse3,
388 &aom_highbd_8_masked_sub_pixel_variance4x4_c, AOM_BITS_8),
Yaowu Xu28c779b2017-06-03 08:40:49 -0700389 make_tuple(&aom_highbd_10_masked_sub_pixel_variance128x128_ssse3,
390 &aom_highbd_10_masked_sub_pixel_variance128x128_c, AOM_BITS_10),
391 make_tuple(&aom_highbd_10_masked_sub_pixel_variance128x64_ssse3,
392 &aom_highbd_10_masked_sub_pixel_variance128x64_c, AOM_BITS_10),
393 make_tuple(&aom_highbd_10_masked_sub_pixel_variance64x128_ssse3,
394 &aom_highbd_10_masked_sub_pixel_variance64x128_c, AOM_BITS_10),
Yaowu Xu28c779b2017-06-03 08:40:49 -0700395 make_tuple(&aom_highbd_10_masked_sub_pixel_variance64x64_ssse3,
396 &aom_highbd_10_masked_sub_pixel_variance64x64_c, AOM_BITS_10),
397 make_tuple(&aom_highbd_10_masked_sub_pixel_variance64x32_ssse3,
398 &aom_highbd_10_masked_sub_pixel_variance64x32_c, AOM_BITS_10),
399 make_tuple(&aom_highbd_10_masked_sub_pixel_variance32x64_ssse3,
400 &aom_highbd_10_masked_sub_pixel_variance32x64_c, AOM_BITS_10),
401 make_tuple(&aom_highbd_10_masked_sub_pixel_variance32x32_ssse3,
402 &aom_highbd_10_masked_sub_pixel_variance32x32_c, AOM_BITS_10),
403 make_tuple(&aom_highbd_10_masked_sub_pixel_variance32x16_ssse3,
404 &aom_highbd_10_masked_sub_pixel_variance32x16_c, AOM_BITS_10),
405 make_tuple(&aom_highbd_10_masked_sub_pixel_variance16x32_ssse3,
406 &aom_highbd_10_masked_sub_pixel_variance16x32_c, AOM_BITS_10),
407 make_tuple(&aom_highbd_10_masked_sub_pixel_variance16x16_ssse3,
408 &aom_highbd_10_masked_sub_pixel_variance16x16_c, AOM_BITS_10),
409 make_tuple(&aom_highbd_10_masked_sub_pixel_variance16x8_ssse3,
410 &aom_highbd_10_masked_sub_pixel_variance16x8_c, AOM_BITS_10),
411 make_tuple(&aom_highbd_10_masked_sub_pixel_variance8x16_ssse3,
412 &aom_highbd_10_masked_sub_pixel_variance8x16_c, AOM_BITS_10),
413 make_tuple(&aom_highbd_10_masked_sub_pixel_variance8x8_ssse3,
414 &aom_highbd_10_masked_sub_pixel_variance8x8_c, AOM_BITS_10),
415 make_tuple(&aom_highbd_10_masked_sub_pixel_variance8x4_ssse3,
416 &aom_highbd_10_masked_sub_pixel_variance8x4_c, AOM_BITS_10),
417 make_tuple(&aom_highbd_10_masked_sub_pixel_variance4x8_ssse3,
418 &aom_highbd_10_masked_sub_pixel_variance4x8_c, AOM_BITS_10),
419 make_tuple(&aom_highbd_10_masked_sub_pixel_variance4x4_ssse3,
420 &aom_highbd_10_masked_sub_pixel_variance4x4_c, AOM_BITS_10),
Yaowu Xu28c779b2017-06-03 08:40:49 -0700421 make_tuple(&aom_highbd_12_masked_sub_pixel_variance128x128_ssse3,
422 &aom_highbd_12_masked_sub_pixel_variance128x128_c, AOM_BITS_12),
423 make_tuple(&aom_highbd_12_masked_sub_pixel_variance128x64_ssse3,
424 &aom_highbd_12_masked_sub_pixel_variance128x64_c, AOM_BITS_12),
425 make_tuple(&aom_highbd_12_masked_sub_pixel_variance64x128_ssse3,
426 &aom_highbd_12_masked_sub_pixel_variance64x128_c, AOM_BITS_12),
Yaowu Xu28c779b2017-06-03 08:40:49 -0700427 make_tuple(&aom_highbd_12_masked_sub_pixel_variance64x64_ssse3,
428 &aom_highbd_12_masked_sub_pixel_variance64x64_c, AOM_BITS_12),
429 make_tuple(&aom_highbd_12_masked_sub_pixel_variance64x32_ssse3,
430 &aom_highbd_12_masked_sub_pixel_variance64x32_c, AOM_BITS_12),
431 make_tuple(&aom_highbd_12_masked_sub_pixel_variance32x64_ssse3,
432 &aom_highbd_12_masked_sub_pixel_variance32x64_c, AOM_BITS_12),
433 make_tuple(&aom_highbd_12_masked_sub_pixel_variance32x32_ssse3,
434 &aom_highbd_12_masked_sub_pixel_variance32x32_c, AOM_BITS_12),
435 make_tuple(&aom_highbd_12_masked_sub_pixel_variance32x16_ssse3,
436 &aom_highbd_12_masked_sub_pixel_variance32x16_c, AOM_BITS_12),
437 make_tuple(&aom_highbd_12_masked_sub_pixel_variance16x32_ssse3,
438 &aom_highbd_12_masked_sub_pixel_variance16x32_c, AOM_BITS_12),
439 make_tuple(&aom_highbd_12_masked_sub_pixel_variance16x16_ssse3,
440 &aom_highbd_12_masked_sub_pixel_variance16x16_c, AOM_BITS_12),
441 make_tuple(&aom_highbd_12_masked_sub_pixel_variance16x8_ssse3,
442 &aom_highbd_12_masked_sub_pixel_variance16x8_c, AOM_BITS_12),
443 make_tuple(&aom_highbd_12_masked_sub_pixel_variance8x16_ssse3,
444 &aom_highbd_12_masked_sub_pixel_variance8x16_c, AOM_BITS_12),
445 make_tuple(&aom_highbd_12_masked_sub_pixel_variance8x8_ssse3,
446 &aom_highbd_12_masked_sub_pixel_variance8x8_c, AOM_BITS_12),
447 make_tuple(&aom_highbd_12_masked_sub_pixel_variance8x4_ssse3,
448 &aom_highbd_12_masked_sub_pixel_variance8x4_c, AOM_BITS_12),
449 make_tuple(&aom_highbd_12_masked_sub_pixel_variance4x8_ssse3,
450 &aom_highbd_12_masked_sub_pixel_variance4x8_c, AOM_BITS_12),
451 make_tuple(&aom_highbd_12_masked_sub_pixel_variance4x4_ssse3,
452 &aom_highbd_12_masked_sub_pixel_variance4x4_c, AOM_BITS_12)
453};
454
455INSTANTIATE_TEST_CASE_P(SSSE3_C_COMPARE, HighbdMaskedSubPixelVarianceTest,
456 ::testing::ValuesIn(hbd_sub_pel_var_test));
David Barker0aa39ff2017-05-23 12:53:08 +0100457#endif // HAVE_SSSE3
Debargha Mukherjee1d69cee2016-02-29 16:08:07 -0800458} // namespace