James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 1 | /* |
Krishna Rapaka | 7319db5 | 2021-09-28 20:35:29 -0700 | [diff] [blame] | 2 | * Copyright (c) 2021, Alliance for Open Media. All rights reserved |
James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 3 | * |
Vibhoothi | 41c6dd7 | 2021-10-12 18:48:26 +0000 | [diff] [blame] | 4 | * This source code is subject to the terms of the BSD 3-Clause Clear License |
| 5 | * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear |
| 6 | * License was not distributed with this source code in the LICENSE file, you |
| 7 | * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the |
| 8 | * Alliance for Open Media Patent License 1.0 was not distributed with this |
| 9 | * source code in the PATENTS file, you can obtain it at |
| 10 | * aomedia.org/license/patent-license/. |
Johann | 123e8a6 | 2017-12-28 14:40:49 -0800 | [diff] [blame] | 11 | */ |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 12 | |
| 13 | #include <cstdlib> |
James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 14 | #include <new> |
Wan-Teh Chang | f8c35de | 2020-01-16 14:28:34 -0800 | [diff] [blame] | 15 | #include <ostream> |
sarahparker | a543df5 | 2018-11-02 16:02:05 -0700 | [diff] [blame] | 16 | #include <tuple> |
James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 17 | |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 18 | #include "third_party/googletest/src/googletest/include/gtest/gtest.h" |
James Zern | 5b75674 | 2013-06-17 22:58:40 -0700 | [diff] [blame] | 19 | |
Tom Finegan | 60e653d | 2018-05-22 11:34:58 -0700 | [diff] [blame] | 20 | #include "config/aom_config.h" |
Tom Finegan | 44702c8 | 2018-05-22 13:00:39 -0700 | [diff] [blame] | 21 | #include "config/aom_dsp_rtcd.h" |
Tom Finegan | 60e653d | 2018-05-22 11:34:58 -0700 | [diff] [blame] | 22 | |
Jingning Han | 097d59c | 2015-07-29 14:51:36 -0700 | [diff] [blame] | 23 | #include "test/acm_random.h" |
| 24 | #include "test/clear_system_state.h" |
| 25 | #include "test/register_state_check.h" |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 26 | #include "aom/aom_codec.h" |
| 27 | #include "aom/aom_integer.h" |
| 28 | #include "aom_mem/aom_mem.h" |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 29 | #include "aom_ports/aom_timer.h" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 30 | #include "aom_ports/mem.h" |
James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 31 | |
| 32 | namespace { |
| 33 | |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 34 | typedef uint64_t (*MseWxH16bitFunc)(uint16_t *dst, int dstride, uint16_t *src, |
Satish Kumar Suman | 5aa160f | 2020-05-07 13:56:00 +0530 | [diff] [blame] | 35 | int sstride, int w, int h); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 36 | typedef unsigned int (*VarianceMxNFunc)(const uint16_t *a, int a_stride, |
| 37 | const uint16_t *b, int b_stride, |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 38 | unsigned int *sse); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 39 | typedef unsigned int (*SubpixVarMxNFunc)(const uint16_t *a, int a_stride, |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 40 | int xoffset, int yoffset, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 41 | const uint16_t *b, int b_stride, |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 42 | unsigned int *sse); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 43 | typedef unsigned int (*SubpixAvgVarMxNFunc)(const uint16_t *a, int a_stride, |
Johann | 6a82f0d | 2015-06-05 09:54:19 -0700 | [diff] [blame] | 44 | int xoffset, int yoffset, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 45 | const uint16_t *b, int b_stride, |
Johann | 6a82f0d | 2015-06-05 09:54:19 -0700 | [diff] [blame] | 46 | uint32_t *sse, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 47 | const uint16_t *second_pred); |
| 48 | typedef unsigned int (*Get4x4SseFunc)(const uint16_t *a, int a_stride, |
| 49 | const uint16_t *b, int b_stride); |
Johann | 6a82f0d | 2015-06-05 09:54:19 -0700 | [diff] [blame] | 50 | typedef unsigned int (*SumOfSquaresFunction)(const int16_t *src); |
Debargha Mukherjee | f90004a | 2018-12-20 13:35:06 -0800 | [diff] [blame] | 51 | typedef unsigned int (*DistWtdSubpixAvgVarMxNFunc)( |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 52 | const uint16_t *a, int a_stride, int xoffset, int yoffset, |
| 53 | const uint16_t *b, int b_stride, uint32_t *sse, const uint16_t *second_pred, |
Debargha Mukherjee | f90004a | 2018-12-20 13:35:06 -0800 | [diff] [blame] | 54 | const DIST_WTD_COMP_PARAMS *jcp_param); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 55 | typedef uint32_t (*ObmcSubpelVarFunc)(const uint16_t *pre, int pre_stride, |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 56 | int xoffset, int yoffset, |
| 57 | const int32_t *wsrc, const int32_t *mask, |
| 58 | unsigned int *sse); |
Johann | 6a82f0d | 2015-06-05 09:54:19 -0700 | [diff] [blame] | 59 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 60 | using libaom_test::ACMRandom; |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 61 | |
Johann | c855ed7 | 2015-05-27 14:37:31 -0700 | [diff] [blame] | 62 | // Truncate high bit depth results by downshifting (with rounding) by: |
| 63 | // 2 * (bit_depth - 8) for sse |
| 64 | // (bit_depth - 8) for se |
| 65 | static void RoundHighBitDepth(int bit_depth, int64_t *se, uint64_t *sse) { |
| 66 | switch (bit_depth) { |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 67 | case AOM_BITS_12: |
Johann | c855ed7 | 2015-05-27 14:37:31 -0700 | [diff] [blame] | 68 | *sse = (*sse + 128) >> 8; |
| 69 | *se = (*se + 8) >> 4; |
| 70 | break; |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 71 | case AOM_BITS_10: |
Johann | c855ed7 | 2015-05-27 14:37:31 -0700 | [diff] [blame] | 72 | *sse = (*sse + 8) >> 4; |
| 73 | *se = (*se + 2) >> 2; |
| 74 | break; |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 75 | case AOM_BITS_8: |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 76 | default: break; |
Johann | c855ed7 | 2015-05-27 14:37:31 -0700 | [diff] [blame] | 77 | } |
| 78 | } |
| 79 | |
Dmitry Kovalev | 1f19ebb | 2014-09-06 00:10:25 -0700 | [diff] [blame] | 80 | static unsigned int mb_ss_ref(const int16_t *src) { |
| 81 | unsigned int res = 0; |
| 82 | for (int i = 0; i < 256; ++i) { |
| 83 | res += src[i] * src[i]; |
| 84 | } |
| 85 | return res; |
| 86 | } |
| 87 | |
Yi Luo | c3e07b2 | 2016-04-04 09:44:56 -0700 | [diff] [blame] | 88 | /* Note: |
| 89 | * Our codebase calculates the "diff" value in the variance algorithm by |
| 90 | * (src - ref). |
| 91 | */ |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 92 | static uint32_t variance_ref(const uint16_t *src, const uint16_t *ref, int l2w, |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 93 | int l2h, int src_stride, int ref_stride, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 94 | uint32_t *sse_ptr, aom_bit_depth_t bit_depth) { |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 95 | int64_t se = 0; |
| 96 | uint64_t sse = 0; |
| 97 | const int w = 1 << l2w; |
| 98 | const int h = 1 << l2h; |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 99 | for (int y = 0; y < h; y++) { |
| 100 | for (int x = 0; x < w; x++) { |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 101 | int diff; |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 102 | diff = src[y * src_stride + x] - ref[y * ref_stride + x]; |
| 103 | se += diff; |
| 104 | sse += diff * diff; |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 105 | } |
| 106 | } |
Johann | c855ed7 | 2015-05-27 14:37:31 -0700 | [diff] [blame] | 107 | RoundHighBitDepth(bit_depth, &se, &sse); |
Johann | d90536c | 2015-06-01 13:03:30 -0700 | [diff] [blame] | 108 | *sse_ptr = static_cast<uint32_t>(sse); |
Urvang Joshi | 77853e5 | 2016-07-15 12:47:01 -0700 | [diff] [blame] | 109 | return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h))); |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 110 | } |
| 111 | |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 112 | /* The subpel reference functions differ from the codec version in one aspect: |
| 113 | * they calculate the bilinear factors directly instead of using a lookup table |
| 114 | * and therefore upshift xoff and yoff by 1. Only every other calculated value |
Yunqing Wang | 787f7f7 | 2020-02-25 15:39:17 -0800 | [diff] [blame] | 115 | * is used so the codec version shrinks the table to save space. |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 116 | */ |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 117 | static uint32_t subpel_variance_ref(const uint16_t *ref, const uint16_t *src, |
Johann | d90536c | 2015-06-01 13:03:30 -0700 | [diff] [blame] | 118 | int l2w, int l2h, int xoff, int yoff, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 119 | uint32_t *sse_ptr, |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 120 | aom_bit_depth_t bit_depth) { |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 121 | int64_t se = 0; |
| 122 | uint64_t sse = 0; |
| 123 | const int w = 1 << l2w; |
| 124 | const int h = 1 << l2h; |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 125 | |
| 126 | xoff <<= 1; |
| 127 | yoff <<= 1; |
| 128 | |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 129 | for (int y = 0; y < h; y++) { |
| 130 | for (int x = 0; x < w; x++) { |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 131 | // Bilinear interpolation at a 16th pel step. |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 132 | uint16_t *ref16 = (uint16_t *)ref; |
| 133 | uint16_t *src16 = (uint16_t *)src; |
| 134 | const int a1 = ref16[(w + 1) * (y + 0) + x + 0]; |
| 135 | const int a2 = ref16[(w + 1) * (y + 0) + x + 1]; |
| 136 | const int b1 = ref16[(w + 1) * (y + 1) + x + 0]; |
| 137 | const int b2 = ref16[(w + 1) * (y + 1) + x + 1]; |
| 138 | const int a = a1 + (((a2 - a1) * xoff + 8) >> 4); |
| 139 | const int b = b1 + (((b2 - b1) * xoff + 8) >> 4); |
| 140 | const int r = a + (((b - a) * yoff + 8) >> 4); |
| 141 | const int diff = r - src16[w * y + x]; |
| 142 | se += diff; |
| 143 | sse += diff * diff; |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 144 | } |
| 145 | } |
Johann | c855ed7 | 2015-05-27 14:37:31 -0700 | [diff] [blame] | 146 | RoundHighBitDepth(bit_depth, &se, &sse); |
Johann | d90536c | 2015-06-01 13:03:30 -0700 | [diff] [blame] | 147 | *sse_ptr = static_cast<uint32_t>(sse); |
Urvang Joshi | 77853e5 | 2016-07-15 12:47:01 -0700 | [diff] [blame] | 148 | return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h))); |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 149 | } |
James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 150 | |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 151 | static uint32_t subpel_avg_variance_ref(const uint16_t *ref, |
| 152 | const uint16_t *src, |
| 153 | const uint16_t *second_pred, int l2w, |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 154 | int l2h, int xoff, int yoff, |
| 155 | uint32_t *sse_ptr, |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 156 | aom_bit_depth_t bit_depth) { |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 157 | int64_t se = 0; |
| 158 | uint64_t sse = 0; |
| 159 | const int w = 1 << l2w; |
| 160 | const int h = 1 << l2h; |
| 161 | |
| 162 | xoff <<= 1; |
| 163 | yoff <<= 1; |
| 164 | |
| 165 | for (int y = 0; y < h; y++) { |
| 166 | for (int x = 0; x < w; x++) { |
| 167 | // bilinear interpolation at a 16th pel step |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 168 | const uint16_t *ref16 = ref; |
| 169 | const uint16_t *src16 = src; |
| 170 | const uint16_t *sec16 = second_pred; |
| 171 | const int a1 = ref16[(w + 1) * (y + 0) + x + 0]; |
| 172 | const int a2 = ref16[(w + 1) * (y + 0) + x + 1]; |
| 173 | const int b1 = ref16[(w + 1) * (y + 1) + x + 0]; |
| 174 | const int b2 = ref16[(w + 1) * (y + 1) + x + 1]; |
| 175 | const int a = a1 + (((a2 - a1) * xoff + 8) >> 4); |
| 176 | const int b = b1 + (((b2 - b1) * xoff + 8) >> 4); |
| 177 | const int r = a + (((b - a) * yoff + 8) >> 4); |
| 178 | const int diff = ((r + sec16[w * y + x] + 1) >> 1) - src16[w * y + x]; |
| 179 | se += diff; |
| 180 | sse += diff * diff; |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 181 | } |
| 182 | } |
| 183 | RoundHighBitDepth(bit_depth, &se, &sse); |
| 184 | *sse_ptr = static_cast<uint32_t>(sse); |
Urvang Joshi | 77853e5 | 2016-07-15 12:47:01 -0700 | [diff] [blame] | 185 | return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h))); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | //////////////////////////////////////////////////////////////////////////////// |
| 189 | |
Dmitry Kovalev | 1f19ebb | 2014-09-06 00:10:25 -0700 | [diff] [blame] | 190 | class SumOfSquaresTest : public ::testing::TestWithParam<SumOfSquaresFunction> { |
| 191 | public: |
| 192 | SumOfSquaresTest() : func_(GetParam()) {} |
| 193 | |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 194 | virtual ~SumOfSquaresTest() { libaom_test::ClearSystemState(); } |
Dmitry Kovalev | 1f19ebb | 2014-09-06 00:10:25 -0700 | [diff] [blame] | 195 | |
| 196 | protected: |
| 197 | void ConstTest(); |
| 198 | void RefTest(); |
| 199 | |
| 200 | SumOfSquaresFunction func_; |
| 201 | ACMRandom rnd_; |
| 202 | }; |
| 203 | |
| 204 | void SumOfSquaresTest::ConstTest() { |
| 205 | int16_t mem[256]; |
| 206 | unsigned int res; |
| 207 | for (int v = 0; v < 256; ++v) { |
| 208 | for (int i = 0; i < 256; ++i) { |
| 209 | mem[i] = v; |
| 210 | } |
| 211 | ASM_REGISTER_STATE_CHECK(res = func_(mem)); |
| 212 | EXPECT_EQ(256u * (v * v), res); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | void SumOfSquaresTest::RefTest() { |
| 217 | int16_t mem[256]; |
| 218 | for (int i = 0; i < 100; ++i) { |
| 219 | for (int j = 0; j < 256; ++j) { |
| 220 | mem[j] = rnd_.Rand8() - rnd_.Rand8(); |
| 221 | } |
| 222 | |
| 223 | const unsigned int expected = mb_ss_ref(mem); |
| 224 | unsigned int res; |
| 225 | ASM_REGISTER_STATE_CHECK(res = func_(mem)); |
| 226 | EXPECT_EQ(expected, res); |
| 227 | } |
| 228 | } |
| 229 | |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 230 | //////////////////////////////////////////////////////////////////////////////// |
| 231 | // Encapsulating struct to store the function to test along with |
| 232 | // some testing context. |
| 233 | // Can be used for MSE, SSE, Variance, etc. |
| 234 | |
| 235 | template <typename Func> |
| 236 | struct TestParams { |
| 237 | TestParams(int log2w = 0, int log2h = 0, Func function = NULL, |
| 238 | int bit_depth_value = 0) |
| 239 | : log2width(log2w), log2height(log2h), func(function) { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 240 | bit_depth = static_cast<aom_bit_depth_t>(bit_depth_value); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 241 | width = 1 << log2width; |
| 242 | height = 1 << log2height; |
| 243 | block_size = width * height; |
| 244 | mask = (1u << bit_depth) - 1; |
| 245 | } |
| 246 | |
| 247 | int log2width, log2height; |
| 248 | int width, height; |
| 249 | int block_size; |
| 250 | Func func; |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 251 | aom_bit_depth_t bit_depth; |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 252 | uint32_t mask; |
| 253 | }; |
| 254 | |
| 255 | template <typename Func> |
| 256 | std::ostream &operator<<(std::ostream &os, const TestParams<Func> &p) { |
Peng Bin | 7ad9dae | 2018-05-11 14:33:19 +0800 | [diff] [blame] | 257 | return os << "width/height:" << p.width << "/" << p.height |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 258 | << " function:" << reinterpret_cast<const void *>(p.func) |
| 259 | << " bit-depth:" << p.bit_depth; |
| 260 | } |
| 261 | |
| 262 | // Main class for testing a function type |
| 263 | template <typename FunctionType> |
| 264 | class MainTestClass |
| 265 | : public ::testing::TestWithParam<TestParams<FunctionType> > { |
James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 266 | public: |
| 267 | virtual void SetUp() { |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 268 | params_ = this->GetParam(); |
| 269 | |
| 270 | rnd_.Reset(ACMRandom::DeterministicSeed()); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 271 | const size_t unit = sizeof(uint16_t); |
| 272 | src_ = reinterpret_cast<uint16_t *>(aom_memalign(16, block_size() * unit)); |
| 273 | ref_ = new uint16_t[block_size() * unit]; |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 274 | ASSERT_TRUE(src_ != NULL); |
| 275 | ASSERT_TRUE(ref_ != NULL); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 276 | } |
| 277 | |
| 278 | virtual void TearDown() { |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 279 | aom_free(src_); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 280 | delete[] ref_; |
| 281 | src_ = NULL; |
| 282 | ref_ = NULL; |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 283 | libaom_test::ClearSystemState(); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | protected: |
| 287 | // We could sub-class MainTestClass into dedicated class for Variance |
| 288 | // and MSE/SSE, but it involves a lot of 'this->xxx' dereferencing |
| 289 | // to access top class fields xxx. That's cumbersome, so for now we'll just |
| 290 | // implement the testing methods here: |
| 291 | |
| 292 | // Variance tests |
| 293 | void ZeroTest(); |
| 294 | void RefTest(); |
| 295 | void RefStrideTest(); |
| 296 | void OneQuarterTest(); |
Peng Bin | f1abb41 | 2018-03-09 19:40:52 +0800 | [diff] [blame] | 297 | void SpeedTest(); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 298 | |
| 299 | // MSE/SSE tests |
| 300 | void RefTestMse(); |
| 301 | void RefTestSse(); |
| 302 | void MaxTestMse(); |
| 303 | void MaxTestSse(); |
| 304 | |
| 305 | protected: |
| 306 | ACMRandom rnd_; |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 307 | uint16_t *src_; |
| 308 | uint16_t *ref_; |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 309 | TestParams<FunctionType> params_; |
| 310 | |
| 311 | // some relay helpers |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 312 | int byte_shift() const { return params_.bit_depth - 8; } |
| 313 | int block_size() const { return params_.block_size; } |
| 314 | int width() const { return params_.width; } |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 315 | int height() const { return params_.height; } |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 316 | uint32_t mask() const { return params_.mask; } |
| 317 | }; |
| 318 | |
| 319 | //////////////////////////////////////////////////////////////////////////////// |
| 320 | // Tests related to variance. |
| 321 | |
| 322 | template <typename VarianceFunctionType> |
| 323 | void MainTestClass<VarianceFunctionType>::ZeroTest() { |
| 324 | for (int i = 0; i <= 255; ++i) { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 325 | uint16_t *const src16 = src_; |
| 326 | for (int k = 0; k < block_size(); ++k) src16[k] = i << byte_shift(); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 327 | for (int j = 0; j <= 255; ++j) { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 328 | uint16_t *const ref16 = ref_; |
| 329 | for (int k = 0; k < block_size(); ++k) ref16[k] = j << byte_shift(); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 330 | unsigned int sse, var; |
| 331 | ASM_REGISTER_STATE_CHECK( |
| 332 | var = params_.func(src_, width(), ref_, width(), &sse)); |
| 333 | EXPECT_EQ(0u, var) << "src values: " << i << " ref values: " << j; |
| 334 | } |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | template <typename VarianceFunctionType> |
| 339 | void MainTestClass<VarianceFunctionType>::RefTest() { |
| 340 | for (int i = 0; i < 10; ++i) { |
| 341 | for (int j = 0; j < block_size(); j++) { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 342 | src_[j] = rnd_.Rand16() & mask(); |
| 343 | ref_[j] = rnd_.Rand16() & mask(); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 344 | } |
| 345 | unsigned int sse1, sse2, var1, var2; |
| 346 | const int stride = width(); |
| 347 | ASM_REGISTER_STATE_CHECK( |
| 348 | var1 = params_.func(src_, stride, ref_, stride, &sse1)); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 349 | var2 = variance_ref(src_, ref_, params_.log2width, params_.log2height, |
| 350 | stride, stride, &sse2, params_.bit_depth); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 351 | EXPECT_EQ(sse1, sse2) << "Error at test index: " << i; |
| 352 | EXPECT_EQ(var1, var2) << "Error at test index: " << i; |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | template <typename VarianceFunctionType> |
| 357 | void MainTestClass<VarianceFunctionType>::RefStrideTest() { |
| 358 | for (int i = 0; i < 10; ++i) { |
| 359 | const int ref_stride = (i & 1) * width(); |
| 360 | const int src_stride = ((i >> 1) & 1) * width(); |
| 361 | for (int j = 0; j < block_size(); j++) { |
| 362 | const int ref_ind = (j / width()) * ref_stride + j % width(); |
| 363 | const int src_ind = (j / width()) * src_stride + j % width(); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 364 | src_[src_ind] = rnd_.Rand16() & mask(); |
| 365 | ref_[ref_ind] = rnd_.Rand16() & mask(); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 366 | } |
| 367 | unsigned int sse1, sse2; |
| 368 | unsigned int var1, var2; |
| 369 | |
| 370 | ASM_REGISTER_STATE_CHECK( |
| 371 | var1 = params_.func(src_, src_stride, ref_, ref_stride, &sse1)); |
| 372 | var2 = variance_ref(src_, ref_, params_.log2width, params_.log2height, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 373 | src_stride, ref_stride, &sse2, params_.bit_depth); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 374 | EXPECT_EQ(sse1, sse2) << "Error at test index: " << i; |
| 375 | EXPECT_EQ(var1, var2) << "Error at test index: " << i; |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | template <typename VarianceFunctionType> |
| 380 | void MainTestClass<VarianceFunctionType>::OneQuarterTest() { |
| 381 | const int half = block_size() / 2; |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 382 | aom_memset16(src_, 255 << byte_shift(), block_size()); |
| 383 | aom_memset16(ref_, 255 << byte_shift(), half); |
| 384 | aom_memset16(ref_ + half, 0, half); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 385 | unsigned int sse, var, expected; |
| 386 | ASM_REGISTER_STATE_CHECK( |
| 387 | var = params_.func(src_, width(), ref_, width(), &sse)); |
| 388 | expected = block_size() * 255 * 255 / 4; |
| 389 | EXPECT_EQ(expected, var); |
| 390 | } |
| 391 | |
Peng Bin | f1abb41 | 2018-03-09 19:40:52 +0800 | [diff] [blame] | 392 | template <typename VarianceFunctionType> |
| 393 | void MainTestClass<VarianceFunctionType>::SpeedTest() { |
| 394 | for (int j = 0; j < block_size(); j++) { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 395 | src_[j] = rnd_.Rand16() & mask(); |
| 396 | ref_[j] = rnd_.Rand16() & mask(); |
Peng Bin | f1abb41 | 2018-03-09 19:40:52 +0800 | [diff] [blame] | 397 | } |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 398 | unsigned int sse; |
Peng Bin | f1abb41 | 2018-03-09 19:40:52 +0800 | [diff] [blame] | 399 | const int stride = width(); |
| 400 | int run_time = 1000000000 / block_size(); |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 401 | aom_usec_timer timer; |
| 402 | aom_usec_timer_start(&timer); |
Peng Bin | f1abb41 | 2018-03-09 19:40:52 +0800 | [diff] [blame] | 403 | for (int i = 0; i < run_time; ++i) { |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 404 | params_.func(src_, stride, ref_, stride, &sse); |
Peng Bin | f1abb41 | 2018-03-09 19:40:52 +0800 | [diff] [blame] | 405 | } |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 406 | |
| 407 | aom_usec_timer_mark(&timer); |
| 408 | const double elapsed_time = |
| 409 | static_cast<double>(aom_usec_timer_elapsed(&timer)); |
| 410 | printf("Variance %dx%d : %7.2fns\n", width(), height(), elapsed_time); |
Peng Bin | f1abb41 | 2018-03-09 19:40:52 +0800 | [diff] [blame] | 411 | } |
| 412 | |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 413 | //////////////////////////////////////////////////////////////////////////////// |
| 414 | // Tests related to MSE / SSE. |
| 415 | |
| 416 | template <typename FunctionType> |
| 417 | void MainTestClass<FunctionType>::RefTestMse() { |
| 418 | for (int i = 0; i < 10; ++i) { |
| 419 | for (int j = 0; j < block_size(); ++j) { |
| 420 | src_[j] = rnd_.Rand8(); |
| 421 | ref_[j] = rnd_.Rand8(); |
| 422 | } |
| 423 | unsigned int sse1, sse2; |
| 424 | const int stride = width(); |
| 425 | ASM_REGISTER_STATE_CHECK(params_.func(src_, stride, ref_, stride, &sse1)); |
| 426 | variance_ref(src_, ref_, params_.log2width, params_.log2height, stride, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 427 | stride, &sse2, AOM_BITS_8); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 428 | EXPECT_EQ(sse1, sse2); |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | template <typename FunctionType> |
| 433 | void MainTestClass<FunctionType>::RefTestSse() { |
| 434 | for (int i = 0; i < 10; ++i) { |
| 435 | for (int j = 0; j < block_size(); ++j) { |
| 436 | src_[j] = rnd_.Rand8(); |
| 437 | ref_[j] = rnd_.Rand8(); |
| 438 | } |
| 439 | unsigned int sse2; |
| 440 | unsigned int var1; |
| 441 | const int stride = width(); |
| 442 | ASM_REGISTER_STATE_CHECK(var1 = params_.func(src_, stride, ref_, stride)); |
| 443 | variance_ref(src_, ref_, params_.log2width, params_.log2height, stride, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 444 | stride, &sse2, AOM_BITS_8); |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 445 | EXPECT_EQ(var1, sse2); |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | template <typename FunctionType> |
| 450 | void MainTestClass<FunctionType>::MaxTestMse() { |
| 451 | memset(src_, 255, block_size()); |
| 452 | memset(ref_, 0, block_size()); |
| 453 | unsigned int sse; |
| 454 | ASM_REGISTER_STATE_CHECK(params_.func(src_, width(), ref_, width(), &sse)); |
| 455 | const unsigned int expected = block_size() * 255 * 255; |
| 456 | EXPECT_EQ(expected, sse); |
| 457 | } |
| 458 | |
| 459 | template <typename FunctionType> |
| 460 | void MainTestClass<FunctionType>::MaxTestSse() { |
| 461 | memset(src_, 255, block_size()); |
| 462 | memset(ref_, 0, block_size()); |
| 463 | unsigned int var; |
| 464 | ASM_REGISTER_STATE_CHECK(var = params_.func(src_, width(), ref_, width())); |
| 465 | const unsigned int expected = block_size() * 255 * 255; |
| 466 | EXPECT_EQ(expected, var); |
| 467 | } |
| 468 | |
| 469 | //////////////////////////////////////////////////////////////////////////////// |
| 470 | |
sarahparker | a543df5 | 2018-11-02 16:02:05 -0700 | [diff] [blame] | 471 | using std::get; |
| 472 | using std::make_tuple; |
| 473 | using std::tuple; |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 474 | |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 475 | template <typename FunctionType> |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 476 | class SubpelVarianceTest |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 477 | : public ::testing::TestWithParam<TestParams<FunctionType> > { |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 478 | public: |
| 479 | virtual void SetUp() { |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 480 | params_ = this->GetParam(); |
James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 481 | |
Dmitry Kovalev | 202edb3 | 2014-09-04 12:24:52 -0700 | [diff] [blame] | 482 | rnd_.Reset(ACMRandom::DeterministicSeed()); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 483 | src_ = reinterpret_cast<uint16_t *>( |
| 484 | aom_memalign(32, block_size() * sizeof(uint16_t))); |
| 485 | sec_ = reinterpret_cast<uint16_t *>( |
| 486 | aom_memalign(32, block_size() * sizeof(uint16_t))); |
| 487 | ref_ = reinterpret_cast<uint16_t *>(aom_memalign( |
| 488 | 32, (block_size() + width() + height() + 1) * sizeof(uint16_t))); |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 489 | ASSERT_TRUE(src_ != NULL); |
Ronald S. Bultje | ac6ea2a | 2013-06-21 17:03:57 -0700 | [diff] [blame] | 490 | ASSERT_TRUE(sec_ != NULL); |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 491 | ASSERT_TRUE(ref_ != NULL); |
| 492 | } |
| 493 | |
| 494 | virtual void TearDown() { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 495 | aom_free(src_); |
| 496 | aom_free(ref_); |
| 497 | aom_free(sec_); |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 498 | libaom_test::ClearSystemState(); |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 499 | } |
| 500 | |
| 501 | protected: |
| 502 | void RefTest(); |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 503 | void ExtremeRefTest(); |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 504 | void SpeedTest(); |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 505 | |
Dmitry Kovalev | 202edb3 | 2014-09-04 12:24:52 -0700 | [diff] [blame] | 506 | ACMRandom rnd_; |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 507 | uint16_t *src_; |
| 508 | uint16_t *ref_; |
| 509 | uint16_t *sec_; |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 510 | TestParams<FunctionType> params_; |
Debargha Mukherjee | f90004a | 2018-12-20 13:35:06 -0800 | [diff] [blame] | 511 | DIST_WTD_COMP_PARAMS jcp_param_; |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 512 | |
| 513 | // some relay helpers |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 514 | int byte_shift() const { return params_.bit_depth - 8; } |
| 515 | int block_size() const { return params_.block_size; } |
| 516 | int width() const { return params_.width; } |
| 517 | int height() const { return params_.height; } |
| 518 | uint32_t mask() const { return params_.mask; } |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 519 | }; |
| 520 | |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 521 | template <typename SubpelVarianceFunctionType> |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 522 | void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() { |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 523 | for (int x = 0; x < 8; ++x) { |
| 524 | for (int y = 0; y < 8; ++y) { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 525 | for (int j = 0; j < block_size(); j++) { |
| 526 | src_[j] = rnd_.Rand16() & mask(); |
| 527 | } |
| 528 | for (int j = 0; j < block_size() + width() + height() + 1; j++) { |
| 529 | ref_[j] = rnd_.Rand16() & mask(); |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 530 | } |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 531 | unsigned int sse1, sse2; |
James Zern | cc774c8 | 2013-06-18 19:15:56 -0700 | [diff] [blame] | 532 | unsigned int var1; |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 533 | ASM_REGISTER_STATE_CHECK( |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 534 | var1 = params_.func(ref_, width() + 1, x, y, src_, width(), &sse1)); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 535 | const unsigned int var2 = |
| 536 | subpel_variance_ref(ref_, src_, params_.log2width, params_.log2height, |
| 537 | x, y, &sse2, params_.bit_depth); |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 538 | EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y; |
| 539 | EXPECT_EQ(var1, var2) << "at position " << x << ", " << y; |
| 540 | } |
| 541 | } |
| 542 | } |
| 543 | |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 544 | template <typename SubpelVarianceFunctionType> |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 545 | void SubpelVarianceTest<SubpelVarianceFunctionType>::ExtremeRefTest() { |
| 546 | // Compare against reference. |
| 547 | // Src: Set the first half of values to 0, the second half to the maximum. |
| 548 | // Ref: Set the first half of values to the maximum, the second half to 0. |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 549 | for (int x = 0; x < 8; ++x) { |
| 550 | for (int y = 0; y < 8; ++y) { |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 551 | const int half = block_size() / 2; |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 552 | aom_memset16(src_, mask(), half); |
| 553 | aom_memset16(src_ + half, 0, half); |
| 554 | aom_memset16(ref_, 0, half); |
| 555 | aom_memset16(ref_ + half, mask(), half + width() + height() + 1); |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 556 | unsigned int sse1, sse2; |
| 557 | unsigned int var1; |
| 558 | ASM_REGISTER_STATE_CHECK( |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 559 | var1 = params_.func(ref_, width() + 1, x, y, src_, width(), &sse1)); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 560 | const unsigned int var2 = |
| 561 | subpel_variance_ref(ref_, src_, params_.log2width, params_.log2height, |
| 562 | x, y, &sse2, params_.bit_depth); |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 563 | EXPECT_EQ(sse1, sse2) << "for xoffset " << x << " and yoffset " << y; |
| 564 | EXPECT_EQ(var1, var2) << "for xoffset " << x << " and yoffset " << y; |
Ronald S. Bultje | 8fb6c58 | 2013-06-20 09:34:25 -0700 | [diff] [blame] | 565 | } |
| 566 | } |
| 567 | } |
| 568 | |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 569 | template <typename SubpelVarianceFunctionType> |
| 570 | void SubpelVarianceTest<SubpelVarianceFunctionType>::SpeedTest() { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 571 | for (int j = 0; j < block_size(); j++) { |
| 572 | src_[j] = rnd_.Rand16() & mask(); |
| 573 | } |
| 574 | for (int j = 0; j < block_size() + width() + height() + 1; j++) { |
| 575 | ref_[j] = rnd_.Rand16() & mask(); |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 576 | } |
| 577 | |
venkat sanampudi | 0a480f2 | 2020-03-05 09:09:00 +0530 | [diff] [blame] | 578 | unsigned int sse1, sse2; |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 579 | int run_time = 1000000000 / block_size(); |
| 580 | aom_usec_timer timer; |
| 581 | |
| 582 | aom_usec_timer_start(&timer); |
| 583 | for (int i = 0; i < run_time; ++i) { |
| 584 | int x = rnd_(8); |
| 585 | int y = rnd_(8); |
| 586 | params_.func(ref_, width() + 1, x, y, src_, width(), &sse1); |
| 587 | } |
| 588 | aom_usec_timer_mark(&timer); |
| 589 | |
| 590 | const int elapsed_time = static_cast<int>(aom_usec_timer_elapsed(&timer)); |
venkat sanampudi | 0a480f2 | 2020-03-05 09:09:00 +0530 | [diff] [blame] | 591 | |
| 592 | aom_usec_timer timer_c; |
| 593 | |
| 594 | aom_usec_timer_start(&timer_c); |
| 595 | for (int i = 0; i < run_time; ++i) { |
| 596 | int x = rnd_(8); |
| 597 | int y = rnd_(8); |
| 598 | subpel_variance_ref(ref_, src_, params_.log2width, params_.log2height, x, y, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 599 | &sse2, params_.bit_depth); |
venkat sanampudi | 0a480f2 | 2020-03-05 09:09:00 +0530 | [diff] [blame] | 600 | } |
| 601 | aom_usec_timer_mark(&timer_c); |
| 602 | |
| 603 | const int elapsed_time_c = static_cast<int>(aom_usec_timer_elapsed(&timer_c)); |
| 604 | |
| 605 | printf( |
| 606 | "sub_pixel_variance_%dx%d_%d: ref_time=%d us opt_time=%d us gain=%d \n", |
| 607 | width(), height(), params_.bit_depth, elapsed_time_c, elapsed_time, |
| 608 | elapsed_time_c / elapsed_time); |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 609 | } |
| 610 | |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 611 | template <> |
Johann | 6a82f0d | 2015-06-05 09:54:19 -0700 | [diff] [blame] | 612 | void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() { |
Johann | eb88b17 | 2015-05-26 11:30:25 -0700 | [diff] [blame] | 613 | for (int x = 0; x < 8; ++x) { |
| 614 | for (int y = 0; y < 8; ++y) { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 615 | for (int j = 0; j < block_size(); j++) { |
| 616 | src_[j] = rnd_.Rand16() & mask(); |
| 617 | sec_[j] = rnd_.Rand16() & mask(); |
| 618 | } |
| 619 | for (int j = 0; j < block_size() + width() + height() + 1; j++) { |
| 620 | ref_[j] = rnd_.Rand16() & mask(); |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 621 | } |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 622 | uint32_t sse1, sse2; |
| 623 | uint32_t var1, var2; |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 624 | ASM_REGISTER_STATE_CHECK(var1 = params_.func(ref_, width() + 1, x, y, |
| 625 | src_, width(), &sse1, sec_)); |
| 626 | var2 = subpel_avg_variance_ref(ref_, src_, sec_, params_.log2width, |
| 627 | params_.log2height, x, y, &sse2, |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 628 | params_.bit_depth); |
Ronald S. Bultje | 1e6a32f | 2013-06-20 15:59:48 -0700 | [diff] [blame] | 629 | EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y; |
| 630 | EXPECT_EQ(var1, var2) << "at position " << x << ", " << y; |
| 631 | } |
| 632 | } |
| 633 | } |
James Zern | a0fcbcf | 2013-09-17 18:47:25 -0700 | [diff] [blame] | 634 | |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 635 | //////////////////////////////////////////////////////////////////////////////// |
| 636 | |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 637 | typedef TestParams<ObmcSubpelVarFunc> ObmcSubpelVarianceParams; |
| 638 | |
| 639 | template <typename FunctionType> |
| 640 | class ObmcVarianceTest |
| 641 | : public ::testing::TestWithParam<TestParams<FunctionType> > { |
| 642 | public: |
| 643 | virtual void SetUp() { |
| 644 | params_ = this->GetParam(); |
| 645 | |
| 646 | rnd_.Reset(ACMRandom::DeterministicSeed()); |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 647 | pre_ = reinterpret_cast<uint16_t *>(aom_memalign( |
| 648 | 32, block_size() + width() + height() + 1 * sizeof(uint16_t))); |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 649 | wsrc_ = reinterpret_cast<int32_t *>( |
| 650 | aom_memalign(32, block_size() * sizeof(uint32_t))); |
| 651 | mask_ = reinterpret_cast<int32_t *>( |
| 652 | aom_memalign(32, block_size() * sizeof(uint32_t))); |
| 653 | ASSERT_TRUE(pre_ != NULL); |
| 654 | ASSERT_TRUE(wsrc_ != NULL); |
| 655 | ASSERT_TRUE(mask_ != NULL); |
| 656 | } |
| 657 | |
| 658 | virtual void TearDown() { |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 659 | aom_free(pre_); |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 660 | aom_free(wsrc_); |
| 661 | aom_free(mask_); |
| 662 | libaom_test::ClearSystemState(); |
| 663 | } |
| 664 | |
| 665 | protected: |
| 666 | void RefTest(); |
| 667 | void ExtremeRefTest(); |
| 668 | void SpeedTest(); |
| 669 | |
| 670 | ACMRandom rnd_; |
James Almer | 756717c | 2022-10-19 17:32:48 +0000 | [diff] [blame] | 671 | uint16_t *pre_; |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 672 | int32_t *wsrc_; |
| 673 | int32_t *mask_; |
| 674 | TestParams<FunctionType> params_; |
| 675 | |
| 676 | // some relay helpers |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 677 | int byte_shift() const { return params_.bit_depth - 8; } |
| 678 | int block_size() const { return params_.block_size; } |
| 679 | int width() const { return params_.width; } |
| 680 | int height() const { return params_.height; } |
| 681 | uint32_t bd_mask() const { return params_.mask; } |
| 682 | }; |
| 683 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 684 | typedef SubpelVarianceTest<SubpixVarMxNFunc> AvxSubpelVarianceTest; |
| 685 | typedef SubpelVarianceTest<SubpixAvgVarMxNFunc> AvxSubpelAvgVarianceTest; |
James Zern | 1711cf2 | 2013-02-22 16:23:36 -0800 | [diff] [blame] | 686 | |
Dmitry Kovalev | 1f19ebb | 2014-09-06 00:10:25 -0700 | [diff] [blame] | 687 | TEST_P(SumOfSquaresTest, Const) { ConstTest(); } |
| 688 | TEST_P(SumOfSquaresTest, Ref) { RefTest(); } |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 689 | TEST_P(AvxSubpelVarianceTest, Ref) { RefTest(); } |
| 690 | TEST_P(AvxSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); } |
venkat sanampudi | 0a480f2 | 2020-03-05 09:09:00 +0530 | [diff] [blame] | 691 | TEST_P(AvxSubpelVarianceTest, DISABLED_Speed) { SpeedTest(); } |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 692 | TEST_P(AvxSubpelAvgVarianceTest, Ref) { RefTest(); } |
Wan-Teh Chang | fefa8f0 | 2020-12-03 10:17:33 -0800 | [diff] [blame] | 693 | |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 694 | INSTANTIATE_TEST_SUITE_P(C, SumOfSquaresTest, |
| 695 | ::testing::Values(aom_get_mb_ss_c)); |
Dmitry Kovalev | 1f19ebb | 2014-09-06 00:10:25 -0700 | [diff] [blame] | 696 | |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 697 | typedef TestParams<VarianceMxNFunc> VarianceParams; |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 698 | typedef TestParams<SubpixVarMxNFunc> SubpelVarianceParams; |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 699 | typedef TestParams<SubpixAvgVarMxNFunc> SubpelAvgVarianceParams; |
Debargha Mukherjee | f90004a | 2018-12-20 13:35:06 -0800 | [diff] [blame] | 700 | typedef TestParams<DistWtdSubpixAvgVarMxNFunc> DistWtdSubpelAvgVarianceParams; |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 701 | |
Satish Kumar Suman | 217ac1c | 2020-05-19 14:37:35 +0530 | [diff] [blame] | 702 | typedef uint64_t (*MseHBDWxH16bitFunc)(uint16_t *dst, int dstride, |
| 703 | uint16_t *src, int sstride, int w, |
| 704 | int h); |
| 705 | |
| 706 | template <typename FunctionType> |
| 707 | class MseHBDWxHTestClass |
| 708 | : public ::testing::TestWithParam<TestParams<FunctionType> > { |
| 709 | public: |
| 710 | virtual void SetUp() { |
| 711 | params_ = this->GetParam(); |
| 712 | |
| 713 | rnd_.Reset(ACMRandom::DeterministicSeed()); |
| 714 | src_ = reinterpret_cast<uint16_t *>( |
| 715 | aom_memalign(16, block_size() * sizeof(src_))); |
| 716 | dst_ = reinterpret_cast<uint16_t *>( |
| 717 | aom_memalign(16, block_size() * sizeof(dst_))); |
| 718 | ASSERT_TRUE(src_ != NULL); |
| 719 | ASSERT_TRUE(dst_ != NULL); |
| 720 | } |
| 721 | |
| 722 | virtual void TearDown() { |
| 723 | aom_free(src_); |
| 724 | aom_free(dst_); |
| 725 | src_ = NULL; |
| 726 | dst_ = NULL; |
| 727 | libaom_test::ClearSystemState(); |
| 728 | } |
| 729 | |
| 730 | protected: |
| 731 | void RefMatchTestMse(); |
| 732 | void SpeedTest(); |
| 733 | |
| 734 | protected: |
| 735 | ACMRandom rnd_; |
| 736 | uint16_t *dst_; |
| 737 | uint16_t *src_; |
| 738 | TestParams<FunctionType> params_; |
| 739 | |
| 740 | // some relay helpers |
| 741 | int block_size() const { return params_.block_size; } |
| 742 | int width() const { return params_.width; } |
| 743 | int d_stride() const { return params_.width; } // stride is same as width |
| 744 | int s_stride() const { return params_.width; } // stride is same as width |
| 745 | int height() const { return params_.height; } |
| 746 | int mask() const { return params_.mask; } |
| 747 | }; |
| 748 | |
| 749 | template <typename MseHBDWxHFunctionType> |
| 750 | void MseHBDWxHTestClass<MseHBDWxHFunctionType>::SpeedTest() { |
| 751 | aom_usec_timer ref_timer, test_timer; |
| 752 | double elapsed_time_c = 0; |
| 753 | double elapsed_time_simd = 0; |
| 754 | int run_time = 10000000; |
| 755 | int w = width(); |
| 756 | int h = height(); |
| 757 | int dstride = d_stride(); |
| 758 | int sstride = s_stride(); |
| 759 | for (int k = 0; k < block_size(); ++k) { |
| 760 | dst_[k] = rnd_.Rand16() & mask(); |
| 761 | src_[k] = rnd_.Rand16() & mask(); |
| 762 | } |
| 763 | aom_usec_timer_start(&ref_timer); |
| 764 | for (int i = 0; i < run_time; i++) { |
| 765 | aom_mse_wxh_16bit_highbd_c(dst_, dstride, src_, sstride, w, h); |
| 766 | } |
| 767 | aom_usec_timer_mark(&ref_timer); |
| 768 | elapsed_time_c = static_cast<double>(aom_usec_timer_elapsed(&ref_timer)); |
| 769 | |
| 770 | aom_usec_timer_start(&test_timer); |
| 771 | for (int i = 0; i < run_time; i++) { |
| 772 | params_.func(dst_, dstride, src_, sstride, w, h); |
| 773 | } |
| 774 | aom_usec_timer_mark(&test_timer); |
| 775 | elapsed_time_simd = static_cast<double>(aom_usec_timer_elapsed(&test_timer)); |
| 776 | |
| 777 | printf("%dx%d\tc_time=%lf \t simd_time=%lf \t gain=%lf\n", width(), height(), |
| 778 | elapsed_time_c, elapsed_time_simd, |
| 779 | (elapsed_time_c / elapsed_time_simd)); |
| 780 | } |
| 781 | |
| 782 | template <typename MseHBDWxHFunctionType> |
| 783 | void MseHBDWxHTestClass<MseHBDWxHFunctionType>::RefMatchTestMse() { |
| 784 | uint64_t mse_ref = 0; |
| 785 | uint64_t mse_mod = 0; |
| 786 | int w = width(); |
| 787 | int h = height(); |
| 788 | int dstride = d_stride(); |
| 789 | int sstride = s_stride(); |
| 790 | for (int i = 0; i < 10; i++) { |
| 791 | for (int k = 0; k < block_size(); ++k) { |
| 792 | dst_[k] = rnd_.Rand16() & mask(); |
| 793 | src_[k] = rnd_.Rand16() & mask(); |
| 794 | } |
| 795 | ASM_REGISTER_STATE_CHECK(mse_ref = aom_mse_wxh_16bit_highbd_c( |
| 796 | dst_, dstride, src_, sstride, w, h)); |
| 797 | ASM_REGISTER_STATE_CHECK( |
| 798 | mse_mod = params_.func(dst_, dstride, src_, sstride, w, h)); |
| 799 | EXPECT_EQ(mse_ref, mse_mod) |
| 800 | << "ref mse: " << mse_ref << " mod mse: " << mse_mod; |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | typedef TestParams<MseHBDWxH16bitFunc> MseHBDWxHParams; |
| 805 | typedef MseHBDWxHTestClass<MseHBDWxH16bitFunc> MseHBDWxHTest; |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 806 | typedef MainTestClass<VarianceMxNFunc> AvxHBDMseTest; |
chiyotsai | 9dfac72 | 2020-07-07 17:43:02 -0700 | [diff] [blame] | 807 | GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AvxHBDMseTest); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 808 | typedef MainTestClass<VarianceMxNFunc> AvxHBDVarianceTest; |
| 809 | typedef SubpelVarianceTest<SubpixVarMxNFunc> AvxHBDSubpelVarianceTest; |
| 810 | typedef SubpelVarianceTest<SubpixAvgVarMxNFunc> AvxHBDSubpelAvgVarianceTest; |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 811 | typedef ObmcVarianceTest<ObmcSubpelVarFunc> AvxHBDObmcSubpelVarianceTest; |
chiyotsai | 9dfac72 | 2020-07-07 17:43:02 -0700 | [diff] [blame] | 812 | GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AvxHBDObmcSubpelVarianceTest); |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 813 | |
Satish Kumar Suman | 217ac1c | 2020-05-19 14:37:35 +0530 | [diff] [blame] | 814 | TEST_P(MseHBDWxHTest, RefMse) { RefMatchTestMse(); } |
| 815 | TEST_P(MseHBDWxHTest, DISABLED_SpeedMse) { SpeedTest(); } |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 816 | TEST_P(AvxHBDMseTest, RefMse) { RefTestMse(); } |
| 817 | TEST_P(AvxHBDMseTest, MaxMse) { MaxTestMse(); } |
| 818 | TEST_P(AvxHBDVarianceTest, Zero) { ZeroTest(); } |
| 819 | TEST_P(AvxHBDVarianceTest, Ref) { RefTest(); } |
| 820 | TEST_P(AvxHBDVarianceTest, RefStride) { RefStrideTest(); } |
| 821 | TEST_P(AvxHBDVarianceTest, OneQuarter) { OneQuarterTest(); } |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 822 | TEST_P(AvxHBDVarianceTest, DISABLED_Speed) { SpeedTest(); } |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 823 | TEST_P(AvxHBDSubpelVarianceTest, Ref) { RefTest(); } |
| 824 | TEST_P(AvxHBDSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); } |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 825 | TEST_P(AvxHBDSubpelVarianceTest, DISABLED_Speed) { SpeedTest(); } |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 826 | TEST_P(AvxHBDSubpelAvgVarianceTest, Ref) { RefTest(); } |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 827 | |
Wan-Teh Chang | fefa8f0 | 2020-12-03 10:17:33 -0800 | [diff] [blame] | 828 | INSTANTIATE_TEST_SUITE_P( |
| 829 | C, MseHBDWxHTest, |
| 830 | ::testing::Values(MseHBDWxHParams(3, 3, &aom_mse_wxh_16bit_highbd_c, 10), |
| 831 | MseHBDWxHParams(3, 2, &aom_mse_wxh_16bit_highbd_c, 10), |
| 832 | MseHBDWxHParams(2, 3, &aom_mse_wxh_16bit_highbd_c, 10), |
| 833 | MseHBDWxHParams(2, 2, &aom_mse_wxh_16bit_highbd_c, 10))); |
| 834 | |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 835 | /* TODO(debargha): This test does not support the highbd version |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 836 | INSTANTIATE_TEST_SUITE_P( |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 837 | C, AvxHBDMseTest, |
| 838 | ::testing::Values(make_tuple(4, 4, &aom_highbd_12_mse16x16_c), |
| 839 | make_tuple(4, 4, &aom_highbd_12_mse16x8_c), |
| 840 | make_tuple(4, 4, &aom_highbd_12_mse8x16_c), |
| 841 | make_tuple(4, 4, &aom_highbd_12_mse8x8_c), |
| 842 | make_tuple(4, 4, &aom_highbd_10_mse16x16_c), |
| 843 | make_tuple(4, 4, &aom_highbd_10_mse16x8_c), |
| 844 | make_tuple(4, 4, &aom_highbd_10_mse8x16_c), |
| 845 | make_tuple(4, 4, &aom_highbd_10_mse8x8_c), |
| 846 | make_tuple(4, 4, &aom_highbd_8_mse16x16_c), |
| 847 | make_tuple(4, 4, &aom_highbd_8_mse16x8_c), |
| 848 | make_tuple(4, 4, &aom_highbd_8_mse8x16_c), |
| 849 | make_tuple(4, 4, &aom_highbd_8_mse8x8_c))); |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 850 | */ |
| 851 | |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 852 | const VarianceParams kArrayHBDVariance_c[] = { |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 853 | VarianceParams(7, 7, &aom_highbd_12_variance128x128_c, 12), |
| 854 | VarianceParams(7, 6, &aom_highbd_12_variance128x64_c, 12), |
| 855 | VarianceParams(6, 7, &aom_highbd_12_variance64x128_c, 12), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 856 | VarianceParams(6, 6, &aom_highbd_12_variance64x64_c, 12), |
| 857 | VarianceParams(6, 5, &aom_highbd_12_variance64x32_c, 12), |
| 858 | VarianceParams(5, 6, &aom_highbd_12_variance32x64_c, 12), |
| 859 | VarianceParams(5, 5, &aom_highbd_12_variance32x32_c, 12), |
| 860 | VarianceParams(5, 4, &aom_highbd_12_variance32x16_c, 12), |
| 861 | VarianceParams(4, 5, &aom_highbd_12_variance16x32_c, 12), |
| 862 | VarianceParams(4, 4, &aom_highbd_12_variance16x16_c, 12), |
| 863 | VarianceParams(4, 3, &aom_highbd_12_variance16x8_c, 12), |
| 864 | VarianceParams(3, 4, &aom_highbd_12_variance8x16_c, 12), |
| 865 | VarianceParams(3, 3, &aom_highbd_12_variance8x8_c, 12), |
| 866 | VarianceParams(3, 2, &aom_highbd_12_variance8x4_c, 12), |
| 867 | VarianceParams(2, 3, &aom_highbd_12_variance4x8_c, 12), |
| 868 | VarianceParams(2, 2, &aom_highbd_12_variance4x4_c, 12), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 869 | VarianceParams(7, 7, &aom_highbd_10_variance128x128_c, 10), |
| 870 | VarianceParams(7, 6, &aom_highbd_10_variance128x64_c, 10), |
| 871 | VarianceParams(6, 7, &aom_highbd_10_variance64x128_c, 10), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 872 | VarianceParams(6, 6, &aom_highbd_10_variance64x64_c, 10), |
| 873 | VarianceParams(6, 5, &aom_highbd_10_variance64x32_c, 10), |
| 874 | VarianceParams(5, 6, &aom_highbd_10_variance32x64_c, 10), |
| 875 | VarianceParams(5, 5, &aom_highbd_10_variance32x32_c, 10), |
| 876 | VarianceParams(5, 4, &aom_highbd_10_variance32x16_c, 10), |
| 877 | VarianceParams(4, 5, &aom_highbd_10_variance16x32_c, 10), |
| 878 | VarianceParams(4, 4, &aom_highbd_10_variance16x16_c, 10), |
| 879 | VarianceParams(4, 3, &aom_highbd_10_variance16x8_c, 10), |
| 880 | VarianceParams(3, 4, &aom_highbd_10_variance8x16_c, 10), |
| 881 | VarianceParams(3, 3, &aom_highbd_10_variance8x8_c, 10), |
| 882 | VarianceParams(3, 2, &aom_highbd_10_variance8x4_c, 10), |
| 883 | VarianceParams(2, 3, &aom_highbd_10_variance4x8_c, 10), |
| 884 | VarianceParams(2, 2, &aom_highbd_10_variance4x4_c, 10), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 885 | VarianceParams(7, 7, &aom_highbd_8_variance128x128_c, 8), |
| 886 | VarianceParams(7, 6, &aom_highbd_8_variance128x64_c, 8), |
| 887 | VarianceParams(6, 7, &aom_highbd_8_variance64x128_c, 8), |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 888 | VarianceParams(6, 6, &aom_highbd_8_variance64x64_c, 8), |
| 889 | VarianceParams(6, 5, &aom_highbd_8_variance64x32_c, 8), |
| 890 | VarianceParams(5, 6, &aom_highbd_8_variance32x64_c, 8), |
| 891 | VarianceParams(5, 5, &aom_highbd_8_variance32x32_c, 8), |
| 892 | VarianceParams(5, 4, &aom_highbd_8_variance32x16_c, 8), |
| 893 | VarianceParams(4, 5, &aom_highbd_8_variance16x32_c, 8), |
| 894 | VarianceParams(4, 4, &aom_highbd_8_variance16x16_c, 8), |
| 895 | VarianceParams(4, 3, &aom_highbd_8_variance16x8_c, 8), |
| 896 | VarianceParams(3, 4, &aom_highbd_8_variance8x16_c, 8), |
| 897 | VarianceParams(3, 3, &aom_highbd_8_variance8x8_c, 8), |
| 898 | VarianceParams(3, 2, &aom_highbd_8_variance8x4_c, 8), |
| 899 | VarianceParams(2, 3, &aom_highbd_8_variance4x8_c, 8), |
Debargha Mukherjee | 90f256f | 2019-07-16 21:02:16 -0700 | [diff] [blame] | 900 | VarianceParams(2, 2, &aom_highbd_8_variance4x4_c, 8), |
| 901 | |
| 902 | VarianceParams(6, 4, &aom_highbd_12_variance64x16_c, 12), |
| 903 | VarianceParams(4, 6, &aom_highbd_12_variance16x64_c, 12), |
| 904 | VarianceParams(5, 3, &aom_highbd_12_variance32x8_c, 12), |
| 905 | VarianceParams(3, 5, &aom_highbd_12_variance8x32_c, 12), |
| 906 | VarianceParams(4, 2, &aom_highbd_12_variance16x4_c, 12), |
| 907 | VarianceParams(2, 4, &aom_highbd_12_variance4x16_c, 12), |
| 908 | VarianceParams(6, 4, &aom_highbd_10_variance64x16_c, 10), |
| 909 | VarianceParams(4, 6, &aom_highbd_10_variance16x64_c, 10), |
| 910 | VarianceParams(5, 3, &aom_highbd_10_variance32x8_c, 10), |
| 911 | VarianceParams(3, 5, &aom_highbd_10_variance8x32_c, 10), |
| 912 | VarianceParams(4, 2, &aom_highbd_10_variance16x4_c, 10), |
| 913 | VarianceParams(2, 4, &aom_highbd_10_variance4x16_c, 10), |
| 914 | VarianceParams(6, 4, &aom_highbd_8_variance64x16_c, 8), |
| 915 | VarianceParams(4, 6, &aom_highbd_8_variance16x64_c, 8), |
| 916 | VarianceParams(5, 3, &aom_highbd_8_variance32x8_c, 8), |
| 917 | VarianceParams(3, 5, &aom_highbd_8_variance8x32_c, 8), |
| 918 | VarianceParams(4, 2, &aom_highbd_8_variance16x4_c, 8), |
| 919 | VarianceParams(2, 4, &aom_highbd_8_variance4x16_c, 8), |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 920 | }; |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 921 | INSTANTIATE_TEST_SUITE_P(C, AvxHBDVarianceTest, |
| 922 | ::testing::ValuesIn(kArrayHBDVariance_c)); |
Johann | 6a82f0d | 2015-06-05 09:54:19 -0700 | [diff] [blame] | 923 | |
Yaowu Xu | d3e7c68 | 2017-12-21 14:08:25 -0800 | [diff] [blame] | 924 | #if HAVE_SSE4_1 |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 925 | INSTANTIATE_TEST_SUITE_P( |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 926 | SSE4_1, AvxHBDVarianceTest, |
skal | 8dbbcda | 2016-07-13 17:33:22 -0700 | [diff] [blame] | 927 | ::testing::Values( |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 928 | VarianceParams(2, 2, &aom_highbd_8_variance4x4_sse4_1, 8), |
| 929 | VarianceParams(2, 2, &aom_highbd_10_variance4x4_sse4_1, 10), |
| 930 | VarianceParams(2, 2, &aom_highbd_12_variance4x4_sse4_1, 12))); |
Yaowu Xu | d3e7c68 | 2017-12-21 14:08:25 -0800 | [diff] [blame] | 931 | #endif // HAVE_SSE4_1 |
Yi Luo | c249689 | 2016-04-08 11:16:30 -0700 | [diff] [blame] | 932 | |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 933 | const SubpelVarianceParams kArrayHBDSubpelVariance_c[] = { |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 934 | SubpelVarianceParams(7, 7, &aom_highbd_8_sub_pixel_variance128x128_c, 8), |
| 935 | SubpelVarianceParams(7, 6, &aom_highbd_8_sub_pixel_variance128x64_c, 8), |
| 936 | SubpelVarianceParams(6, 7, &aom_highbd_8_sub_pixel_variance64x128_c, 8), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 937 | SubpelVarianceParams(6, 6, &aom_highbd_8_sub_pixel_variance64x64_c, 8), |
| 938 | SubpelVarianceParams(6, 5, &aom_highbd_8_sub_pixel_variance64x32_c, 8), |
| 939 | SubpelVarianceParams(5, 6, &aom_highbd_8_sub_pixel_variance32x64_c, 8), |
| 940 | SubpelVarianceParams(5, 5, &aom_highbd_8_sub_pixel_variance32x32_c, 8), |
| 941 | SubpelVarianceParams(5, 4, &aom_highbd_8_sub_pixel_variance32x16_c, 8), |
| 942 | SubpelVarianceParams(4, 5, &aom_highbd_8_sub_pixel_variance16x32_c, 8), |
| 943 | SubpelVarianceParams(4, 4, &aom_highbd_8_sub_pixel_variance16x16_c, 8), |
| 944 | SubpelVarianceParams(4, 3, &aom_highbd_8_sub_pixel_variance16x8_c, 8), |
| 945 | SubpelVarianceParams(3, 4, &aom_highbd_8_sub_pixel_variance8x16_c, 8), |
| 946 | SubpelVarianceParams(3, 3, &aom_highbd_8_sub_pixel_variance8x8_c, 8), |
| 947 | SubpelVarianceParams(3, 2, &aom_highbd_8_sub_pixel_variance8x4_c, 8), |
| 948 | SubpelVarianceParams(2, 3, &aom_highbd_8_sub_pixel_variance4x8_c, 8), |
| 949 | SubpelVarianceParams(2, 2, &aom_highbd_8_sub_pixel_variance4x4_c, 8), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 950 | SubpelVarianceParams(7, 7, &aom_highbd_10_sub_pixel_variance128x128_c, 10), |
| 951 | SubpelVarianceParams(7, 6, &aom_highbd_10_sub_pixel_variance128x64_c, 10), |
| 952 | SubpelVarianceParams(6, 7, &aom_highbd_10_sub_pixel_variance64x128_c, 10), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 953 | SubpelVarianceParams(6, 6, &aom_highbd_10_sub_pixel_variance64x64_c, 10), |
| 954 | SubpelVarianceParams(6, 5, &aom_highbd_10_sub_pixel_variance64x32_c, 10), |
| 955 | SubpelVarianceParams(5, 6, &aom_highbd_10_sub_pixel_variance32x64_c, 10), |
| 956 | SubpelVarianceParams(5, 5, &aom_highbd_10_sub_pixel_variance32x32_c, 10), |
| 957 | SubpelVarianceParams(5, 4, &aom_highbd_10_sub_pixel_variance32x16_c, 10), |
| 958 | SubpelVarianceParams(4, 5, &aom_highbd_10_sub_pixel_variance16x32_c, 10), |
| 959 | SubpelVarianceParams(4, 4, &aom_highbd_10_sub_pixel_variance16x16_c, 10), |
| 960 | SubpelVarianceParams(4, 3, &aom_highbd_10_sub_pixel_variance16x8_c, 10), |
| 961 | SubpelVarianceParams(3, 4, &aom_highbd_10_sub_pixel_variance8x16_c, 10), |
| 962 | SubpelVarianceParams(3, 3, &aom_highbd_10_sub_pixel_variance8x8_c, 10), |
| 963 | SubpelVarianceParams(3, 2, &aom_highbd_10_sub_pixel_variance8x4_c, 10), |
| 964 | SubpelVarianceParams(2, 3, &aom_highbd_10_sub_pixel_variance4x8_c, 10), |
| 965 | SubpelVarianceParams(2, 2, &aom_highbd_10_sub_pixel_variance4x4_c, 10), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 966 | SubpelVarianceParams(7, 7, &aom_highbd_12_sub_pixel_variance128x128_c, 12), |
| 967 | SubpelVarianceParams(7, 6, &aom_highbd_12_sub_pixel_variance128x64_c, 12), |
| 968 | SubpelVarianceParams(6, 7, &aom_highbd_12_sub_pixel_variance64x128_c, 12), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 969 | SubpelVarianceParams(6, 6, &aom_highbd_12_sub_pixel_variance64x64_c, 12), |
| 970 | SubpelVarianceParams(6, 5, &aom_highbd_12_sub_pixel_variance64x32_c, 12), |
| 971 | SubpelVarianceParams(5, 6, &aom_highbd_12_sub_pixel_variance32x64_c, 12), |
| 972 | SubpelVarianceParams(5, 5, &aom_highbd_12_sub_pixel_variance32x32_c, 12), |
| 973 | SubpelVarianceParams(5, 4, &aom_highbd_12_sub_pixel_variance32x16_c, 12), |
| 974 | SubpelVarianceParams(4, 5, &aom_highbd_12_sub_pixel_variance16x32_c, 12), |
| 975 | SubpelVarianceParams(4, 4, &aom_highbd_12_sub_pixel_variance16x16_c, 12), |
| 976 | SubpelVarianceParams(4, 3, &aom_highbd_12_sub_pixel_variance16x8_c, 12), |
| 977 | SubpelVarianceParams(3, 4, &aom_highbd_12_sub_pixel_variance8x16_c, 12), |
| 978 | SubpelVarianceParams(3, 3, &aom_highbd_12_sub_pixel_variance8x8_c, 12), |
| 979 | SubpelVarianceParams(3, 2, &aom_highbd_12_sub_pixel_variance8x4_c, 12), |
| 980 | SubpelVarianceParams(2, 3, &aom_highbd_12_sub_pixel_variance4x8_c, 12), |
| 981 | SubpelVarianceParams(2, 2, &aom_highbd_12_sub_pixel_variance4x4_c, 12), |
Debargha Mukherjee | 90f256f | 2019-07-16 21:02:16 -0700 | [diff] [blame] | 982 | |
| 983 | SubpelVarianceParams(6, 4, &aom_highbd_8_sub_pixel_variance64x16_c, 8), |
| 984 | SubpelVarianceParams(4, 6, &aom_highbd_8_sub_pixel_variance16x64_c, 8), |
| 985 | SubpelVarianceParams(5, 3, &aom_highbd_8_sub_pixel_variance32x8_c, 8), |
| 986 | SubpelVarianceParams(3, 5, &aom_highbd_8_sub_pixel_variance8x32_c, 8), |
| 987 | SubpelVarianceParams(4, 2, &aom_highbd_8_sub_pixel_variance16x4_c, 8), |
| 988 | SubpelVarianceParams(2, 4, &aom_highbd_8_sub_pixel_variance4x16_c, 8), |
| 989 | SubpelVarianceParams(6, 4, &aom_highbd_10_sub_pixel_variance64x16_c, 10), |
| 990 | SubpelVarianceParams(4, 6, &aom_highbd_10_sub_pixel_variance16x64_c, 10), |
| 991 | SubpelVarianceParams(5, 3, &aom_highbd_10_sub_pixel_variance32x8_c, 10), |
| 992 | SubpelVarianceParams(3, 5, &aom_highbd_10_sub_pixel_variance8x32_c, 10), |
| 993 | SubpelVarianceParams(4, 2, &aom_highbd_10_sub_pixel_variance16x4_c, 10), |
| 994 | SubpelVarianceParams(2, 4, &aom_highbd_10_sub_pixel_variance4x16_c, 10), |
| 995 | SubpelVarianceParams(6, 4, &aom_highbd_12_sub_pixel_variance64x16_c, 12), |
| 996 | SubpelVarianceParams(4, 6, &aom_highbd_12_sub_pixel_variance16x64_c, 12), |
| 997 | SubpelVarianceParams(5, 3, &aom_highbd_12_sub_pixel_variance32x8_c, 12), |
| 998 | SubpelVarianceParams(3, 5, &aom_highbd_12_sub_pixel_variance8x32_c, 12), |
| 999 | SubpelVarianceParams(4, 2, &aom_highbd_12_sub_pixel_variance16x4_c, 12), |
| 1000 | SubpelVarianceParams(2, 4, &aom_highbd_12_sub_pixel_variance4x16_c, 12), |
Alex Converse | 25de2e1 | 2016-04-27 12:23:00 -0700 | [diff] [blame] | 1001 | }; |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1002 | INSTANTIATE_TEST_SUITE_P(C, AvxHBDSubpelVarianceTest, |
| 1003 | ::testing::ValuesIn(kArrayHBDSubpelVariance_c)); |
Johann | 6a82f0d | 2015-06-05 09:54:19 -0700 | [diff] [blame] | 1004 | |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1005 | const SubpelAvgVarianceParams kArrayHBDSubpelAvgVariance_c[] = { |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1006 | SubpelAvgVarianceParams(7, 7, &aom_highbd_8_sub_pixel_avg_variance128x128_c, |
| 1007 | 8), |
| 1008 | SubpelAvgVarianceParams(7, 6, &aom_highbd_8_sub_pixel_avg_variance128x64_c, |
| 1009 | 8), |
| 1010 | SubpelAvgVarianceParams(6, 7, &aom_highbd_8_sub_pixel_avg_variance64x128_c, |
| 1011 | 8), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1012 | SubpelAvgVarianceParams(6, 6, &aom_highbd_8_sub_pixel_avg_variance64x64_c, 8), |
| 1013 | SubpelAvgVarianceParams(6, 5, &aom_highbd_8_sub_pixel_avg_variance64x32_c, 8), |
| 1014 | SubpelAvgVarianceParams(5, 6, &aom_highbd_8_sub_pixel_avg_variance32x64_c, 8), |
| 1015 | SubpelAvgVarianceParams(5, 5, &aom_highbd_8_sub_pixel_avg_variance32x32_c, 8), |
| 1016 | SubpelAvgVarianceParams(5, 4, &aom_highbd_8_sub_pixel_avg_variance32x16_c, 8), |
| 1017 | SubpelAvgVarianceParams(4, 5, &aom_highbd_8_sub_pixel_avg_variance16x32_c, 8), |
| 1018 | SubpelAvgVarianceParams(4, 4, &aom_highbd_8_sub_pixel_avg_variance16x16_c, 8), |
| 1019 | SubpelAvgVarianceParams(4, 3, &aom_highbd_8_sub_pixel_avg_variance16x8_c, 8), |
| 1020 | SubpelAvgVarianceParams(3, 4, &aom_highbd_8_sub_pixel_avg_variance8x16_c, 8), |
| 1021 | SubpelAvgVarianceParams(3, 3, &aom_highbd_8_sub_pixel_avg_variance8x8_c, 8), |
| 1022 | SubpelAvgVarianceParams(3, 2, &aom_highbd_8_sub_pixel_avg_variance8x4_c, 8), |
| 1023 | SubpelAvgVarianceParams(2, 3, &aom_highbd_8_sub_pixel_avg_variance4x8_c, 8), |
| 1024 | SubpelAvgVarianceParams(2, 2, &aom_highbd_8_sub_pixel_avg_variance4x4_c, 8), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1025 | SubpelAvgVarianceParams(7, 7, &aom_highbd_10_sub_pixel_avg_variance128x128_c, |
| 1026 | 10), |
| 1027 | SubpelAvgVarianceParams(7, 6, &aom_highbd_10_sub_pixel_avg_variance128x64_c, |
| 1028 | 10), |
| 1029 | SubpelAvgVarianceParams(6, 7, &aom_highbd_10_sub_pixel_avg_variance64x128_c, |
| 1030 | 10), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1031 | SubpelAvgVarianceParams(6, 6, &aom_highbd_10_sub_pixel_avg_variance64x64_c, |
| 1032 | 10), |
| 1033 | SubpelAvgVarianceParams(6, 5, &aom_highbd_10_sub_pixel_avg_variance64x32_c, |
| 1034 | 10), |
| 1035 | SubpelAvgVarianceParams(5, 6, &aom_highbd_10_sub_pixel_avg_variance32x64_c, |
| 1036 | 10), |
| 1037 | SubpelAvgVarianceParams(5, 5, &aom_highbd_10_sub_pixel_avg_variance32x32_c, |
| 1038 | 10), |
| 1039 | SubpelAvgVarianceParams(5, 4, &aom_highbd_10_sub_pixel_avg_variance32x16_c, |
| 1040 | 10), |
| 1041 | SubpelAvgVarianceParams(4, 5, &aom_highbd_10_sub_pixel_avg_variance16x32_c, |
| 1042 | 10), |
| 1043 | SubpelAvgVarianceParams(4, 4, &aom_highbd_10_sub_pixel_avg_variance16x16_c, |
| 1044 | 10), |
| 1045 | SubpelAvgVarianceParams(4, 3, &aom_highbd_10_sub_pixel_avg_variance16x8_c, |
| 1046 | 10), |
| 1047 | SubpelAvgVarianceParams(3, 4, &aom_highbd_10_sub_pixel_avg_variance8x16_c, |
| 1048 | 10), |
| 1049 | SubpelAvgVarianceParams(3, 3, &aom_highbd_10_sub_pixel_avg_variance8x8_c, 10), |
| 1050 | SubpelAvgVarianceParams(3, 2, &aom_highbd_10_sub_pixel_avg_variance8x4_c, 10), |
| 1051 | SubpelAvgVarianceParams(2, 3, &aom_highbd_10_sub_pixel_avg_variance4x8_c, 10), |
| 1052 | SubpelAvgVarianceParams(2, 2, &aom_highbd_10_sub_pixel_avg_variance4x4_c, 10), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1053 | SubpelAvgVarianceParams(7, 7, &aom_highbd_12_sub_pixel_avg_variance128x128_c, |
| 1054 | 12), |
| 1055 | SubpelAvgVarianceParams(7, 6, &aom_highbd_12_sub_pixel_avg_variance128x64_c, |
| 1056 | 12), |
| 1057 | SubpelAvgVarianceParams(6, 7, &aom_highbd_12_sub_pixel_avg_variance64x128_c, |
| 1058 | 12), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1059 | SubpelAvgVarianceParams(6, 6, &aom_highbd_12_sub_pixel_avg_variance64x64_c, |
| 1060 | 12), |
| 1061 | SubpelAvgVarianceParams(6, 5, &aom_highbd_12_sub_pixel_avg_variance64x32_c, |
| 1062 | 12), |
| 1063 | SubpelAvgVarianceParams(5, 6, &aom_highbd_12_sub_pixel_avg_variance32x64_c, |
| 1064 | 12), |
| 1065 | SubpelAvgVarianceParams(5, 5, &aom_highbd_12_sub_pixel_avg_variance32x32_c, |
| 1066 | 12), |
| 1067 | SubpelAvgVarianceParams(5, 4, &aom_highbd_12_sub_pixel_avg_variance32x16_c, |
| 1068 | 12), |
| 1069 | SubpelAvgVarianceParams(4, 5, &aom_highbd_12_sub_pixel_avg_variance16x32_c, |
| 1070 | 12), |
| 1071 | SubpelAvgVarianceParams(4, 4, &aom_highbd_12_sub_pixel_avg_variance16x16_c, |
| 1072 | 12), |
| 1073 | SubpelAvgVarianceParams(4, 3, &aom_highbd_12_sub_pixel_avg_variance16x8_c, |
| 1074 | 12), |
| 1075 | SubpelAvgVarianceParams(3, 4, &aom_highbd_12_sub_pixel_avg_variance8x16_c, |
| 1076 | 12), |
| 1077 | SubpelAvgVarianceParams(3, 3, &aom_highbd_12_sub_pixel_avg_variance8x8_c, 12), |
| 1078 | SubpelAvgVarianceParams(3, 2, &aom_highbd_12_sub_pixel_avg_variance8x4_c, 12), |
| 1079 | SubpelAvgVarianceParams(2, 3, &aom_highbd_12_sub_pixel_avg_variance4x8_c, 12), |
Debargha Mukherjee | 90f256f | 2019-07-16 21:02:16 -0700 | [diff] [blame] | 1080 | SubpelAvgVarianceParams(2, 2, &aom_highbd_12_sub_pixel_avg_variance4x4_c, 12), |
| 1081 | |
| 1082 | SubpelAvgVarianceParams(6, 4, &aom_highbd_8_sub_pixel_avg_variance64x16_c, 8), |
| 1083 | SubpelAvgVarianceParams(4, 6, &aom_highbd_8_sub_pixel_avg_variance16x64_c, 8), |
| 1084 | SubpelAvgVarianceParams(5, 3, &aom_highbd_8_sub_pixel_avg_variance32x8_c, 8), |
| 1085 | SubpelAvgVarianceParams(3, 5, &aom_highbd_8_sub_pixel_avg_variance8x32_c, 8), |
| 1086 | SubpelAvgVarianceParams(4, 2, &aom_highbd_8_sub_pixel_avg_variance16x4_c, 8), |
| 1087 | SubpelAvgVarianceParams(2, 4, &aom_highbd_8_sub_pixel_avg_variance4x16_c, 8), |
| 1088 | SubpelAvgVarianceParams(6, 4, &aom_highbd_10_sub_pixel_avg_variance64x16_c, |
| 1089 | 10), |
| 1090 | SubpelAvgVarianceParams(4, 6, &aom_highbd_10_sub_pixel_avg_variance16x64_c, |
| 1091 | 10), |
| 1092 | SubpelAvgVarianceParams(5, 3, &aom_highbd_10_sub_pixel_avg_variance32x8_c, |
| 1093 | 10), |
| 1094 | SubpelAvgVarianceParams(3, 5, &aom_highbd_10_sub_pixel_avg_variance8x32_c, |
| 1095 | 10), |
| 1096 | SubpelAvgVarianceParams(4, 2, &aom_highbd_10_sub_pixel_avg_variance16x4_c, |
| 1097 | 10), |
| 1098 | SubpelAvgVarianceParams(2, 4, &aom_highbd_10_sub_pixel_avg_variance4x16_c, |
| 1099 | 10), |
| 1100 | SubpelAvgVarianceParams(6, 4, &aom_highbd_12_sub_pixel_avg_variance64x16_c, |
| 1101 | 12), |
| 1102 | SubpelAvgVarianceParams(4, 6, &aom_highbd_12_sub_pixel_avg_variance16x64_c, |
| 1103 | 12), |
| 1104 | SubpelAvgVarianceParams(5, 3, &aom_highbd_12_sub_pixel_avg_variance32x8_c, |
| 1105 | 12), |
| 1106 | SubpelAvgVarianceParams(3, 5, &aom_highbd_12_sub_pixel_avg_variance8x32_c, |
| 1107 | 12), |
| 1108 | SubpelAvgVarianceParams(4, 2, &aom_highbd_12_sub_pixel_avg_variance16x4_c, |
| 1109 | 12), |
| 1110 | SubpelAvgVarianceParams(2, 4, &aom_highbd_12_sub_pixel_avg_variance4x16_c, |
| 1111 | 12), |
Alex Converse | 25de2e1 | 2016-04-27 12:23:00 -0700 | [diff] [blame] | 1112 | }; |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1113 | INSTANTIATE_TEST_SUITE_P(C, AvxHBDSubpelAvgVarianceTest, |
| 1114 | ::testing::ValuesIn(kArrayHBDSubpelAvgVariance_c)); |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 1115 | |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 1116 | const ObmcSubpelVarianceParams kArrayHBDObmcSubpelVariance_c[] = { |
| 1117 | ObmcSubpelVarianceParams(7, 7, &aom_highbd_obmc_sub_pixel_variance128x128_c, |
| 1118 | 8), |
| 1119 | ObmcSubpelVarianceParams(7, 6, &aom_highbd_obmc_sub_pixel_variance128x64_c, |
| 1120 | 8), |
| 1121 | ObmcSubpelVarianceParams(6, 7, &aom_highbd_obmc_sub_pixel_variance64x128_c, |
| 1122 | 8), |
| 1123 | ObmcSubpelVarianceParams(6, 6, &aom_highbd_obmc_sub_pixel_variance64x64_c, 8), |
| 1124 | ObmcSubpelVarianceParams(6, 5, &aom_highbd_obmc_sub_pixel_variance64x32_c, 8), |
| 1125 | ObmcSubpelVarianceParams(5, 6, &aom_highbd_obmc_sub_pixel_variance32x64_c, 8), |
| 1126 | ObmcSubpelVarianceParams(5, 5, &aom_highbd_obmc_sub_pixel_variance32x32_c, 8), |
| 1127 | ObmcSubpelVarianceParams(5, 4, &aom_highbd_obmc_sub_pixel_variance32x16_c, 8), |
| 1128 | ObmcSubpelVarianceParams(4, 5, &aom_highbd_obmc_sub_pixel_variance16x32_c, 8), |
| 1129 | ObmcSubpelVarianceParams(4, 4, &aom_highbd_obmc_sub_pixel_variance16x16_c, 8), |
| 1130 | ObmcSubpelVarianceParams(4, 3, &aom_highbd_obmc_sub_pixel_variance16x8_c, 8), |
| 1131 | ObmcSubpelVarianceParams(3, 4, &aom_highbd_obmc_sub_pixel_variance8x16_c, 8), |
| 1132 | ObmcSubpelVarianceParams(3, 3, &aom_highbd_obmc_sub_pixel_variance8x8_c, 8), |
| 1133 | ObmcSubpelVarianceParams(3, 2, &aom_highbd_obmc_sub_pixel_variance8x4_c, 8), |
| 1134 | ObmcSubpelVarianceParams(2, 3, &aom_highbd_obmc_sub_pixel_variance4x8_c, 8), |
| 1135 | ObmcSubpelVarianceParams(2, 2, &aom_highbd_obmc_sub_pixel_variance4x4_c, 8), |
| 1136 | ObmcSubpelVarianceParams(7, 7, |
| 1137 | &aom_highbd_10_obmc_sub_pixel_variance128x128_c, 10), |
| 1138 | ObmcSubpelVarianceParams(7, 6, &aom_highbd_10_obmc_sub_pixel_variance128x64_c, |
| 1139 | 10), |
| 1140 | ObmcSubpelVarianceParams(6, 7, &aom_highbd_10_obmc_sub_pixel_variance64x128_c, |
| 1141 | 10), |
| 1142 | ObmcSubpelVarianceParams(6, 6, &aom_highbd_10_obmc_sub_pixel_variance64x64_c, |
| 1143 | 10), |
| 1144 | ObmcSubpelVarianceParams(6, 5, &aom_highbd_10_obmc_sub_pixel_variance64x32_c, |
| 1145 | 10), |
| 1146 | ObmcSubpelVarianceParams(5, 6, &aom_highbd_10_obmc_sub_pixel_variance32x64_c, |
| 1147 | 10), |
| 1148 | ObmcSubpelVarianceParams(5, 5, &aom_highbd_10_obmc_sub_pixel_variance32x32_c, |
| 1149 | 10), |
| 1150 | ObmcSubpelVarianceParams(5, 4, &aom_highbd_10_obmc_sub_pixel_variance32x16_c, |
| 1151 | 10), |
| 1152 | ObmcSubpelVarianceParams(4, 5, &aom_highbd_10_obmc_sub_pixel_variance16x32_c, |
| 1153 | 10), |
| 1154 | ObmcSubpelVarianceParams(4, 4, &aom_highbd_10_obmc_sub_pixel_variance16x16_c, |
| 1155 | 10), |
| 1156 | ObmcSubpelVarianceParams(4, 3, &aom_highbd_10_obmc_sub_pixel_variance16x8_c, |
| 1157 | 10), |
| 1158 | ObmcSubpelVarianceParams(3, 4, &aom_highbd_10_obmc_sub_pixel_variance8x16_c, |
| 1159 | 10), |
| 1160 | ObmcSubpelVarianceParams(3, 3, &aom_highbd_10_obmc_sub_pixel_variance8x8_c, |
| 1161 | 10), |
| 1162 | ObmcSubpelVarianceParams(3, 2, &aom_highbd_10_obmc_sub_pixel_variance8x4_c, |
| 1163 | 10), |
| 1164 | ObmcSubpelVarianceParams(2, 3, &aom_highbd_10_obmc_sub_pixel_variance4x8_c, |
| 1165 | 10), |
| 1166 | ObmcSubpelVarianceParams(2, 2, &aom_highbd_10_obmc_sub_pixel_variance4x4_c, |
| 1167 | 10), |
| 1168 | ObmcSubpelVarianceParams(7, 7, |
| 1169 | &aom_highbd_12_obmc_sub_pixel_variance128x128_c, 12), |
| 1170 | ObmcSubpelVarianceParams(7, 6, &aom_highbd_12_obmc_sub_pixel_variance128x64_c, |
| 1171 | 12), |
| 1172 | ObmcSubpelVarianceParams(6, 7, &aom_highbd_12_obmc_sub_pixel_variance64x128_c, |
| 1173 | 12), |
| 1174 | ObmcSubpelVarianceParams(6, 6, &aom_highbd_12_obmc_sub_pixel_variance64x64_c, |
| 1175 | 12), |
| 1176 | ObmcSubpelVarianceParams(6, 5, &aom_highbd_12_obmc_sub_pixel_variance64x32_c, |
| 1177 | 12), |
| 1178 | ObmcSubpelVarianceParams(5, 6, &aom_highbd_12_obmc_sub_pixel_variance32x64_c, |
| 1179 | 12), |
| 1180 | ObmcSubpelVarianceParams(5, 5, &aom_highbd_12_obmc_sub_pixel_variance32x32_c, |
| 1181 | 12), |
| 1182 | ObmcSubpelVarianceParams(5, 4, &aom_highbd_12_obmc_sub_pixel_variance32x16_c, |
| 1183 | 12), |
| 1184 | ObmcSubpelVarianceParams(4, 5, &aom_highbd_12_obmc_sub_pixel_variance16x32_c, |
| 1185 | 12), |
| 1186 | ObmcSubpelVarianceParams(4, 4, &aom_highbd_12_obmc_sub_pixel_variance16x16_c, |
| 1187 | 12), |
| 1188 | ObmcSubpelVarianceParams(4, 3, &aom_highbd_12_obmc_sub_pixel_variance16x8_c, |
| 1189 | 12), |
| 1190 | ObmcSubpelVarianceParams(3, 4, &aom_highbd_12_obmc_sub_pixel_variance8x16_c, |
| 1191 | 12), |
| 1192 | ObmcSubpelVarianceParams(3, 3, &aom_highbd_12_obmc_sub_pixel_variance8x8_c, |
| 1193 | 12), |
| 1194 | ObmcSubpelVarianceParams(3, 2, &aom_highbd_12_obmc_sub_pixel_variance8x4_c, |
| 1195 | 12), |
| 1196 | ObmcSubpelVarianceParams(2, 3, &aom_highbd_12_obmc_sub_pixel_variance4x8_c, |
| 1197 | 12), |
| 1198 | ObmcSubpelVarianceParams(2, 2, &aom_highbd_12_obmc_sub_pixel_variance4x4_c, |
Debargha Mukherjee | 90f256f | 2019-07-16 21:02:16 -0700 | [diff] [blame] | 1199 | 12), |
| 1200 | |
| 1201 | ObmcSubpelVarianceParams(6, 4, &aom_highbd_obmc_sub_pixel_variance64x16_c, 8), |
| 1202 | ObmcSubpelVarianceParams(4, 6, &aom_highbd_obmc_sub_pixel_variance16x64_c, 8), |
| 1203 | ObmcSubpelVarianceParams(5, 3, &aom_highbd_obmc_sub_pixel_variance32x8_c, 8), |
| 1204 | ObmcSubpelVarianceParams(3, 5, &aom_highbd_obmc_sub_pixel_variance8x32_c, 8), |
| 1205 | ObmcSubpelVarianceParams(4, 2, &aom_highbd_obmc_sub_pixel_variance16x4_c, 8), |
| 1206 | ObmcSubpelVarianceParams(2, 4, &aom_highbd_obmc_sub_pixel_variance4x16_c, 8), |
| 1207 | ObmcSubpelVarianceParams(6, 4, &aom_highbd_10_obmc_sub_pixel_variance64x16_c, |
| 1208 | 10), |
| 1209 | ObmcSubpelVarianceParams(4, 6, &aom_highbd_10_obmc_sub_pixel_variance16x64_c, |
| 1210 | 10), |
| 1211 | ObmcSubpelVarianceParams(5, 3, &aom_highbd_10_obmc_sub_pixel_variance32x8_c, |
| 1212 | 10), |
| 1213 | ObmcSubpelVarianceParams(3, 5, &aom_highbd_10_obmc_sub_pixel_variance8x32_c, |
| 1214 | 10), |
| 1215 | ObmcSubpelVarianceParams(4, 2, &aom_highbd_10_obmc_sub_pixel_variance16x4_c, |
| 1216 | 10), |
| 1217 | ObmcSubpelVarianceParams(2, 4, &aom_highbd_10_obmc_sub_pixel_variance4x16_c, |
| 1218 | 10), |
| 1219 | ObmcSubpelVarianceParams(6, 4, &aom_highbd_12_obmc_sub_pixel_variance64x16_c, |
| 1220 | 12), |
| 1221 | ObmcSubpelVarianceParams(4, 6, &aom_highbd_12_obmc_sub_pixel_variance16x64_c, |
| 1222 | 12), |
| 1223 | ObmcSubpelVarianceParams(5, 3, &aom_highbd_12_obmc_sub_pixel_variance32x8_c, |
| 1224 | 12), |
| 1225 | ObmcSubpelVarianceParams(3, 5, &aom_highbd_12_obmc_sub_pixel_variance8x32_c, |
| 1226 | 12), |
| 1227 | ObmcSubpelVarianceParams(4, 2, &aom_highbd_12_obmc_sub_pixel_variance16x4_c, |
| 1228 | 12), |
| 1229 | ObmcSubpelVarianceParams(2, 4, &aom_highbd_12_obmc_sub_pixel_variance4x16_c, |
| 1230 | 12), |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 1231 | }; |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1232 | INSTANTIATE_TEST_SUITE_P(C, AvxHBDObmcSubpelVarianceTest, |
| 1233 | ::testing::ValuesIn(kArrayHBDObmcSubpelVariance_c)); |
Kyle Siefring | 6042d90 | 2018-06-12 00:33:17 -0400 | [diff] [blame] | 1234 | |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 1235 | #if HAVE_SSE2 |
Satish Kumar Suman | da29bc3 | 2020-05-18 13:50:58 +0530 | [diff] [blame] | 1236 | INSTANTIATE_TEST_SUITE_P( |
Satish Kumar Suman | 154af70 | 2020-05-21 12:35:29 +0530 | [diff] [blame] | 1237 | SSE2, MseHBDWxHTest, |
| 1238 | ::testing::Values(MseHBDWxHParams(3, 3, &aom_mse_wxh_16bit_highbd_sse2, 10), |
| 1239 | MseHBDWxHParams(3, 2, &aom_mse_wxh_16bit_highbd_sse2, 10), |
| 1240 | MseHBDWxHParams(2, 3, &aom_mse_wxh_16bit_highbd_sse2, 10), |
| 1241 | MseHBDWxHParams(2, 2, &aom_mse_wxh_16bit_highbd_sse2, |
| 1242 | 10))); |
James Almer | 857e93f | 2022-05-25 16:44:43 +0000 | [diff] [blame] | 1243 | |
Yaowu Xu | d3e7c68 | 2017-12-21 14:08:25 -0800 | [diff] [blame] | 1244 | #if HAVE_SSE4_1 |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1245 | INSTANTIATE_TEST_SUITE_P( |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1246 | SSE4_1, AvxSubpelVarianceTest, |
Yi Luo | c249689 | 2016-04-08 11:16:30 -0700 | [diff] [blame] | 1247 | ::testing::Values( |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1248 | SubpelVarianceParams(2, 2, &aom_highbd_8_sub_pixel_variance4x4_sse4_1, |
| 1249 | 8), |
| 1250 | SubpelVarianceParams(2, 2, &aom_highbd_10_sub_pixel_variance4x4_sse4_1, |
| 1251 | 10), |
| 1252 | SubpelVarianceParams(2, 2, &aom_highbd_12_sub_pixel_variance4x4_sse4_1, |
| 1253 | 12))); |
Yi Luo | c249689 | 2016-04-08 11:16:30 -0700 | [diff] [blame] | 1254 | |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1255 | INSTANTIATE_TEST_SUITE_P( |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1256 | SSE4_1, AvxSubpelAvgVarianceTest, |
Yi Luo | c249689 | 2016-04-08 11:16:30 -0700 | [diff] [blame] | 1257 | ::testing::Values( |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1258 | SubpelAvgVarianceParams(2, 2, |
| 1259 | &aom_highbd_8_sub_pixel_avg_variance4x4_sse4_1, |
| 1260 | 8), |
| 1261 | SubpelAvgVarianceParams(2, 2, |
| 1262 | &aom_highbd_10_sub_pixel_avg_variance4x4_sse4_1, |
| 1263 | 10), |
| 1264 | SubpelAvgVarianceParams(2, 2, |
| 1265 | &aom_highbd_12_sub_pixel_avg_variance4x4_sse4_1, |
| 1266 | 12))); |
Yaowu Xu | d3e7c68 | 2017-12-21 14:08:25 -0800 | [diff] [blame] | 1267 | #endif // HAVE_SSE4_1 |
Yi Luo | c249689 | 2016-04-08 11:16:30 -0700 | [diff] [blame] | 1268 | |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 1269 | /* TODO(debargha): This test does not support the highbd version |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1270 | INSTANTIATE_TEST_SUITE_P( |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1271 | SSE2, AvxHBDMseTest, |
| 1272 | ::testing::Values(MseParams(4, 4, &aom_highbd_12_mse16x16_sse2), |
| 1273 | MseParams(4, 3, &aom_highbd_12_mse16x8_sse2), |
| 1274 | MseParams(3, 4, &aom_highbd_12_mse8x16_sse2), |
| 1275 | MseParams(3, 3, &aom_highbd_12_mse8x8_sse2), |
| 1276 | MseParams(4, 4, &aom_highbd_10_mse16x16_sse2), |
| 1277 | MseParams(4, 3, &aom_highbd_10_mse16x8_sse2), |
| 1278 | MseParams(3, 4, &aom_highbd_10_mse8x16_sse2), |
| 1279 | MseParams(3, 3, &aom_highbd_10_mse8x8_sse2), |
| 1280 | MseParams(4, 4, &aom_highbd_8_mse16x16_sse2), |
| 1281 | MseParams(4, 3, &aom_highbd_8_mse16x8_sse2), |
| 1282 | MseParams(3, 4, &aom_highbd_8_mse8x16_sse2), |
| 1283 | MseParams(3, 3, &aom_highbd_8_mse8x8_sse2))); |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 1284 | */ |
| 1285 | |
Wan-Teh Chang | 7c01d22 | 2018-09-04 15:09:42 -0700 | [diff] [blame] | 1286 | const VarianceParams kArrayHBDVariance_sse2[] = { |
| 1287 | VarianceParams(7, 7, &aom_highbd_12_variance128x128_sse2, 12), |
| 1288 | VarianceParams(7, 6, &aom_highbd_12_variance128x64_sse2, 12), |
| 1289 | VarianceParams(6, 7, &aom_highbd_12_variance64x128_sse2, 12), |
| 1290 | VarianceParams(6, 6, &aom_highbd_12_variance64x64_sse2, 12), |
| 1291 | VarianceParams(6, 5, &aom_highbd_12_variance64x32_sse2, 12), |
| 1292 | VarianceParams(5, 6, &aom_highbd_12_variance32x64_sse2, 12), |
| 1293 | VarianceParams(5, 5, &aom_highbd_12_variance32x32_sse2, 12), |
| 1294 | VarianceParams(5, 4, &aom_highbd_12_variance32x16_sse2, 12), |
| 1295 | VarianceParams(4, 5, &aom_highbd_12_variance16x32_sse2, 12), |
| 1296 | VarianceParams(4, 4, &aom_highbd_12_variance16x16_sse2, 12), |
| 1297 | VarianceParams(4, 3, &aom_highbd_12_variance16x8_sse2, 12), |
| 1298 | VarianceParams(3, 4, &aom_highbd_12_variance8x16_sse2, 12), |
| 1299 | VarianceParams(3, 3, &aom_highbd_12_variance8x8_sse2, 12), |
| 1300 | VarianceParams(7, 7, &aom_highbd_10_variance128x128_sse2, 10), |
| 1301 | VarianceParams(7, 6, &aom_highbd_10_variance128x64_sse2, 10), |
| 1302 | VarianceParams(6, 7, &aom_highbd_10_variance64x128_sse2, 10), |
| 1303 | VarianceParams(6, 6, &aom_highbd_10_variance64x64_sse2, 10), |
| 1304 | VarianceParams(6, 5, &aom_highbd_10_variance64x32_sse2, 10), |
| 1305 | VarianceParams(5, 6, &aom_highbd_10_variance32x64_sse2, 10), |
| 1306 | VarianceParams(5, 5, &aom_highbd_10_variance32x32_sse2, 10), |
| 1307 | VarianceParams(5, 4, &aom_highbd_10_variance32x16_sse2, 10), |
| 1308 | VarianceParams(4, 5, &aom_highbd_10_variance16x32_sse2, 10), |
| 1309 | VarianceParams(4, 4, &aom_highbd_10_variance16x16_sse2, 10), |
| 1310 | VarianceParams(4, 3, &aom_highbd_10_variance16x8_sse2, 10), |
| 1311 | VarianceParams(3, 4, &aom_highbd_10_variance8x16_sse2, 10), |
| 1312 | VarianceParams(3, 3, &aom_highbd_10_variance8x8_sse2, 10), |
| 1313 | VarianceParams(7, 7, &aom_highbd_8_variance128x128_sse2, 8), |
| 1314 | VarianceParams(7, 6, &aom_highbd_8_variance128x64_sse2, 8), |
| 1315 | VarianceParams(6, 7, &aom_highbd_8_variance64x128_sse2, 8), |
| 1316 | VarianceParams(6, 6, &aom_highbd_8_variance64x64_sse2, 8), |
| 1317 | VarianceParams(6, 5, &aom_highbd_8_variance64x32_sse2, 8), |
| 1318 | VarianceParams(5, 6, &aom_highbd_8_variance32x64_sse2, 8), |
| 1319 | VarianceParams(5, 5, &aom_highbd_8_variance32x32_sse2, 8), |
| 1320 | VarianceParams(5, 4, &aom_highbd_8_variance32x16_sse2, 8), |
| 1321 | VarianceParams(4, 5, &aom_highbd_8_variance16x32_sse2, 8), |
| 1322 | VarianceParams(4, 4, &aom_highbd_8_variance16x16_sse2, 8), |
| 1323 | VarianceParams(4, 3, &aom_highbd_8_variance16x8_sse2, 8), |
| 1324 | VarianceParams(3, 4, &aom_highbd_8_variance8x16_sse2, 8), |
Debargha Mukherjee | 90f256f | 2019-07-16 21:02:16 -0700 | [diff] [blame] | 1325 | VarianceParams(3, 3, &aom_highbd_8_variance8x8_sse2, 8), |
| 1326 | |
| 1327 | VarianceParams(6, 4, &aom_highbd_12_variance64x16_sse2, 12), |
| 1328 | VarianceParams(4, 6, &aom_highbd_12_variance16x64_sse2, 12), |
| 1329 | VarianceParams(5, 3, &aom_highbd_12_variance32x8_sse2, 12), |
| 1330 | VarianceParams(3, 5, &aom_highbd_12_variance8x32_sse2, 12), |
| 1331 | // VarianceParams(4, 2, &aom_highbd_12_variance16x4_sse2, 12), |
| 1332 | // VarianceParams(2, 4, &aom_highbd_12_variance4x16_sse2, 12), |
| 1333 | VarianceParams(6, 4, &aom_highbd_10_variance64x16_sse2, 10), |
| 1334 | VarianceParams(4, 6, &aom_highbd_10_variance16x64_sse2, 10), |
| 1335 | VarianceParams(5, 3, &aom_highbd_10_variance32x8_sse2, 10), |
| 1336 | VarianceParams(3, 5, &aom_highbd_10_variance8x32_sse2, 10), |
| 1337 | // VarianceParams(4, 2, &aom_highbd_10_variance16x4_sse2, 10), |
| 1338 | // VarianceParams(2, 4, &aom_highbd_10_variance4x16_sse2, 10), |
| 1339 | VarianceParams(6, 4, &aom_highbd_8_variance64x16_sse2, 8), |
| 1340 | VarianceParams(4, 6, &aom_highbd_8_variance16x64_sse2, 8), |
| 1341 | VarianceParams(5, 3, &aom_highbd_8_variance32x8_sse2, 8), |
| 1342 | VarianceParams(3, 5, &aom_highbd_8_variance8x32_sse2, 8), |
| 1343 | // VarianceParams(4, 2, &aom_highbd_8_variance16x4_sse2, 8), |
| 1344 | // VarianceParams(2, 4, &aom_highbd_8_variance4x16_sse2, 8), |
Wan-Teh Chang | 7c01d22 | 2018-09-04 15:09:42 -0700 | [diff] [blame] | 1345 | }; |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1346 | INSTANTIATE_TEST_SUITE_P(SSE2, AvxHBDVarianceTest, |
| 1347 | ::testing::ValuesIn(kArrayHBDVariance_sse2)); |
Johann | c3bdffb | 2015-05-15 11:52:03 -0700 | [diff] [blame] | 1348 | |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 1349 | #if HAVE_AVX2 |
| 1350 | |
Satish Kumar Suman | 217ac1c | 2020-05-19 14:37:35 +0530 | [diff] [blame] | 1351 | INSTANTIATE_TEST_SUITE_P( |
| 1352 | AVX2, MseHBDWxHTest, |
| 1353 | ::testing::Values(MseHBDWxHParams(3, 3, &aom_mse_wxh_16bit_highbd_avx2, 10), |
| 1354 | MseHBDWxHParams(3, 2, &aom_mse_wxh_16bit_highbd_avx2, 10), |
| 1355 | MseHBDWxHParams(2, 3, &aom_mse_wxh_16bit_highbd_avx2, 10), |
| 1356 | MseHBDWxHParams(2, 2, &aom_mse_wxh_16bit_highbd_avx2, |
| 1357 | 10))); |
| 1358 | |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 1359 | const VarianceParams kArrayHBDVariance_avx2[] = { |
| 1360 | VarianceParams(7, 7, &aom_highbd_10_variance128x128_avx2, 10), |
| 1361 | VarianceParams(7, 6, &aom_highbd_10_variance128x64_avx2, 10), |
| 1362 | VarianceParams(6, 7, &aom_highbd_10_variance64x128_avx2, 10), |
| 1363 | VarianceParams(6, 6, &aom_highbd_10_variance64x64_avx2, 10), |
| 1364 | VarianceParams(6, 5, &aom_highbd_10_variance64x32_avx2, 10), |
| 1365 | VarianceParams(5, 6, &aom_highbd_10_variance32x64_avx2, 10), |
| 1366 | VarianceParams(5, 5, &aom_highbd_10_variance32x32_avx2, 10), |
| 1367 | VarianceParams(5, 4, &aom_highbd_10_variance32x16_avx2, 10), |
| 1368 | VarianceParams(4, 5, &aom_highbd_10_variance16x32_avx2, 10), |
| 1369 | VarianceParams(4, 4, &aom_highbd_10_variance16x16_avx2, 10), |
| 1370 | VarianceParams(4, 3, &aom_highbd_10_variance16x8_avx2, 10), |
| 1371 | VarianceParams(3, 4, &aom_highbd_10_variance8x16_avx2, 10), |
Debargha Mukherjee | 90f256f | 2019-07-16 21:02:16 -0700 | [diff] [blame] | 1372 | VarianceParams(3, 3, &aom_highbd_10_variance8x8_avx2, 10), |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 1373 | }; |
| 1374 | |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1375 | INSTANTIATE_TEST_SUITE_P(AVX2, AvxHBDVarianceTest, |
| 1376 | ::testing::ValuesIn(kArrayHBDVariance_avx2)); |
Krishna Malladi | 0bf50f8 | 2020-03-05 12:38:24 -0800 | [diff] [blame] | 1377 | |
| 1378 | const SubpelVarianceParams kArrayHBDSubpelVariance_avx2[] = { |
| 1379 | SubpelVarianceParams(7, 7, &aom_highbd_10_sub_pixel_variance128x128_avx2, 10), |
| 1380 | SubpelVarianceParams(7, 6, &aom_highbd_10_sub_pixel_variance128x64_avx2, 10), |
| 1381 | SubpelVarianceParams(6, 7, &aom_highbd_10_sub_pixel_variance64x128_avx2, 10), |
| 1382 | SubpelVarianceParams(6, 6, &aom_highbd_10_sub_pixel_variance64x64_avx2, 10), |
| 1383 | SubpelVarianceParams(6, 5, &aom_highbd_10_sub_pixel_variance64x32_avx2, 10), |
| 1384 | SubpelVarianceParams(5, 6, &aom_highbd_10_sub_pixel_variance32x64_avx2, 10), |
| 1385 | SubpelVarianceParams(5, 5, &aom_highbd_10_sub_pixel_variance32x32_avx2, 10), |
| 1386 | SubpelVarianceParams(5, 4, &aom_highbd_10_sub_pixel_variance32x16_avx2, 10), |
| 1387 | SubpelVarianceParams(4, 5, &aom_highbd_10_sub_pixel_variance16x32_avx2, 10), |
| 1388 | SubpelVarianceParams(4, 4, &aom_highbd_10_sub_pixel_variance16x16_avx2, 10), |
| 1389 | SubpelVarianceParams(4, 3, &aom_highbd_10_sub_pixel_variance16x8_avx2, 10), |
Krishna Malladi | 3f42636 | 2020-07-08 10:50:16 -0700 | [diff] [blame] | 1390 | SubpelVarianceParams(3, 4, &aom_highbd_10_sub_pixel_variance8x16_avx2, 10), |
| 1391 | SubpelVarianceParams(3, 3, &aom_highbd_10_sub_pixel_variance8x8_avx2, 10), |
Krishna Malladi | 0bf50f8 | 2020-03-05 12:38:24 -0800 | [diff] [blame] | 1392 | }; |
| 1393 | |
| 1394 | INSTANTIATE_TEST_SUITE_P(AVX2, AvxHBDSubpelVarianceTest, |
| 1395 | ::testing::ValuesIn(kArrayHBDSubpelVariance_avx2)); |
Sachin Kumar Garg | f2b7da0 | 2018-09-06 17:40:49 +0530 | [diff] [blame] | 1396 | #endif // HAVE_AVX2 |
| 1397 | |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1398 | const SubpelVarianceParams kArrayHBDSubpelVariance_sse2[] = { |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 1399 | SubpelVarianceParams(7, 7, &aom_highbd_12_sub_pixel_variance128x128_sse2, 12), |
| 1400 | SubpelVarianceParams(7, 6, &aom_highbd_12_sub_pixel_variance128x64_sse2, 12), |
| 1401 | SubpelVarianceParams(6, 7, &aom_highbd_12_sub_pixel_variance64x128_sse2, 12), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1402 | SubpelVarianceParams(6, 6, &aom_highbd_12_sub_pixel_variance64x64_sse2, 12), |
| 1403 | SubpelVarianceParams(6, 5, &aom_highbd_12_sub_pixel_variance64x32_sse2, 12), |
| 1404 | SubpelVarianceParams(5, 6, &aom_highbd_12_sub_pixel_variance32x64_sse2, 12), |
| 1405 | SubpelVarianceParams(5, 5, &aom_highbd_12_sub_pixel_variance32x32_sse2, 12), |
| 1406 | SubpelVarianceParams(5, 4, &aom_highbd_12_sub_pixel_variance32x16_sse2, 12), |
| 1407 | SubpelVarianceParams(4, 5, &aom_highbd_12_sub_pixel_variance16x32_sse2, 12), |
| 1408 | SubpelVarianceParams(4, 4, &aom_highbd_12_sub_pixel_variance16x16_sse2, 12), |
| 1409 | SubpelVarianceParams(4, 3, &aom_highbd_12_sub_pixel_variance16x8_sse2, 12), |
| 1410 | SubpelVarianceParams(3, 4, &aom_highbd_12_sub_pixel_variance8x16_sse2, 12), |
| 1411 | SubpelVarianceParams(3, 3, &aom_highbd_12_sub_pixel_variance8x8_sse2, 12), |
| 1412 | SubpelVarianceParams(3, 2, &aom_highbd_12_sub_pixel_variance8x4_sse2, 12), |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 1413 | SubpelVarianceParams(7, 7, &aom_highbd_10_sub_pixel_variance128x128_sse2, 10), |
| 1414 | SubpelVarianceParams(7, 6, &aom_highbd_10_sub_pixel_variance128x64_sse2, 10), |
| 1415 | SubpelVarianceParams(6, 7, &aom_highbd_10_sub_pixel_variance64x128_sse2, 10), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1416 | SubpelVarianceParams(6, 6, &aom_highbd_10_sub_pixel_variance64x64_sse2, 10), |
| 1417 | SubpelVarianceParams(6, 5, &aom_highbd_10_sub_pixel_variance64x32_sse2, 10), |
| 1418 | SubpelVarianceParams(5, 6, &aom_highbd_10_sub_pixel_variance32x64_sse2, 10), |
| 1419 | SubpelVarianceParams(5, 5, &aom_highbd_10_sub_pixel_variance32x32_sse2, 10), |
| 1420 | SubpelVarianceParams(5, 4, &aom_highbd_10_sub_pixel_variance32x16_sse2, 10), |
| 1421 | SubpelVarianceParams(4, 5, &aom_highbd_10_sub_pixel_variance16x32_sse2, 10), |
| 1422 | SubpelVarianceParams(4, 4, &aom_highbd_10_sub_pixel_variance16x16_sse2, 10), |
| 1423 | SubpelVarianceParams(4, 3, &aom_highbd_10_sub_pixel_variance16x8_sse2, 10), |
| 1424 | SubpelVarianceParams(3, 4, &aom_highbd_10_sub_pixel_variance8x16_sse2, 10), |
| 1425 | SubpelVarianceParams(3, 3, &aom_highbd_10_sub_pixel_variance8x8_sse2, 10), |
| 1426 | SubpelVarianceParams(3, 2, &aom_highbd_10_sub_pixel_variance8x4_sse2, 10), |
Aniket Dhok | e980281 | 2019-02-13 16:42:22 +0530 | [diff] [blame] | 1427 | SubpelVarianceParams(7, 7, &aom_highbd_8_sub_pixel_variance128x128_sse2, 8), |
| 1428 | SubpelVarianceParams(7, 6, &aom_highbd_8_sub_pixel_variance128x64_sse2, 8), |
| 1429 | SubpelVarianceParams(6, 7, &aom_highbd_8_sub_pixel_variance64x128_sse2, 8), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1430 | SubpelVarianceParams(6, 6, &aom_highbd_8_sub_pixel_variance64x64_sse2, 8), |
| 1431 | SubpelVarianceParams(6, 5, &aom_highbd_8_sub_pixel_variance64x32_sse2, 8), |
| 1432 | SubpelVarianceParams(5, 6, &aom_highbd_8_sub_pixel_variance32x64_sse2, 8), |
| 1433 | SubpelVarianceParams(5, 5, &aom_highbd_8_sub_pixel_variance32x32_sse2, 8), |
| 1434 | SubpelVarianceParams(5, 4, &aom_highbd_8_sub_pixel_variance32x16_sse2, 8), |
| 1435 | SubpelVarianceParams(4, 5, &aom_highbd_8_sub_pixel_variance16x32_sse2, 8), |
| 1436 | SubpelVarianceParams(4, 4, &aom_highbd_8_sub_pixel_variance16x16_sse2, 8), |
| 1437 | SubpelVarianceParams(4, 3, &aom_highbd_8_sub_pixel_variance16x8_sse2, 8), |
| 1438 | SubpelVarianceParams(3, 4, &aom_highbd_8_sub_pixel_variance8x16_sse2, 8), |
| 1439 | SubpelVarianceParams(3, 3, &aom_highbd_8_sub_pixel_variance8x8_sse2, 8), |
Debargha Mukherjee | 90f256f | 2019-07-16 21:02:16 -0700 | [diff] [blame] | 1440 | SubpelVarianceParams(3, 2, &aom_highbd_8_sub_pixel_variance8x4_sse2, 8), |
| 1441 | |
| 1442 | SubpelVarianceParams(6, 4, &aom_highbd_12_sub_pixel_variance64x16_sse2, 12), |
| 1443 | SubpelVarianceParams(4, 6, &aom_highbd_12_sub_pixel_variance16x64_sse2, 12), |
| 1444 | SubpelVarianceParams(5, 3, &aom_highbd_12_sub_pixel_variance32x8_sse2, 12), |
| 1445 | SubpelVarianceParams(3, 5, &aom_highbd_12_sub_pixel_variance8x32_sse2, 12), |
| 1446 | SubpelVarianceParams(4, 2, &aom_highbd_12_sub_pixel_variance16x4_sse2, 12), |
| 1447 | // SubpelVarianceParams(2, 4, &aom_highbd_12_sub_pixel_variance4x16_sse2, 12), |
| 1448 | SubpelVarianceParams(6, 4, &aom_highbd_10_sub_pixel_variance64x16_sse2, 10), |
| 1449 | SubpelVarianceParams(4, 6, &aom_highbd_10_sub_pixel_variance16x64_sse2, 10), |
| 1450 | SubpelVarianceParams(5, 3, &aom_highbd_10_sub_pixel_variance32x8_sse2, 10), |
| 1451 | SubpelVarianceParams(3, 5, &aom_highbd_10_sub_pixel_variance8x32_sse2, 10), |
| 1452 | SubpelVarianceParams(4, 2, &aom_highbd_10_sub_pixel_variance16x4_sse2, 10), |
| 1453 | // SubpelVarianceParams(2, 4, &aom_highbd_10_sub_pixel_variance4x16_sse2, 10), |
| 1454 | SubpelVarianceParams(6, 4, &aom_highbd_8_sub_pixel_variance64x16_sse2, 8), |
| 1455 | SubpelVarianceParams(4, 6, &aom_highbd_8_sub_pixel_variance16x64_sse2, 8), |
| 1456 | SubpelVarianceParams(5, 3, &aom_highbd_8_sub_pixel_variance32x8_sse2, 8), |
| 1457 | SubpelVarianceParams(3, 5, &aom_highbd_8_sub_pixel_variance8x32_sse2, 8), |
| 1458 | SubpelVarianceParams(4, 2, &aom_highbd_8_sub_pixel_variance16x4_sse2, 8), |
| 1459 | // SubpelVarianceParams(2, 4, &aom_highbd_8_sub_pixel_variance4x16_sse2, 8), |
James Zern | a9b275f | 2017-06-20 22:59:23 -0700 | [diff] [blame] | 1460 | }; |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1461 | INSTANTIATE_TEST_SUITE_P(SSE2, AvxHBDSubpelVarianceTest, |
| 1462 | ::testing::ValuesIn(kArrayHBDSubpelVariance_sse2)); |
James Zern | a9b275f | 2017-06-20 22:59:23 -0700 | [diff] [blame] | 1463 | |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1464 | const SubpelAvgVarianceParams kArrayHBDSubpelAvgVariance_sse2[] = { |
| 1465 | SubpelAvgVarianceParams(6, 6, &aom_highbd_12_sub_pixel_avg_variance64x64_sse2, |
| 1466 | 12), |
| 1467 | SubpelAvgVarianceParams(6, 5, &aom_highbd_12_sub_pixel_avg_variance64x32_sse2, |
| 1468 | 12), |
| 1469 | SubpelAvgVarianceParams(5, 6, &aom_highbd_12_sub_pixel_avg_variance32x64_sse2, |
| 1470 | 12), |
| 1471 | SubpelAvgVarianceParams(5, 5, &aom_highbd_12_sub_pixel_avg_variance32x32_sse2, |
| 1472 | 12), |
| 1473 | SubpelAvgVarianceParams(5, 4, &aom_highbd_12_sub_pixel_avg_variance32x16_sse2, |
| 1474 | 12), |
| 1475 | SubpelAvgVarianceParams(4, 5, &aom_highbd_12_sub_pixel_avg_variance16x32_sse2, |
| 1476 | 12), |
| 1477 | SubpelAvgVarianceParams(4, 4, &aom_highbd_12_sub_pixel_avg_variance16x16_sse2, |
| 1478 | 12), |
| 1479 | SubpelAvgVarianceParams(4, 3, &aom_highbd_12_sub_pixel_avg_variance16x8_sse2, |
| 1480 | 12), |
| 1481 | SubpelAvgVarianceParams(3, 4, &aom_highbd_12_sub_pixel_avg_variance8x16_sse2, |
| 1482 | 12), |
| 1483 | SubpelAvgVarianceParams(3, 3, &aom_highbd_12_sub_pixel_avg_variance8x8_sse2, |
| 1484 | 12), |
| 1485 | SubpelAvgVarianceParams(3, 2, &aom_highbd_12_sub_pixel_avg_variance8x4_sse2, |
| 1486 | 12), |
| 1487 | SubpelAvgVarianceParams(6, 6, &aom_highbd_10_sub_pixel_avg_variance64x64_sse2, |
| 1488 | 10), |
| 1489 | SubpelAvgVarianceParams(6, 5, &aom_highbd_10_sub_pixel_avg_variance64x32_sse2, |
| 1490 | 10), |
| 1491 | SubpelAvgVarianceParams(5, 6, &aom_highbd_10_sub_pixel_avg_variance32x64_sse2, |
| 1492 | 10), |
| 1493 | SubpelAvgVarianceParams(5, 5, &aom_highbd_10_sub_pixel_avg_variance32x32_sse2, |
| 1494 | 10), |
| 1495 | SubpelAvgVarianceParams(5, 4, &aom_highbd_10_sub_pixel_avg_variance32x16_sse2, |
| 1496 | 10), |
| 1497 | SubpelAvgVarianceParams(4, 5, &aom_highbd_10_sub_pixel_avg_variance16x32_sse2, |
| 1498 | 10), |
| 1499 | SubpelAvgVarianceParams(4, 4, &aom_highbd_10_sub_pixel_avg_variance16x16_sse2, |
| 1500 | 10), |
| 1501 | SubpelAvgVarianceParams(4, 3, &aom_highbd_10_sub_pixel_avg_variance16x8_sse2, |
| 1502 | 10), |
| 1503 | SubpelAvgVarianceParams(3, 4, &aom_highbd_10_sub_pixel_avg_variance8x16_sse2, |
| 1504 | 10), |
| 1505 | SubpelAvgVarianceParams(3, 3, &aom_highbd_10_sub_pixel_avg_variance8x8_sse2, |
| 1506 | 10), |
| 1507 | SubpelAvgVarianceParams(3, 2, &aom_highbd_10_sub_pixel_avg_variance8x4_sse2, |
| 1508 | 10), |
| 1509 | SubpelAvgVarianceParams(6, 6, &aom_highbd_8_sub_pixel_avg_variance64x64_sse2, |
| 1510 | 8), |
| 1511 | SubpelAvgVarianceParams(6, 5, &aom_highbd_8_sub_pixel_avg_variance64x32_sse2, |
| 1512 | 8), |
| 1513 | SubpelAvgVarianceParams(5, 6, &aom_highbd_8_sub_pixel_avg_variance32x64_sse2, |
| 1514 | 8), |
| 1515 | SubpelAvgVarianceParams(5, 5, &aom_highbd_8_sub_pixel_avg_variance32x32_sse2, |
| 1516 | 8), |
| 1517 | SubpelAvgVarianceParams(5, 4, &aom_highbd_8_sub_pixel_avg_variance32x16_sse2, |
| 1518 | 8), |
| 1519 | SubpelAvgVarianceParams(4, 5, &aom_highbd_8_sub_pixel_avg_variance16x32_sse2, |
| 1520 | 8), |
| 1521 | SubpelAvgVarianceParams(4, 4, &aom_highbd_8_sub_pixel_avg_variance16x16_sse2, |
| 1522 | 8), |
| 1523 | SubpelAvgVarianceParams(4, 3, &aom_highbd_8_sub_pixel_avg_variance16x8_sse2, |
| 1524 | 8), |
| 1525 | SubpelAvgVarianceParams(3, 4, &aom_highbd_8_sub_pixel_avg_variance8x16_sse2, |
| 1526 | 8), |
| 1527 | SubpelAvgVarianceParams(3, 3, &aom_highbd_8_sub_pixel_avg_variance8x8_sse2, |
| 1528 | 8), |
Debargha Mukherjee | 90f256f | 2019-07-16 21:02:16 -0700 | [diff] [blame] | 1529 | SubpelAvgVarianceParams(3, 2, &aom_highbd_8_sub_pixel_avg_variance8x4_sse2, |
| 1530 | 8), |
| 1531 | |
| 1532 | SubpelAvgVarianceParams(6, 4, &aom_highbd_12_sub_pixel_avg_variance64x16_sse2, |
| 1533 | 12), |
| 1534 | SubpelAvgVarianceParams(4, 6, &aom_highbd_12_sub_pixel_avg_variance16x64_sse2, |
| 1535 | 12), |
| 1536 | SubpelAvgVarianceParams(5, 3, &aom_highbd_12_sub_pixel_avg_variance32x8_sse2, |
| 1537 | 12), |
| 1538 | SubpelAvgVarianceParams(3, 5, &aom_highbd_12_sub_pixel_avg_variance8x32_sse2, |
| 1539 | 12), |
| 1540 | SubpelAvgVarianceParams(4, 2, &aom_highbd_12_sub_pixel_avg_variance16x4_sse2, |
| 1541 | 12), |
| 1542 | // SubpelAvgVarianceParams(2, 4, |
| 1543 | // &aom_highbd_12_sub_pixel_avg_variance4x16_sse2, 12), |
| 1544 | SubpelAvgVarianceParams(6, 4, &aom_highbd_10_sub_pixel_avg_variance64x16_sse2, |
| 1545 | 10), |
| 1546 | SubpelAvgVarianceParams(4, 6, &aom_highbd_10_sub_pixel_avg_variance16x64_sse2, |
| 1547 | 10), |
| 1548 | SubpelAvgVarianceParams(5, 3, &aom_highbd_10_sub_pixel_avg_variance32x8_sse2, |
| 1549 | 10), |
| 1550 | SubpelAvgVarianceParams(3, 5, &aom_highbd_10_sub_pixel_avg_variance8x32_sse2, |
| 1551 | 10), |
| 1552 | SubpelAvgVarianceParams(4, 2, &aom_highbd_10_sub_pixel_avg_variance16x4_sse2, |
| 1553 | 10), |
| 1554 | // SubpelAvgVarianceParams(2, 4, |
| 1555 | // &aom_highbd_10_sub_pixel_avg_variance4x16_sse2, 10), |
| 1556 | SubpelAvgVarianceParams(6, 4, &aom_highbd_8_sub_pixel_avg_variance64x16_sse2, |
| 1557 | 8), |
| 1558 | SubpelAvgVarianceParams(4, 6, &aom_highbd_8_sub_pixel_avg_variance16x64_sse2, |
| 1559 | 8), |
| 1560 | SubpelAvgVarianceParams(5, 3, &aom_highbd_8_sub_pixel_avg_variance32x8_sse2, |
| 1561 | 8), |
| 1562 | SubpelAvgVarianceParams(3, 5, &aom_highbd_8_sub_pixel_avg_variance8x32_sse2, |
| 1563 | 8), |
| 1564 | SubpelAvgVarianceParams(4, 2, &aom_highbd_8_sub_pixel_avg_variance16x4_sse2, |
| 1565 | 8), |
| 1566 | // SubpelAvgVarianceParams(2, 4, |
| 1567 | // &aom_highbd_8_sub_pixel_avg_variance4x16_sse2, 8), |
James Zern | d598f04 | 2017-06-20 23:34:05 -0700 | [diff] [blame] | 1568 | }; |
James Zern | a9b275f | 2017-06-20 22:59:23 -0700 | [diff] [blame] | 1569 | |
Cheng Chen | 96786fe | 2020-02-14 17:28:25 -0800 | [diff] [blame] | 1570 | INSTANTIATE_TEST_SUITE_P(SSE2, AvxHBDSubpelAvgVarianceTest, |
| 1571 | ::testing::ValuesIn(kArrayHBDSubpelAvgVariance_sse2)); |
Peter de Rivaz | 48032bf | 2014-10-16 14:00:54 +0100 | [diff] [blame] | 1572 | #endif // HAVE_SSE2 |
James Zern | 9847344 | 2012-11-06 16:58:11 -0800 | [diff] [blame] | 1573 | } // namespace |