Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Side by Side Diff: source/libvpx/test/variance_test.cc

Issue 1169543007: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/test/tools_common.sh ('k') | source/libvpx/test/vp9_skip_loopfilter_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <cstdlib> 11 #include <cstdlib>
12 #include <new> 12 #include <new>
13 13
14 #include "test/acm_random.h" 14 #include "test/acm_random.h"
15 #include "test/clear_system_state.h" 15 #include "test/clear_system_state.h"
16 #include "test/register_state_check.h" 16 #include "test/register_state_check.h"
17 #include "third_party/googletest/src/include/gtest/gtest.h" 17 #include "third_party/googletest/src/include/gtest/gtest.h"
18 18
19 #include "./vpx_config.h" 19 #include "./vpx_config.h"
20 #include "vpx/vpx_codec.h" 20 #include "vpx/vpx_codec.h"
21 #include "vpx/vpx_integer.h" 21 #include "vpx/vpx_integer.h"
22 #include "vpx_mem/vpx_mem.h" 22 #include "vpx_mem/vpx_mem.h"
23 #include "vpx_ports/mem.h" 23 #include "vpx_ports/mem.h"
24 #if CONFIG_VP8_ENCODER
25 # include "./vp8_rtcd.h"
26 #endif // CONFIG_VP8_ENCODER
24 #if CONFIG_VP9_ENCODER 27 #if CONFIG_VP9_ENCODER
25 # include "./vp9_rtcd.h" 28 # include "./vp9_rtcd.h"
26 # include "vp9/encoder/vp9_variance.h" 29 # include "vp9/encoder/vp9_variance.h"
27 #endif // CONFIG_VP9_ENCODER 30 #endif // CONFIG_VP9_ENCODER
28 #include "./vpx_dsp_rtcd.h" 31 #include "./vpx_dsp_rtcd.h"
29 32
30 namespace { 33 namespace {
31 34
32 typedef unsigned int (*VarianceMxNFunc)(const uint8_t *a, int a_stride, 35 typedef unsigned int (*VarianceMxNFunc)(const uint8_t *a, int a_stride,
33 const uint8_t *b, int b_stride, 36 const uint8_t *b, int b_stride,
34 unsigned int *sse); 37 unsigned int *sse);
38 typedef unsigned int (*SubpixVarMxNFunc)(const uint8_t *a, int a_stride,
39 int xoffset, int yoffset,
40 const uint8_t *b, int b_stride,
41 unsigned int *sse);
35 typedef unsigned int (*Get4x4SseFunc)(const uint8_t *a, int a_stride, 42 typedef unsigned int (*Get4x4SseFunc)(const uint8_t *a, int a_stride,
36 const uint8_t *b, int b_stride); 43 const uint8_t *b, int b_stride);
37 44
38
39 using ::std::tr1::get; 45 using ::std::tr1::get;
40 using ::std::tr1::make_tuple; 46 using ::std::tr1::make_tuple;
41 using ::std::tr1::tuple; 47 using ::std::tr1::tuple;
42 using libvpx_test::ACMRandom; 48 using libvpx_test::ACMRandom;
43 49
44 // Truncate high bit depth results by downshifting (with rounding) by: 50 // Truncate high bit depth results by downshifting (with rounding) by:
45 // 2 * (bit_depth - 8) for sse 51 // 2 * (bit_depth - 8) for sse
46 // (bit_depth - 8) for se 52 // (bit_depth - 8) for se
47 static void RoundHighBitDepth(int bit_depth, int64_t *se, uint64_t *sse) { 53 static void RoundHighBitDepth(int bit_depth, int64_t *se, uint64_t *sse) {
48 switch (bit_depth) { 54 switch (bit_depth) {
(...skipping 12 matching lines...) Expand all
61 } 67 }
62 68
63 static unsigned int mb_ss_ref(const int16_t *src) { 69 static unsigned int mb_ss_ref(const int16_t *src) {
64 unsigned int res = 0; 70 unsigned int res = 0;
65 for (int i = 0; i < 256; ++i) { 71 for (int i = 0; i < 256; ++i) {
66 res += src[i] * src[i]; 72 res += src[i] * src[i];
67 } 73 }
68 return res; 74 return res;
69 } 75 }
70 76
71 static unsigned int variance_ref(const uint8_t *src, const uint8_t *ref, 77 static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref,
72 int l2w, int l2h, int src_stride_coeff, 78 int l2w, int l2h, int src_stride_coeff,
73 int ref_stride_coeff, uint32_t *sse_ptr, 79 int ref_stride_coeff, uint32_t *sse_ptr,
74 bool use_high_bit_depth_, 80 bool use_high_bit_depth_,
75 vpx_bit_depth_t bit_depth) { 81 vpx_bit_depth_t bit_depth) {
76 int64_t se = 0; 82 int64_t se = 0;
77 uint64_t sse = 0; 83 uint64_t sse = 0;
78 const int w = 1 << l2w; 84 const int w = 1 << l2w;
79 const int h = 1 << l2h; 85 const int h = 1 << l2h;
80 for (int y = 0; y < h; y++) { 86 for (int y = 0; y < h; y++) {
81 for (int x = 0; x < w; x++) { 87 for (int x = 0; x < w; x++) {
82 int diff; 88 int diff;
83 if (!use_high_bit_depth_) { 89 if (!use_high_bit_depth_) {
84 diff = ref[w * y * ref_stride_coeff + x] - 90 diff = ref[w * y * ref_stride_coeff + x] -
85 src[w * y * src_stride_coeff + x]; 91 src[w * y * src_stride_coeff + x];
86 se += diff; 92 se += diff;
87 sse += diff * diff; 93 sse += diff * diff;
88 #if CONFIG_VP9_HIGHBITDEPTH 94 #if CONFIG_VP9_HIGHBITDEPTH
89 } else { 95 } else {
90 diff = CONVERT_TO_SHORTPTR(ref)[w * y * ref_stride_coeff + x] - 96 diff = CONVERT_TO_SHORTPTR(ref)[w * y * ref_stride_coeff + x] -
91 CONVERT_TO_SHORTPTR(src)[w * y * src_stride_coeff + x]; 97 CONVERT_TO_SHORTPTR(src)[w * y * src_stride_coeff + x];
92 se += diff; 98 se += diff;
93 sse += diff * diff; 99 sse += diff * diff;
94 #endif // CONFIG_VP9_HIGHBITDEPTH 100 #endif // CONFIG_VP9_HIGHBITDEPTH
95 } 101 }
96 } 102 }
97 } 103 }
98 RoundHighBitDepth(bit_depth, &se, &sse); 104 RoundHighBitDepth(bit_depth, &se, &sse);
99 *sse_ptr = (uint32_t) sse; 105 *sse_ptr = static_cast<uint32_t>(sse);
100 return (unsigned int) (sse - (((int64_t) se * se) >> (l2w + l2h))); 106 return static_cast<uint32_t>(sse -
107 ((static_cast<int64_t>(se) * se) >>
108 (l2w + l2h)));
101 } 109 }
102 110
103 static unsigned int subpel_variance_ref(const uint8_t *ref, const uint8_t *src, 111 /* The subpel reference functions differ from the codec version in one aspect:
104 int l2w, int l2h, int xoff, int yoff, 112 * they calculate the bilinear factors directly instead of using a lookup table
105 unsigned int *sse_ptr, 113 * and therefore upshift xoff and yoff by 1. Only every other calculated value
106 bool use_high_bit_depth_, 114 * is used so the codec version shrinks the table to save space and maintain
107 vpx_bit_depth_t bit_depth) { 115 * compatibility with vp8.
116 */
117 static uint32_t subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
118 int l2w, int l2h, int xoff, int yoff,
119 uint32_t *sse_ptr,
120 bool use_high_bit_depth_,
121 vpx_bit_depth_t bit_depth) {
108 int64_t se = 0; 122 int64_t se = 0;
109 uint64_t sse = 0; 123 uint64_t sse = 0;
110 const int w = 1 << l2w; 124 const int w = 1 << l2w;
111 const int h = 1 << l2h; 125 const int h = 1 << l2h;
126
127 xoff <<= 1;
128 yoff <<= 1;
129
112 for (int y = 0; y < h; y++) { 130 for (int y = 0; y < h; y++) {
113 for (int x = 0; x < w; x++) { 131 for (int x = 0; x < w; x++) {
114 // Bilinear interpolation at a 16th pel step. 132 // Bilinear interpolation at a 16th pel step.
115 if (!use_high_bit_depth_) { 133 if (!use_high_bit_depth_) {
116 const int a1 = ref[(w + 1) * (y + 0) + x + 0]; 134 const int a1 = ref[(w + 1) * (y + 0) + x + 0];
117 const int a2 = ref[(w + 1) * (y + 0) + x + 1]; 135 const int a2 = ref[(w + 1) * (y + 0) + x + 1];
118 const int b1 = ref[(w + 1) * (y + 1) + x + 0]; 136 const int b1 = ref[(w + 1) * (y + 1) + x + 0];
119 const int b2 = ref[(w + 1) * (y + 1) + x + 1]; 137 const int b2 = ref[(w + 1) * (y + 1) + x + 1];
120 const int a = a1 + (((a2 - a1) * xoff + 8) >> 4); 138 const int a = a1 + (((a2 - a1) * xoff + 8) >> 4);
121 const int b = b1 + (((b2 - b1) * xoff + 8) >> 4); 139 const int b = b1 + (((b2 - b1) * xoff + 8) >> 4);
(...skipping 13 matching lines...) Expand all
135 const int b = b1 + (((b2 - b1) * xoff + 8) >> 4); 153 const int b = b1 + (((b2 - b1) * xoff + 8) >> 4);
136 const int r = a + (((b - a) * yoff + 8) >> 4); 154 const int r = a + (((b - a) * yoff + 8) >> 4);
137 const int diff = r - src16[w * y + x]; 155 const int diff = r - src16[w * y + x];
138 se += diff; 156 se += diff;
139 sse += diff * diff; 157 sse += diff * diff;
140 #endif // CONFIG_VP9_HIGHBITDEPTH 158 #endif // CONFIG_VP9_HIGHBITDEPTH
141 } 159 }
142 } 160 }
143 } 161 }
144 RoundHighBitDepth(bit_depth, &se, &sse); 162 RoundHighBitDepth(bit_depth, &se, &sse);
145 *sse_ptr = (unsigned int) sse; 163 *sse_ptr = static_cast<uint32_t>(sse);
146 return (unsigned int) (sse - (((int64_t) se * se) >> (l2w + l2h))); 164 return static_cast<uint32_t>(sse -
165 ((static_cast<int64_t>(se) * se) >>
166 (l2w + l2h)));
147 } 167 }
148 168
149 typedef unsigned int (*SumOfSquaresFunction)(const int16_t *src); 169 typedef unsigned int (*SumOfSquaresFunction)(const int16_t *src);
150 170
151 class SumOfSquaresTest : public ::testing::TestWithParam<SumOfSquaresFunction> { 171 class SumOfSquaresTest : public ::testing::TestWithParam<SumOfSquaresFunction> {
152 public: 172 public:
153 SumOfSquaresTest() : func_(GetParam()) {} 173 SumOfSquaresTest() : func_(GetParam()) {}
154 174
155 virtual ~SumOfSquaresTest() { 175 virtual ~SumOfSquaresTest() {
156 libvpx_test::ClearSystemState(); 176 libvpx_test::ClearSystemState();
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 template<typename MseFunctionType> 477 template<typename MseFunctionType>
458 void MseTest<MseFunctionType>::MaxTest_sse() { 478 void MseTest<MseFunctionType>::MaxTest_sse() {
459 memset(src_, 255, block_size_); 479 memset(src_, 255, block_size_);
460 memset(ref_, 0, block_size_); 480 memset(ref_, 0, block_size_);
461 unsigned int var; 481 unsigned int var;
462 ASM_REGISTER_STATE_CHECK(var = mse_(src_, width_, ref_, width_)); 482 ASM_REGISTER_STATE_CHECK(var = mse_(src_, width_, ref_, width_));
463 const unsigned int expected = block_size_ * 255 * 255; 483 const unsigned int expected = block_size_ * 255 * 255;
464 EXPECT_EQ(expected, var); 484 EXPECT_EQ(expected, var);
465 } 485 }
466 486
467 unsigned int subpel_avg_variance_ref(const uint8_t *ref, 487 static uint32_t subpel_avg_variance_ref(const uint8_t *ref,
468 const uint8_t *src, 488 const uint8_t *src,
469 const uint8_t *second_pred, 489 const uint8_t *second_pred,
470 int l2w, int l2h, 490 int l2w, int l2h,
471 int xoff, int yoff, 491 int xoff, int yoff,
472 unsigned int *sse_ptr, 492 uint32_t *sse_ptr,
473 bool use_high_bit_depth, 493 bool use_high_bit_depth,
474 vpx_bit_depth_t bit_depth) { 494 vpx_bit_depth_t bit_depth) {
475 int64_t se = 0; 495 int64_t se = 0;
476 uint64_t sse = 0; 496 uint64_t sse = 0;
477 const int w = 1 << l2w; 497 const int w = 1 << l2w;
478 const int h = 1 << l2h; 498 const int h = 1 << l2h;
499
500 xoff <<= 1;
501 yoff <<= 1;
502
479 for (int y = 0; y < h; y++) { 503 for (int y = 0; y < h; y++) {
480 for (int x = 0; x < w; x++) { 504 for (int x = 0; x < w; x++) {
481 // bilinear interpolation at a 16th pel step 505 // bilinear interpolation at a 16th pel step
482 if (!use_high_bit_depth) { 506 if (!use_high_bit_depth) {
483 const int a1 = ref[(w + 1) * (y + 0) + x + 0]; 507 const int a1 = ref[(w + 1) * (y + 0) + x + 0];
484 const int a2 = ref[(w + 1) * (y + 0) + x + 1]; 508 const int a2 = ref[(w + 1) * (y + 0) + x + 1];
485 const int b1 = ref[(w + 1) * (y + 1) + x + 0]; 509 const int b1 = ref[(w + 1) * (y + 1) + x + 0];
486 const int b2 = ref[(w + 1) * (y + 1) + x + 1]; 510 const int b2 = ref[(w + 1) * (y + 1) + x + 1];
487 const int a = a1 + (((a2 - a1) * xoff + 8) >> 4); 511 const int a = a1 + (((a2 - a1) * xoff + 8) >> 4);
488 const int b = b1 + (((b2 - b1) * xoff + 8) >> 4); 512 const int b = b1 + (((b2 - b1) * xoff + 8) >> 4);
(...skipping 14 matching lines...) Expand all
503 const int b = b1 + (((b2 - b1) * xoff + 8) >> 4); 527 const int b = b1 + (((b2 - b1) * xoff + 8) >> 4);
504 const int r = a + (((b - a) * yoff + 8) >> 4); 528 const int r = a + (((b - a) * yoff + 8) >> 4);
505 const int diff = ((r + sec16[w * y + x] + 1) >> 1) - src16[w * y + x]; 529 const int diff = ((r + sec16[w * y + x] + 1) >> 1) - src16[w * y + x];
506 se += diff; 530 se += diff;
507 sse += diff * diff; 531 sse += diff * diff;
508 #endif // CONFIG_VP9_HIGHBITDEPTH 532 #endif // CONFIG_VP9_HIGHBITDEPTH
509 } 533 }
510 } 534 }
511 } 535 }
512 RoundHighBitDepth(bit_depth, &se, &sse); 536 RoundHighBitDepth(bit_depth, &se, &sse);
513 *sse_ptr = (unsigned int) sse; 537 *sse_ptr = static_cast<uint32_t>(sse);
514 return (unsigned int) (sse - (((int64_t) se * se) >> (l2w + l2h))); 538 return static_cast<uint32_t>(sse -
539 ((static_cast<int64_t>(se) * se) >>
540 (l2w + l2h)));
515 } 541 }
516 542
517 template<typename SubpelVarianceFunctionType> 543 template<typename SubpelVarianceFunctionType>
518 class SubpelVarianceTest 544 class SubpelVarianceTest
519 : public ::testing::TestWithParam<tuple<int, int, 545 : public ::testing::TestWithParam<tuple<int, int,
520 SubpelVarianceFunctionType, int> > { 546 SubpelVarianceFunctionType, int> > {
521 public: 547 public:
522 virtual void SetUp() { 548 virtual void SetUp() {
523 const tuple<int, int, SubpelVarianceFunctionType, int>& params = 549 const tuple<int, int, SubpelVarianceFunctionType, int>& params =
524 this->GetParam(); 550 this->GetParam();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 bool use_high_bit_depth_; 611 bool use_high_bit_depth_;
586 vpx_bit_depth_t bit_depth_; 612 vpx_bit_depth_t bit_depth_;
587 int width_, log2width_; 613 int width_, log2width_;
588 int height_, log2height_; 614 int height_, log2height_;
589 int block_size_, mask_; 615 int block_size_, mask_;
590 SubpelVarianceFunctionType subpel_variance_; 616 SubpelVarianceFunctionType subpel_variance_;
591 }; 617 };
592 618
593 template<typename SubpelVarianceFunctionType> 619 template<typename SubpelVarianceFunctionType>
594 void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() { 620 void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() {
595 for (int x = 0; x < 16; ++x) { 621 for (int x = 0; x < 8; ++x) {
596 for (int y = 0; y < 16; ++y) { 622 for (int y = 0; y < 8; ++y) {
597 if (!use_high_bit_depth_) { 623 if (!use_high_bit_depth_) {
598 for (int j = 0; j < block_size_; j++) { 624 for (int j = 0; j < block_size_; j++) {
599 src_[j] = rnd_.Rand8(); 625 src_[j] = rnd_.Rand8();
600 } 626 }
601 for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) { 627 for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
602 ref_[j] = rnd_.Rand8(); 628 ref_[j] = rnd_.Rand8();
603 } 629 }
604 #if CONFIG_VP9_HIGHBITDEPTH 630 #if CONFIG_VP9_HIGHBITDEPTH
605 } else { 631 } else {
606 for (int j = 0; j < block_size_; j++) { 632 for (int j = 0; j < block_size_; j++) {
607 CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask_; 633 CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask_;
608 } 634 }
609 for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) { 635 for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
610 CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask_; 636 CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask_;
611 } 637 }
612 #endif // CONFIG_VP9_HIGHBITDEPTH 638 #endif // CONFIG_VP9_HIGHBITDEPTH
613 } 639 }
614 unsigned int sse1, sse2; 640 unsigned int sse1, sse2;
615 unsigned int var1; 641 unsigned int var1;
616 ASM_REGISTER_STATE_CHECK(var1 = subpel_variance_(ref_, width_ + 1, x, y, 642 ASM_REGISTER_STATE_CHECK(var1 = subpel_variance_(ref_, width_ + 1, x, y,
617 src_, width_, &sse1)); 643 src_, width_, &sse1));
618 const unsigned int var2 = subpel_variance_ref(ref_, src_, log2width_, 644 const unsigned int var2 = subpel_variance_ref(ref_, src_,
619 log2height_, x, y, &sse2, 645 log2width_, log2height_,
646 x, y, &sse2,
620 use_high_bit_depth_, 647 use_high_bit_depth_,
621 bit_depth_); 648 bit_depth_);
622 EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y; 649 EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y;
623 EXPECT_EQ(var1, var2) << "at position " << x << ", " << y; 650 EXPECT_EQ(var1, var2) << "at position " << x << ", " << y;
624 } 651 }
625 } 652 }
626 } 653 }
627 654
628 template<typename SubpelVarianceFunctionType> 655 template<typename SubpelVarianceFunctionType>
629 void SubpelVarianceTest<SubpelVarianceFunctionType>::ExtremeRefTest() { 656 void SubpelVarianceTest<SubpelVarianceFunctionType>::ExtremeRefTest() {
630 // Compare against reference. 657 // Compare against reference.
631 // Src: Set the first half of values to 0, the second half to the maximum. 658 // Src: Set the first half of values to 0, the second half to the maximum.
632 // Ref: Set the first half of values to the maximum, the second half to 0. 659 // Ref: Set the first half of values to the maximum, the second half to 0.
633 for (int x = 0; x < 16; ++x) { 660 for (int x = 0; x < 8; ++x) {
634 for (int y = 0; y < 16; ++y) { 661 for (int y = 0; y < 8; ++y) {
635 const int half = block_size_ / 2; 662 const int half = block_size_ / 2;
636 if (!use_high_bit_depth_) { 663 if (!use_high_bit_depth_) {
637 memset(src_, 0, half); 664 memset(src_, 0, half);
638 memset(src_ + half, 255, half); 665 memset(src_ + half, 255, half);
639 memset(ref_, 255, half); 666 memset(ref_, 255, half);
640 memset(ref_ + half, 0, half + width_ + height_ + 1); 667 memset(ref_ + half, 0, half + width_ + height_ + 1);
641 #if CONFIG_VP9_HIGHBITDEPTH 668 #if CONFIG_VP9_HIGHBITDEPTH
642 } else { 669 } else {
643 vpx_memset16(CONVERT_TO_SHORTPTR(src_), mask_, half); 670 vpx_memset16(CONVERT_TO_SHORTPTR(src_), mask_, half);
644 vpx_memset16(CONVERT_TO_SHORTPTR(src_) + half, 0, half); 671 vpx_memset16(CONVERT_TO_SHORTPTR(src_) + half, 0, half);
645 vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 0, half); 672 vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 0, half);
646 vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, mask_, 673 vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, mask_,
647 half + width_ + height_ + 1); 674 half + width_ + height_ + 1);
648 #endif // CONFIG_VP9_HIGHBITDEPTH 675 #endif // CONFIG_VP9_HIGHBITDEPTH
649 } 676 }
650 unsigned int sse1, sse2; 677 unsigned int sse1, sse2;
651 unsigned int var1; 678 unsigned int var1;
652 ASM_REGISTER_STATE_CHECK( 679 ASM_REGISTER_STATE_CHECK(
653 var1 = subpel_variance_(ref_, width_ + 1, x, y, src_, width_, &sse1)); 680 var1 = subpel_variance_(ref_, width_ + 1, x, y, src_, width_, &sse1));
654 const unsigned int var2 = 681 const unsigned int var2 =
655 subpel_variance_ref(ref_, src_, log2width_, log2height_, x, y, &sse2, 682 subpel_variance_ref(ref_, src_, log2width_, log2height_,
656 use_high_bit_depth_, bit_depth_); 683 x, y, &sse2, use_high_bit_depth_, bit_depth_);
657 EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y; 684 EXPECT_EQ(sse1, sse2) << "for xoffset " << x << " and yoffset " << y;
658 EXPECT_EQ(var1, var2) << "at position " << x << ", " << y; 685 EXPECT_EQ(var1, var2) << "for xoffset " << x << " and yoffset " << y;
659 } 686 }
660 } 687 }
661 } 688 }
662 689
663 #if CONFIG_VP9_ENCODER 690 #if CONFIG_VP9_ENCODER
664 template<> 691 template<>
665 void SubpelVarianceTest<vp9_subp_avg_variance_fn_t>::RefTest() { 692 void SubpelVarianceTest<vp9_subp_avg_variance_fn_t>::RefTest() {
666 for (int x = 0; x < 16; ++x) { 693 for (int x = 0; x < 8; ++x) {
667 for (int y = 0; y < 16; ++y) { 694 for (int y = 0; y < 8; ++y) {
668 if (!use_high_bit_depth_) { 695 if (!use_high_bit_depth_) {
669 for (int j = 0; j < block_size_; j++) { 696 for (int j = 0; j < block_size_; j++) {
670 src_[j] = rnd_.Rand8(); 697 src_[j] = rnd_.Rand8();
671 sec_[j] = rnd_.Rand8(); 698 sec_[j] = rnd_.Rand8();
672 } 699 }
673 for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) { 700 for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
674 ref_[j] = rnd_.Rand8(); 701 ref_[j] = rnd_.Rand8();
675 } 702 }
676 #if CONFIG_VP9_HIGHBITDEPTH 703 #if CONFIG_VP9_HIGHBITDEPTH
677 } else { 704 } else {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 809
783 const VarianceMxNFunc highbd_10_mse16x16_c = vpx_highbd_10_mse16x16_c; 810 const VarianceMxNFunc highbd_10_mse16x16_c = vpx_highbd_10_mse16x16_c;
784 const VarianceMxNFunc highbd_10_mse16x8_c = vpx_highbd_10_mse16x8_c; 811 const VarianceMxNFunc highbd_10_mse16x8_c = vpx_highbd_10_mse16x8_c;
785 const VarianceMxNFunc highbd_10_mse8x16_c = vpx_highbd_10_mse8x16_c; 812 const VarianceMxNFunc highbd_10_mse8x16_c = vpx_highbd_10_mse8x16_c;
786 const VarianceMxNFunc highbd_10_mse8x8_c = vpx_highbd_10_mse8x8_c; 813 const VarianceMxNFunc highbd_10_mse8x8_c = vpx_highbd_10_mse8x8_c;
787 814
788 const VarianceMxNFunc highbd_8_mse16x16_c = vpx_highbd_8_mse16x16_c; 815 const VarianceMxNFunc highbd_8_mse16x16_c = vpx_highbd_8_mse16x16_c;
789 const VarianceMxNFunc highbd_8_mse16x8_c = vpx_highbd_8_mse16x8_c; 816 const VarianceMxNFunc highbd_8_mse16x8_c = vpx_highbd_8_mse16x8_c;
790 const VarianceMxNFunc highbd_8_mse8x16_c = vpx_highbd_8_mse8x16_c; 817 const VarianceMxNFunc highbd_8_mse8x16_c = vpx_highbd_8_mse8x16_c;
791 const VarianceMxNFunc highbd_8_mse8x8_c = vpx_highbd_8_mse8x8_c; 818 const VarianceMxNFunc highbd_8_mse8x8_c = vpx_highbd_8_mse8x8_c;
792
793 INSTANTIATE_TEST_CASE_P( 819 INSTANTIATE_TEST_CASE_P(
794 C, VpxHBDMseTest, ::testing::Values(make_tuple(4, 4, highbd_12_mse16x16_c), 820 C, VpxHBDMseTest, ::testing::Values(make_tuple(4, 4, highbd_12_mse16x16_c),
795 make_tuple(4, 4, highbd_12_mse16x8_c), 821 make_tuple(4, 4, highbd_12_mse16x8_c),
796 make_tuple(4, 4, highbd_12_mse8x16_c), 822 make_tuple(4, 4, highbd_12_mse8x16_c),
797 make_tuple(4, 4, highbd_12_mse8x8_c), 823 make_tuple(4, 4, highbd_12_mse8x8_c),
798 make_tuple(4, 4, highbd_10_mse16x16_c), 824 make_tuple(4, 4, highbd_10_mse16x16_c),
799 make_tuple(4, 4, highbd_10_mse16x8_c), 825 make_tuple(4, 4, highbd_10_mse16x8_c),
800 make_tuple(4, 4, highbd_10_mse8x16_c), 826 make_tuple(4, 4, highbd_10_mse8x16_c),
801 make_tuple(4, 4, highbd_10_mse8x8_c), 827 make_tuple(4, 4, highbd_10_mse8x8_c),
802 make_tuple(4, 4, highbd_8_mse16x16_c), 828 make_tuple(4, 4, highbd_8_mse16x16_c),
803 make_tuple(4, 4, highbd_8_mse16x8_c), 829 make_tuple(4, 4, highbd_8_mse16x8_c),
804 make_tuple(4, 4, highbd_8_mse8x16_c), 830 make_tuple(4, 4, highbd_8_mse8x16_c),
805 make_tuple(4, 4, highbd_8_mse8x8_c))); 831 make_tuple(4, 4, highbd_8_mse8x8_c)));
806 */ 832 */
807 833
808
809 const VarianceMxNFunc highbd_12_variance64x64_c = vpx_highbd_12_variance64x64_c; 834 const VarianceMxNFunc highbd_12_variance64x64_c = vpx_highbd_12_variance64x64_c;
810 const VarianceMxNFunc highbd_12_variance64x32_c = vpx_highbd_12_variance64x32_c; 835 const VarianceMxNFunc highbd_12_variance64x32_c = vpx_highbd_12_variance64x32_c;
811 const VarianceMxNFunc highbd_12_variance32x64_c = vpx_highbd_12_variance32x64_c; 836 const VarianceMxNFunc highbd_12_variance32x64_c = vpx_highbd_12_variance32x64_c;
812 const VarianceMxNFunc highbd_12_variance32x32_c = vpx_highbd_12_variance32x32_c; 837 const VarianceMxNFunc highbd_12_variance32x32_c = vpx_highbd_12_variance32x32_c;
813 const VarianceMxNFunc highbd_12_variance32x16_c = vpx_highbd_12_variance32x16_c; 838 const VarianceMxNFunc highbd_12_variance32x16_c = vpx_highbd_12_variance32x16_c;
814 const VarianceMxNFunc highbd_12_variance16x32_c = vpx_highbd_12_variance16x32_c; 839 const VarianceMxNFunc highbd_12_variance16x32_c = vpx_highbd_12_variance16x32_c;
815 const VarianceMxNFunc highbd_12_variance16x16_c = vpx_highbd_12_variance16x16_c; 840 const VarianceMxNFunc highbd_12_variance16x16_c = vpx_highbd_12_variance16x16_c;
816 const VarianceMxNFunc highbd_12_variance16x8_c = vpx_highbd_12_variance16x8_c; 841 const VarianceMxNFunc highbd_12_variance16x8_c = vpx_highbd_12_variance16x8_c;
817 const VarianceMxNFunc highbd_12_variance8x16_c = vpx_highbd_12_variance8x16_c; 842 const VarianceMxNFunc highbd_12_variance8x16_c = vpx_highbd_12_variance8x16_c;
818 const VarianceMxNFunc highbd_12_variance8x8_c = vpx_highbd_12_variance8x8_c; 843 const VarianceMxNFunc highbd_12_variance8x8_c = vpx_highbd_12_variance8x8_c;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 988
964 const VarianceMxNFunc highbd_10_mse16x16_sse2 = vpx_highbd_10_mse16x16_sse2; 989 const VarianceMxNFunc highbd_10_mse16x16_sse2 = vpx_highbd_10_mse16x16_sse2;
965 const VarianceMxNFunc highbd_10_mse16x8_sse2 = vpx_highbd_10_mse16x8_sse2; 990 const VarianceMxNFunc highbd_10_mse16x8_sse2 = vpx_highbd_10_mse16x8_sse2;
966 const VarianceMxNFunc highbd_10_mse8x16_sse2 = vpx_highbd_10_mse8x16_sse2; 991 const VarianceMxNFunc highbd_10_mse8x16_sse2 = vpx_highbd_10_mse8x16_sse2;
967 const VarianceMxNFunc highbd_10_mse8x8_sse2 = vpx_highbd_10_mse8x8_sse2; 992 const VarianceMxNFunc highbd_10_mse8x8_sse2 = vpx_highbd_10_mse8x8_sse2;
968 993
969 const VarianceMxNFunc highbd_8_mse16x16_sse2 = vpx_highbd_8_mse16x16_sse2; 994 const VarianceMxNFunc highbd_8_mse16x16_sse2 = vpx_highbd_8_mse16x16_sse2;
970 const VarianceMxNFunc highbd_8_mse16x8_sse2 = vpx_highbd_8_mse16x8_sse2; 995 const VarianceMxNFunc highbd_8_mse16x8_sse2 = vpx_highbd_8_mse16x8_sse2;
971 const VarianceMxNFunc highbd_8_mse8x16_sse2 = vpx_highbd_8_mse8x16_sse2; 996 const VarianceMxNFunc highbd_8_mse8x16_sse2 = vpx_highbd_8_mse8x16_sse2;
972 const VarianceMxNFunc highbd_8_mse8x8_sse2 = vpx_highbd_8_mse8x8_sse2; 997 const VarianceMxNFunc highbd_8_mse8x8_sse2 = vpx_highbd_8_mse8x8_sse2;
973
974 INSTANTIATE_TEST_CASE_P( 998 INSTANTIATE_TEST_CASE_P(
975 SSE2, VpxHBDMseTest, ::testing::Values(make_tuple(4, 4, highbd_12_mse16x16_s se2), 999 SSE2, VpxHBDMseTest, ::testing::Values(make_tuple(4, 4, highbd_12_mse16x16_s se2),
976 make_tuple(4, 3, highbd_12_mse16x8_ss e2), 1000 make_tuple(4, 3, highbd_12_mse16x8_ss e2),
977 make_tuple(3, 4, highbd_12_mse8x16_ss e2), 1001 make_tuple(3, 4, highbd_12_mse8x16_ss e2),
978 make_tuple(3, 3, highbd_12_mse8x8_sse 2), 1002 make_tuple(3, 3, highbd_12_mse8x8_sse 2),
979 make_tuple(4, 4, highbd_10_mse16x16_s se2), 1003 make_tuple(4, 4, highbd_10_mse16x16_s se2),
980 make_tuple(4, 3, highbd_10_mse16x8_ss e2), 1004 make_tuple(4, 3, highbd_10_mse16x8_ss e2),
981 make_tuple(3, 4, highbd_10_mse8x16_ss e2), 1005 make_tuple(3, 4, highbd_10_mse8x16_ss e2),
982 make_tuple(3, 3, highbd_10_mse8x8_sse 2), 1006 make_tuple(3, 3, highbd_10_mse8x8_sse 2),
983 make_tuple(4, 4, highbd_8_mse16x16_ss e2), 1007 make_tuple(4, 4, highbd_8_mse16x16_ss e2),
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 make_tuple(5, 5, highbd_8_variance32x32_sse2, 8), 1099 make_tuple(5, 5, highbd_8_variance32x32_sse2, 8),
1076 make_tuple(5, 4, highbd_8_variance32x16_sse2, 8), 1100 make_tuple(5, 4, highbd_8_variance32x16_sse2, 8),
1077 make_tuple(4, 5, highbd_8_variance16x32_sse2, 8), 1101 make_tuple(4, 5, highbd_8_variance16x32_sse2, 8),
1078 make_tuple(4, 4, highbd_8_variance16x16_sse2, 8), 1102 make_tuple(4, 4, highbd_8_variance16x16_sse2, 8),
1079 make_tuple(4, 3, highbd_8_variance16x8_sse2, 8), 1103 make_tuple(4, 3, highbd_8_variance16x8_sse2, 8),
1080 make_tuple(3, 4, highbd_8_variance8x16_sse2, 8), 1104 make_tuple(3, 4, highbd_8_variance8x16_sse2, 8),
1081 make_tuple(3, 3, highbd_8_variance8x8_sse2, 8))); 1105 make_tuple(3, 3, highbd_8_variance8x8_sse2, 8)));
1082 #endif // CONFIG_VP9_HIGHBITDEPTH 1106 #endif // CONFIG_VP9_HIGHBITDEPTH
1083 #endif // HAVE_SSE2 1107 #endif // HAVE_SSE2
1084 1108
1109 #if CONFIG_VP8
1110 typedef SubpelVarianceTest<SubpixVarMxNFunc> VP8SubpelVarianceTest;
1111
1112 TEST_P(VP8SubpelVarianceTest, Ref) { RefTest(); }
1113 TEST_P(VP8SubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
1114 #endif // CONFIG_VP8
1115
1085 #if CONFIG_VP9_ENCODER 1116 #if CONFIG_VP9_ENCODER
1086 typedef SubpelVarianceTest<vp9_subpixvariance_fn_t> VP9SubpelVarianceTest; 1117 typedef SubpelVarianceTest<SubpixVarMxNFunc> VP9SubpelVarianceTest;
1087 typedef SubpelVarianceTest<vp9_subp_avg_variance_fn_t> VP9SubpelAvgVarianceTest; 1118 typedef SubpelVarianceTest<vp9_subp_avg_variance_fn_t> VP9SubpelAvgVarianceTest;
1088 1119
1089 TEST_P(VP9SubpelVarianceTest, Ref) { RefTest(); } 1120 TEST_P(VP9SubpelVarianceTest, Ref) { RefTest(); }
1090 TEST_P(VP9SubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); } 1121 TEST_P(VP9SubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
1091 TEST_P(VP9SubpelAvgVarianceTest, Ref) { RefTest(); } 1122 TEST_P(VP9SubpelAvgVarianceTest, Ref) { RefTest(); }
1092 1123
1093 #if CONFIG_VP9_HIGHBITDEPTH 1124 #if CONFIG_VP9_HIGHBITDEPTH
1094 typedef SubpelVarianceTest<vp9_subpixvariance_fn_t> VP9SubpelVarianceHighTest; 1125 typedef SubpelVarianceTest<SubpixVarMxNFunc> VP9SubpelVarianceHighTest;
1095 typedef SubpelVarianceTest<vp9_subp_avg_variance_fn_t> 1126 typedef SubpelVarianceTest<vp9_subp_avg_variance_fn_t>
1096 VP9SubpelAvgVarianceHighTest; 1127 VP9SubpelAvgVarianceHighTest;
1097 1128
1098 TEST_P(VP9SubpelVarianceHighTest, Ref) { RefTest(); } 1129 TEST_P(VP9SubpelVarianceHighTest, Ref) { RefTest(); }
1099 TEST_P(VP9SubpelVarianceHighTest, ExtremeRef) { ExtremeRefTest(); } 1130 TEST_P(VP9SubpelVarianceHighTest, ExtremeRef) { ExtremeRefTest(); }
1100 TEST_P(VP9SubpelAvgVarianceHighTest, Ref) { RefTest(); } 1131 TEST_P(VP9SubpelAvgVarianceHighTest, Ref) { RefTest(); }
1101 #endif // CONFIG_VP9_HIGHBITDEPTH 1132 #endif // CONFIG_VP9_HIGHBITDEPTH
1102 1133
1103 const vp9_subpixvariance_fn_t subpel_variance4x4_c = 1134 const SubpixVarMxNFunc subpel_variance4x4_c = vp9_sub_pixel_variance4x4_c;
1104 vp9_sub_pixel_variance4x4_c; 1135 const SubpixVarMxNFunc subpel_variance4x8_c = vp9_sub_pixel_variance4x8_c;
1105 const vp9_subpixvariance_fn_t subpel_variance4x8_c = 1136 const SubpixVarMxNFunc subpel_variance8x4_c = vp9_sub_pixel_variance8x4_c;
1106 vp9_sub_pixel_variance4x8_c; 1137 const SubpixVarMxNFunc subpel_variance8x8_c = vp9_sub_pixel_variance8x8_c;
1107 const vp9_subpixvariance_fn_t subpel_variance8x4_c = 1138 const SubpixVarMxNFunc subpel_variance8x16_c = vp9_sub_pixel_variance8x16_c;
1108 vp9_sub_pixel_variance8x4_c; 1139 const SubpixVarMxNFunc subpel_variance16x8_c = vp9_sub_pixel_variance16x8_c;
1109 const vp9_subpixvariance_fn_t subpel_variance8x8_c = 1140 const SubpixVarMxNFunc subpel_variance16x16_c = vp9_sub_pixel_variance16x16_c;
1110 vp9_sub_pixel_variance8x8_c; 1141 const SubpixVarMxNFunc subpel_variance16x32_c = vp9_sub_pixel_variance16x32_c;
1111 const vp9_subpixvariance_fn_t subpel_variance8x16_c = 1142 const SubpixVarMxNFunc subpel_variance32x16_c = vp9_sub_pixel_variance32x16_c;
1112 vp9_sub_pixel_variance8x16_c; 1143 const SubpixVarMxNFunc subpel_variance32x32_c = vp9_sub_pixel_variance32x32_c;
1113 const vp9_subpixvariance_fn_t subpel_variance16x8_c = 1144 const SubpixVarMxNFunc subpel_variance32x64_c = vp9_sub_pixel_variance32x64_c;
1114 vp9_sub_pixel_variance16x8_c; 1145 const SubpixVarMxNFunc subpel_variance64x32_c = vp9_sub_pixel_variance64x32_c;
1115 const vp9_subpixvariance_fn_t subpel_variance16x16_c = 1146 const SubpixVarMxNFunc subpel_variance64x64_c = vp9_sub_pixel_variance64x64_c;
1116 vp9_sub_pixel_variance16x16_c;
1117 const vp9_subpixvariance_fn_t subpel_variance16x32_c =
1118 vp9_sub_pixel_variance16x32_c;
1119 const vp9_subpixvariance_fn_t subpel_variance32x16_c =
1120 vp9_sub_pixel_variance32x16_c;
1121 const vp9_subpixvariance_fn_t subpel_variance32x32_c =
1122 vp9_sub_pixel_variance32x32_c;
1123 const vp9_subpixvariance_fn_t subpel_variance32x64_c =
1124 vp9_sub_pixel_variance32x64_c;
1125 const vp9_subpixvariance_fn_t subpel_variance64x32_c =
1126 vp9_sub_pixel_variance64x32_c;
1127 const vp9_subpixvariance_fn_t subpel_variance64x64_c =
1128 vp9_sub_pixel_variance64x64_c;
1129 INSTANTIATE_TEST_CASE_P( 1147 INSTANTIATE_TEST_CASE_P(
1130 C, VP9SubpelVarianceTest, 1148 C, VP9SubpelVarianceTest,
1131 ::testing::Values(make_tuple(2, 2, subpel_variance4x4_c, 0), 1149 ::testing::Values(make_tuple(2, 2, subpel_variance4x4_c, 0),
1132 make_tuple(2, 3, subpel_variance4x8_c, 0), 1150 make_tuple(2, 3, subpel_variance4x8_c, 0),
1133 make_tuple(3, 2, subpel_variance8x4_c, 0), 1151 make_tuple(3, 2, subpel_variance8x4_c, 0),
1134 make_tuple(3, 3, subpel_variance8x8_c, 0), 1152 make_tuple(3, 3, subpel_variance8x8_c, 0),
1135 make_tuple(3, 4, subpel_variance8x16_c, 0), 1153 make_tuple(3, 4, subpel_variance8x16_c, 0),
1136 make_tuple(4, 3, subpel_variance16x8_c, 0), 1154 make_tuple(4, 3, subpel_variance16x8_c, 0),
1137 make_tuple(4, 4, subpel_variance16x16_c, 0), 1155 make_tuple(4, 4, subpel_variance16x16_c, 0),
1138 make_tuple(4, 5, subpel_variance16x32_c, 0), 1156 make_tuple(4, 5, subpel_variance16x32_c, 0),
1139 make_tuple(5, 4, subpel_variance32x16_c, 0), 1157 make_tuple(5, 4, subpel_variance32x16_c, 0),
1140 make_tuple(5, 5, subpel_variance32x32_c, 0), 1158 make_tuple(5, 5, subpel_variance32x32_c, 0),
1141 make_tuple(5, 6, subpel_variance32x64_c, 0), 1159 make_tuple(5, 6, subpel_variance32x64_c, 0),
1142 make_tuple(6, 5, subpel_variance64x32_c, 0), 1160 make_tuple(6, 5, subpel_variance64x32_c, 0),
1143 make_tuple(6, 6, subpel_variance64x64_c, 0))); 1161 make_tuple(6, 6, subpel_variance64x64_c, 0)));
1162
1163 #if CONFIG_VP8
1164 const SubpixVarMxNFunc vp8_subpel_variance16x16_c =
1165 vp8_sub_pixel_variance16x16_c;
1166 const SubpixVarMxNFunc vp8_subpel_variance16x8_c = vp8_sub_pixel_variance16x8_c;
1167 const SubpixVarMxNFunc vp8_subpel_variance8x16_c = vp8_sub_pixel_variance8x16_c;
1168 const SubpixVarMxNFunc vp8_subpel_variance8x8_c = vp8_sub_pixel_variance8x8_c;
1169 const SubpixVarMxNFunc vp8_subpel_variance4x4_c = vp8_sub_pixel_variance4x4_c;
1170 INSTANTIATE_TEST_CASE_P(
1171 C, VP8SubpelVarianceTest,
1172 ::testing::Values(make_tuple(2, 2, vp8_subpel_variance4x4_c, 0),
1173 make_tuple(3, 3, vp8_subpel_variance8x8_c, 0),
1174 make_tuple(3, 4, vp8_subpel_variance8x16_c, 0),
1175 make_tuple(4, 3, vp8_subpel_variance16x8_c, 0),
1176 make_tuple(4, 4, vp8_subpel_variance16x16_c, 0)));
1177 #endif // CONFIG_VP8
1178
1144 const vp9_subp_avg_variance_fn_t subpel_avg_variance4x4_c = 1179 const vp9_subp_avg_variance_fn_t subpel_avg_variance4x4_c =
1145 vp9_sub_pixel_avg_variance4x4_c; 1180 vp9_sub_pixel_avg_variance4x4_c;
1146 const vp9_subp_avg_variance_fn_t subpel_avg_variance4x8_c = 1181 const vp9_subp_avg_variance_fn_t subpel_avg_variance4x8_c =
1147 vp9_sub_pixel_avg_variance4x8_c; 1182 vp9_sub_pixel_avg_variance4x8_c;
1148 const vp9_subp_avg_variance_fn_t subpel_avg_variance8x4_c = 1183 const vp9_subp_avg_variance_fn_t subpel_avg_variance8x4_c =
1149 vp9_sub_pixel_avg_variance8x4_c; 1184 vp9_sub_pixel_avg_variance8x4_c;
1150 const vp9_subp_avg_variance_fn_t subpel_avg_variance8x8_c = 1185 const vp9_subp_avg_variance_fn_t subpel_avg_variance8x8_c =
1151 vp9_sub_pixel_avg_variance8x8_c; 1186 vp9_sub_pixel_avg_variance8x8_c;
1152 const vp9_subp_avg_variance_fn_t subpel_avg_variance8x16_c = 1187 const vp9_subp_avg_variance_fn_t subpel_avg_variance8x16_c =
1153 vp9_sub_pixel_avg_variance8x16_c; 1188 vp9_sub_pixel_avg_variance8x16_c;
(...skipping 22 matching lines...) Expand all
1176 make_tuple(3, 4, subpel_avg_variance8x16_c, 0), 1211 make_tuple(3, 4, subpel_avg_variance8x16_c, 0),
1177 make_tuple(4, 3, subpel_avg_variance16x8_c, 0), 1212 make_tuple(4, 3, subpel_avg_variance16x8_c, 0),
1178 make_tuple(4, 4, subpel_avg_variance16x16_c, 0), 1213 make_tuple(4, 4, subpel_avg_variance16x16_c, 0),
1179 make_tuple(4, 5, subpel_avg_variance16x32_c, 0), 1214 make_tuple(4, 5, subpel_avg_variance16x32_c, 0),
1180 make_tuple(5, 4, subpel_avg_variance32x16_c, 0), 1215 make_tuple(5, 4, subpel_avg_variance32x16_c, 0),
1181 make_tuple(5, 5, subpel_avg_variance32x32_c, 0), 1216 make_tuple(5, 5, subpel_avg_variance32x32_c, 0),
1182 make_tuple(5, 6, subpel_avg_variance32x64_c, 0), 1217 make_tuple(5, 6, subpel_avg_variance32x64_c, 0),
1183 make_tuple(6, 5, subpel_avg_variance64x32_c, 0), 1218 make_tuple(6, 5, subpel_avg_variance64x32_c, 0),
1184 make_tuple(6, 6, subpel_avg_variance64x64_c, 0))); 1219 make_tuple(6, 6, subpel_avg_variance64x64_c, 0)));
1185 #if CONFIG_VP9_HIGHBITDEPTH 1220 #if CONFIG_VP9_HIGHBITDEPTH
1186 const vp9_subpixvariance_fn_t highbd_10_subpel_variance4x4_c = 1221 const SubpixVarMxNFunc highbd_10_subpel_variance4x4_c =
1187 vp9_highbd_10_sub_pixel_variance4x4_c; 1222 vp9_highbd_10_sub_pixel_variance4x4_c;
1188 const vp9_subpixvariance_fn_t highbd_10_subpel_variance4x8_c = 1223 const SubpixVarMxNFunc highbd_10_subpel_variance4x8_c =
1189 vp9_highbd_10_sub_pixel_variance4x8_c; 1224 vp9_highbd_10_sub_pixel_variance4x8_c;
1190 const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x4_c = 1225 const SubpixVarMxNFunc highbd_10_subpel_variance8x4_c =
1191 vp9_highbd_10_sub_pixel_variance8x4_c; 1226 vp9_highbd_10_sub_pixel_variance8x4_c;
1192 const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x8_c = 1227 const SubpixVarMxNFunc highbd_10_subpel_variance8x8_c =
1193 vp9_highbd_10_sub_pixel_variance8x8_c; 1228 vp9_highbd_10_sub_pixel_variance8x8_c;
1194 const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x16_c = 1229 const SubpixVarMxNFunc highbd_10_subpel_variance8x16_c =
1195 vp9_highbd_10_sub_pixel_variance8x16_c; 1230 vp9_highbd_10_sub_pixel_variance8x16_c;
1196 const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x8_c = 1231 const SubpixVarMxNFunc highbd_10_subpel_variance16x8_c =
1197 vp9_highbd_10_sub_pixel_variance16x8_c; 1232 vp9_highbd_10_sub_pixel_variance16x8_c;
1198 const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x16_c = 1233 const SubpixVarMxNFunc highbd_10_subpel_variance16x16_c =
1199 vp9_highbd_10_sub_pixel_variance16x16_c; 1234 vp9_highbd_10_sub_pixel_variance16x16_c;
1200 const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x32_c = 1235 const SubpixVarMxNFunc highbd_10_subpel_variance16x32_c =
1201 vp9_highbd_10_sub_pixel_variance16x32_c; 1236 vp9_highbd_10_sub_pixel_variance16x32_c;
1202 const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x16_c = 1237 const SubpixVarMxNFunc highbd_10_subpel_variance32x16_c =
1203 vp9_highbd_10_sub_pixel_variance32x16_c; 1238 vp9_highbd_10_sub_pixel_variance32x16_c;
1204 const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x32_c = 1239 const SubpixVarMxNFunc highbd_10_subpel_variance32x32_c =
1205 vp9_highbd_10_sub_pixel_variance32x32_c; 1240 vp9_highbd_10_sub_pixel_variance32x32_c;
1206 const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x64_c = 1241 const SubpixVarMxNFunc highbd_10_subpel_variance32x64_c =
1207 vp9_highbd_10_sub_pixel_variance32x64_c; 1242 vp9_highbd_10_sub_pixel_variance32x64_c;
1208 const vp9_subpixvariance_fn_t highbd_10_subpel_variance64x32_c = 1243 const SubpixVarMxNFunc highbd_10_subpel_variance64x32_c =
1209 vp9_highbd_10_sub_pixel_variance64x32_c; 1244 vp9_highbd_10_sub_pixel_variance64x32_c;
1210 const vp9_subpixvariance_fn_t highbd_10_subpel_variance64x64_c = 1245 const SubpixVarMxNFunc highbd_10_subpel_variance64x64_c =
1211 vp9_highbd_10_sub_pixel_variance64x64_c; 1246 vp9_highbd_10_sub_pixel_variance64x64_c;
1212 const vp9_subpixvariance_fn_t highbd_12_subpel_variance4x4_c = 1247 const SubpixVarMxNFunc highbd_12_subpel_variance4x4_c =
1213 vp9_highbd_12_sub_pixel_variance4x4_c; 1248 vp9_highbd_12_sub_pixel_variance4x4_c;
1214 const vp9_subpixvariance_fn_t highbd_12_subpel_variance4x8_c = 1249 const SubpixVarMxNFunc highbd_12_subpel_variance4x8_c =
1215 vp9_highbd_12_sub_pixel_variance4x8_c; 1250 vp9_highbd_12_sub_pixel_variance4x8_c;
1216 const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x4_c = 1251 const SubpixVarMxNFunc highbd_12_subpel_variance8x4_c =
1217 vp9_highbd_12_sub_pixel_variance8x4_c; 1252 vp9_highbd_12_sub_pixel_variance8x4_c;
1218 const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x8_c = 1253 const SubpixVarMxNFunc highbd_12_subpel_variance8x8_c =
1219 vp9_highbd_12_sub_pixel_variance8x8_c; 1254 vp9_highbd_12_sub_pixel_variance8x8_c;
1220 const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x16_c = 1255 const SubpixVarMxNFunc highbd_12_subpel_variance8x16_c =
1221 vp9_highbd_12_sub_pixel_variance8x16_c; 1256 vp9_highbd_12_sub_pixel_variance8x16_c;
1222 const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x8_c = 1257 const SubpixVarMxNFunc highbd_12_subpel_variance16x8_c =
1223 vp9_highbd_12_sub_pixel_variance16x8_c; 1258 vp9_highbd_12_sub_pixel_variance16x8_c;
1224 const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x16_c = 1259 const SubpixVarMxNFunc highbd_12_subpel_variance16x16_c =
1225 vp9_highbd_12_sub_pixel_variance16x16_c; 1260 vp9_highbd_12_sub_pixel_variance16x16_c;
1226 const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x32_c = 1261 const SubpixVarMxNFunc highbd_12_subpel_variance16x32_c =
1227 vp9_highbd_12_sub_pixel_variance16x32_c; 1262 vp9_highbd_12_sub_pixel_variance16x32_c;
1228 const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x16_c = 1263 const SubpixVarMxNFunc highbd_12_subpel_variance32x16_c =
1229 vp9_highbd_12_sub_pixel_variance32x16_c; 1264 vp9_highbd_12_sub_pixel_variance32x16_c;
1230 const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x32_c = 1265 const SubpixVarMxNFunc highbd_12_subpel_variance32x32_c =
1231 vp9_highbd_12_sub_pixel_variance32x32_c; 1266 vp9_highbd_12_sub_pixel_variance32x32_c;
1232 const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x64_c = 1267 const SubpixVarMxNFunc highbd_12_subpel_variance32x64_c =
1233 vp9_highbd_12_sub_pixel_variance32x64_c; 1268 vp9_highbd_12_sub_pixel_variance32x64_c;
1234 const vp9_subpixvariance_fn_t highbd_12_subpel_variance64x32_c = 1269 const SubpixVarMxNFunc highbd_12_subpel_variance64x32_c =
1235 vp9_highbd_12_sub_pixel_variance64x32_c; 1270 vp9_highbd_12_sub_pixel_variance64x32_c;
1236 const vp9_subpixvariance_fn_t highbd_12_subpel_variance64x64_c = 1271 const SubpixVarMxNFunc highbd_12_subpel_variance64x64_c =
1237 vp9_highbd_12_sub_pixel_variance64x64_c; 1272 vp9_highbd_12_sub_pixel_variance64x64_c;
1238 const vp9_subpixvariance_fn_t highbd_subpel_variance4x4_c = 1273 const SubpixVarMxNFunc highbd_subpel_variance4x4_c =
1239 vp9_highbd_sub_pixel_variance4x4_c; 1274 vp9_highbd_sub_pixel_variance4x4_c;
1240 const vp9_subpixvariance_fn_t highbd_subpel_variance4x8_c = 1275 const SubpixVarMxNFunc highbd_subpel_variance4x8_c =
1241 vp9_highbd_sub_pixel_variance4x8_c; 1276 vp9_highbd_sub_pixel_variance4x8_c;
1242 const vp9_subpixvariance_fn_t highbd_subpel_variance8x4_c = 1277 const SubpixVarMxNFunc highbd_subpel_variance8x4_c =
1243 vp9_highbd_sub_pixel_variance8x4_c; 1278 vp9_highbd_sub_pixel_variance8x4_c;
1244 const vp9_subpixvariance_fn_t highbd_subpel_variance8x8_c = 1279 const SubpixVarMxNFunc highbd_subpel_variance8x8_c =
1245 vp9_highbd_sub_pixel_variance8x8_c; 1280 vp9_highbd_sub_pixel_variance8x8_c;
1246 const vp9_subpixvariance_fn_t highbd_subpel_variance8x16_c = 1281 const SubpixVarMxNFunc highbd_subpel_variance8x16_c =
1247 vp9_highbd_sub_pixel_variance8x16_c; 1282 vp9_highbd_sub_pixel_variance8x16_c;
1248 const vp9_subpixvariance_fn_t highbd_subpel_variance16x8_c = 1283 const SubpixVarMxNFunc highbd_subpel_variance16x8_c =
1249 vp9_highbd_sub_pixel_variance16x8_c; 1284 vp9_highbd_sub_pixel_variance16x8_c;
1250 const vp9_subpixvariance_fn_t highbd_subpel_variance16x16_c = 1285 const SubpixVarMxNFunc highbd_subpel_variance16x16_c =
1251 vp9_highbd_sub_pixel_variance16x16_c; 1286 vp9_highbd_sub_pixel_variance16x16_c;
1252 const vp9_subpixvariance_fn_t highbd_subpel_variance16x32_c = 1287 const SubpixVarMxNFunc highbd_subpel_variance16x32_c =
1253 vp9_highbd_sub_pixel_variance16x32_c; 1288 vp9_highbd_sub_pixel_variance16x32_c;
1254 const vp9_subpixvariance_fn_t highbd_subpel_variance32x16_c = 1289 const SubpixVarMxNFunc highbd_subpel_variance32x16_c =
1255 vp9_highbd_sub_pixel_variance32x16_c; 1290 vp9_highbd_sub_pixel_variance32x16_c;
1256 const vp9_subpixvariance_fn_t highbd_subpel_variance32x32_c = 1291 const SubpixVarMxNFunc highbd_subpel_variance32x32_c =
1257 vp9_highbd_sub_pixel_variance32x32_c; 1292 vp9_highbd_sub_pixel_variance32x32_c;
1258 const vp9_subpixvariance_fn_t highbd_subpel_variance32x64_c = 1293 const SubpixVarMxNFunc highbd_subpel_variance32x64_c =
1259 vp9_highbd_sub_pixel_variance32x64_c; 1294 vp9_highbd_sub_pixel_variance32x64_c;
1260 const vp9_subpixvariance_fn_t highbd_subpel_variance64x32_c = 1295 const SubpixVarMxNFunc highbd_subpel_variance64x32_c =
1261 vp9_highbd_sub_pixel_variance64x32_c; 1296 vp9_highbd_sub_pixel_variance64x32_c;
1262 const vp9_subpixvariance_fn_t highbd_subpel_variance64x64_c = 1297 const SubpixVarMxNFunc highbd_subpel_variance64x64_c =
1263 vp9_highbd_sub_pixel_variance64x64_c; 1298 vp9_highbd_sub_pixel_variance64x64_c;
1264 INSTANTIATE_TEST_CASE_P( 1299 INSTANTIATE_TEST_CASE_P(
1265 C, VP9SubpelVarianceHighTest, 1300 C, VP9SubpelVarianceHighTest,
1266 ::testing::Values(make_tuple(2, 2, highbd_10_subpel_variance4x4_c, 10), 1301 ::testing::Values(make_tuple(2, 2, highbd_10_subpel_variance4x4_c, 10),
1267 make_tuple(2, 3, highbd_10_subpel_variance4x8_c, 10), 1302 make_tuple(2, 3, highbd_10_subpel_variance4x8_c, 10),
1268 make_tuple(3, 2, highbd_10_subpel_variance8x4_c, 10), 1303 make_tuple(3, 2, highbd_10_subpel_variance8x4_c, 10),
1269 make_tuple(3, 3, highbd_10_subpel_variance8x8_c, 10), 1304 make_tuple(3, 3, highbd_10_subpel_variance8x8_c, 10),
1270 make_tuple(3, 4, highbd_10_subpel_variance8x16_c, 10), 1305 make_tuple(3, 4, highbd_10_subpel_variance8x16_c, 10),
1271 make_tuple(4, 3, highbd_10_subpel_variance16x8_c, 10), 1306 make_tuple(4, 3, highbd_10_subpel_variance16x8_c, 10),
1272 make_tuple(4, 4, highbd_10_subpel_variance16x16_c, 10), 1307 make_tuple(4, 4, highbd_10_subpel_variance16x16_c, 10),
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 make_tuple(4, 4, highbd_subpel_avg_variance16x16_c, 8), 1453 make_tuple(4, 4, highbd_subpel_avg_variance16x16_c, 8),
1419 make_tuple(4, 5, highbd_subpel_avg_variance16x32_c, 8), 1454 make_tuple(4, 5, highbd_subpel_avg_variance16x32_c, 8),
1420 make_tuple(5, 4, highbd_subpel_avg_variance32x16_c, 8), 1455 make_tuple(5, 4, highbd_subpel_avg_variance32x16_c, 8),
1421 make_tuple(5, 5, highbd_subpel_avg_variance32x32_c, 8), 1456 make_tuple(5, 5, highbd_subpel_avg_variance32x32_c, 8),
1422 make_tuple(5, 6, highbd_subpel_avg_variance32x64_c, 8), 1457 make_tuple(5, 6, highbd_subpel_avg_variance32x64_c, 8),
1423 make_tuple(6, 5, highbd_subpel_avg_variance64x32_c, 8), 1458 make_tuple(6, 5, highbd_subpel_avg_variance64x32_c, 8),
1424 make_tuple(6, 6, highbd_subpel_avg_variance64x64_c, 8))); 1459 make_tuple(6, 6, highbd_subpel_avg_variance64x64_c, 8)));
1425 #endif // CONFIG_VP9_HIGHBITDEPTH 1460 #endif // CONFIG_VP9_HIGHBITDEPTH
1426 #endif // CONFIG_VP9_ENCODER 1461 #endif // CONFIG_VP9_ENCODER
1427 1462
1463 #if CONFIG_VP8
1464 #if HAVE_MMX
1465 const SubpixVarMxNFunc subpel_variance16x16_mmx =
1466 vp8_sub_pixel_variance16x16_mmx;
1467 const SubpixVarMxNFunc subpel_variance16x8_mmx = vp8_sub_pixel_variance16x8_mmx;
1468 const SubpixVarMxNFunc subpel_variance8x16_mmx = vp8_sub_pixel_variance8x16_mmx;
1469 const SubpixVarMxNFunc subpel_variance8x8_mmx = vp8_sub_pixel_variance8x8_mmx;
1470 const SubpixVarMxNFunc subpel_variance4x4_mmx = vp8_sub_pixel_variance4x4_mmx;
1471 INSTANTIATE_TEST_CASE_P(
1472 MMX, VP8SubpelVarianceTest,
1473 ::testing::Values(make_tuple(4, 4, subpel_variance16x16_mmx, 0),
1474 make_tuple(4, 3, subpel_variance16x8_mmx, 0),
1475 make_tuple(3, 4, subpel_variance8x16_mmx, 0),
1476 make_tuple(3, 3, subpel_variance8x8_mmx, 0),
1477 make_tuple(2, 2, subpel_variance4x4_mmx, 0)));
1478 #endif // HAVE_MMX
1479 #endif // CONFIG_VP8
1480
1428 #if CONFIG_VP9_ENCODER 1481 #if CONFIG_VP9_ENCODER
1429 #if HAVE_SSE2 1482 #if HAVE_SSE2
1430 #if CONFIG_USE_X86INC 1483 #if CONFIG_USE_X86INC
1431 const vp9_subpixvariance_fn_t subpel_variance4x4_sse = 1484 const SubpixVarMxNFunc subpel_variance4x4_sse = vp9_sub_pixel_variance4x4_sse;
1432 vp9_sub_pixel_variance4x4_sse; 1485 const SubpixVarMxNFunc subpel_variance4x8_sse = vp9_sub_pixel_variance4x8_sse;
1433 const vp9_subpixvariance_fn_t subpel_variance4x8_sse = 1486 const SubpixVarMxNFunc subpel_variance8x4_sse2 = vp9_sub_pixel_variance8x4_sse2;
1434 vp9_sub_pixel_variance4x8_sse; 1487 const SubpixVarMxNFunc subpel_variance8x8_sse2 = vp9_sub_pixel_variance8x8_sse2;
1435 const vp9_subpixvariance_fn_t subpel_variance8x4_sse2 = 1488 const SubpixVarMxNFunc subpel_variance8x16_sse2 =
1436 vp9_sub_pixel_variance8x4_sse2;
1437 const vp9_subpixvariance_fn_t subpel_variance8x8_sse2 =
1438 vp9_sub_pixel_variance8x8_sse2;
1439 const vp9_subpixvariance_fn_t subpel_variance8x16_sse2 =
1440 vp9_sub_pixel_variance8x16_sse2; 1489 vp9_sub_pixel_variance8x16_sse2;
1441 const vp9_subpixvariance_fn_t subpel_variance16x8_sse2 = 1490 const SubpixVarMxNFunc subpel_variance16x8_sse2 =
1442 vp9_sub_pixel_variance16x8_sse2; 1491 vp9_sub_pixel_variance16x8_sse2;
1443 const vp9_subpixvariance_fn_t subpel_variance16x16_sse2 = 1492 const SubpixVarMxNFunc subpel_variance16x16_sse2 =
1444 vp9_sub_pixel_variance16x16_sse2; 1493 vp9_sub_pixel_variance16x16_sse2;
1445 const vp9_subpixvariance_fn_t subpel_variance16x32_sse2 = 1494 const SubpixVarMxNFunc subpel_variance16x32_sse2 =
1446 vp9_sub_pixel_variance16x32_sse2; 1495 vp9_sub_pixel_variance16x32_sse2;
1447 const vp9_subpixvariance_fn_t subpel_variance32x16_sse2 = 1496 const SubpixVarMxNFunc subpel_variance32x16_sse2 =
1448 vp9_sub_pixel_variance32x16_sse2; 1497 vp9_sub_pixel_variance32x16_sse2;
1449 const vp9_subpixvariance_fn_t subpel_variance32x32_sse2 = 1498 const SubpixVarMxNFunc subpel_variance32x32_sse2 =
1450 vp9_sub_pixel_variance32x32_sse2; 1499 vp9_sub_pixel_variance32x32_sse2;
1451 const vp9_subpixvariance_fn_t subpel_variance32x64_sse2 = 1500 const SubpixVarMxNFunc subpel_variance32x64_sse2 =
1452 vp9_sub_pixel_variance32x64_sse2; 1501 vp9_sub_pixel_variance32x64_sse2;
1453 const vp9_subpixvariance_fn_t subpel_variance64x32_sse2 = 1502 const SubpixVarMxNFunc subpel_variance64x32_sse2 =
1454 vp9_sub_pixel_variance64x32_sse2; 1503 vp9_sub_pixel_variance64x32_sse2;
1455 const vp9_subpixvariance_fn_t subpel_variance64x64_sse2 = 1504 const SubpixVarMxNFunc subpel_variance64x64_sse2 =
1456 vp9_sub_pixel_variance64x64_sse2; 1505 vp9_sub_pixel_variance64x64_sse2;
1457 INSTANTIATE_TEST_CASE_P( 1506 INSTANTIATE_TEST_CASE_P(
1458 SSE2, VP9SubpelVarianceTest, 1507 SSE2, VP9SubpelVarianceTest,
1459 ::testing::Values(make_tuple(2, 2, subpel_variance4x4_sse, 0), 1508 ::testing::Values(make_tuple(2, 2, subpel_variance4x4_sse, 0),
1460 make_tuple(2, 3, subpel_variance4x8_sse, 0), 1509 make_tuple(2, 3, subpel_variance4x8_sse, 0),
1461 make_tuple(3, 2, subpel_variance8x4_sse2, 0), 1510 make_tuple(3, 2, subpel_variance8x4_sse2, 0),
1462 make_tuple(3, 3, subpel_variance8x8_sse2, 0), 1511 make_tuple(3, 3, subpel_variance8x8_sse2, 0),
1463 make_tuple(3, 4, subpel_variance8x16_sse2, 0), 1512 make_tuple(3, 4, subpel_variance8x16_sse2, 0),
1464 make_tuple(4, 3, subpel_variance16x8_sse2, 0), 1513 make_tuple(4, 3, subpel_variance16x8_sse2, 0),
1465 make_tuple(4, 4, subpel_variance16x16_sse2, 0), 1514 make_tuple(4, 4, subpel_variance16x16_sse2, 0),
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 make_tuple(3, 4, subpel_avg_variance8x16_sse2, 0), 1553 make_tuple(3, 4, subpel_avg_variance8x16_sse2, 0),
1505 make_tuple(4, 3, subpel_avg_variance16x8_sse2, 0), 1554 make_tuple(4, 3, subpel_avg_variance16x8_sse2, 0),
1506 make_tuple(4, 4, subpel_avg_variance16x16_sse2, 0), 1555 make_tuple(4, 4, subpel_avg_variance16x16_sse2, 0),
1507 make_tuple(4, 5, subpel_avg_variance16x32_sse2, 0), 1556 make_tuple(4, 5, subpel_avg_variance16x32_sse2, 0),
1508 make_tuple(5, 4, subpel_avg_variance32x16_sse2, 0), 1557 make_tuple(5, 4, subpel_avg_variance32x16_sse2, 0),
1509 make_tuple(5, 5, subpel_avg_variance32x32_sse2, 0), 1558 make_tuple(5, 5, subpel_avg_variance32x32_sse2, 0),
1510 make_tuple(5, 6, subpel_avg_variance32x64_sse2, 0), 1559 make_tuple(5, 6, subpel_avg_variance32x64_sse2, 0),
1511 make_tuple(6, 5, subpel_avg_variance64x32_sse2, 0), 1560 make_tuple(6, 5, subpel_avg_variance64x32_sse2, 0),
1512 make_tuple(6, 6, subpel_avg_variance64x64_sse2, 0))); 1561 make_tuple(6, 6, subpel_avg_variance64x64_sse2, 0)));
1513 #if CONFIG_VP9_HIGHBITDEPTH 1562 #if CONFIG_VP9_HIGHBITDEPTH
1514 const vp9_subpixvariance_fn_t highbd_subpel_variance8x4_sse2 = 1563 const SubpixVarMxNFunc highbd_subpel_variance8x4_sse2 =
1515 vp9_highbd_sub_pixel_variance8x4_sse2; 1564 vp9_highbd_sub_pixel_variance8x4_sse2;
1516 const vp9_subpixvariance_fn_t highbd_subpel_variance8x8_sse2 = 1565 const SubpixVarMxNFunc highbd_subpel_variance8x8_sse2 =
1517 vp9_highbd_sub_pixel_variance8x8_sse2; 1566 vp9_highbd_sub_pixel_variance8x8_sse2;
1518 const vp9_subpixvariance_fn_t highbd_subpel_variance8x16_sse2 = 1567 const SubpixVarMxNFunc highbd_subpel_variance8x16_sse2 =
1519 vp9_highbd_sub_pixel_variance8x16_sse2; 1568 vp9_highbd_sub_pixel_variance8x16_sse2;
1520 const vp9_subpixvariance_fn_t highbd_subpel_variance16x8_sse2 = 1569 const SubpixVarMxNFunc highbd_subpel_variance16x8_sse2 =
1521 vp9_highbd_sub_pixel_variance16x8_sse2; 1570 vp9_highbd_sub_pixel_variance16x8_sse2;
1522 const vp9_subpixvariance_fn_t highbd_subpel_variance16x16_sse2 = 1571 const SubpixVarMxNFunc highbd_subpel_variance16x16_sse2 =
1523 vp9_highbd_sub_pixel_variance16x16_sse2; 1572 vp9_highbd_sub_pixel_variance16x16_sse2;
1524 const vp9_subpixvariance_fn_t highbd_subpel_variance16x32_sse2 = 1573 const SubpixVarMxNFunc highbd_subpel_variance16x32_sse2 =
1525 vp9_highbd_sub_pixel_variance16x32_sse2; 1574 vp9_highbd_sub_pixel_variance16x32_sse2;
1526 const vp9_subpixvariance_fn_t highbd_subpel_variance32x16_sse2 = 1575 const SubpixVarMxNFunc highbd_subpel_variance32x16_sse2 =
1527 vp9_highbd_sub_pixel_variance32x16_sse2; 1576 vp9_highbd_sub_pixel_variance32x16_sse2;
1528 const vp9_subpixvariance_fn_t highbd_subpel_variance32x32_sse2 = 1577 const SubpixVarMxNFunc highbd_subpel_variance32x32_sse2 =
1529 vp9_highbd_sub_pixel_variance32x32_sse2; 1578 vp9_highbd_sub_pixel_variance32x32_sse2;
1530 const vp9_subpixvariance_fn_t highbd_subpel_variance32x64_sse2 = 1579 const SubpixVarMxNFunc highbd_subpel_variance32x64_sse2 =
1531 vp9_highbd_sub_pixel_variance32x64_sse2; 1580 vp9_highbd_sub_pixel_variance32x64_sse2;
1532 const vp9_subpixvariance_fn_t highbd_subpel_variance64x32_sse2 = 1581 const SubpixVarMxNFunc highbd_subpel_variance64x32_sse2 =
1533 vp9_highbd_sub_pixel_variance64x32_sse2; 1582 vp9_highbd_sub_pixel_variance64x32_sse2;
1534 const vp9_subpixvariance_fn_t highbd_subpel_variance64x64_sse2 = 1583 const SubpixVarMxNFunc highbd_subpel_variance64x64_sse2 =
1535 vp9_highbd_sub_pixel_variance64x64_sse2; 1584 vp9_highbd_sub_pixel_variance64x64_sse2;
1536 const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x4_sse2 = 1585 const SubpixVarMxNFunc highbd_10_subpel_variance8x4_sse2 =
1537 vp9_highbd_10_sub_pixel_variance8x4_sse2; 1586 vp9_highbd_10_sub_pixel_variance8x4_sse2;
1538 const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x8_sse2 = 1587 const SubpixVarMxNFunc highbd_10_subpel_variance8x8_sse2 =
1539 vp9_highbd_10_sub_pixel_variance8x8_sse2; 1588 vp9_highbd_10_sub_pixel_variance8x8_sse2;
1540 const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x16_sse2 = 1589 const SubpixVarMxNFunc highbd_10_subpel_variance8x16_sse2 =
1541 vp9_highbd_10_sub_pixel_variance8x16_sse2; 1590 vp9_highbd_10_sub_pixel_variance8x16_sse2;
1542 const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x8_sse2 = 1591 const SubpixVarMxNFunc highbd_10_subpel_variance16x8_sse2 =
1543 vp9_highbd_10_sub_pixel_variance16x8_sse2; 1592 vp9_highbd_10_sub_pixel_variance16x8_sse2;
1544 const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x16_sse2 = 1593 const SubpixVarMxNFunc highbd_10_subpel_variance16x16_sse2 =
1545 vp9_highbd_10_sub_pixel_variance16x16_sse2; 1594 vp9_highbd_10_sub_pixel_variance16x16_sse2;
1546 const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x32_sse2 = 1595 const SubpixVarMxNFunc highbd_10_subpel_variance16x32_sse2 =
1547 vp9_highbd_10_sub_pixel_variance16x32_sse2; 1596 vp9_highbd_10_sub_pixel_variance16x32_sse2;
1548 const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x16_sse2 = 1597 const SubpixVarMxNFunc highbd_10_subpel_variance32x16_sse2 =
1549 vp9_highbd_10_sub_pixel_variance32x16_sse2; 1598 vp9_highbd_10_sub_pixel_variance32x16_sse2;
1550 const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x32_sse2 = 1599 const SubpixVarMxNFunc highbd_10_subpel_variance32x32_sse2 =
1551 vp9_highbd_10_sub_pixel_variance32x32_sse2; 1600 vp9_highbd_10_sub_pixel_variance32x32_sse2;
1552 const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x64_sse2 = 1601 const SubpixVarMxNFunc highbd_10_subpel_variance32x64_sse2 =
1553 vp9_highbd_10_sub_pixel_variance32x64_sse2; 1602 vp9_highbd_10_sub_pixel_variance32x64_sse2;
1554 const vp9_subpixvariance_fn_t highbd_10_subpel_variance64x32_sse2 = 1603 const SubpixVarMxNFunc highbd_10_subpel_variance64x32_sse2 =
1555 vp9_highbd_10_sub_pixel_variance64x32_sse2; 1604 vp9_highbd_10_sub_pixel_variance64x32_sse2;
1556 const vp9_subpixvariance_fn_t highbd_10_subpel_variance64x64_sse2 = 1605 const SubpixVarMxNFunc highbd_10_subpel_variance64x64_sse2 =
1557 vp9_highbd_10_sub_pixel_variance64x64_sse2; 1606 vp9_highbd_10_sub_pixel_variance64x64_sse2;
1558 const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x4_sse2 = 1607 const SubpixVarMxNFunc highbd_12_subpel_variance8x4_sse2 =
1559 vp9_highbd_12_sub_pixel_variance8x4_sse2; 1608 vp9_highbd_12_sub_pixel_variance8x4_sse2;
1560 const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x8_sse2 = 1609 const SubpixVarMxNFunc highbd_12_subpel_variance8x8_sse2 =
1561 vp9_highbd_12_sub_pixel_variance8x8_sse2; 1610 vp9_highbd_12_sub_pixel_variance8x8_sse2;
1562 const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x16_sse2 = 1611 const SubpixVarMxNFunc highbd_12_subpel_variance8x16_sse2 =
1563 vp9_highbd_12_sub_pixel_variance8x16_sse2; 1612 vp9_highbd_12_sub_pixel_variance8x16_sse2;
1564 const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x8_sse2 = 1613 const SubpixVarMxNFunc highbd_12_subpel_variance16x8_sse2 =
1565 vp9_highbd_12_sub_pixel_variance16x8_sse2; 1614 vp9_highbd_12_sub_pixel_variance16x8_sse2;
1566 const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x16_sse2 = 1615 const SubpixVarMxNFunc highbd_12_subpel_variance16x16_sse2 =
1567 vp9_highbd_12_sub_pixel_variance16x16_sse2; 1616 vp9_highbd_12_sub_pixel_variance16x16_sse2;
1568 const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x32_sse2 = 1617 const SubpixVarMxNFunc highbd_12_subpel_variance16x32_sse2 =
1569 vp9_highbd_12_sub_pixel_variance16x32_sse2; 1618 vp9_highbd_12_sub_pixel_variance16x32_sse2;
1570 const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x16_sse2 = 1619 const SubpixVarMxNFunc highbd_12_subpel_variance32x16_sse2 =
1571 vp9_highbd_12_sub_pixel_variance32x16_sse2; 1620 vp9_highbd_12_sub_pixel_variance32x16_sse2;
1572 const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x32_sse2 = 1621 const SubpixVarMxNFunc highbd_12_subpel_variance32x32_sse2 =
1573 vp9_highbd_12_sub_pixel_variance32x32_sse2; 1622 vp9_highbd_12_sub_pixel_variance32x32_sse2;
1574 const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x64_sse2 = 1623 const SubpixVarMxNFunc highbd_12_subpel_variance32x64_sse2 =
1575 vp9_highbd_12_sub_pixel_variance32x64_sse2; 1624 vp9_highbd_12_sub_pixel_variance32x64_sse2;
1576 const vp9_subpixvariance_fn_t highbd_12_subpel_variance64x32_sse2 = 1625 const SubpixVarMxNFunc highbd_12_subpel_variance64x32_sse2 =
1577 vp9_highbd_12_sub_pixel_variance64x32_sse2; 1626 vp9_highbd_12_sub_pixel_variance64x32_sse2;
1578 const vp9_subpixvariance_fn_t highbd_12_subpel_variance64x64_sse2 = 1627 const SubpixVarMxNFunc highbd_12_subpel_variance64x64_sse2 =
1579 vp9_highbd_12_sub_pixel_variance64x64_sse2; 1628 vp9_highbd_12_sub_pixel_variance64x64_sse2;
1580 INSTANTIATE_TEST_CASE_P( 1629 INSTANTIATE_TEST_CASE_P(
1581 SSE2, VP9SubpelVarianceHighTest, 1630 SSE2, VP9SubpelVarianceHighTest,
1582 ::testing::Values(make_tuple(3, 2, highbd_10_subpel_variance8x4_sse2, 10), 1631 ::testing::Values(make_tuple(3, 2, highbd_10_subpel_variance8x4_sse2, 10),
1583 make_tuple(3, 3, highbd_10_subpel_variance8x8_sse2, 10), 1632 make_tuple(3, 3, highbd_10_subpel_variance8x8_sse2, 10),
1584 make_tuple(3, 4, highbd_10_subpel_variance8x16_sse2, 10), 1633 make_tuple(3, 4, highbd_10_subpel_variance8x16_sse2, 10),
1585 make_tuple(4, 3, highbd_10_subpel_variance16x8_sse2, 10), 1634 make_tuple(4, 3, highbd_10_subpel_variance16x8_sse2, 10),
1586 make_tuple(4, 4, highbd_10_subpel_variance16x16_sse2, 10), 1635 make_tuple(4, 4, highbd_10_subpel_variance16x16_sse2, 10),
1587 make_tuple(4, 5, highbd_10_subpel_variance16x32_sse2, 10), 1636 make_tuple(4, 5, highbd_10_subpel_variance16x32_sse2, 10),
1588 make_tuple(5, 4, highbd_10_subpel_variance32x16_sse2, 10), 1637 make_tuple(5, 4, highbd_10_subpel_variance32x16_sse2, 10),
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 make_tuple(5, 4, highbd_subpel_avg_variance32x16_sse2, 8), 1761 make_tuple(5, 4, highbd_subpel_avg_variance32x16_sse2, 8),
1713 make_tuple(5, 5, highbd_subpel_avg_variance32x32_sse2, 8), 1762 make_tuple(5, 5, highbd_subpel_avg_variance32x32_sse2, 8),
1714 make_tuple(5, 6, highbd_subpel_avg_variance32x64_sse2, 8), 1763 make_tuple(5, 6, highbd_subpel_avg_variance32x64_sse2, 8),
1715 make_tuple(6, 5, highbd_subpel_avg_variance64x32_sse2, 8), 1764 make_tuple(6, 5, highbd_subpel_avg_variance64x32_sse2, 8),
1716 make_tuple(6, 6, highbd_subpel_avg_variance64x64_sse2, 8))); 1765 make_tuple(6, 6, highbd_subpel_avg_variance64x64_sse2, 8)));
1717 #endif // CONFIG_VP9_HIGHBITDEPTH 1766 #endif // CONFIG_VP9_HIGHBITDEPTH
1718 #endif // CONFIG_USE_X86INC 1767 #endif // CONFIG_USE_X86INC
1719 #endif // HAVE_SSE2 1768 #endif // HAVE_SSE2
1720 #endif // CONFIG_VP9_ENCODER 1769 #endif // CONFIG_VP9_ENCODER
1721 1770
1771 #if CONFIG_VP8
1772 #if HAVE_SSE2
1773 const SubpixVarMxNFunc vp8_subpel_variance16x16_sse2 =
1774 vp8_sub_pixel_variance16x16_wmt;
1775 const SubpixVarMxNFunc vp8_subpel_variance16x8_sse2 =
1776 vp8_sub_pixel_variance16x8_wmt;
1777 const SubpixVarMxNFunc vp8_subpel_variance8x16_sse2 =
1778 vp8_sub_pixel_variance8x16_wmt;
1779 const SubpixVarMxNFunc vp8_subpel_variance8x8_sse2 =
1780 vp8_sub_pixel_variance8x8_wmt;
1781 const SubpixVarMxNFunc vp8_subpel_variance4x4_sse2 =
1782 vp8_sub_pixel_variance4x4_wmt;
1783 INSTANTIATE_TEST_CASE_P(
1784 SSE2, VP8SubpelVarianceTest,
1785 ::testing::Values(make_tuple(2, 2, vp8_subpel_variance4x4_sse2, 0),
1786 make_tuple(3, 3, vp8_subpel_variance8x8_sse2, 0),
1787 make_tuple(3, 4, vp8_subpel_variance8x16_sse2, 0),
1788 make_tuple(4, 3, vp8_subpel_variance16x8_sse2, 0),
1789 make_tuple(4, 4, vp8_subpel_variance16x16_sse2, 0)));
1790 #endif // HAVE_SSE2
1791 #endif // CONFIG_VP8
1792
1722 #if CONFIG_VP9_ENCODER 1793 #if CONFIG_VP9_ENCODER
1723 #if HAVE_SSSE3 1794 #if HAVE_SSSE3
1724 #if CONFIG_USE_X86INC 1795 #if CONFIG_USE_X86INC
1725 1796 const SubpixVarMxNFunc subpel_variance4x4_ssse3 =
1726 const vp9_subpixvariance_fn_t subpel_variance4x4_ssse3 =
1727 vp9_sub_pixel_variance4x4_ssse3; 1797 vp9_sub_pixel_variance4x4_ssse3;
1728 const vp9_subpixvariance_fn_t subpel_variance4x8_ssse3 = 1798 const SubpixVarMxNFunc subpel_variance4x8_ssse3 =
1729 vp9_sub_pixel_variance4x8_ssse3; 1799 vp9_sub_pixel_variance4x8_ssse3;
1730 const vp9_subpixvariance_fn_t subpel_variance8x4_ssse3 = 1800 const SubpixVarMxNFunc subpel_variance8x4_ssse3 =
1731 vp9_sub_pixel_variance8x4_ssse3; 1801 vp9_sub_pixel_variance8x4_ssse3;
1732 const vp9_subpixvariance_fn_t subpel_variance8x8_ssse3 = 1802 const SubpixVarMxNFunc subpel_variance8x8_ssse3 =
1733 vp9_sub_pixel_variance8x8_ssse3; 1803 vp9_sub_pixel_variance8x8_ssse3;
1734 const vp9_subpixvariance_fn_t subpel_variance8x16_ssse3 = 1804 const SubpixVarMxNFunc subpel_variance8x16_ssse3 =
1735 vp9_sub_pixel_variance8x16_ssse3; 1805 vp9_sub_pixel_variance8x16_ssse3;
1736 const vp9_subpixvariance_fn_t subpel_variance16x8_ssse3 = 1806 const SubpixVarMxNFunc subpel_variance16x8_ssse3 =
1737 vp9_sub_pixel_variance16x8_ssse3; 1807 vp9_sub_pixel_variance16x8_ssse3;
1738 const vp9_subpixvariance_fn_t subpel_variance16x16_ssse3 = 1808 const SubpixVarMxNFunc subpel_variance16x16_ssse3 =
1739 vp9_sub_pixel_variance16x16_ssse3; 1809 vp9_sub_pixel_variance16x16_ssse3;
1740 const vp9_subpixvariance_fn_t subpel_variance16x32_ssse3 = 1810 const SubpixVarMxNFunc subpel_variance16x32_ssse3 =
1741 vp9_sub_pixel_variance16x32_ssse3; 1811 vp9_sub_pixel_variance16x32_ssse3;
1742 const vp9_subpixvariance_fn_t subpel_variance32x16_ssse3 = 1812 const SubpixVarMxNFunc subpel_variance32x16_ssse3 =
1743 vp9_sub_pixel_variance32x16_ssse3; 1813 vp9_sub_pixel_variance32x16_ssse3;
1744 const vp9_subpixvariance_fn_t subpel_variance32x32_ssse3 = 1814 const SubpixVarMxNFunc subpel_variance32x32_ssse3 =
1745 vp9_sub_pixel_variance32x32_ssse3; 1815 vp9_sub_pixel_variance32x32_ssse3;
1746 const vp9_subpixvariance_fn_t subpel_variance32x64_ssse3 = 1816 const SubpixVarMxNFunc subpel_variance32x64_ssse3 =
1747 vp9_sub_pixel_variance32x64_ssse3; 1817 vp9_sub_pixel_variance32x64_ssse3;
1748 const vp9_subpixvariance_fn_t subpel_variance64x32_ssse3 = 1818 const SubpixVarMxNFunc subpel_variance64x32_ssse3 =
1749 vp9_sub_pixel_variance64x32_ssse3; 1819 vp9_sub_pixel_variance64x32_ssse3;
1750 const vp9_subpixvariance_fn_t subpel_variance64x64_ssse3 = 1820 const SubpixVarMxNFunc subpel_variance64x64_ssse3 =
1751 vp9_sub_pixel_variance64x64_ssse3; 1821 vp9_sub_pixel_variance64x64_ssse3;
1752 INSTANTIATE_TEST_CASE_P( 1822 INSTANTIATE_TEST_CASE_P(
1753 SSSE3, VP9SubpelVarianceTest, 1823 SSSE3, VP9SubpelVarianceTest,
1754 ::testing::Values(make_tuple(2, 2, subpel_variance4x4_ssse3, 0), 1824 ::testing::Values(make_tuple(2, 2, subpel_variance4x4_ssse3, 0),
1755 make_tuple(2, 3, subpel_variance4x8_ssse3, 0), 1825 make_tuple(2, 3, subpel_variance4x8_ssse3, 0),
1756 make_tuple(3, 2, subpel_variance8x4_ssse3, 0), 1826 make_tuple(3, 2, subpel_variance8x4_ssse3, 0),
1757 make_tuple(3, 3, subpel_variance8x8_ssse3, 0), 1827 make_tuple(3, 3, subpel_variance8x8_ssse3, 0),
1758 make_tuple(3, 4, subpel_variance8x16_ssse3, 0), 1828 make_tuple(3, 4, subpel_variance8x16_ssse3, 0),
1759 make_tuple(4, 3, subpel_variance16x8_ssse3, 0), 1829 make_tuple(4, 3, subpel_variance16x8_ssse3, 0),
1760 make_tuple(4, 4, subpel_variance16x16_ssse3, 0), 1830 make_tuple(4, 4, subpel_variance16x16_ssse3, 0),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 make_tuple(4, 5, subpel_avg_variance16x32_ssse3, 0), 1872 make_tuple(4, 5, subpel_avg_variance16x32_ssse3, 0),
1803 make_tuple(5, 4, subpel_avg_variance32x16_ssse3, 0), 1873 make_tuple(5, 4, subpel_avg_variance32x16_ssse3, 0),
1804 make_tuple(5, 5, subpel_avg_variance32x32_ssse3, 0), 1874 make_tuple(5, 5, subpel_avg_variance32x32_ssse3, 0),
1805 make_tuple(5, 6, subpel_avg_variance32x64_ssse3, 0), 1875 make_tuple(5, 6, subpel_avg_variance32x64_ssse3, 0),
1806 make_tuple(6, 5, subpel_avg_variance64x32_ssse3, 0), 1876 make_tuple(6, 5, subpel_avg_variance64x32_ssse3, 0),
1807 make_tuple(6, 6, subpel_avg_variance64x64_ssse3, 0))); 1877 make_tuple(6, 6, subpel_avg_variance64x64_ssse3, 0)));
1808 #endif // CONFIG_USE_X86INC 1878 #endif // CONFIG_USE_X86INC
1809 #endif // HAVE_SSSE3 1879 #endif // HAVE_SSSE3
1810 #endif // CONFIG_VP9_ENCODER 1880 #endif // CONFIG_VP9_ENCODER
1811 1881
1882 #if CONFIG_VP8
1883 #if HAVE_SSSE3
1884 const SubpixVarMxNFunc vp8_subpel_variance16x16_ssse3 =
1885 vp8_sub_pixel_variance16x16_ssse3;
1886 const SubpixVarMxNFunc vp8_subpel_variance16x8_ssse3 =
1887 vp8_sub_pixel_variance16x8_ssse3;
1888 INSTANTIATE_TEST_CASE_P(
1889 SSSE3, VP8SubpelVarianceTest,
1890 ::testing::Values(make_tuple(4, 3, vp8_subpel_variance16x8_ssse3, 0),
1891 make_tuple(4, 4, vp8_subpel_variance16x16_ssse3, 0)));
1892 #endif // HAVE_SSSE3
1893 #endif // CONFIG_VP8
1894
1812 #if HAVE_AVX2 1895 #if HAVE_AVX2
1813 const VarianceMxNFunc mse16x16_avx2 = vpx_mse16x16_avx2; 1896 const VarianceMxNFunc mse16x16_avx2 = vpx_mse16x16_avx2;
1814 INSTANTIATE_TEST_CASE_P(AVX2, VpxMseTest, 1897 INSTANTIATE_TEST_CASE_P(AVX2, VpxMseTest,
1815 ::testing::Values(make_tuple(4, 4, mse16x16_avx2))); 1898 ::testing::Values(make_tuple(4, 4, mse16x16_avx2)));
1816 1899
1817 const VarianceMxNFunc variance64x64_avx2 = vpx_variance64x64_avx2; 1900 const VarianceMxNFunc variance64x64_avx2 = vpx_variance64x64_avx2;
1818 const VarianceMxNFunc variance64x32_avx2 = vpx_variance64x32_avx2; 1901 const VarianceMxNFunc variance64x32_avx2 = vpx_variance64x32_avx2;
1819 const VarianceMxNFunc variance32x32_avx2 = vpx_variance32x32_avx2; 1902 const VarianceMxNFunc variance32x32_avx2 = vpx_variance32x32_avx2;
1820 const VarianceMxNFunc variance32x16_avx2 = vpx_variance32x16_avx2; 1903 const VarianceMxNFunc variance32x16_avx2 = vpx_variance32x16_avx2;
1821 const VarianceMxNFunc variance16x16_avx2 = vpx_variance16x16_avx2; 1904 const VarianceMxNFunc variance16x16_avx2 = vpx_variance16x16_avx2;
1822 INSTANTIATE_TEST_CASE_P( 1905 INSTANTIATE_TEST_CASE_P(
1823 AVX2, VpxVarianceTest, 1906 AVX2, VpxVarianceTest,
1824 ::testing::Values(make_tuple(6, 6, variance64x64_avx2, 0), 1907 ::testing::Values(make_tuple(6, 6, variance64x64_avx2, 0),
1825 make_tuple(6, 5, variance64x32_avx2, 0), 1908 make_tuple(6, 5, variance64x32_avx2, 0),
1826 make_tuple(5, 5, variance32x32_avx2, 0), 1909 make_tuple(5, 5, variance32x32_avx2, 0),
1827 make_tuple(5, 4, variance32x16_avx2, 0), 1910 make_tuple(5, 4, variance32x16_avx2, 0),
1828 make_tuple(4, 4, variance16x16_avx2, 0))); 1911 make_tuple(4, 4, variance16x16_avx2, 0)));
1829 1912
1830 #if CONFIG_VP9_ENCODER 1913 #if CONFIG_VP9_ENCODER
1831 const vp9_subpixvariance_fn_t subpel_variance32x32_avx2 = 1914 const SubpixVarMxNFunc subpel_variance32x32_avx2 =
1832 vp9_sub_pixel_variance32x32_avx2; 1915 vp9_sub_pixel_variance32x32_avx2;
1833 const vp9_subpixvariance_fn_t subpel_variance64x64_avx2 = 1916 const SubpixVarMxNFunc subpel_variance64x64_avx2 =
1834 vp9_sub_pixel_variance64x64_avx2; 1917 vp9_sub_pixel_variance64x64_avx2;
1835 INSTANTIATE_TEST_CASE_P( 1918 INSTANTIATE_TEST_CASE_P(
1836 AVX2, VP9SubpelVarianceTest, 1919 AVX2, VP9SubpelVarianceTest,
1837 ::testing::Values(make_tuple(5, 5, subpel_variance32x32_avx2, 0), 1920 ::testing::Values(make_tuple(5, 5, subpel_variance32x32_avx2, 0),
1838 make_tuple(6, 6, subpel_variance64x64_avx2, 0))); 1921 make_tuple(6, 6, subpel_variance64x64_avx2, 0)));
1839 1922
1840 const vp9_subp_avg_variance_fn_t subpel_avg_variance32x32_avx2 = 1923 const vp9_subp_avg_variance_fn_t subpel_avg_variance32x32_avx2 =
1841 vp9_sub_pixel_avg_variance32x32_avx2; 1924 vp9_sub_pixel_avg_variance32x32_avx2;
1842 const vp9_subp_avg_variance_fn_t subpel_avg_variance64x64_avx2 = 1925 const vp9_subp_avg_variance_fn_t subpel_avg_variance64x64_avx2 =
1843 vp9_sub_pixel_avg_variance64x64_avx2; 1926 vp9_sub_pixel_avg_variance64x64_avx2;
1844 INSTANTIATE_TEST_CASE_P( 1927 INSTANTIATE_TEST_CASE_P(
1845 AVX2, VP9SubpelAvgVarianceTest, 1928 AVX2, VP9SubpelAvgVarianceTest,
1846 ::testing::Values(make_tuple(5, 5, subpel_avg_variance32x32_avx2, 0), 1929 ::testing::Values(make_tuple(5, 5, subpel_avg_variance32x32_avx2, 0),
1847 make_tuple(6, 6, subpel_avg_variance64x64_avx2, 0))); 1930 make_tuple(6, 6, subpel_avg_variance64x64_avx2, 0)));
1848 #endif // CONFIG_VP9_ENCODER 1931 #endif // CONFIG_VP9_ENCODER
1849 #endif // HAVE_AVX2 1932 #endif // HAVE_AVX2
1850 1933
1934 #if CONFIG_VP8
1935 #if HAVE_MEDIA
1936 const SubpixVarMxNFunc subpel_variance16x16_media =
1937 vp8_sub_pixel_variance16x16_armv6;
1938 const SubpixVarMxNFunc subpel_variance8x8_media =
1939 vp8_sub_pixel_variance8x8_armv6;
1940 INSTANTIATE_TEST_CASE_P(
1941 MEDIA, VP8SubpelVarianceTest,
1942 ::testing::Values(make_tuple(3, 3, subpel_variance8x8_media, 0),
1943 make_tuple(4, 4, subpel_variance16x16_media, 0)));
1944 #endif // HAVE_MEDIA
1945 #endif // CONFIG_VP8
1946
1851 #if HAVE_NEON 1947 #if HAVE_NEON
1852 const Get4x4SseFunc get4x4sse_cs_neon = vpx_get4x4sse_cs_neon; 1948 const Get4x4SseFunc get4x4sse_cs_neon = vpx_get4x4sse_cs_neon;
1853 INSTANTIATE_TEST_CASE_P(NEON, VpxSseTest, 1949 INSTANTIATE_TEST_CASE_P(NEON, VpxSseTest,
1854 ::testing::Values(make_tuple(2, 2, get4x4sse_cs_neon))); 1950 ::testing::Values(make_tuple(2, 2, get4x4sse_cs_neon)));
1855 1951
1856 const VarianceMxNFunc mse16x16_neon = vpx_mse16x16_neon; 1952 const VarianceMxNFunc mse16x16_neon = vpx_mse16x16_neon;
1857 INSTANTIATE_TEST_CASE_P(NEON, VpxMseTest, 1953 INSTANTIATE_TEST_CASE_P(NEON, VpxMseTest,
1858 ::testing::Values(make_tuple(4, 4, mse16x16_neon))); 1954 ::testing::Values(make_tuple(4, 4, mse16x16_neon)));
1859 1955
1860 const VarianceMxNFunc variance64x64_neon = vpx_variance64x64_neon; 1956 const VarianceMxNFunc variance64x64_neon = vpx_variance64x64_neon;
1861 const VarianceMxNFunc variance64x32_neon = vpx_variance64x32_neon; 1957 const VarianceMxNFunc variance64x32_neon = vpx_variance64x32_neon;
1862 const VarianceMxNFunc variance32x64_neon = vpx_variance32x64_neon; 1958 const VarianceMxNFunc variance32x64_neon = vpx_variance32x64_neon;
1863 const VarianceMxNFunc variance32x32_neon = vpx_variance32x32_neon; 1959 const VarianceMxNFunc variance32x32_neon = vpx_variance32x32_neon;
1864 const VarianceMxNFunc variance16x16_neon = vpx_variance16x16_neon; 1960 const VarianceMxNFunc variance16x16_neon = vpx_variance16x16_neon;
1865 const VarianceMxNFunc variance16x8_neon = vpx_variance16x8_neon; 1961 const VarianceMxNFunc variance16x8_neon = vpx_variance16x8_neon;
1866 const VarianceMxNFunc variance8x16_neon = vpx_variance8x16_neon; 1962 const VarianceMxNFunc variance8x16_neon = vpx_variance8x16_neon;
1867 const VarianceMxNFunc variance8x8_neon = vpx_variance8x8_neon; 1963 const VarianceMxNFunc variance8x8_neon = vpx_variance8x8_neon;
1868 INSTANTIATE_TEST_CASE_P( 1964 INSTANTIATE_TEST_CASE_P(
1869 NEON, VpxVarianceTest, 1965 NEON, VpxVarianceTest,
1870 ::testing::Values(make_tuple(6, 6, variance64x64_neon, 0), 1966 ::testing::Values(make_tuple(6, 6, variance64x64_neon, 0),
1871 make_tuple(6, 5, variance64x32_neon, 0), 1967 make_tuple(6, 5, variance64x32_neon, 0),
1872 make_tuple(5, 6, variance32x64_neon, 0), 1968 make_tuple(5, 6, variance32x64_neon, 0),
1873 make_tuple(5, 5, variance32x32_neon, 0), 1969 make_tuple(5, 5, variance32x32_neon, 0),
1874 make_tuple(4, 4, variance16x16_neon, 0), 1970 make_tuple(4, 4, variance16x16_neon, 0),
1875 make_tuple(4, 3, variance16x8_neon, 0), 1971 make_tuple(4, 3, variance16x8_neon, 0),
1876 make_tuple(3, 4, variance8x16_neon, 0), 1972 make_tuple(3, 4, variance8x16_neon, 0),
1877 make_tuple(3, 3, variance8x8_neon, 0))); 1973 make_tuple(3, 3, variance8x8_neon, 0)));
1878 1974
1975 #if CONFIG_VP8
1976 #if HAVE_NEON_ASM
1977 const SubpixVarMxNFunc vp8_subpel_variance16x16_neon =
1978 vp8_sub_pixel_variance16x16_neon;
1979 INSTANTIATE_TEST_CASE_P(
1980 NEON, VP8SubpelVarianceTest,
1981 ::testing::Values(make_tuple(4, 4, vp8_subpel_variance16x16_neon, 0)));
1982 #endif // HAVE_NEON_ASM
1983 #endif // CONFIG_VP8
1984
1879 #if CONFIG_VP9_ENCODER 1985 #if CONFIG_VP9_ENCODER
1880 const vp9_subpixvariance_fn_t subpel_variance8x8_neon = 1986 const SubpixVarMxNFunc subpel_variance8x8_neon = vp9_sub_pixel_variance8x8_neon;
1881 vp9_sub_pixel_variance8x8_neon; 1987 const SubpixVarMxNFunc subpel_variance16x16_neon =
1882 const vp9_subpixvariance_fn_t subpel_variance16x16_neon =
1883 vp9_sub_pixel_variance16x16_neon; 1988 vp9_sub_pixel_variance16x16_neon;
1884 const vp9_subpixvariance_fn_t subpel_variance32x32_neon = 1989 const SubpixVarMxNFunc subpel_variance32x32_neon =
1885 vp9_sub_pixel_variance32x32_neon; 1990 vp9_sub_pixel_variance32x32_neon;
1886 const vp9_subpixvariance_fn_t subpel_variance64x64_neon = 1991 const SubpixVarMxNFunc subpel_variance64x64_neon =
1887 vp9_sub_pixel_variance64x64_neon; 1992 vp9_sub_pixel_variance64x64_neon;
1888 INSTANTIATE_TEST_CASE_P( 1993 INSTANTIATE_TEST_CASE_P(
1889 NEON, VP9SubpelVarianceTest, 1994 NEON, VP9SubpelVarianceTest,
1890 ::testing::Values(make_tuple(3, 3, subpel_variance8x8_neon, 0), 1995 ::testing::Values(make_tuple(3, 3, subpel_variance8x8_neon, 0),
1891 make_tuple(4, 4, subpel_variance16x16_neon, 0), 1996 make_tuple(4, 4, subpel_variance16x16_neon, 0),
1892 make_tuple(5, 5, subpel_variance32x32_neon, 0), 1997 make_tuple(5, 5, subpel_variance32x32_neon, 0),
1893 make_tuple(6, 6, subpel_variance64x64_neon, 0))); 1998 make_tuple(6, 6, subpel_variance64x64_neon, 0)));
1894 #endif // CONFIG_VP9_ENCODER 1999 #endif // CONFIG_VP9_ENCODER
1895 #endif // HAVE_NEON 2000 #endif // HAVE_NEON
1896 2001
1897 #if HAVE_MEDIA 2002 #if HAVE_MEDIA
1898 const VarianceMxNFunc mse16x16_media = vpx_mse16x16_media; 2003 const VarianceMxNFunc mse16x16_media = vpx_mse16x16_media;
1899 INSTANTIATE_TEST_CASE_P(MEDIA, VpxMseTest, 2004 INSTANTIATE_TEST_CASE_P(MEDIA, VpxMseTest,
1900 ::testing::Values(make_tuple(4, 4, mse16x16_media))); 2005 ::testing::Values(make_tuple(4, 4, mse16x16_media)));
1901 2006
1902 const VarianceMxNFunc variance16x16_media = vpx_variance16x16_media; 2007 const VarianceMxNFunc variance16x16_media = vpx_variance16x16_media;
1903 const VarianceMxNFunc variance8x8_media = vpx_variance8x8_media; 2008 const VarianceMxNFunc variance8x8_media = vpx_variance8x8_media;
1904 INSTANTIATE_TEST_CASE_P( 2009 INSTANTIATE_TEST_CASE_P(
1905 MEDIA, VpxVarianceTest, 2010 MEDIA, VpxVarianceTest,
1906 ::testing::Values(make_tuple(4, 4, variance16x16_media, 0), 2011 ::testing::Values(make_tuple(4, 4, variance16x16_media, 0),
1907 make_tuple(3, 3, variance8x8_media, 0))); 2012 make_tuple(3, 3, variance8x8_media, 0)));
1908 #endif // HAVE_MEDIA 2013 #endif // HAVE_MEDIA
1909 } // namespace 2014 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/tools_common.sh ('k') | source/libvpx/test/vp9_skip_loopfilter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698