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.
17 #include "./vpx_config.h"
18 #if CONFIG_VP8_ENCODER
19 #include "./vp8_rtcd.h"
21 #if CONFIG_VP9_ENCODER
22 #include "./vp9_rtcd.h"
24 #include "vpx_mem/vpx_mem.h"
27 #include "test/acm_random.h"
28 #include "test/clear_system_state.h"
29 #include "test/register_state_check.h"
30 #include "test/util.h"
31 #include "third_party/googletest/src/include/gtest/gtest.h"
34 typedef unsigned int (*sad_m_by_n_fn_t)(const unsigned char *source_ptr,
36 const unsigned char *reference_ptr,
38 unsigned int max_sad);
39 typedef std::tr1::tuple<int, int, sad_m_by_n_fn_t> sad_m_by_n_test_param_t;
41 typedef void (*sad_n_by_n_by_4_fn_t)(const uint8_t *src_ptr,
43 const unsigned char * const ref_ptr[],
45 unsigned int *sad_array);
46 typedef std::tr1::tuple<int, int, sad_n_by_n_by_4_fn_t>
47 sad_n_by_n_by_4_test_param_t;
49 using libvpx_test::ACMRandom;
52 class SADTestBase : public ::testing::Test {
54 SADTestBase(int width, int height) : width_(width), height_(height) {}
56 static void SetUpTestCase() {
57 source_data_ = reinterpret_cast<uint8_t*>(
58 vpx_memalign(kDataAlignment, kDataBlockSize));
59 reference_data_ = reinterpret_cast<uint8_t*>(
60 vpx_memalign(kDataAlignment, kDataBufferSize));
63 static void TearDownTestCase() {
64 vpx_free(source_data_);
66 vpx_free(reference_data_);
67 reference_data_ = NULL;
70 virtual void TearDown() {
71 libvpx_test::ClearSystemState();
75 // Handle blocks up to 4 blocks 64x64 with stride up to 128
76 static const int kDataAlignment = 16;
77 static const int kDataBlockSize = 64 * 128;
78 static const int kDataBufferSize = 4 * kDataBlockSize;
80 virtual void SetUp() {
81 source_stride_ = (width_ + 31) & ~31;
82 reference_stride_ = width_ * 2;
83 rnd_.Reset(ACMRandom::DeterministicSeed());
86 virtual uint8_t* GetReference(int block_idx) {
87 return reference_data_ + block_idx * kDataBlockSize;
90 // Sum of Absolute Differences. Given two blocks, calculate the absolute
91 // difference between two pixels in the same relative location; accumulate.
92 unsigned int ReferenceSAD(unsigned int max_sad, int block_idx = 0) {
94 const uint8_t* const reference = GetReference(block_idx);
96 for (int h = 0; h < height_; ++h) {
97 for (int w = 0; w < width_; ++w) {
98 sad += abs(source_data_[h * source_stride_ + w]
99 - reference[h * reference_stride_ + w]);
108 void FillConstant(uint8_t *data, int stride, uint8_t fill_constant) {
109 for (int h = 0; h < height_; ++h) {
110 for (int w = 0; w < width_; ++w) {
111 data[h * stride + w] = fill_constant;
116 void FillRandom(uint8_t *data, int stride) {
117 for (int h = 0; h < height_; ++h) {
118 for (int w = 0; w < width_; ++w) {
119 data[h * stride + w] = rnd_.Rand8();
125 static uint8_t* source_data_;
127 static uint8_t* reference_data_;
128 int reference_stride_;
133 class SADTest : public SADTestBase,
134 public ::testing::WithParamInterface<sad_m_by_n_test_param_t> {
136 SADTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1)) {}
139 unsigned int SAD(unsigned int max_sad, int block_idx = 0) {
141 const uint8_t* const reference = GetReference(block_idx);
143 REGISTER_STATE_CHECK(ret = GET_PARAM(2)(source_data_, source_stride_,
144 reference, reference_stride_,
149 void CheckSad(unsigned int max_sad) {
150 unsigned int reference_sad, exp_sad;
152 reference_sad = ReferenceSAD(max_sad);
153 exp_sad = SAD(max_sad);
155 if (reference_sad <= max_sad) {
156 ASSERT_EQ(exp_sad, reference_sad);
158 // Alternative implementations are not required to check max_sad
159 ASSERT_GE(exp_sad, reference_sad);
164 class SADx4Test : public SADTestBase,
165 public ::testing::WithParamInterface<sad_n_by_n_by_4_test_param_t> {
167 SADx4Test() : SADTestBase(GET_PARAM(0), GET_PARAM(1)) {}
170 void SADs(unsigned int *results) {
171 const uint8_t* refs[] = {GetReference(0), GetReference(1),
172 GetReference(2), GetReference(3)};
174 REGISTER_STATE_CHECK(GET_PARAM(2)(source_data_, source_stride_,
175 refs, reference_stride_,
180 unsigned int reference_sad, exp_sad[4];
183 for (int block = 0; block < 4; block++) {
184 reference_sad = ReferenceSAD(UINT_MAX, block);
186 EXPECT_EQ(exp_sad[block], reference_sad) << "block " << block;
191 uint8_t* SADTestBase::source_data_ = NULL;
192 uint8_t* SADTestBase::reference_data_ = NULL;
194 TEST_P(SADTest, MaxRef) {
195 FillConstant(source_data_, source_stride_, 0);
196 FillConstant(reference_data_, reference_stride_, 255);
200 TEST_P(SADx4Test, MaxRef) {
201 FillConstant(source_data_, source_stride_, 0);
202 FillConstant(GetReference(0), reference_stride_, 255);
203 FillConstant(GetReference(1), reference_stride_, 255);
204 FillConstant(GetReference(2), reference_stride_, 255);
205 FillConstant(GetReference(3), reference_stride_, 255);
209 TEST_P(SADTest, MaxSrc) {
210 FillConstant(source_data_, source_stride_, 255);
211 FillConstant(reference_data_, reference_stride_, 0);
215 TEST_P(SADx4Test, MaxSrc) {
216 FillConstant(source_data_, source_stride_, 255);
217 FillConstant(GetReference(0), reference_stride_, 0);
218 FillConstant(GetReference(1), reference_stride_, 0);
219 FillConstant(GetReference(2), reference_stride_, 0);
220 FillConstant(GetReference(3), reference_stride_, 0);
224 TEST_P(SADTest, ShortRef) {
225 int tmp_stride = reference_stride_;
226 reference_stride_ >>= 1;
227 FillRandom(source_data_, source_stride_);
228 FillRandom(reference_data_, reference_stride_);
230 reference_stride_ = tmp_stride;
233 TEST_P(SADx4Test, ShortRef) {
234 int tmp_stride = reference_stride_;
235 reference_stride_ >>= 1;
236 FillRandom(source_data_, source_stride_);
237 FillRandom(GetReference(0), reference_stride_);
238 FillRandom(GetReference(1), reference_stride_);
239 FillRandom(GetReference(2), reference_stride_);
240 FillRandom(GetReference(3), reference_stride_);
242 reference_stride_ = tmp_stride;
245 TEST_P(SADTest, UnalignedRef) {
246 // The reference frame, but not the source frame, may be unaligned for
247 // certain types of searches.
248 int tmp_stride = reference_stride_;
249 reference_stride_ -= 1;
250 FillRandom(source_data_, source_stride_);
251 FillRandom(reference_data_, reference_stride_);
253 reference_stride_ = tmp_stride;
256 TEST_P(SADx4Test, UnalignedRef) {
257 // The reference frame, but not the source frame, may be unaligned for
258 // certain types of searches.
259 int tmp_stride = reference_stride_;
260 reference_stride_ -= 1;
261 FillRandom(source_data_, source_stride_);
262 FillRandom(GetReference(0), reference_stride_);
263 FillRandom(GetReference(1), reference_stride_);
264 FillRandom(GetReference(2), reference_stride_);
265 FillRandom(GetReference(3), reference_stride_);
267 reference_stride_ = tmp_stride;
270 TEST_P(SADTest, ShortSrc) {
271 int tmp_stride = source_stride_;
272 source_stride_ >>= 1;
273 FillRandom(source_data_, source_stride_);
274 FillRandom(reference_data_, reference_stride_);
276 source_stride_ = tmp_stride;
279 TEST_P(SADx4Test, ShortSrc) {
280 int tmp_stride = source_stride_;
281 source_stride_ >>= 1;
282 FillRandom(source_data_, source_stride_);
283 FillRandom(GetReference(0), reference_stride_);
284 FillRandom(GetReference(1), reference_stride_);
285 FillRandom(GetReference(2), reference_stride_);
286 FillRandom(GetReference(3), reference_stride_);
288 source_stride_ = tmp_stride;
291 TEST_P(SADTest, MaxSAD) {
292 // Verify that, when max_sad is set, the implementation does not return a
293 // value lower than the reference.
294 FillConstant(source_data_, source_stride_, 255);
295 FillConstant(reference_data_, reference_stride_, 0);
299 using std::tr1::make_tuple;
301 #if CONFIG_VP8_ENCODER
302 const sad_m_by_n_fn_t sad_16x16_c = vp8_sad16x16_c;
303 const sad_m_by_n_fn_t sad_8x16_c = vp8_sad8x16_c;
304 const sad_m_by_n_fn_t sad_16x8_c = vp8_sad16x8_c;
305 const sad_m_by_n_fn_t sad_8x8_c = vp8_sad8x8_c;
306 const sad_m_by_n_fn_t sad_4x4_c = vp8_sad4x4_c;
308 #if CONFIG_VP9_ENCODER
309 const sad_m_by_n_fn_t sad_64x64_c_vp9 = vp9_sad64x64_c;
310 const sad_m_by_n_fn_t sad_32x32_c_vp9 = vp9_sad32x32_c;
311 const sad_m_by_n_fn_t sad_16x16_c_vp9 = vp9_sad16x16_c;
312 const sad_m_by_n_fn_t sad_8x16_c_vp9 = vp9_sad8x16_c;
313 const sad_m_by_n_fn_t sad_16x8_c_vp9 = vp9_sad16x8_c;
314 const sad_m_by_n_fn_t sad_8x8_c_vp9 = vp9_sad8x8_c;
315 const sad_m_by_n_fn_t sad_8x4_c_vp9 = vp9_sad8x4_c;
316 const sad_m_by_n_fn_t sad_4x8_c_vp9 = vp9_sad4x8_c;
317 const sad_m_by_n_fn_t sad_4x4_c_vp9 = vp9_sad4x4_c;
319 const sad_m_by_n_test_param_t c_tests[] = {
320 #if CONFIG_VP8_ENCODER
321 make_tuple(16, 16, sad_16x16_c),
322 make_tuple(8, 16, sad_8x16_c),
323 make_tuple(16, 8, sad_16x8_c),
324 make_tuple(8, 8, sad_8x8_c),
325 make_tuple(4, 4, sad_4x4_c),
327 #if CONFIG_VP9_ENCODER
328 make_tuple(64, 64, sad_64x64_c_vp9),
329 make_tuple(32, 32, sad_32x32_c_vp9),
330 make_tuple(16, 16, sad_16x16_c_vp9),
331 make_tuple(8, 16, sad_8x16_c_vp9),
332 make_tuple(16, 8, sad_16x8_c_vp9),
333 make_tuple(8, 8, sad_8x8_c_vp9),
334 make_tuple(8, 4, sad_8x4_c_vp9),
335 make_tuple(4, 8, sad_4x8_c_vp9),
336 make_tuple(4, 4, sad_4x4_c_vp9),
339 INSTANTIATE_TEST_CASE_P(C, SADTest, ::testing::ValuesIn(c_tests));
341 #if CONFIG_VP9_ENCODER
342 const sad_n_by_n_by_4_fn_t sad_64x64x4d_c = vp9_sad64x64x4d_c;
343 const sad_n_by_n_by_4_fn_t sad_64x32x4d_c = vp9_sad64x32x4d_c;
344 const sad_n_by_n_by_4_fn_t sad_32x64x4d_c = vp9_sad32x64x4d_c;
345 const sad_n_by_n_by_4_fn_t sad_32x32x4d_c = vp9_sad32x32x4d_c;
346 const sad_n_by_n_by_4_fn_t sad_32x16x4d_c = vp9_sad32x16x4d_c;
347 const sad_n_by_n_by_4_fn_t sad_16x32x4d_c = vp9_sad16x32x4d_c;
348 const sad_n_by_n_by_4_fn_t sad_16x16x4d_c = vp9_sad16x16x4d_c;
349 const sad_n_by_n_by_4_fn_t sad_16x8x4d_c = vp9_sad16x8x4d_c;
350 const sad_n_by_n_by_4_fn_t sad_8x16x4d_c = vp9_sad8x16x4d_c;
351 const sad_n_by_n_by_4_fn_t sad_8x8x4d_c = vp9_sad8x8x4d_c;
352 const sad_n_by_n_by_4_fn_t sad_8x4x4d_c = vp9_sad8x4x4d_c;
353 const sad_n_by_n_by_4_fn_t sad_4x8x4d_c = vp9_sad4x8x4d_c;
354 const sad_n_by_n_by_4_fn_t sad_4x4x4d_c = vp9_sad4x4x4d_c;
355 INSTANTIATE_TEST_CASE_P(C, SADx4Test, ::testing::Values(
356 make_tuple(64, 64, sad_64x64x4d_c),
357 make_tuple(64, 32, sad_64x32x4d_c),
358 make_tuple(32, 64, sad_32x64x4d_c),
359 make_tuple(32, 32, sad_32x32x4d_c),
360 make_tuple(32, 16, sad_32x16x4d_c),
361 make_tuple(16, 32, sad_16x32x4d_c),
362 make_tuple(16, 16, sad_16x16x4d_c),
363 make_tuple(16, 8, sad_16x8x4d_c),
364 make_tuple(8, 16, sad_8x16x4d_c),
365 make_tuple(8, 8, sad_8x8x4d_c),
366 make_tuple(8, 4, sad_8x4x4d_c),
367 make_tuple(4, 8, sad_4x8x4d_c),
368 make_tuple(4, 4, sad_4x4x4d_c)));
373 const sad_m_by_n_fn_t sad_16x16_armv6 = vp8_sad16x16_armv6;
374 INSTANTIATE_TEST_CASE_P(MEDIA, SADTest, ::testing::Values(
375 make_tuple(16, 16, sad_16x16_armv6)));
379 const sad_m_by_n_fn_t sad_16x16_neon = vp8_sad16x16_neon;
380 const sad_m_by_n_fn_t sad_8x16_neon = vp8_sad8x16_neon;
381 const sad_m_by_n_fn_t sad_16x8_neon = vp8_sad16x8_neon;
382 const sad_m_by_n_fn_t sad_8x8_neon = vp8_sad8x8_neon;
383 const sad_m_by_n_fn_t sad_4x4_neon = vp8_sad4x4_neon;
384 INSTANTIATE_TEST_CASE_P(NEON, SADTest, ::testing::Values(
385 make_tuple(16, 16, sad_16x16_neon),
386 make_tuple(8, 16, sad_8x16_neon),
387 make_tuple(16, 8, sad_16x8_neon),
388 make_tuple(8, 8, sad_8x8_neon),
389 make_tuple(4, 4, sad_4x4_neon)));
394 #if CONFIG_VP8_ENCODER
395 const sad_m_by_n_fn_t sad_16x16_mmx = vp8_sad16x16_mmx;
396 const sad_m_by_n_fn_t sad_8x16_mmx = vp8_sad8x16_mmx;
397 const sad_m_by_n_fn_t sad_16x8_mmx = vp8_sad16x8_mmx;
398 const sad_m_by_n_fn_t sad_8x8_mmx = vp8_sad8x8_mmx;
399 const sad_m_by_n_fn_t sad_4x4_mmx = vp8_sad4x4_mmx;
401 #if CONFIG_VP9_ENCODER
402 const sad_m_by_n_fn_t sad_16x16_mmx_vp9 = vp9_sad16x16_mmx;
403 const sad_m_by_n_fn_t sad_8x16_mmx_vp9 = vp9_sad8x16_mmx;
404 const sad_m_by_n_fn_t sad_16x8_mmx_vp9 = vp9_sad16x8_mmx;
405 const sad_m_by_n_fn_t sad_8x8_mmx_vp9 = vp9_sad8x8_mmx;
406 const sad_m_by_n_fn_t sad_4x4_mmx_vp9 = vp9_sad4x4_mmx;
409 const sad_m_by_n_test_param_t mmx_tests[] = {
410 #if CONFIG_VP8_ENCODER
411 make_tuple(16, 16, sad_16x16_mmx),
412 make_tuple(8, 16, sad_8x16_mmx),
413 make_tuple(16, 8, sad_16x8_mmx),
414 make_tuple(8, 8, sad_8x8_mmx),
415 make_tuple(4, 4, sad_4x4_mmx),
417 #if CONFIG_VP9_ENCODER
418 make_tuple(16, 16, sad_16x16_mmx_vp9),
419 make_tuple(8, 16, sad_8x16_mmx_vp9),
420 make_tuple(16, 8, sad_16x8_mmx_vp9),
421 make_tuple(8, 8, sad_8x8_mmx_vp9),
422 make_tuple(4, 4, sad_4x4_mmx_vp9),
425 INSTANTIATE_TEST_CASE_P(MMX, SADTest, ::testing::ValuesIn(mmx_tests));
429 #if CONFIG_VP9_ENCODER
430 #if CONFIG_USE_X86INC
431 const sad_m_by_n_fn_t sad_4x4_sse_vp9 = vp9_sad4x4_sse;
432 const sad_m_by_n_fn_t sad_4x8_sse_vp9 = vp9_sad4x8_sse;
433 INSTANTIATE_TEST_CASE_P(SSE, SADTest, ::testing::Values(
434 make_tuple(4, 4, sad_4x4_sse_vp9),
435 make_tuple(4, 8, sad_4x8_sse_vp9)));
437 const sad_n_by_n_by_4_fn_t sad_4x8x4d_sse = vp9_sad4x8x4d_sse;
438 const sad_n_by_n_by_4_fn_t sad_4x4x4d_sse = vp9_sad4x4x4d_sse;
439 INSTANTIATE_TEST_CASE_P(SSE, SADx4Test, ::testing::Values(
440 make_tuple(4, 8, sad_4x8x4d_sse),
441 make_tuple(4, 4, sad_4x4x4d_sse)));
447 #if CONFIG_VP8_ENCODER
448 const sad_m_by_n_fn_t sad_16x16_wmt = vp8_sad16x16_wmt;
449 const sad_m_by_n_fn_t sad_8x16_wmt = vp8_sad8x16_wmt;
450 const sad_m_by_n_fn_t sad_16x8_wmt = vp8_sad16x8_wmt;
451 const sad_m_by_n_fn_t sad_8x8_wmt = vp8_sad8x8_wmt;
452 const sad_m_by_n_fn_t sad_4x4_wmt = vp8_sad4x4_wmt;
454 #if CONFIG_VP9_ENCODER
455 #if CONFIG_USE_X86INC
456 const sad_m_by_n_fn_t sad_64x64_sse2_vp9 = vp9_sad64x64_sse2;
457 const sad_m_by_n_fn_t sad_64x32_sse2_vp9 = vp9_sad64x32_sse2;
458 const sad_m_by_n_fn_t sad_32x64_sse2_vp9 = vp9_sad32x64_sse2;
459 const sad_m_by_n_fn_t sad_32x32_sse2_vp9 = vp9_sad32x32_sse2;
460 const sad_m_by_n_fn_t sad_32x16_sse2_vp9 = vp9_sad32x16_sse2;
461 const sad_m_by_n_fn_t sad_16x32_sse2_vp9 = vp9_sad16x32_sse2;
462 const sad_m_by_n_fn_t sad_16x16_sse2_vp9 = vp9_sad16x16_sse2;
463 const sad_m_by_n_fn_t sad_16x8_sse2_vp9 = vp9_sad16x8_sse2;
464 const sad_m_by_n_fn_t sad_8x16_sse2_vp9 = vp9_sad8x16_sse2;
465 const sad_m_by_n_fn_t sad_8x8_sse2_vp9 = vp9_sad8x8_sse2;
466 const sad_m_by_n_fn_t sad_8x4_sse2_vp9 = vp9_sad8x4_sse2;
469 const sad_m_by_n_test_param_t sse2_tests[] = {
470 #if CONFIG_VP8_ENCODER
471 make_tuple(16, 16, sad_16x16_wmt),
472 make_tuple(8, 16, sad_8x16_wmt),
473 make_tuple(16, 8, sad_16x8_wmt),
474 make_tuple(8, 8, sad_8x8_wmt),
475 make_tuple(4, 4, sad_4x4_wmt),
477 #if CONFIG_VP9_ENCODER
478 #if CONFIG_USE_X86INC
479 make_tuple(64, 64, sad_64x64_sse2_vp9),
480 make_tuple(64, 32, sad_64x32_sse2_vp9),
481 make_tuple(32, 64, sad_32x64_sse2_vp9),
482 make_tuple(32, 32, sad_32x32_sse2_vp9),
483 make_tuple(32, 16, sad_32x16_sse2_vp9),
484 make_tuple(16, 32, sad_16x32_sse2_vp9),
485 make_tuple(16, 16, sad_16x16_sse2_vp9),
486 make_tuple(16, 8, sad_16x8_sse2_vp9),
487 make_tuple(8, 16, sad_8x16_sse2_vp9),
488 make_tuple(8, 8, sad_8x8_sse2_vp9),
489 make_tuple(8, 4, sad_8x4_sse2_vp9),
493 INSTANTIATE_TEST_CASE_P(SSE2, SADTest, ::testing::ValuesIn(sse2_tests));
495 #if CONFIG_VP9_ENCODER
496 #if CONFIG_USE_X86INC
497 const sad_n_by_n_by_4_fn_t sad_64x64x4d_sse2 = vp9_sad64x64x4d_sse2;
498 const sad_n_by_n_by_4_fn_t sad_64x32x4d_sse2 = vp9_sad64x32x4d_sse2;
499 const sad_n_by_n_by_4_fn_t sad_32x64x4d_sse2 = vp9_sad32x64x4d_sse2;
500 const sad_n_by_n_by_4_fn_t sad_32x32x4d_sse2 = vp9_sad32x32x4d_sse2;
501 const sad_n_by_n_by_4_fn_t sad_32x16x4d_sse2 = vp9_sad32x16x4d_sse2;
502 const sad_n_by_n_by_4_fn_t sad_16x32x4d_sse2 = vp9_sad16x32x4d_sse2;
503 const sad_n_by_n_by_4_fn_t sad_16x16x4d_sse2 = vp9_sad16x16x4d_sse2;
504 const sad_n_by_n_by_4_fn_t sad_16x8x4d_sse2 = vp9_sad16x8x4d_sse2;
505 const sad_n_by_n_by_4_fn_t sad_8x16x4d_sse2 = vp9_sad8x16x4d_sse2;
506 const sad_n_by_n_by_4_fn_t sad_8x8x4d_sse2 = vp9_sad8x8x4d_sse2;
507 const sad_n_by_n_by_4_fn_t sad_8x4x4d_sse2 = vp9_sad8x4x4d_sse2;
508 INSTANTIATE_TEST_CASE_P(SSE2, SADx4Test, ::testing::Values(
509 make_tuple(64, 64, sad_64x64x4d_sse2),
510 make_tuple(64, 32, sad_64x32x4d_sse2),
511 make_tuple(32, 64, sad_32x64x4d_sse2),
512 make_tuple(32, 32, sad_32x32x4d_sse2),
513 make_tuple(32, 16, sad_32x16x4d_sse2),
514 make_tuple(16, 32, sad_16x32x4d_sse2),
515 make_tuple(16, 16, sad_16x16x4d_sse2),
516 make_tuple(16, 8, sad_16x8x4d_sse2),
517 make_tuple(8, 16, sad_8x16x4d_sse2),
518 make_tuple(8, 8, sad_8x8x4d_sse2),
519 make_tuple(8, 4, sad_8x4x4d_sse2)));
525 #if CONFIG_VP8_ENCODER
526 const sad_n_by_n_by_4_fn_t sad_16x16x4d_sse3 = vp8_sad16x16x4d_sse3;
527 const sad_n_by_n_by_4_fn_t sad_16x8x4d_sse3 = vp8_sad16x8x4d_sse3;
528 const sad_n_by_n_by_4_fn_t sad_8x16x4d_sse3 = vp8_sad8x16x4d_sse3;
529 const sad_n_by_n_by_4_fn_t sad_8x8x4d_sse3 = vp8_sad8x8x4d_sse3;
530 const sad_n_by_n_by_4_fn_t sad_4x4x4d_sse3 = vp8_sad4x4x4d_sse3;
531 INSTANTIATE_TEST_CASE_P(SSE3, SADx4Test, ::testing::Values(
532 make_tuple(16, 16, sad_16x16x4d_sse3),
533 make_tuple(16, 8, sad_16x8x4d_sse3),
534 make_tuple(8, 16, sad_8x16x4d_sse3),
535 make_tuple(8, 8, sad_8x8x4d_sse3),
536 make_tuple(4, 4, sad_4x4x4d_sse3)));
541 #if CONFIG_USE_X86INC
542 const sad_m_by_n_fn_t sad_16x16_sse3 = vp8_sad16x16_sse3;
543 INSTANTIATE_TEST_CASE_P(SSE3, SADTest, ::testing::Values(
544 make_tuple(16, 16, sad_16x16_sse3)));