xref: /aosp_15_r20/external/libaom/test/sad_test.cc (revision 77c1e3ccc04c968bd2bc212e87364f250e820521)
1*77c1e3ccSAndroid Build Coastguard Worker /*
2*77c1e3ccSAndroid Build Coastguard Worker  * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
3*77c1e3ccSAndroid Build Coastguard Worker  *
4*77c1e3ccSAndroid Build Coastguard Worker  * This source code is subject to the terms of the BSD 2 Clause License and
5*77c1e3ccSAndroid Build Coastguard Worker  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6*77c1e3ccSAndroid Build Coastguard Worker  * was not distributed with this source code in the LICENSE file, you can
7*77c1e3ccSAndroid Build Coastguard Worker  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8*77c1e3ccSAndroid Build Coastguard Worker  * Media Patent License 1.0 was not distributed with this source code in the
9*77c1e3ccSAndroid Build Coastguard Worker  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10*77c1e3ccSAndroid Build Coastguard Worker  */
11*77c1e3ccSAndroid Build Coastguard Worker 
12*77c1e3ccSAndroid Build Coastguard Worker #include <string.h>
13*77c1e3ccSAndroid Build Coastguard Worker #include <limits.h>
14*77c1e3ccSAndroid Build Coastguard Worker #include <stdio.h>
15*77c1e3ccSAndroid Build Coastguard Worker #include <tuple>
16*77c1e3ccSAndroid Build Coastguard Worker 
17*77c1e3ccSAndroid Build Coastguard Worker #include "gtest/gtest.h"
18*77c1e3ccSAndroid Build Coastguard Worker 
19*77c1e3ccSAndroid Build Coastguard Worker #include "config/aom_config.h"
20*77c1e3ccSAndroid Build Coastguard Worker #include "config/aom_dsp_rtcd.h"
21*77c1e3ccSAndroid Build Coastguard Worker 
22*77c1e3ccSAndroid Build Coastguard Worker #include "test/acm_random.h"
23*77c1e3ccSAndroid Build Coastguard Worker #include "test/register_state_check.h"
24*77c1e3ccSAndroid Build Coastguard Worker #include "test/util.h"
25*77c1e3ccSAndroid Build Coastguard Worker #include "aom/aom_codec.h"
26*77c1e3ccSAndroid Build Coastguard Worker #include "aom_mem/aom_mem.h"
27*77c1e3ccSAndroid Build Coastguard Worker #include "aom_ports/mem.h"
28*77c1e3ccSAndroid Build Coastguard Worker 
29*77c1e3ccSAndroid Build Coastguard Worker typedef unsigned int (*SadMxNFunc)(const uint8_t *src_ptr, int src_stride,
30*77c1e3ccSAndroid Build Coastguard Worker                                    const uint8_t *ref_ptr, int ref_stride);
31*77c1e3ccSAndroid Build Coastguard Worker typedef std::tuple<int, int, SadMxNFunc, int> SadMxNParam;
32*77c1e3ccSAndroid Build Coastguard Worker 
33*77c1e3ccSAndroid Build Coastguard Worker typedef unsigned int (*SadSkipMxNFunc)(const uint8_t *src_ptr, int src_stride,
34*77c1e3ccSAndroid Build Coastguard Worker                                        const uint8_t *ref_ptr, int ref_stride);
35*77c1e3ccSAndroid Build Coastguard Worker typedef std::tuple<int, int, SadSkipMxNFunc, int> SadSkipMxNParam;
36*77c1e3ccSAndroid Build Coastguard Worker 
37*77c1e3ccSAndroid Build Coastguard Worker typedef uint32_t (*SadMxNAvgFunc)(const uint8_t *src_ptr, int src_stride,
38*77c1e3ccSAndroid Build Coastguard Worker                                   const uint8_t *ref_ptr, int ref_stride,
39*77c1e3ccSAndroid Build Coastguard Worker                                   const uint8_t *second_pred);
40*77c1e3ccSAndroid Build Coastguard Worker typedef std::tuple<int, int, SadMxNAvgFunc, int> SadMxNAvgParam;
41*77c1e3ccSAndroid Build Coastguard Worker 
42*77c1e3ccSAndroid Build Coastguard Worker typedef unsigned int (*DistWtdSadMxhFunc)(const uint8_t *src_ptr,
43*77c1e3ccSAndroid Build Coastguard Worker                                           int src_stride,
44*77c1e3ccSAndroid Build Coastguard Worker                                           const uint8_t *ref_ptr,
45*77c1e3ccSAndroid Build Coastguard Worker                                           int ref_stride, int width,
46*77c1e3ccSAndroid Build Coastguard Worker                                           int height);
47*77c1e3ccSAndroid Build Coastguard Worker typedef std::tuple<int, int, DistWtdSadMxhFunc, int> DistWtdSadMxhParam;
48*77c1e3ccSAndroid Build Coastguard Worker 
49*77c1e3ccSAndroid Build Coastguard Worker typedef uint32_t (*DistWtdSadMxNAvgFunc)(const uint8_t *src_ptr, int src_stride,
50*77c1e3ccSAndroid Build Coastguard Worker                                          const uint8_t *ref_ptr, int ref_stride,
51*77c1e3ccSAndroid Build Coastguard Worker                                          const uint8_t *second_pred,
52*77c1e3ccSAndroid Build Coastguard Worker                                          const DIST_WTD_COMP_PARAMS *jcp_param);
53*77c1e3ccSAndroid Build Coastguard Worker typedef std::tuple<int, int, DistWtdSadMxNAvgFunc, int> DistWtdSadMxNAvgParam;
54*77c1e3ccSAndroid Build Coastguard Worker 
55*77c1e3ccSAndroid Build Coastguard Worker typedef void (*SadMxNx4Func)(const uint8_t *src_ptr, int src_stride,
56*77c1e3ccSAndroid Build Coastguard Worker                              const uint8_t *const ref_ptr[], int ref_stride,
57*77c1e3ccSAndroid Build Coastguard Worker                              uint32_t *sad_array);
58*77c1e3ccSAndroid Build Coastguard Worker typedef std::tuple<int, int, SadMxNx4Func, int> SadMxNx4Param;
59*77c1e3ccSAndroid Build Coastguard Worker 
60*77c1e3ccSAndroid Build Coastguard Worker typedef void (*SadSkipMxNx4Func)(const uint8_t *src_ptr, int src_stride,
61*77c1e3ccSAndroid Build Coastguard Worker                                  const uint8_t *const ref_ptr[], int ref_stride,
62*77c1e3ccSAndroid Build Coastguard Worker                                  uint32_t *sad_array);
63*77c1e3ccSAndroid Build Coastguard Worker typedef std::tuple<int, int, SadSkipMxNx4Func, int> SadSkipMxNx4Param;
64*77c1e3ccSAndroid Build Coastguard Worker 
65*77c1e3ccSAndroid Build Coastguard Worker typedef void (*SadMxNx4AvgFunc)(const uint8_t *src_ptr, int src_stride,
66*77c1e3ccSAndroid Build Coastguard Worker                                 const uint8_t *const ref_ptr[], int ref_stride,
67*77c1e3ccSAndroid Build Coastguard Worker                                 const uint8_t *second_pred,
68*77c1e3ccSAndroid Build Coastguard Worker                                 uint32_t *sad_array);
69*77c1e3ccSAndroid Build Coastguard Worker typedef std::tuple<int, int, SadMxNx4AvgFunc, int> SadMxNx4AvgParam;
70*77c1e3ccSAndroid Build Coastguard Worker 
71*77c1e3ccSAndroid Build Coastguard Worker using libaom_test::ACMRandom;
72*77c1e3ccSAndroid Build Coastguard Worker 
73*77c1e3ccSAndroid Build Coastguard Worker namespace {
74*77c1e3ccSAndroid Build Coastguard Worker class SADTestBase : public ::testing::Test {
75*77c1e3ccSAndroid Build Coastguard Worker  public:
SADTestBase(int width,int height,int bit_depth)76*77c1e3ccSAndroid Build Coastguard Worker   SADTestBase(int width, int height, int bit_depth)
77*77c1e3ccSAndroid Build Coastguard Worker       : width_(width), height_(height), bd_(bit_depth) {}
78*77c1e3ccSAndroid Build Coastguard Worker 
SetUpTestSuite()79*77c1e3ccSAndroid Build Coastguard Worker   static void SetUpTestSuite() {
80*77c1e3ccSAndroid Build Coastguard Worker     source_data8_ = reinterpret_cast<uint8_t *>(
81*77c1e3ccSAndroid Build Coastguard Worker         aom_memalign(kDataAlignment, kDataBlockSize));
82*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(source_data8_, nullptr);
83*77c1e3ccSAndroid Build Coastguard Worker     reference_data8_ = reinterpret_cast<uint8_t *>(
84*77c1e3ccSAndroid Build Coastguard Worker         aom_memalign(kDataAlignment, kDataBufferSize));
85*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(reference_data8_, nullptr);
86*77c1e3ccSAndroid Build Coastguard Worker     second_pred8_ =
87*77c1e3ccSAndroid Build Coastguard Worker         reinterpret_cast<uint8_t *>(aom_memalign(kDataAlignment, 128 * 128));
88*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(second_pred8_, nullptr);
89*77c1e3ccSAndroid Build Coastguard Worker     comp_pred8_ =
90*77c1e3ccSAndroid Build Coastguard Worker         reinterpret_cast<uint8_t *>(aom_memalign(kDataAlignment, 128 * 128));
91*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(comp_pred8_, nullptr);
92*77c1e3ccSAndroid Build Coastguard Worker     comp_pred8_test_ =
93*77c1e3ccSAndroid Build Coastguard Worker         reinterpret_cast<uint8_t *>(aom_memalign(kDataAlignment, 128 * 128));
94*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(comp_pred8_test_, nullptr);
95*77c1e3ccSAndroid Build Coastguard Worker     source_data16_ = reinterpret_cast<uint16_t *>(
96*77c1e3ccSAndroid Build Coastguard Worker         aom_memalign(kDataAlignment, kDataBlockSize * sizeof(uint16_t)));
97*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(source_data16_, nullptr);
98*77c1e3ccSAndroid Build Coastguard Worker     reference_data16_ = reinterpret_cast<uint16_t *>(
99*77c1e3ccSAndroid Build Coastguard Worker         aom_memalign(kDataAlignment, kDataBufferSize * sizeof(uint16_t)));
100*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(reference_data16_, nullptr);
101*77c1e3ccSAndroid Build Coastguard Worker     second_pred16_ = reinterpret_cast<uint16_t *>(
102*77c1e3ccSAndroid Build Coastguard Worker         aom_memalign(kDataAlignment, 128 * 128 * sizeof(uint16_t)));
103*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(second_pred16_, nullptr);
104*77c1e3ccSAndroid Build Coastguard Worker     comp_pred16_ = reinterpret_cast<uint16_t *>(
105*77c1e3ccSAndroid Build Coastguard Worker         aom_memalign(kDataAlignment, 128 * 128 * sizeof(uint16_t)));
106*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(comp_pred16_, nullptr);
107*77c1e3ccSAndroid Build Coastguard Worker     comp_pred16_test_ = reinterpret_cast<uint16_t *>(
108*77c1e3ccSAndroid Build Coastguard Worker         aom_memalign(kDataAlignment, 128 * 128 * sizeof(uint16_t)));
109*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(comp_pred16_test_, nullptr);
110*77c1e3ccSAndroid Build Coastguard Worker   }
111*77c1e3ccSAndroid Build Coastguard Worker 
TearDownTestSuite()112*77c1e3ccSAndroid Build Coastguard Worker   static void TearDownTestSuite() {
113*77c1e3ccSAndroid Build Coastguard Worker     aom_free(source_data8_);
114*77c1e3ccSAndroid Build Coastguard Worker     source_data8_ = nullptr;
115*77c1e3ccSAndroid Build Coastguard Worker     aom_free(reference_data8_);
116*77c1e3ccSAndroid Build Coastguard Worker     reference_data8_ = nullptr;
117*77c1e3ccSAndroid Build Coastguard Worker     aom_free(second_pred8_);
118*77c1e3ccSAndroid Build Coastguard Worker     second_pred8_ = nullptr;
119*77c1e3ccSAndroid Build Coastguard Worker     aom_free(comp_pred8_);
120*77c1e3ccSAndroid Build Coastguard Worker     comp_pred8_ = nullptr;
121*77c1e3ccSAndroid Build Coastguard Worker     aom_free(comp_pred8_test_);
122*77c1e3ccSAndroid Build Coastguard Worker     comp_pred8_test_ = nullptr;
123*77c1e3ccSAndroid Build Coastguard Worker     aom_free(source_data16_);
124*77c1e3ccSAndroid Build Coastguard Worker     source_data16_ = nullptr;
125*77c1e3ccSAndroid Build Coastguard Worker     aom_free(reference_data16_);
126*77c1e3ccSAndroid Build Coastguard Worker     reference_data16_ = nullptr;
127*77c1e3ccSAndroid Build Coastguard Worker     aom_free(second_pred16_);
128*77c1e3ccSAndroid Build Coastguard Worker     second_pred16_ = nullptr;
129*77c1e3ccSAndroid Build Coastguard Worker     aom_free(comp_pred16_);
130*77c1e3ccSAndroid Build Coastguard Worker     comp_pred16_ = nullptr;
131*77c1e3ccSAndroid Build Coastguard Worker     aom_free(comp_pred16_test_);
132*77c1e3ccSAndroid Build Coastguard Worker     comp_pred16_test_ = nullptr;
133*77c1e3ccSAndroid Build Coastguard Worker   }
134*77c1e3ccSAndroid Build Coastguard Worker 
135*77c1e3ccSAndroid Build Coastguard Worker  protected:
136*77c1e3ccSAndroid Build Coastguard Worker   // Handle up to 4 128x128 blocks, with stride up to 256
137*77c1e3ccSAndroid Build Coastguard Worker   static const int kDataAlignment = 16;
138*77c1e3ccSAndroid Build Coastguard Worker   static const int kDataBlockSize = 128 * 256;
139*77c1e3ccSAndroid Build Coastguard Worker   static const int kDataBufferSize = 4 * kDataBlockSize;
140*77c1e3ccSAndroid Build Coastguard Worker 
SetUp()141*77c1e3ccSAndroid Build Coastguard Worker   void SetUp() override {
142*77c1e3ccSAndroid Build Coastguard Worker     if (bd_ == -1) {
143*77c1e3ccSAndroid Build Coastguard Worker       use_high_bit_depth_ = false;
144*77c1e3ccSAndroid Build Coastguard Worker       bit_depth_ = AOM_BITS_8;
145*77c1e3ccSAndroid Build Coastguard Worker       source_data_ = source_data8_;
146*77c1e3ccSAndroid Build Coastguard Worker       reference_data_ = reference_data8_;
147*77c1e3ccSAndroid Build Coastguard Worker       second_pred_ = second_pred8_;
148*77c1e3ccSAndroid Build Coastguard Worker       comp_pred_ = comp_pred8_;
149*77c1e3ccSAndroid Build Coastguard Worker       comp_pred_test_ = comp_pred8_test_;
150*77c1e3ccSAndroid Build Coastguard Worker     } else {
151*77c1e3ccSAndroid Build Coastguard Worker       use_high_bit_depth_ = true;
152*77c1e3ccSAndroid Build Coastguard Worker       bit_depth_ = static_cast<aom_bit_depth_t>(bd_);
153*77c1e3ccSAndroid Build Coastguard Worker       source_data_ = CONVERT_TO_BYTEPTR(source_data16_);
154*77c1e3ccSAndroid Build Coastguard Worker       reference_data_ = CONVERT_TO_BYTEPTR(reference_data16_);
155*77c1e3ccSAndroid Build Coastguard Worker       second_pred_ = CONVERT_TO_BYTEPTR(second_pred16_);
156*77c1e3ccSAndroid Build Coastguard Worker       comp_pred_ = CONVERT_TO_BYTEPTR(comp_pred16_);
157*77c1e3ccSAndroid Build Coastguard Worker       comp_pred_test_ = CONVERT_TO_BYTEPTR(comp_pred16_test_);
158*77c1e3ccSAndroid Build Coastguard Worker     }
159*77c1e3ccSAndroid Build Coastguard Worker     mask_ = (1 << bit_depth_) - 1;
160*77c1e3ccSAndroid Build Coastguard Worker     source_stride_ = (width_ + 31) & ~31;
161*77c1e3ccSAndroid Build Coastguard Worker     reference_stride_ = width_ * 2;
162*77c1e3ccSAndroid Build Coastguard Worker     rnd_.Reset(ACMRandom::DeterministicSeed());
163*77c1e3ccSAndroid Build Coastguard Worker   }
164*77c1e3ccSAndroid Build Coastguard Worker 
GetReference(int block_idx)165*77c1e3ccSAndroid Build Coastguard Worker   virtual uint8_t *GetReference(int block_idx) {
166*77c1e3ccSAndroid Build Coastguard Worker     if (use_high_bit_depth_)
167*77c1e3ccSAndroid Build Coastguard Worker       return CONVERT_TO_BYTEPTR(CONVERT_TO_SHORTPTR(reference_data_) +
168*77c1e3ccSAndroid Build Coastguard Worker                                 block_idx * kDataBlockSize);
169*77c1e3ccSAndroid Build Coastguard Worker     return reference_data_ + block_idx * kDataBlockSize;
170*77c1e3ccSAndroid Build Coastguard Worker   }
171*77c1e3ccSAndroid Build Coastguard Worker 
172*77c1e3ccSAndroid Build Coastguard Worker   // Sum of Absolute Differences. Given two blocks, calculate the absolute
173*77c1e3ccSAndroid Build Coastguard Worker   // difference between two pixels in the same relative location; accumulate.
ReferenceSAD(int block_idx)174*77c1e3ccSAndroid Build Coastguard Worker   unsigned int ReferenceSAD(int block_idx) {
175*77c1e3ccSAndroid Build Coastguard Worker     unsigned int sad = 0;
176*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const reference8 = GetReference(block_idx);
177*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const source8 = source_data_;
178*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const reference16 =
179*77c1e3ccSAndroid Build Coastguard Worker         CONVERT_TO_SHORTPTR(GetReference(block_idx));
180*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const source16 = CONVERT_TO_SHORTPTR(source_data_);
181*77c1e3ccSAndroid Build Coastguard Worker     for (int h = 0; h < height_; ++h) {
182*77c1e3ccSAndroid Build Coastguard Worker       for (int w = 0; w < width_; ++w) {
183*77c1e3ccSAndroid Build Coastguard Worker         if (!use_high_bit_depth_) {
184*77c1e3ccSAndroid Build Coastguard Worker           sad += abs(source8[h * source_stride_ + w] -
185*77c1e3ccSAndroid Build Coastguard Worker                      reference8[h * reference_stride_ + w]);
186*77c1e3ccSAndroid Build Coastguard Worker         } else {
187*77c1e3ccSAndroid Build Coastguard Worker           sad += abs(source16[h * source_stride_ + w] -
188*77c1e3ccSAndroid Build Coastguard Worker                      reference16[h * reference_stride_ + w]);
189*77c1e3ccSAndroid Build Coastguard Worker         }
190*77c1e3ccSAndroid Build Coastguard Worker       }
191*77c1e3ccSAndroid Build Coastguard Worker     }
192*77c1e3ccSAndroid Build Coastguard Worker     return sad;
193*77c1e3ccSAndroid Build Coastguard Worker   }
194*77c1e3ccSAndroid Build Coastguard Worker 
195*77c1e3ccSAndroid Build Coastguard Worker   // Sum of Absolute Differences Skip rows. Given two blocks,
196*77c1e3ccSAndroid Build Coastguard Worker   // calculate the absolute  difference between two pixels in the same
197*77c1e3ccSAndroid Build Coastguard Worker   // relative location every other row; accumulate and double the result at the
198*77c1e3ccSAndroid Build Coastguard Worker   // end.
ReferenceSADSkip(int block_idx)199*77c1e3ccSAndroid Build Coastguard Worker   unsigned int ReferenceSADSkip(int block_idx) {
200*77c1e3ccSAndroid Build Coastguard Worker     unsigned int sad = 0;
201*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const reference8 = GetReference(block_idx);
202*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const source8 = source_data_;
203*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const reference16 =
204*77c1e3ccSAndroid Build Coastguard Worker         CONVERT_TO_SHORTPTR(GetReference(block_idx));
205*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const source16 = CONVERT_TO_SHORTPTR(source_data_);
206*77c1e3ccSAndroid Build Coastguard Worker     for (int h = 0; h < height_; h += 2) {
207*77c1e3ccSAndroid Build Coastguard Worker       for (int w = 0; w < width_; ++w) {
208*77c1e3ccSAndroid Build Coastguard Worker         if (!use_high_bit_depth_) {
209*77c1e3ccSAndroid Build Coastguard Worker           sad += abs(source8[h * source_stride_ + w] -
210*77c1e3ccSAndroid Build Coastguard Worker                      reference8[h * reference_stride_ + w]);
211*77c1e3ccSAndroid Build Coastguard Worker         } else {
212*77c1e3ccSAndroid Build Coastguard Worker           sad += abs(source16[h * source_stride_ + w] -
213*77c1e3ccSAndroid Build Coastguard Worker                      reference16[h * reference_stride_ + w]);
214*77c1e3ccSAndroid Build Coastguard Worker         }
215*77c1e3ccSAndroid Build Coastguard Worker       }
216*77c1e3ccSAndroid Build Coastguard Worker     }
217*77c1e3ccSAndroid Build Coastguard Worker     return sad * 2;
218*77c1e3ccSAndroid Build Coastguard Worker   }
219*77c1e3ccSAndroid Build Coastguard Worker 
220*77c1e3ccSAndroid Build Coastguard Worker   // Sum of Absolute Differences Average. Given two blocks, and a prediction
221*77c1e3ccSAndroid Build Coastguard Worker   // calculate the absolute difference between one pixel and average of the
222*77c1e3ccSAndroid Build Coastguard Worker   // corresponding and predicted pixels; accumulate.
ReferenceSADavg(int block_idx)223*77c1e3ccSAndroid Build Coastguard Worker   unsigned int ReferenceSADavg(int block_idx) {
224*77c1e3ccSAndroid Build Coastguard Worker     unsigned int sad = 0;
225*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const reference8 = GetReference(block_idx);
226*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const source8 = source_data_;
227*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const second_pred8 = second_pred_;
228*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const reference16 =
229*77c1e3ccSAndroid Build Coastguard Worker         CONVERT_TO_SHORTPTR(GetReference(block_idx));
230*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const source16 = CONVERT_TO_SHORTPTR(source_data_);
231*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const second_pred16 = CONVERT_TO_SHORTPTR(second_pred_);
232*77c1e3ccSAndroid Build Coastguard Worker     for (int h = 0; h < height_; ++h) {
233*77c1e3ccSAndroid Build Coastguard Worker       for (int w = 0; w < width_; ++w) {
234*77c1e3ccSAndroid Build Coastguard Worker         if (!use_high_bit_depth_) {
235*77c1e3ccSAndroid Build Coastguard Worker           const int tmp = second_pred8[h * width_ + w] +
236*77c1e3ccSAndroid Build Coastguard Worker                           reference8[h * reference_stride_ + w];
237*77c1e3ccSAndroid Build Coastguard Worker           const uint8_t comp_pred = ROUND_POWER_OF_TWO(tmp, 1);
238*77c1e3ccSAndroid Build Coastguard Worker           sad += abs(source8[h * source_stride_ + w] - comp_pred);
239*77c1e3ccSAndroid Build Coastguard Worker         } else {
240*77c1e3ccSAndroid Build Coastguard Worker           const int tmp = second_pred16[h * width_ + w] +
241*77c1e3ccSAndroid Build Coastguard Worker                           reference16[h * reference_stride_ + w];
242*77c1e3ccSAndroid Build Coastguard Worker           const uint16_t comp_pred = ROUND_POWER_OF_TWO(tmp, 1);
243*77c1e3ccSAndroid Build Coastguard Worker           sad += abs(source16[h * source_stride_ + w] - comp_pred);
244*77c1e3ccSAndroid Build Coastguard Worker         }
245*77c1e3ccSAndroid Build Coastguard Worker       }
246*77c1e3ccSAndroid Build Coastguard Worker     }
247*77c1e3ccSAndroid Build Coastguard Worker     return sad;
248*77c1e3ccSAndroid Build Coastguard Worker   }
249*77c1e3ccSAndroid Build Coastguard Worker 
ReferenceDistWtdSADavg(int block_idx)250*77c1e3ccSAndroid Build Coastguard Worker   unsigned int ReferenceDistWtdSADavg(int block_idx) {
251*77c1e3ccSAndroid Build Coastguard Worker     unsigned int sad = 0;
252*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const reference8 = GetReference(block_idx);
253*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const source8 = source_data_;
254*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const second_pred8 = second_pred_;
255*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const reference16 =
256*77c1e3ccSAndroid Build Coastguard Worker         CONVERT_TO_SHORTPTR(GetReference(block_idx));
257*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const source16 = CONVERT_TO_SHORTPTR(source_data_);
258*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *const second_pred16 = CONVERT_TO_SHORTPTR(second_pred_);
259*77c1e3ccSAndroid Build Coastguard Worker     for (int h = 0; h < height_; ++h) {
260*77c1e3ccSAndroid Build Coastguard Worker       for (int w = 0; w < width_; ++w) {
261*77c1e3ccSAndroid Build Coastguard Worker         if (!use_high_bit_depth_) {
262*77c1e3ccSAndroid Build Coastguard Worker           const int tmp =
263*77c1e3ccSAndroid Build Coastguard Worker               second_pred8[h * width_ + w] * jcp_param_.bck_offset +
264*77c1e3ccSAndroid Build Coastguard Worker               reference8[h * reference_stride_ + w] * jcp_param_.fwd_offset;
265*77c1e3ccSAndroid Build Coastguard Worker           const uint8_t comp_pred = ROUND_POWER_OF_TWO(tmp, 4);
266*77c1e3ccSAndroid Build Coastguard Worker           sad += abs(source8[h * source_stride_ + w] - comp_pred);
267*77c1e3ccSAndroid Build Coastguard Worker         } else {
268*77c1e3ccSAndroid Build Coastguard Worker           const int tmp =
269*77c1e3ccSAndroid Build Coastguard Worker               second_pred16[h * width_ + w] * jcp_param_.bck_offset +
270*77c1e3ccSAndroid Build Coastguard Worker               reference16[h * reference_stride_ + w] * jcp_param_.fwd_offset;
271*77c1e3ccSAndroid Build Coastguard Worker           const uint16_t comp_pred = ROUND_POWER_OF_TWO(tmp, 4);
272*77c1e3ccSAndroid Build Coastguard Worker           sad += abs(source16[h * source_stride_ + w] - comp_pred);
273*77c1e3ccSAndroid Build Coastguard Worker         }
274*77c1e3ccSAndroid Build Coastguard Worker       }
275*77c1e3ccSAndroid Build Coastguard Worker     }
276*77c1e3ccSAndroid Build Coastguard Worker     return sad;
277*77c1e3ccSAndroid Build Coastguard Worker   }
278*77c1e3ccSAndroid Build Coastguard Worker 
FillConstant(uint8_t * data,int stride,uint16_t fill_constant)279*77c1e3ccSAndroid Build Coastguard Worker   void FillConstant(uint8_t *data, int stride, uint16_t fill_constant) {
280*77c1e3ccSAndroid Build Coastguard Worker     uint8_t *data8 = data;
281*77c1e3ccSAndroid Build Coastguard Worker     uint16_t *data16 = CONVERT_TO_SHORTPTR(data);
282*77c1e3ccSAndroid Build Coastguard Worker     for (int h = 0; h < height_; ++h) {
283*77c1e3ccSAndroid Build Coastguard Worker       for (int w = 0; w < width_; ++w) {
284*77c1e3ccSAndroid Build Coastguard Worker         if (!use_high_bit_depth_) {
285*77c1e3ccSAndroid Build Coastguard Worker           data8[h * stride + w] = static_cast<uint8_t>(fill_constant);
286*77c1e3ccSAndroid Build Coastguard Worker         } else {
287*77c1e3ccSAndroid Build Coastguard Worker           data16[h * stride + w] = fill_constant;
288*77c1e3ccSAndroid Build Coastguard Worker         }
289*77c1e3ccSAndroid Build Coastguard Worker       }
290*77c1e3ccSAndroid Build Coastguard Worker     }
291*77c1e3ccSAndroid Build Coastguard Worker   }
292*77c1e3ccSAndroid Build Coastguard Worker 
FillRandom(uint8_t * data,int stride)293*77c1e3ccSAndroid Build Coastguard Worker   void FillRandom(uint8_t *data, int stride) {
294*77c1e3ccSAndroid Build Coastguard Worker     uint8_t *data8 = data;
295*77c1e3ccSAndroid Build Coastguard Worker     uint16_t *data16 = CONVERT_TO_SHORTPTR(data);
296*77c1e3ccSAndroid Build Coastguard Worker     for (int h = 0; h < height_; ++h) {
297*77c1e3ccSAndroid Build Coastguard Worker       for (int w = 0; w < width_; ++w) {
298*77c1e3ccSAndroid Build Coastguard Worker         if (!use_high_bit_depth_) {
299*77c1e3ccSAndroid Build Coastguard Worker           data8[h * stride + w] = rnd_.Rand8();
300*77c1e3ccSAndroid Build Coastguard Worker         } else {
301*77c1e3ccSAndroid Build Coastguard Worker           data16[h * stride + w] = rnd_.Rand16() & mask_;
302*77c1e3ccSAndroid Build Coastguard Worker         }
303*77c1e3ccSAndroid Build Coastguard Worker       }
304*77c1e3ccSAndroid Build Coastguard Worker     }
305*77c1e3ccSAndroid Build Coastguard Worker   }
306*77c1e3ccSAndroid Build Coastguard Worker 
SADForSpeedTest(unsigned int * results,const uint8_t * const * references)307*77c1e3ccSAndroid Build Coastguard Worker   virtual void SADForSpeedTest(unsigned int *results,
308*77c1e3ccSAndroid Build Coastguard Worker                                const uint8_t *const *references) {
309*77c1e3ccSAndroid Build Coastguard Worker     (void)results;
310*77c1e3ccSAndroid Build Coastguard Worker     (void)references;
311*77c1e3ccSAndroid Build Coastguard Worker   }
312*77c1e3ccSAndroid Build Coastguard Worker 
SpeedSAD()313*77c1e3ccSAndroid Build Coastguard Worker   void SpeedSAD() {
314*77c1e3ccSAndroid Build Coastguard Worker     int test_count = 20000000;
315*77c1e3ccSAndroid Build Coastguard Worker     unsigned int exp_sad[4];
316*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *references[] = { GetReference(0), GetReference(1),
317*77c1e3ccSAndroid Build Coastguard Worker                                     GetReference(2), GetReference(3) };
318*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer timer;
319*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer_start(&timer);
320*77c1e3ccSAndroid Build Coastguard Worker     while (test_count > 0) {
321*77c1e3ccSAndroid Build Coastguard Worker       SADForSpeedTest(exp_sad, references);
322*77c1e3ccSAndroid Build Coastguard Worker       test_count -= 1;
323*77c1e3ccSAndroid Build Coastguard Worker     }
324*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer_mark(&timer);
325*77c1e3ccSAndroid Build Coastguard Worker     const int64_t time = aom_usec_timer_elapsed(&timer) / 1000;
326*77c1e3ccSAndroid Build Coastguard Worker     std::cout << "BLOCK_" << width_ << "X" << height_
327*77c1e3ccSAndroid Build Coastguard Worker               << ", bit_depth:" << bit_depth_ << ",Time: " << time << "ms"
328*77c1e3ccSAndroid Build Coastguard Worker               << std::endl;
329*77c1e3ccSAndroid Build Coastguard Worker   }
330*77c1e3ccSAndroid Build Coastguard Worker 
331*77c1e3ccSAndroid Build Coastguard Worker   int width_, height_, mask_, bd_;
332*77c1e3ccSAndroid Build Coastguard Worker   aom_bit_depth_t bit_depth_;
333*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *source_data_;
334*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *reference_data_;
335*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *second_pred_;
336*77c1e3ccSAndroid Build Coastguard Worker   int source_stride_;
337*77c1e3ccSAndroid Build Coastguard Worker   bool use_high_bit_depth_;
338*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *source_data8_;
339*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *reference_data8_;
340*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *second_pred8_;
341*77c1e3ccSAndroid Build Coastguard Worker   static uint16_t *source_data16_;
342*77c1e3ccSAndroid Build Coastguard Worker   static uint16_t *reference_data16_;
343*77c1e3ccSAndroid Build Coastguard Worker   static uint16_t *second_pred16_;
344*77c1e3ccSAndroid Build Coastguard Worker   int reference_stride_;
345*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *comp_pred_;
346*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *comp_pred8_;
347*77c1e3ccSAndroid Build Coastguard Worker   static uint16_t *comp_pred16_;
348*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *comp_pred_test_;
349*77c1e3ccSAndroid Build Coastguard Worker   static uint8_t *comp_pred8_test_;
350*77c1e3ccSAndroid Build Coastguard Worker   static uint16_t *comp_pred16_test_;
351*77c1e3ccSAndroid Build Coastguard Worker   DIST_WTD_COMP_PARAMS jcp_param_;
352*77c1e3ccSAndroid Build Coastguard Worker 
353*77c1e3ccSAndroid Build Coastguard Worker   ACMRandom rnd_;
354*77c1e3ccSAndroid Build Coastguard Worker };
355*77c1e3ccSAndroid Build Coastguard Worker 
356*77c1e3ccSAndroid Build Coastguard Worker class SADx4Test : public ::testing::WithParamInterface<SadMxNx4Param>,
357*77c1e3ccSAndroid Build Coastguard Worker                   public SADTestBase {
358*77c1e3ccSAndroid Build Coastguard Worker  public:
SADx4Test()359*77c1e3ccSAndroid Build Coastguard Worker   SADx4Test() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
360*77c1e3ccSAndroid Build Coastguard Worker 
361*77c1e3ccSAndroid Build Coastguard Worker  protected:
SADs(unsigned int * results)362*77c1e3ccSAndroid Build Coastguard Worker   void SADs(unsigned int *results) {
363*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *references[] = { GetReference(0), GetReference(1),
364*77c1e3ccSAndroid Build Coastguard Worker                                     GetReference(2), GetReference(3) };
365*77c1e3ccSAndroid Build Coastguard Worker 
366*77c1e3ccSAndroid Build Coastguard Worker     API_REGISTER_STATE_CHECK(GET_PARAM(2)(
367*77c1e3ccSAndroid Build Coastguard Worker         source_data_, source_stride_, references, reference_stride_, results));
368*77c1e3ccSAndroid Build Coastguard Worker   }
369*77c1e3ccSAndroid Build Coastguard Worker 
SADForSpeedTest(unsigned int * results,const uint8_t * const * references)370*77c1e3ccSAndroid Build Coastguard Worker   void SADForSpeedTest(unsigned int *results,
371*77c1e3ccSAndroid Build Coastguard Worker                        const uint8_t *const *references) override {
372*77c1e3ccSAndroid Build Coastguard Worker     GET_PARAM(2)
373*77c1e3ccSAndroid Build Coastguard Worker     (source_data_, source_stride_, references, reference_stride_, results);
374*77c1e3ccSAndroid Build Coastguard Worker   }
375*77c1e3ccSAndroid Build Coastguard Worker 
CheckSADs()376*77c1e3ccSAndroid Build Coastguard Worker   void CheckSADs() {
377*77c1e3ccSAndroid Build Coastguard Worker     unsigned int reference_sad, exp_sad[4];
378*77c1e3ccSAndroid Build Coastguard Worker     SADs(exp_sad);
379*77c1e3ccSAndroid Build Coastguard Worker     for (int block = 0; block < 4; ++block) {
380*77c1e3ccSAndroid Build Coastguard Worker       reference_sad = ReferenceSAD(block);
381*77c1e3ccSAndroid Build Coastguard Worker 
382*77c1e3ccSAndroid Build Coastguard Worker       EXPECT_EQ(reference_sad, exp_sad[block]) << "block " << block;
383*77c1e3ccSAndroid Build Coastguard Worker     }
384*77c1e3ccSAndroid Build Coastguard Worker   }
385*77c1e3ccSAndroid Build Coastguard Worker };
386*77c1e3ccSAndroid Build Coastguard Worker 
387*77c1e3ccSAndroid Build Coastguard Worker class SADx3Test : public ::testing::WithParamInterface<SadMxNx4Param>,
388*77c1e3ccSAndroid Build Coastguard Worker                   public SADTestBase {
389*77c1e3ccSAndroid Build Coastguard Worker  public:
SADx3Test()390*77c1e3ccSAndroid Build Coastguard Worker   SADx3Test() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
391*77c1e3ccSAndroid Build Coastguard Worker 
392*77c1e3ccSAndroid Build Coastguard Worker  protected:
SADs(unsigned int * results)393*77c1e3ccSAndroid Build Coastguard Worker   void SADs(unsigned int *results) {
394*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *references[] = { GetReference(0), GetReference(1),
395*77c1e3ccSAndroid Build Coastguard Worker                                     GetReference(2), GetReference(3) };
396*77c1e3ccSAndroid Build Coastguard Worker 
397*77c1e3ccSAndroid Build Coastguard Worker     GET_PARAM(2)
398*77c1e3ccSAndroid Build Coastguard Worker     (source_data_, source_stride_, references, reference_stride_, results);
399*77c1e3ccSAndroid Build Coastguard Worker   }
400*77c1e3ccSAndroid Build Coastguard Worker 
SADForSpeedTest(unsigned int * results,const uint8_t * const * references)401*77c1e3ccSAndroid Build Coastguard Worker   void SADForSpeedTest(unsigned int *results,
402*77c1e3ccSAndroid Build Coastguard Worker                        const uint8_t *const *references) override {
403*77c1e3ccSAndroid Build Coastguard Worker     GET_PARAM(2)
404*77c1e3ccSAndroid Build Coastguard Worker     (source_data_, source_stride_, references, reference_stride_, results);
405*77c1e3ccSAndroid Build Coastguard Worker   }
406*77c1e3ccSAndroid Build Coastguard Worker 
CheckSADs()407*77c1e3ccSAndroid Build Coastguard Worker   void CheckSADs() {
408*77c1e3ccSAndroid Build Coastguard Worker     unsigned int reference_sad, exp_sad[4];
409*77c1e3ccSAndroid Build Coastguard Worker 
410*77c1e3ccSAndroid Build Coastguard Worker     SADs(exp_sad);
411*77c1e3ccSAndroid Build Coastguard Worker     for (int block = 0; block < 3; ++block) {
412*77c1e3ccSAndroid Build Coastguard Worker       reference_sad = ReferenceSAD(block);
413*77c1e3ccSAndroid Build Coastguard Worker 
414*77c1e3ccSAndroid Build Coastguard Worker       EXPECT_EQ(reference_sad, exp_sad[block]) << "block " << block;
415*77c1e3ccSAndroid Build Coastguard Worker     }
416*77c1e3ccSAndroid Build Coastguard Worker   }
417*77c1e3ccSAndroid Build Coastguard Worker };
418*77c1e3ccSAndroid Build Coastguard Worker 
419*77c1e3ccSAndroid Build Coastguard Worker class SADSkipx4Test : public ::testing::WithParamInterface<SadMxNx4Param>,
420*77c1e3ccSAndroid Build Coastguard Worker                       public SADTestBase {
421*77c1e3ccSAndroid Build Coastguard Worker  public:
SADSkipx4Test()422*77c1e3ccSAndroid Build Coastguard Worker   SADSkipx4Test() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
423*77c1e3ccSAndroid Build Coastguard Worker 
424*77c1e3ccSAndroid Build Coastguard Worker  protected:
SADs(unsigned int * results)425*77c1e3ccSAndroid Build Coastguard Worker   void SADs(unsigned int *results) {
426*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *references[] = { GetReference(0), GetReference(1),
427*77c1e3ccSAndroid Build Coastguard Worker                                     GetReference(2), GetReference(3) };
428*77c1e3ccSAndroid Build Coastguard Worker 
429*77c1e3ccSAndroid Build Coastguard Worker     API_REGISTER_STATE_CHECK(GET_PARAM(2)(
430*77c1e3ccSAndroid Build Coastguard Worker         source_data_, source_stride_, references, reference_stride_, results));
431*77c1e3ccSAndroid Build Coastguard Worker   }
432*77c1e3ccSAndroid Build Coastguard Worker 
CheckSADs()433*77c1e3ccSAndroid Build Coastguard Worker   void CheckSADs() {
434*77c1e3ccSAndroid Build Coastguard Worker     unsigned int reference_sad, exp_sad[4];
435*77c1e3ccSAndroid Build Coastguard Worker 
436*77c1e3ccSAndroid Build Coastguard Worker     SADs(exp_sad);
437*77c1e3ccSAndroid Build Coastguard Worker     for (int block = 0; block < 4; ++block) {
438*77c1e3ccSAndroid Build Coastguard Worker       reference_sad = ReferenceSADSkip(block);
439*77c1e3ccSAndroid Build Coastguard Worker 
440*77c1e3ccSAndroid Build Coastguard Worker       EXPECT_EQ(reference_sad, exp_sad[block]) << "block " << block;
441*77c1e3ccSAndroid Build Coastguard Worker     }
442*77c1e3ccSAndroid Build Coastguard Worker   }
443*77c1e3ccSAndroid Build Coastguard Worker 
SADForSpeedTest(unsigned int * results,const uint8_t * const * references)444*77c1e3ccSAndroid Build Coastguard Worker   void SADForSpeedTest(unsigned int *results,
445*77c1e3ccSAndroid Build Coastguard Worker                        const uint8_t *const *references) override {
446*77c1e3ccSAndroid Build Coastguard Worker     GET_PARAM(2)
447*77c1e3ccSAndroid Build Coastguard Worker     (source_data_, source_stride_, references, reference_stride_, results);
448*77c1e3ccSAndroid Build Coastguard Worker   }
449*77c1e3ccSAndroid Build Coastguard Worker };
450*77c1e3ccSAndroid Build Coastguard Worker 
451*77c1e3ccSAndroid Build Coastguard Worker class SADTest : public ::testing::WithParamInterface<SadMxNParam>,
452*77c1e3ccSAndroid Build Coastguard Worker                 public SADTestBase {
453*77c1e3ccSAndroid Build Coastguard Worker  public:
SADTest()454*77c1e3ccSAndroid Build Coastguard Worker   SADTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
455*77c1e3ccSAndroid Build Coastguard Worker 
456*77c1e3ccSAndroid Build Coastguard Worker  protected:
SAD(int block_idx)457*77c1e3ccSAndroid Build Coastguard Worker   unsigned int SAD(int block_idx) {
458*77c1e3ccSAndroid Build Coastguard Worker     unsigned int ret;
459*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const reference = GetReference(block_idx);
460*77c1e3ccSAndroid Build Coastguard Worker 
461*77c1e3ccSAndroid Build Coastguard Worker     API_REGISTER_STATE_CHECK(ret = GET_PARAM(2)(source_data_, source_stride_,
462*77c1e3ccSAndroid Build Coastguard Worker                                                 reference, reference_stride_));
463*77c1e3ccSAndroid Build Coastguard Worker     return ret;
464*77c1e3ccSAndroid Build Coastguard Worker   }
465*77c1e3ccSAndroid Build Coastguard Worker 
CheckSAD()466*77c1e3ccSAndroid Build Coastguard Worker   void CheckSAD() {
467*77c1e3ccSAndroid Build Coastguard Worker     const unsigned int reference_sad = ReferenceSAD(0);
468*77c1e3ccSAndroid Build Coastguard Worker     const unsigned int exp_sad = SAD(0);
469*77c1e3ccSAndroid Build Coastguard Worker 
470*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_EQ(reference_sad, exp_sad);
471*77c1e3ccSAndroid Build Coastguard Worker   }
472*77c1e3ccSAndroid Build Coastguard Worker 
SADForSpeedTest(unsigned int * results,const uint8_t * const * references)473*77c1e3ccSAndroid Build Coastguard Worker   void SADForSpeedTest(unsigned int *results,
474*77c1e3ccSAndroid Build Coastguard Worker                        const uint8_t *const *references) override {
475*77c1e3ccSAndroid Build Coastguard Worker     GET_PARAM(2)
476*77c1e3ccSAndroid Build Coastguard Worker     (source_data_, source_stride_, references[0], reference_stride_);
477*77c1e3ccSAndroid Build Coastguard Worker     (void)results;
478*77c1e3ccSAndroid Build Coastguard Worker   }
479*77c1e3ccSAndroid Build Coastguard Worker };
480*77c1e3ccSAndroid Build Coastguard Worker 
481*77c1e3ccSAndroid Build Coastguard Worker class SADSkipTest : public ::testing::WithParamInterface<SadMxNParam>,
482*77c1e3ccSAndroid Build Coastguard Worker                     public SADTestBase {
483*77c1e3ccSAndroid Build Coastguard Worker  public:
SADSkipTest()484*77c1e3ccSAndroid Build Coastguard Worker   SADSkipTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
485*77c1e3ccSAndroid Build Coastguard Worker 
486*77c1e3ccSAndroid Build Coastguard Worker  protected:
SAD(int block_idx)487*77c1e3ccSAndroid Build Coastguard Worker   unsigned int SAD(int block_idx) {
488*77c1e3ccSAndroid Build Coastguard Worker     unsigned int ret;
489*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const reference = GetReference(block_idx);
490*77c1e3ccSAndroid Build Coastguard Worker 
491*77c1e3ccSAndroid Build Coastguard Worker     API_REGISTER_STATE_CHECK(ret = GET_PARAM(2)(source_data_, source_stride_,
492*77c1e3ccSAndroid Build Coastguard Worker                                                 reference, reference_stride_));
493*77c1e3ccSAndroid Build Coastguard Worker     return ret;
494*77c1e3ccSAndroid Build Coastguard Worker   }
495*77c1e3ccSAndroid Build Coastguard Worker 
CheckSAD()496*77c1e3ccSAndroid Build Coastguard Worker   void CheckSAD() {
497*77c1e3ccSAndroid Build Coastguard Worker     const unsigned int reference_sad = ReferenceSADSkip(0);
498*77c1e3ccSAndroid Build Coastguard Worker     const unsigned int exp_sad = SAD(0);
499*77c1e3ccSAndroid Build Coastguard Worker 
500*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_EQ(reference_sad, exp_sad);
501*77c1e3ccSAndroid Build Coastguard Worker   }
502*77c1e3ccSAndroid Build Coastguard Worker 
SADForSpeedTest(unsigned int * results,const uint8_t * const * references)503*77c1e3ccSAndroid Build Coastguard Worker   void SADForSpeedTest(unsigned int *results,
504*77c1e3ccSAndroid Build Coastguard Worker                        const uint8_t *const *references) override {
505*77c1e3ccSAndroid Build Coastguard Worker     GET_PARAM(2)
506*77c1e3ccSAndroid Build Coastguard Worker     (source_data_, source_stride_, references[0], reference_stride_);
507*77c1e3ccSAndroid Build Coastguard Worker     (void)results;
508*77c1e3ccSAndroid Build Coastguard Worker   }
509*77c1e3ccSAndroid Build Coastguard Worker };
510*77c1e3ccSAndroid Build Coastguard Worker 
511*77c1e3ccSAndroid Build Coastguard Worker class SADavgTest : public ::testing::WithParamInterface<SadMxNAvgParam>,
512*77c1e3ccSAndroid Build Coastguard Worker                    public SADTestBase {
513*77c1e3ccSAndroid Build Coastguard Worker  public:
SADavgTest()514*77c1e3ccSAndroid Build Coastguard Worker   SADavgTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
515*77c1e3ccSAndroid Build Coastguard Worker 
516*77c1e3ccSAndroid Build Coastguard Worker  protected:
SAD_avg(int block_idx)517*77c1e3ccSAndroid Build Coastguard Worker   unsigned int SAD_avg(int block_idx) {
518*77c1e3ccSAndroid Build Coastguard Worker     unsigned int ret;
519*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const reference = GetReference(block_idx);
520*77c1e3ccSAndroid Build Coastguard Worker 
521*77c1e3ccSAndroid Build Coastguard Worker     API_REGISTER_STATE_CHECK(ret = GET_PARAM(2)(source_data_, source_stride_,
522*77c1e3ccSAndroid Build Coastguard Worker                                                 reference, reference_stride_,
523*77c1e3ccSAndroid Build Coastguard Worker                                                 second_pred_));
524*77c1e3ccSAndroid Build Coastguard Worker     return ret;
525*77c1e3ccSAndroid Build Coastguard Worker   }
526*77c1e3ccSAndroid Build Coastguard Worker 
CheckSAD()527*77c1e3ccSAndroid Build Coastguard Worker   void CheckSAD() {
528*77c1e3ccSAndroid Build Coastguard Worker     const unsigned int reference_sad = ReferenceSADavg(0);
529*77c1e3ccSAndroid Build Coastguard Worker     const unsigned int exp_sad = SAD_avg(0);
530*77c1e3ccSAndroid Build Coastguard Worker 
531*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_EQ(reference_sad, exp_sad);
532*77c1e3ccSAndroid Build Coastguard Worker   }
533*77c1e3ccSAndroid Build Coastguard Worker };
534*77c1e3ccSAndroid Build Coastguard Worker 
535*77c1e3ccSAndroid Build Coastguard Worker class DistWtdSADavgTest
536*77c1e3ccSAndroid Build Coastguard Worker     : public ::testing::WithParamInterface<DistWtdSadMxNAvgParam>,
537*77c1e3ccSAndroid Build Coastguard Worker       public SADTestBase {
538*77c1e3ccSAndroid Build Coastguard Worker  public:
DistWtdSADavgTest()539*77c1e3ccSAndroid Build Coastguard Worker   DistWtdSADavgTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1), GET_PARAM(3)) {}
540*77c1e3ccSAndroid Build Coastguard Worker 
541*77c1e3ccSAndroid Build Coastguard Worker  protected:
dist_wtd_SAD_avg(int block_idx)542*77c1e3ccSAndroid Build Coastguard Worker   unsigned int dist_wtd_SAD_avg(int block_idx) {
543*77c1e3ccSAndroid Build Coastguard Worker     unsigned int ret;
544*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *const reference = GetReference(block_idx);
545*77c1e3ccSAndroid Build Coastguard Worker 
546*77c1e3ccSAndroid Build Coastguard Worker     API_REGISTER_STATE_CHECK(ret = GET_PARAM(2)(source_data_, source_stride_,
547*77c1e3ccSAndroid Build Coastguard Worker                                                 reference, reference_stride_,
548*77c1e3ccSAndroid Build Coastguard Worker                                                 second_pred_, &jcp_param_));
549*77c1e3ccSAndroid Build Coastguard Worker     return ret;
550*77c1e3ccSAndroid Build Coastguard Worker   }
551*77c1e3ccSAndroid Build Coastguard Worker 
CheckSAD()552*77c1e3ccSAndroid Build Coastguard Worker   void CheckSAD() {
553*77c1e3ccSAndroid Build Coastguard Worker     for (int j = 0; j < 2; ++j) {
554*77c1e3ccSAndroid Build Coastguard Worker       for (int i = 0; i < 4; ++i) {
555*77c1e3ccSAndroid Build Coastguard Worker         jcp_param_.fwd_offset = quant_dist_lookup_table[i][j];
556*77c1e3ccSAndroid Build Coastguard Worker         jcp_param_.bck_offset = quant_dist_lookup_table[i][1 - j];
557*77c1e3ccSAndroid Build Coastguard Worker 
558*77c1e3ccSAndroid Build Coastguard Worker         const unsigned int reference_sad = ReferenceDistWtdSADavg(0);
559*77c1e3ccSAndroid Build Coastguard Worker         const unsigned int exp_sad = dist_wtd_SAD_avg(0);
560*77c1e3ccSAndroid Build Coastguard Worker 
561*77c1e3ccSAndroid Build Coastguard Worker         ASSERT_EQ(reference_sad, exp_sad);
562*77c1e3ccSAndroid Build Coastguard Worker       }
563*77c1e3ccSAndroid Build Coastguard Worker     }
564*77c1e3ccSAndroid Build Coastguard Worker   }
565*77c1e3ccSAndroid Build Coastguard Worker };
566*77c1e3ccSAndroid Build Coastguard Worker 
567*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::source_data_ = nullptr;
568*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::reference_data_ = nullptr;
569*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::second_pred_ = nullptr;
570*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::comp_pred_ = nullptr;
571*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::comp_pred_test_ = nullptr;
572*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::source_data8_ = nullptr;
573*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::reference_data8_ = nullptr;
574*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::second_pred8_ = nullptr;
575*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::comp_pred8_ = nullptr;
576*77c1e3ccSAndroid Build Coastguard Worker uint8_t *SADTestBase::comp_pred8_test_ = nullptr;
577*77c1e3ccSAndroid Build Coastguard Worker uint16_t *SADTestBase::source_data16_ = nullptr;
578*77c1e3ccSAndroid Build Coastguard Worker uint16_t *SADTestBase::reference_data16_ = nullptr;
579*77c1e3ccSAndroid Build Coastguard Worker uint16_t *SADTestBase::second_pred16_ = nullptr;
580*77c1e3ccSAndroid Build Coastguard Worker uint16_t *SADTestBase::comp_pred16_ = nullptr;
581*77c1e3ccSAndroid Build Coastguard Worker uint16_t *SADTestBase::comp_pred16_test_ = nullptr;
582*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADTest,MaxRef)583*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADTest, MaxRef) {
584*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, 0);
585*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(reference_data_, reference_stride_, mask_);
586*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
587*77c1e3ccSAndroid Build Coastguard Worker }
588*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADTest,MaxSrc)589*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADTest, MaxSrc) {
590*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, mask_);
591*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(reference_data_, reference_stride_, 0);
592*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
593*77c1e3ccSAndroid Build Coastguard Worker }
594*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADTest,ShortRef)595*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADTest, ShortRef) {
596*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = reference_stride_;
597*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ >>= 1;
598*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
599*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
600*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
601*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
602*77c1e3ccSAndroid Build Coastguard Worker }
603*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADTest,UnalignedRef)604*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADTest, UnalignedRef) {
605*77c1e3ccSAndroid Build Coastguard Worker   // The reference frame, but not the source frame, may be unaligned for
606*77c1e3ccSAndroid Build Coastguard Worker   // certain types of searches.
607*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = reference_stride_;
608*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ -= 1;
609*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
610*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
611*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
612*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
613*77c1e3ccSAndroid Build Coastguard Worker }
614*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADTest,ShortSrc)615*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADTest, ShortSrc) {
616*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = source_stride_;
617*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
618*77c1e3ccSAndroid Build Coastguard Worker   int test_count = 2000;
619*77c1e3ccSAndroid Build Coastguard Worker   while (test_count > 0) {
620*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(source_data_, source_stride_);
621*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(reference_data_, reference_stride_);
622*77c1e3ccSAndroid Build Coastguard Worker     CheckSAD();
623*77c1e3ccSAndroid Build Coastguard Worker     if (testing::Test::HasFatalFailure()) break;
624*77c1e3ccSAndroid Build Coastguard Worker     test_count -= 1;
625*77c1e3ccSAndroid Build Coastguard Worker   }
626*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
627*77c1e3ccSAndroid Build Coastguard Worker }
628*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADTest,DISABLED_Speed)629*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADTest, DISABLED_Speed) {
630*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = source_stride_;
631*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
632*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
633*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
634*77c1e3ccSAndroid Build Coastguard Worker   SpeedSAD();
635*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
636*77c1e3ccSAndroid Build Coastguard Worker }
637*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipTest,MaxRef)638*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipTest, MaxRef) {
639*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, 0);
640*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(reference_data_, reference_stride_, mask_);
641*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
642*77c1e3ccSAndroid Build Coastguard Worker }
643*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipTest,MaxSrc)644*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipTest, MaxSrc) {
645*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, mask_);
646*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(reference_data_, reference_stride_, 0);
647*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
648*77c1e3ccSAndroid Build Coastguard Worker }
649*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipTest,ShortRef)650*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipTest, ShortRef) {
651*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = reference_stride_;
652*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ >>= 1;
653*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
654*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
655*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
656*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
657*77c1e3ccSAndroid Build Coastguard Worker }
658*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipTest,UnalignedRef)659*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipTest, UnalignedRef) {
660*77c1e3ccSAndroid Build Coastguard Worker   // The reference frame, but not the source frame, may be unaligned for
661*77c1e3ccSAndroid Build Coastguard Worker   // certain types of searches.
662*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = reference_stride_;
663*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ -= 1;
664*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
665*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
666*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
667*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
668*77c1e3ccSAndroid Build Coastguard Worker }
669*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipTest,ShortSrc)670*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipTest, ShortSrc) {
671*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = source_stride_;
672*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
673*77c1e3ccSAndroid Build Coastguard Worker   int test_count = 2000;
674*77c1e3ccSAndroid Build Coastguard Worker   while (test_count > 0) {
675*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(source_data_, source_stride_);
676*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(reference_data_, reference_stride_);
677*77c1e3ccSAndroid Build Coastguard Worker     CheckSAD();
678*77c1e3ccSAndroid Build Coastguard Worker     if (testing::Test::HasFatalFailure()) break;
679*77c1e3ccSAndroid Build Coastguard Worker     test_count -= 1;
680*77c1e3ccSAndroid Build Coastguard Worker   }
681*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
682*77c1e3ccSAndroid Build Coastguard Worker }
683*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipTest,DISABLED_Speed)684*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipTest, DISABLED_Speed) {
685*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = source_stride_;
686*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
687*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
688*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
689*77c1e3ccSAndroid Build Coastguard Worker   SpeedSAD();
690*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
691*77c1e3ccSAndroid Build Coastguard Worker }
692*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADavgTest,MaxRef)693*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADavgTest, MaxRef) {
694*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, 0);
695*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(reference_data_, reference_stride_, mask_);
696*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(second_pred_, width_, 0);
697*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
698*77c1e3ccSAndroid Build Coastguard Worker }
TEST_P(SADavgTest,MaxSrc)699*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADavgTest, MaxSrc) {
700*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, mask_);
701*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(reference_data_, reference_stride_, 0);
702*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(second_pred_, width_, 0);
703*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
704*77c1e3ccSAndroid Build Coastguard Worker }
705*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADavgTest,ShortRef)706*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADavgTest, ShortRef) {
707*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = reference_stride_;
708*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ >>= 1;
709*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
710*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
711*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(second_pred_, width_);
712*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
713*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
714*77c1e3ccSAndroid Build Coastguard Worker }
715*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADavgTest,UnalignedRef)716*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADavgTest, UnalignedRef) {
717*77c1e3ccSAndroid Build Coastguard Worker   // The reference frame, but not the source frame, may be unaligned for
718*77c1e3ccSAndroid Build Coastguard Worker   // certain types of searches.
719*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = reference_stride_;
720*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ -= 1;
721*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
722*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
723*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(second_pred_, width_);
724*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
725*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
726*77c1e3ccSAndroid Build Coastguard Worker }
727*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADavgTest,ShortSrc)728*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADavgTest, ShortSrc) {
729*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = source_stride_;
730*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
731*77c1e3ccSAndroid Build Coastguard Worker   int test_count = 2000;
732*77c1e3ccSAndroid Build Coastguard Worker   while (test_count > 0) {
733*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(source_data_, source_stride_);
734*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(reference_data_, reference_stride_);
735*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(second_pred_, width_);
736*77c1e3ccSAndroid Build Coastguard Worker     CheckSAD();
737*77c1e3ccSAndroid Build Coastguard Worker     if (testing::Test::HasFatalFailure()) break;
738*77c1e3ccSAndroid Build Coastguard Worker     test_count -= 1;
739*77c1e3ccSAndroid Build Coastguard Worker   }
740*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
741*77c1e3ccSAndroid Build Coastguard Worker }
742*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(DistWtdSADavgTest,MaxRef)743*77c1e3ccSAndroid Build Coastguard Worker TEST_P(DistWtdSADavgTest, MaxRef) {
744*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, 0);
745*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(reference_data_, reference_stride_, mask_);
746*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(second_pred_, width_, 0);
747*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
748*77c1e3ccSAndroid Build Coastguard Worker }
TEST_P(DistWtdSADavgTest,MaxSrc)749*77c1e3ccSAndroid Build Coastguard Worker TEST_P(DistWtdSADavgTest, MaxSrc) {
750*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, mask_);
751*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(reference_data_, reference_stride_, 0);
752*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(second_pred_, width_, 0);
753*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
754*77c1e3ccSAndroid Build Coastguard Worker }
755*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(DistWtdSADavgTest,ShortRef)756*77c1e3ccSAndroid Build Coastguard Worker TEST_P(DistWtdSADavgTest, ShortRef) {
757*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = reference_stride_;
758*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ >>= 1;
759*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
760*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
761*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(second_pred_, width_);
762*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
763*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
764*77c1e3ccSAndroid Build Coastguard Worker }
765*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(DistWtdSADavgTest,UnalignedRef)766*77c1e3ccSAndroid Build Coastguard Worker TEST_P(DistWtdSADavgTest, UnalignedRef) {
767*77c1e3ccSAndroid Build Coastguard Worker   // The reference frame, but not the source frame, may be unaligned for
768*77c1e3ccSAndroid Build Coastguard Worker   // certain types of searches.
769*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = reference_stride_;
770*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ -= 1;
771*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
772*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(reference_data_, reference_stride_);
773*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(second_pred_, width_);
774*77c1e3ccSAndroid Build Coastguard Worker   CheckSAD();
775*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
776*77c1e3ccSAndroid Build Coastguard Worker }
777*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(DistWtdSADavgTest,ShortSrc)778*77c1e3ccSAndroid Build Coastguard Worker TEST_P(DistWtdSADavgTest, ShortSrc) {
779*77c1e3ccSAndroid Build Coastguard Worker   const int tmp_stride = source_stride_;
780*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
781*77c1e3ccSAndroid Build Coastguard Worker   int test_count = 2000;
782*77c1e3ccSAndroid Build Coastguard Worker   while (test_count > 0) {
783*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(source_data_, source_stride_);
784*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(reference_data_, reference_stride_);
785*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(second_pred_, width_);
786*77c1e3ccSAndroid Build Coastguard Worker     CheckSAD();
787*77c1e3ccSAndroid Build Coastguard Worker     if (testing::Test::HasFatalFailure()) break;
788*77c1e3ccSAndroid Build Coastguard Worker     test_count -= 1;
789*77c1e3ccSAndroid Build Coastguard Worker   }
790*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
791*77c1e3ccSAndroid Build Coastguard Worker }
792*77c1e3ccSAndroid Build Coastguard Worker 
793*77c1e3ccSAndroid Build Coastguard Worker // SADx4
TEST_P(SADx4Test,MaxRef)794*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx4Test, MaxRef) {
795*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, 0);
796*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(0), reference_stride_, mask_);
797*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(1), reference_stride_, mask_);
798*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(2), reference_stride_, mask_);
799*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(3), reference_stride_, mask_);
800*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
801*77c1e3ccSAndroid Build Coastguard Worker }
802*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx4Test,MaxSrc)803*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx4Test, MaxSrc) {
804*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, mask_);
805*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(0), reference_stride_, 0);
806*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(1), reference_stride_, 0);
807*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(2), reference_stride_, 0);
808*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(3), reference_stride_, 0);
809*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
810*77c1e3ccSAndroid Build Coastguard Worker }
811*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx4Test,ShortRef)812*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx4Test, ShortRef) {
813*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = reference_stride_;
814*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ >>= 1;
815*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
816*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
817*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
818*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
819*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
820*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
821*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
822*77c1e3ccSAndroid Build Coastguard Worker }
823*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx4Test,UnalignedRef)824*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx4Test, UnalignedRef) {
825*77c1e3ccSAndroid Build Coastguard Worker   // The reference frame, but not the source frame, may be unaligned for
826*77c1e3ccSAndroid Build Coastguard Worker   // certain types of searches.
827*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = reference_stride_;
828*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ -= 1;
829*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
830*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
831*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
832*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
833*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
834*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
835*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
836*77c1e3ccSAndroid Build Coastguard Worker }
837*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx4Test,ShortSrc)838*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx4Test, ShortSrc) {
839*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = source_stride_;
840*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
841*77c1e3ccSAndroid Build Coastguard Worker   int test_count = 1000;
842*77c1e3ccSAndroid Build Coastguard Worker   while (test_count > 0) {
843*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(source_data_, source_stride_);
844*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(0), reference_stride_);
845*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(1), reference_stride_);
846*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(2), reference_stride_);
847*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(3), reference_stride_);
848*77c1e3ccSAndroid Build Coastguard Worker     CheckSADs();
849*77c1e3ccSAndroid Build Coastguard Worker     test_count -= 1;
850*77c1e3ccSAndroid Build Coastguard Worker   }
851*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
852*77c1e3ccSAndroid Build Coastguard Worker }
853*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx4Test,SrcAlignedByWidth)854*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx4Test, SrcAlignedByWidth) {
855*77c1e3ccSAndroid Build Coastguard Worker   uint8_t *tmp_source_data = source_data_;
856*77c1e3ccSAndroid Build Coastguard Worker   source_data_ += width_;
857*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
858*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
859*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
860*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
861*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
862*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
863*77c1e3ccSAndroid Build Coastguard Worker   source_data_ = tmp_source_data;
864*77c1e3ccSAndroid Build Coastguard Worker }
865*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx4Test,DISABLED_Speed)866*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx4Test, DISABLED_Speed) {
867*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
868*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
869*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
870*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
871*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
872*77c1e3ccSAndroid Build Coastguard Worker   SpeedSAD();
873*77c1e3ccSAndroid Build Coastguard Worker }
874*77c1e3ccSAndroid Build Coastguard Worker 
875*77c1e3ccSAndroid Build Coastguard Worker // SADx3
TEST_P(SADx3Test,MaxRef)876*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx3Test, MaxRef) {
877*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, 0);
878*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(0), reference_stride_, mask_);
879*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(1), reference_stride_, mask_);
880*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(2), reference_stride_, mask_);
881*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(3), reference_stride_, mask_);
882*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
883*77c1e3ccSAndroid Build Coastguard Worker }
884*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx3Test,MaxSrc)885*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx3Test, MaxSrc) {
886*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, mask_);
887*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(0), reference_stride_, 0);
888*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(1), reference_stride_, 0);
889*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(2), reference_stride_, 0);
890*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(3), reference_stride_, 0);
891*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
892*77c1e3ccSAndroid Build Coastguard Worker }
893*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx3Test,ShortRef)894*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx3Test, ShortRef) {
895*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = reference_stride_;
896*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ >>= 1;
897*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
898*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
899*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
900*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
901*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
902*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
903*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
904*77c1e3ccSAndroid Build Coastguard Worker }
905*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx3Test,UnalignedRef)906*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx3Test, UnalignedRef) {
907*77c1e3ccSAndroid Build Coastguard Worker   // The reference frame, but not the source frame, may be unaligned for
908*77c1e3ccSAndroid Build Coastguard Worker   // certain types of searches.
909*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = reference_stride_;
910*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ -= 1;
911*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
912*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
913*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
914*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
915*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
916*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
917*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
918*77c1e3ccSAndroid Build Coastguard Worker }
919*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx3Test,ShortSrc)920*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx3Test, ShortSrc) {
921*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = source_stride_;
922*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
923*77c1e3ccSAndroid Build Coastguard Worker   int test_count = 1000;
924*77c1e3ccSAndroid Build Coastguard Worker   while (test_count > 0) {
925*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(source_data_, source_stride_);
926*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(0), reference_stride_);
927*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(1), reference_stride_);
928*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(2), reference_stride_);
929*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(3), reference_stride_);
930*77c1e3ccSAndroid Build Coastguard Worker     CheckSADs();
931*77c1e3ccSAndroid Build Coastguard Worker     test_count -= 1;
932*77c1e3ccSAndroid Build Coastguard Worker   }
933*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
934*77c1e3ccSAndroid Build Coastguard Worker }
935*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx3Test,SrcAlignedByWidth)936*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx3Test, SrcAlignedByWidth) {
937*77c1e3ccSAndroid Build Coastguard Worker   uint8_t *tmp_source_data = source_data_;
938*77c1e3ccSAndroid Build Coastguard Worker   source_data_ += width_;
939*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
940*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
941*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
942*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
943*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
944*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
945*77c1e3ccSAndroid Build Coastguard Worker   source_data_ = tmp_source_data;
946*77c1e3ccSAndroid Build Coastguard Worker }
947*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADx3Test,DISABLED_Speed)948*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADx3Test, DISABLED_Speed) {
949*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
950*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
951*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
952*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
953*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
954*77c1e3ccSAndroid Build Coastguard Worker   SpeedSAD();
955*77c1e3ccSAndroid Build Coastguard Worker }
956*77c1e3ccSAndroid Build Coastguard Worker 
957*77c1e3ccSAndroid Build Coastguard Worker // SADSkipx4
TEST_P(SADSkipx4Test,MaxRef)958*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipx4Test, MaxRef) {
959*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, 0);
960*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(0), reference_stride_, mask_);
961*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(1), reference_stride_, mask_);
962*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(2), reference_stride_, mask_);
963*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(3), reference_stride_, mask_);
964*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
965*77c1e3ccSAndroid Build Coastguard Worker }
966*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipx4Test,MaxSrc)967*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipx4Test, MaxSrc) {
968*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(source_data_, source_stride_, mask_);
969*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(0), reference_stride_, 0);
970*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(1), reference_stride_, 0);
971*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(2), reference_stride_, 0);
972*77c1e3ccSAndroid Build Coastguard Worker   FillConstant(GetReference(3), reference_stride_, 0);
973*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
974*77c1e3ccSAndroid Build Coastguard Worker }
975*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipx4Test,ShortRef)976*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipx4Test, ShortRef) {
977*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = reference_stride_;
978*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ >>= 1;
979*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
980*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
981*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
982*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
983*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
984*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
985*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
986*77c1e3ccSAndroid Build Coastguard Worker }
987*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipx4Test,UnalignedRef)988*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipx4Test, UnalignedRef) {
989*77c1e3ccSAndroid Build Coastguard Worker   // The reference frame, but not the source frame, may be unaligned for
990*77c1e3ccSAndroid Build Coastguard Worker   // certain types of searches.
991*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = reference_stride_;
992*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ -= 1;
993*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
994*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
995*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
996*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
997*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
998*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
999*77c1e3ccSAndroid Build Coastguard Worker   reference_stride_ = tmp_stride;
1000*77c1e3ccSAndroid Build Coastguard Worker }
1001*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipx4Test,ShortSrc)1002*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipx4Test, ShortSrc) {
1003*77c1e3ccSAndroid Build Coastguard Worker   int tmp_stride = source_stride_;
1004*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ >>= 1;
1005*77c1e3ccSAndroid Build Coastguard Worker   int test_count = 1000;
1006*77c1e3ccSAndroid Build Coastguard Worker   while (test_count > 0) {
1007*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(source_data_, source_stride_);
1008*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(0), reference_stride_);
1009*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(1), reference_stride_);
1010*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(2), reference_stride_);
1011*77c1e3ccSAndroid Build Coastguard Worker     FillRandom(GetReference(3), reference_stride_);
1012*77c1e3ccSAndroid Build Coastguard Worker     CheckSADs();
1013*77c1e3ccSAndroid Build Coastguard Worker     test_count -= 1;
1014*77c1e3ccSAndroid Build Coastguard Worker   }
1015*77c1e3ccSAndroid Build Coastguard Worker   source_stride_ = tmp_stride;
1016*77c1e3ccSAndroid Build Coastguard Worker }
1017*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipx4Test,SrcAlignedByWidth)1018*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipx4Test, SrcAlignedByWidth) {
1019*77c1e3ccSAndroid Build Coastguard Worker   uint8_t *tmp_source_data = source_data_;
1020*77c1e3ccSAndroid Build Coastguard Worker   source_data_ += width_;
1021*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
1022*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
1023*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
1024*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
1025*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
1026*77c1e3ccSAndroid Build Coastguard Worker   CheckSADs();
1027*77c1e3ccSAndroid Build Coastguard Worker   source_data_ = tmp_source_data;
1028*77c1e3ccSAndroid Build Coastguard Worker }
1029*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(SADSkipx4Test,DISABLED_Speed)1030*77c1e3ccSAndroid Build Coastguard Worker TEST_P(SADSkipx4Test, DISABLED_Speed) {
1031*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(source_data_, source_stride_);
1032*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(0), reference_stride_);
1033*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(1), reference_stride_);
1034*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(2), reference_stride_);
1035*77c1e3ccSAndroid Build Coastguard Worker   FillRandom(GetReference(3), reference_stride_);
1036*77c1e3ccSAndroid Build Coastguard Worker   SpeedSAD();
1037*77c1e3ccSAndroid Build Coastguard Worker }
1038*77c1e3ccSAndroid Build Coastguard Worker 
1039*77c1e3ccSAndroid Build Coastguard Worker using std::make_tuple;
1040*77c1e3ccSAndroid Build Coastguard Worker 
1041*77c1e3ccSAndroid Build Coastguard Worker //------------------------------------------------------------------------------
1042*77c1e3ccSAndroid Build Coastguard Worker // C functions
1043*77c1e3ccSAndroid Build Coastguard Worker const SadMxNParam c_tests[] = {
1044*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_c, -1),
1045*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_c, -1),
1046*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_c, -1),
1047*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_c, -1),
1048*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_c, -1),
1049*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_c, -1),
1050*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_c, -1),
1051*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_c, -1),
1052*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32_c, -1),
1053*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16_c, -1),
1054*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8_c, -1),
1055*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16_c, -1),
1056*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8_c, -1),
1057*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4_c, -1),
1058*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8_c, -1),
1059*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4_c, -1),
1060*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1061*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_c, 8),
1062*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_c, 8),
1063*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_c, 8),
1064*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_c, 8),
1065*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_c, 8),
1066*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_c, 8),
1067*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_c, 8),
1068*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_c, 8),
1069*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_c, 8),
1070*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_c, 8),
1071*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_c, 8),
1072*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_c, 8),
1073*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_c, 8),
1074*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_c, 8),
1075*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_c, 8),
1076*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_c, 8),
1077*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_c, 10),
1078*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_c, 10),
1079*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_c, 10),
1080*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_c, 10),
1081*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_c, 10),
1082*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_c, 10),
1083*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_c, 10),
1084*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_c, 10),
1085*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_c, 10),
1086*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_c, 10),
1087*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_c, 10),
1088*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_c, 10),
1089*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_c, 10),
1090*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_c, 10),
1091*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_c, 10),
1092*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_c, 10),
1093*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_c, 12),
1094*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_c, 12),
1095*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_c, 12),
1096*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_c, 12),
1097*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_c, 12),
1098*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_c, 12),
1099*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_c, 12),
1100*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_c, 12),
1101*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_c, 12),
1102*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_c, 12),
1103*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_c, 12),
1104*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_c, 12),
1105*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_c, 12),
1106*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_c, 12),
1107*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_c, 12),
1108*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_c, 12),
1109*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1110*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1111*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16_c, -1),
1112*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64_c, -1),
1113*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1114*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_c, 8),
1115*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_c, 8),
1116*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_c, 10),
1117*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_c, 10),
1118*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_c, 12),
1119*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_c, 12),
1120*77c1e3ccSAndroid Build Coastguard Worker #endif
1121*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8_c, -1),
1122*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32_c, -1),
1123*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1124*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_c, 8),
1125*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_c, 8),
1126*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_c, 10),
1127*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_c, 10),
1128*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_c, 12),
1129*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_c, 12),
1130*77c1e3ccSAndroid Build Coastguard Worker #endif
1131*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4_c, -1),
1132*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16_c, -1),
1133*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1134*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_c, 8),
1135*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_c, 8),
1136*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_c, 10),
1137*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_c, 10),
1138*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_c, 12),
1139*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_c, 12),
1140*77c1e3ccSAndroid Build Coastguard Worker #endif
1141*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
1142*77c1e3ccSAndroid Build Coastguard Worker };
1143*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(C, SADTest, ::testing::ValuesIn(c_tests));
1144*77c1e3ccSAndroid Build Coastguard Worker 
1145*77c1e3ccSAndroid Build Coastguard Worker const SadSkipMxNParam skip_c_tests[] = {
1146*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128_c, -1),
1147*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64_c, -1),
1148*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128_c, -1),
1149*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64_c, -1),
1150*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32_c, -1),
1151*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64_c, -1),
1152*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32_c, -1),
1153*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16_c, -1),
1154*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32_c, -1),
1155*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16_c, -1),
1156*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8_c, -1),
1157*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad_skip_8x16_c, -1),
1158*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad_skip_8x8_c, -1),
1159*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad_skip_8x4_c, -1),
1160*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad_skip_4x8_c, -1),
1161*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad_skip_4x4_c, -1),
1162*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1163*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16_c, -1),
1164*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64_c, -1),
1165*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8_c, -1),
1166*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad_skip_8x32_c, -1),
1167*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad_skip_16x4_c, -1),
1168*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad_skip_4x16_c, -1),
1169*77c1e3ccSAndroid Build Coastguard Worker #endif
1170*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1171*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_c, 8),
1172*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_c, 8),
1173*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_c, 8),
1174*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_c, 8),
1175*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_c, 8),
1176*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_c, 8),
1177*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_c, 8),
1178*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_c, 8),
1179*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_c, 8),
1180*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_c, 8),
1181*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_c, 8),
1182*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_c, 8),
1183*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_c, 8),
1184*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4_c, 8),
1185*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_c, 8),
1186*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4_c, 8),
1187*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1188*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_c, 8),
1189*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_c, 8),
1190*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_c, 8),
1191*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_c, 8),
1192*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4_c, 8),
1193*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_c, 8),
1194*77c1e3ccSAndroid Build Coastguard Worker #endif
1195*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_c, 10),
1196*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_c, 10),
1197*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_c, 10),
1198*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_c, 10),
1199*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_c, 10),
1200*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_c, 10),
1201*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_c, 10),
1202*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_c, 10),
1203*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_c, 10),
1204*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_c, 10),
1205*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_c, 10),
1206*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_c, 10),
1207*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_c, 10),
1208*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4_c, 10),
1209*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_c, 10),
1210*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4_c, 10),
1211*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1212*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_c, 10),
1213*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_c, 10),
1214*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_c, 10),
1215*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_c, 10),
1216*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4_c, 10),
1217*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_c, 10),
1218*77c1e3ccSAndroid Build Coastguard Worker #endif
1219*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_c, 12),
1220*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_c, 12),
1221*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_c, 12),
1222*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_c, 12),
1223*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_c, 12),
1224*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_c, 12),
1225*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_c, 12),
1226*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_c, 12),
1227*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_c, 12),
1228*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_c, 12),
1229*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_c, 12),
1230*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_c, 12),
1231*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_c, 12),
1232*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4_c, 12),
1233*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_c, 12),
1234*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4_c, 12),
1235*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1236*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_c, 12),
1237*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_c, 12),
1238*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_c, 12),
1239*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_c, 12),
1240*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4_c, 12),
1241*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_c, 12),
1242*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
1243*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1244*77c1e3ccSAndroid Build Coastguard Worker };
1245*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(C, SADSkipTest, ::testing::ValuesIn(skip_c_tests));
1246*77c1e3ccSAndroid Build Coastguard Worker 
1247*77c1e3ccSAndroid Build Coastguard Worker const SadMxNAvgParam avg_c_tests[] = {
1248*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_avg_c, -1),
1249*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_avg_c, -1),
1250*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_avg_c, -1),
1251*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_avg_c, -1),
1252*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_avg_c, -1),
1253*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_avg_c, -1),
1254*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_avg_c, -1),
1255*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_avg_c, -1),
1256*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32_avg_c, -1),
1257*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16_avg_c, -1),
1258*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8_avg_c, -1),
1259*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16_avg_c, -1),
1260*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8_avg_c, -1),
1261*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4_avg_c, -1),
1262*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8_avg_c, -1),
1263*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4_avg_c, -1),
1264*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1265*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_c, 8),
1266*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_c, 8),
1267*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_c, 8),
1268*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_c, 8),
1269*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_c, 8),
1270*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_c, 8),
1271*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_c, 8),
1272*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_c, 8),
1273*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_c, 8),
1274*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_c, 8),
1275*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_c, 8),
1276*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_c, 8),
1277*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_c, 8),
1278*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_c, 8),
1279*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_c, 8),
1280*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_c, 8),
1281*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_c, 10),
1282*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_c, 10),
1283*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_c, 10),
1284*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_c, 10),
1285*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_c, 10),
1286*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_c, 10),
1287*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_c, 10),
1288*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_c, 10),
1289*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_c, 10),
1290*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_c, 10),
1291*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_c, 10),
1292*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_c, 10),
1293*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_c, 10),
1294*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_c, 10),
1295*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_c, 10),
1296*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_c, 10),
1297*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_c, 12),
1298*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_c, 12),
1299*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_c, 12),
1300*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_c, 12),
1301*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_c, 12),
1302*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_c, 12),
1303*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_c, 12),
1304*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_c, 12),
1305*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_c, 12),
1306*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_c, 12),
1307*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_c, 12),
1308*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_c, 12),
1309*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_c, 12),
1310*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_c, 12),
1311*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_c, 12),
1312*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_c, 12),
1313*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1314*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1315*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16_avg_c, -1),
1316*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64_avg_c, -1),
1317*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1318*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_c, 8),
1319*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_c, 8),
1320*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_c, 10),
1321*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_c, 10),
1322*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_c, 12),
1323*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_c, 12),
1324*77c1e3ccSAndroid Build Coastguard Worker #endif
1325*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8_avg_c, -1),
1326*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32_avg_c, -1),
1327*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1328*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_c, 8),
1329*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_c, 8),
1330*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_c, 10),
1331*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_c, 10),
1332*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_c, 12),
1333*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_c, 12),
1334*77c1e3ccSAndroid Build Coastguard Worker #endif
1335*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4_avg_c, -1),
1336*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16_avg_c, -1),
1337*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1338*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_c, 8),
1339*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_c, 8),
1340*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_c, 10),
1341*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_c, 10),
1342*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_c, 12),
1343*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_c, 12),
1344*77c1e3ccSAndroid Build Coastguard Worker #endif
1345*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
1346*77c1e3ccSAndroid Build Coastguard Worker };
1347*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(C, SADavgTest, ::testing::ValuesIn(avg_c_tests));
1348*77c1e3ccSAndroid Build Coastguard Worker 
1349*77c1e3ccSAndroid Build Coastguard Worker const DistWtdSadMxNAvgParam dist_wtd_avg_c_tests[] = {
1350*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_dist_wtd_sad128x128_avg_c, -1),
1351*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_dist_wtd_sad128x64_avg_c, -1),
1352*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_dist_wtd_sad64x128_avg_c, -1),
1353*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_dist_wtd_sad64x64_avg_c, -1),
1354*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_dist_wtd_sad64x32_avg_c, -1),
1355*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_dist_wtd_sad32x64_avg_c, -1),
1356*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_dist_wtd_sad32x32_avg_c, -1),
1357*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_dist_wtd_sad32x16_avg_c, -1),
1358*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_dist_wtd_sad16x32_avg_c, -1),
1359*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_dist_wtd_sad16x16_avg_c, -1),
1360*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_dist_wtd_sad16x8_avg_c, -1),
1361*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_dist_wtd_sad8x16_avg_c, -1),
1362*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_dist_wtd_sad8x8_avg_c, -1),
1363*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_dist_wtd_sad8x4_avg_c, -1),
1364*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_dist_wtd_sad4x8_avg_c, -1),
1365*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_dist_wtd_sad4x4_avg_c, -1),
1366*77c1e3ccSAndroid Build Coastguard Worker 
1367*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1368*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_dist_wtd_sad64x16_avg_c, -1),
1369*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_dist_wtd_sad16x64_avg_c, -1),
1370*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_dist_wtd_sad32x8_avg_c, -1),
1371*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_dist_wtd_sad8x32_avg_c, -1),
1372*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_dist_wtd_sad16x4_avg_c, -1),
1373*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_dist_wtd_sad4x16_avg_c, -1),
1374*77c1e3ccSAndroid Build Coastguard Worker #endif
1375*77c1e3ccSAndroid Build Coastguard Worker };
1376*77c1e3ccSAndroid Build Coastguard Worker 
1377*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(C, DistWtdSADavgTest,
1378*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(dist_wtd_avg_c_tests));
1379*77c1e3ccSAndroid Build Coastguard Worker 
1380*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x4d_c_tests[] = {
1381*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x4d_c, -1),
1382*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x4d_c, -1),
1383*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x4d_c, -1),
1384*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x4d_c, -1),
1385*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x4d_c, -1),
1386*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x4d_c, -1),
1387*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x4d_c, -1),
1388*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x4d_c, -1),
1389*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32x4d_c, -1),
1390*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16x4d_c, -1),
1391*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8x4d_c, -1),
1392*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16x4d_c, -1),
1393*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8x4d_c, -1),
1394*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4x4d_c, -1),
1395*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8x4d_c, -1),
1396*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4x4d_c, -1),
1397*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1398*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_c, 8),
1399*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_c, 8),
1400*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_c, 8),
1401*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_c, 8),
1402*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_c, 8),
1403*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_c, 8),
1404*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_c, 8),
1405*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_c, 8),
1406*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_c, 8),
1407*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_c, 8),
1408*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_c, 8),
1409*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_c, 8),
1410*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_c, 8),
1411*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_c, 8),
1412*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_c, 8),
1413*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_c, 8),
1414*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_c, 10),
1415*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_c, 10),
1416*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_c, 10),
1417*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_c, 10),
1418*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_c, 10),
1419*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_c, 10),
1420*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_c, 10),
1421*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_c, 10),
1422*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_c, 10),
1423*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_c, 10),
1424*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_c, 10),
1425*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_c, 10),
1426*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_c, 10),
1427*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_c, 10),
1428*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_c, 10),
1429*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_c, 10),
1430*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_c, 12),
1431*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_c, 12),
1432*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_c, 12),
1433*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_c, 12),
1434*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_c, 12),
1435*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_c, 12),
1436*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_c, 12),
1437*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_c, 12),
1438*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_c, 12),
1439*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_c, 12),
1440*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_c, 12),
1441*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_c, 12),
1442*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_c, 12),
1443*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_c, 12),
1444*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_c, 12),
1445*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_c, 12),
1446*77c1e3ccSAndroid Build Coastguard Worker #endif
1447*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1448*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x4d_c, -1),
1449*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64x4d_c, -1),
1450*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1451*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_c, 8),
1452*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_c, 8),
1453*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_c, 10),
1454*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_c, 10),
1455*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_c, 12),
1456*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_c, 12),
1457*77c1e3ccSAndroid Build Coastguard Worker #endif
1458*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x4d_c, -1),
1459*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32x4d_c, -1),
1460*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1461*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_c, 8),
1462*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_c, 8),
1463*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_c, 10),
1464*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_c, 10),
1465*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_c, 12),
1466*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_c, 12),
1467*77c1e3ccSAndroid Build Coastguard Worker #endif
1468*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x4d_c, -1),
1469*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16x4d_c, -1),
1470*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1471*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_c, 8),
1472*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_c, 8),
1473*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_c, 10),
1474*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_c, 10),
1475*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_c, 12),
1476*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_c, 12),
1477*77c1e3ccSAndroid Build Coastguard Worker #endif
1478*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
1479*77c1e3ccSAndroid Build Coastguard Worker };
1480*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(C, SADx4Test, ::testing::ValuesIn(x4d_c_tests));
1481*77c1e3ccSAndroid Build Coastguard Worker 
1482*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x3d_c_tests[] = {
1483*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x3d_c, -1),
1484*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x3d_c, -1),
1485*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x3d_c, -1),
1486*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x3d_c, -1),
1487*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x3d_c, -1),
1488*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x3d_c, -1),
1489*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x3d_c, -1),
1490*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x3d_c, -1),
1491*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32x3d_c, -1),
1492*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16x3d_c, -1),
1493*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8x3d_c, -1),
1494*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16x3d_c, -1),
1495*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8x3d_c, -1),
1496*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4x3d_c, -1),
1497*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8x3d_c, -1),
1498*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4x3d_c, -1),
1499*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1500*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_c, 8),
1501*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_c, 8),
1502*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_c, 8),
1503*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_c, 8),
1504*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_c, 8),
1505*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_c, 8),
1506*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_c, 8),
1507*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_c, 8),
1508*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_c, 8),
1509*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_c, 8),
1510*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_c, 8),
1511*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x3d_c, 8),
1512*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x3d_c, 8),
1513*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x3d_c, 8),
1514*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x3d_c, 8),
1515*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x3d_c, 8),
1516*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_c, 10),
1517*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_c, 10),
1518*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_c, 10),
1519*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_c, 10),
1520*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_c, 10),
1521*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_c, 10),
1522*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_c, 10),
1523*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_c, 10),
1524*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_c, 10),
1525*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_c, 10),
1526*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_c, 10),
1527*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x3d_c, 10),
1528*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x3d_c, 10),
1529*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x3d_c, 10),
1530*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x3d_c, 10),
1531*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x3d_c, 10),
1532*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_c, 12),
1533*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_c, 12),
1534*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_c, 12),
1535*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_c, 12),
1536*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_c, 12),
1537*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_c, 12),
1538*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_c, 12),
1539*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_c, 12),
1540*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_c, 12),
1541*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_c, 12),
1542*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_c, 12),
1543*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x3d_c, 12),
1544*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x3d_c, 12),
1545*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x3d_c, 12),
1546*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x3d_c, 12),
1547*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x3d_c, 12),
1548*77c1e3ccSAndroid Build Coastguard Worker #endif
1549*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1550*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x3d_c, -1),
1551*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64x3d_c, -1),
1552*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1553*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_c, 8),
1554*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_c, 8),
1555*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_c, 10),
1556*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_c, 10),
1557*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_c, 12),
1558*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_c, 12),
1559*77c1e3ccSAndroid Build Coastguard Worker #endif
1560*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x3d_c, -1),
1561*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32x3d_c, -1),
1562*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1563*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_c, 8),
1564*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x3d_c, 8),
1565*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_c, 10),
1566*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x3d_c, 10),
1567*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_c, 12),
1568*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x3d_c, 12),
1569*77c1e3ccSAndroid Build Coastguard Worker #endif
1570*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x3d_c, -1),
1571*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16x3d_c, -1),
1572*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1573*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_c, 8),
1574*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x3d_c, 8),
1575*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_c, 10),
1576*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x3d_c, 10),
1577*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_c, 12),
1578*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x3d_c, 12),
1579*77c1e3ccSAndroid Build Coastguard Worker #endif
1580*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
1581*77c1e3ccSAndroid Build Coastguard Worker };
1582*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(C, SADx3Test, ::testing::ValuesIn(x3d_c_tests));
1583*77c1e3ccSAndroid Build Coastguard Worker 
1584*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param skip_x4d_c_tests[] = {
1585*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128x4d_c, -1),
1586*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64x4d_c, -1),
1587*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128x4d_c, -1),
1588*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64x4d_c, -1),
1589*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32x4d_c, -1),
1590*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64x4d_c, -1),
1591*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32x4d_c, -1),
1592*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16x4d_c, -1),
1593*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32x4d_c, -1),
1594*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16x4d_c, -1),
1595*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8x4d_c, -1),
1596*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad_skip_8x16x4d_c, -1),
1597*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad_skip_8x8x4d_c, -1),
1598*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad_skip_4x8x4d_c, -1),
1599*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1600*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16x4d_c, -1),
1601*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64x4d_c, -1),
1602*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8x4d_c, -1),
1603*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad_skip_8x32x4d_c, -1),
1604*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad_skip_4x16x4d_c, -1),
1605*77c1e3ccSAndroid Build Coastguard Worker #endif
1606*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1607*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_c, 8),
1608*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_c, 8),
1609*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_c, 8),
1610*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_c, 8),
1611*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_c, 8),
1612*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_c, 8),
1613*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_c, 8),
1614*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_c, 8),
1615*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_c, 8),
1616*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_c, 8),
1617*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_c, 8),
1618*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_c, 8),
1619*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_c, 8),
1620*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_c, 8),
1621*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_c, 8),
1622*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_c, 8),
1623*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1624*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_c, 8),
1625*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_c, 8),
1626*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_c, 8),
1627*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_c, 8),
1628*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_c, 8),
1629*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_c, 8),
1630*77c1e3ccSAndroid Build Coastguard Worker #endif
1631*77c1e3ccSAndroid Build Coastguard Worker 
1632*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_c, 10),
1633*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_c, 10),
1634*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_c, 10),
1635*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_c, 10),
1636*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_c, 10),
1637*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_c, 10),
1638*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_c, 10),
1639*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_c, 10),
1640*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_c, 10),
1641*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_c, 10),
1642*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_c, 10),
1643*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_c, 10),
1644*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_c, 10),
1645*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_c, 10),
1646*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_c, 10),
1647*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_c, 10),
1648*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1649*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_c, 10),
1650*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_c, 10),
1651*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_c, 10),
1652*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_c, 10),
1653*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_c, 10),
1654*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_c, 10),
1655*77c1e3ccSAndroid Build Coastguard Worker #endif
1656*77c1e3ccSAndroid Build Coastguard Worker 
1657*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_c, 12),
1658*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_c, 12),
1659*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_c, 12),
1660*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_c, 12),
1661*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_c, 12),
1662*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_c, 12),
1663*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_c, 12),
1664*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_c, 12),
1665*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_c, 12),
1666*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_c, 12),
1667*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_c, 12),
1668*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_c, 12),
1669*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_c, 12),
1670*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_c, 12),
1671*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_c, 12),
1672*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_c, 12),
1673*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1674*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_c, 12),
1675*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_c, 12),
1676*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_c, 12),
1677*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_c, 12),
1678*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_c, 12),
1679*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_c, 12),
1680*77c1e3ccSAndroid Build Coastguard Worker #endif
1681*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1682*77c1e3ccSAndroid Build Coastguard Worker };
1683*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(C, SADSkipx4Test,
1684*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_x4d_c_tests));
1685*77c1e3ccSAndroid Build Coastguard Worker 
1686*77c1e3ccSAndroid Build Coastguard Worker //------------------------------------------------------------------------------
1687*77c1e3ccSAndroid Build Coastguard Worker // ARM functions
1688*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_NEON
1689*77c1e3ccSAndroid Build Coastguard Worker const SadMxNParam neon_tests[] = {
1690*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_neon, -1),
1691*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_neon, -1),
1692*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_neon, -1),
1693*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_neon, -1),
1694*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_neon, -1),
1695*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_neon, -1),
1696*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_neon, -1),
1697*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_neon, -1),
1698*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32_neon, -1),
1699*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16_neon, -1),
1700*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8_neon, -1),
1701*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16_neon, -1),
1702*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8_neon, -1),
1703*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4_neon, -1),
1704*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8_neon, -1),
1705*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4_neon, -1),
1706*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1707*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_neon, 8),
1708*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_neon, 8),
1709*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_neon, 8),
1710*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_neon, 8),
1711*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_neon, 8),
1712*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_neon, 8),
1713*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_neon, 8),
1714*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_neon, 8),
1715*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_neon, 8),
1716*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_neon, 8),
1717*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_neon, 8),
1718*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_neon, 8),
1719*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_neon, 8),
1720*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_neon, 8),
1721*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_neon, 8),
1722*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_neon, 8),
1723*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_neon, 10),
1724*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_neon, 10),
1725*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_neon, 10),
1726*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_neon, 10),
1727*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_neon, 10),
1728*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_neon, 10),
1729*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_neon, 10),
1730*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_neon, 10),
1731*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_neon, 10),
1732*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_neon, 10),
1733*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_neon, 10),
1734*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_neon, 10),
1735*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_neon, 10),
1736*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_neon, 10),
1737*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_neon, 10),
1738*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_neon, 10),
1739*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_neon, 12),
1740*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_neon, 12),
1741*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_neon, 12),
1742*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_neon, 12),
1743*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_neon, 12),
1744*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_neon, 12),
1745*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_neon, 12),
1746*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_neon, 12),
1747*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_neon, 12),
1748*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_neon, 12),
1749*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_neon, 12),
1750*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_neon, 12),
1751*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_neon, 12),
1752*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_neon, 12),
1753*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_neon, 12),
1754*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_neon, 12),
1755*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1756*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1757*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16_neon, -1),
1758*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8_neon, -1),
1759*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64_neon, -1),
1760*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4_neon, -1),
1761*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32_neon, -1),
1762*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16_neon, -1),
1763*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1764*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_neon, 8),
1765*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_neon, 8),
1766*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_neon, 8),
1767*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_neon, 8),
1768*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_neon, 8),
1769*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_neon, 8),
1770*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_neon, 10),
1771*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_neon, 10),
1772*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_neon, 10),
1773*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_neon, 10),
1774*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_neon, 10),
1775*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_neon, 10),
1776*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_neon, 12),
1777*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_neon, 12),
1778*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_neon, 12),
1779*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_neon, 12),
1780*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_neon, 12),
1781*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_neon, 12),
1782*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1783*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
1784*77c1e3ccSAndroid Build Coastguard Worker };
1785*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON, SADTest, ::testing::ValuesIn(neon_tests));
1786*77c1e3ccSAndroid Build Coastguard Worker 
1787*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x4d_neon_tests[] = {
1788*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x4d_neon, -1),
1789*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x4d_neon, -1),
1790*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x4d_neon, -1),
1791*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x4d_neon, -1),
1792*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x4d_neon, -1),
1793*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x4d_neon, -1),
1794*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x4d_neon, -1),
1795*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x4d_neon, -1),
1796*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32x4d_neon, -1),
1797*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16x4d_neon, -1),
1798*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8x4d_neon, -1),
1799*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16x4d_neon, -1),
1800*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8x4d_neon, -1),
1801*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4x4d_neon, -1),
1802*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8x4d_neon, -1),
1803*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4x4d_neon, -1),
1804*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1805*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_neon, 8),
1806*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_neon, 8),
1807*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_neon, 8),
1808*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_neon, 8),
1809*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_neon, 8),
1810*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_neon, 8),
1811*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_neon, 8),
1812*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_neon, 8),
1813*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_neon, 8),
1814*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_neon, 8),
1815*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_neon, 8),
1816*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_neon, 8),
1817*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_neon, 8),
1818*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_neon, 8),
1819*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_neon, 8),
1820*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_neon, 8),
1821*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_neon, 10),
1822*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_neon, 10),
1823*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_neon, 10),
1824*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_neon, 10),
1825*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_neon, 10),
1826*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_neon, 10),
1827*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_neon, 10),
1828*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_neon, 10),
1829*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_neon, 10),
1830*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_neon, 10),
1831*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_neon, 10),
1832*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_neon, 10),
1833*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_neon, 10),
1834*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_neon, 10),
1835*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_neon, 10),
1836*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_neon, 10),
1837*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_neon, 12),
1838*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_neon, 12),
1839*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_neon, 12),
1840*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_neon, 12),
1841*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_neon, 12),
1842*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_neon, 12),
1843*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_neon, 12),
1844*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_neon, 12),
1845*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_neon, 12),
1846*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_neon, 12),
1847*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_neon, 12),
1848*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_neon, 12),
1849*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_neon, 12),
1850*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_neon, 12),
1851*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_neon, 12),
1852*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_neon, 12),
1853*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1854*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1855*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x4d_neon, -1),
1856*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x4d_neon, -1),
1857*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64x4d_neon, -1),
1858*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x4d_neon, -1),
1859*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32x4d_neon, -1),
1860*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16x4d_neon, -1),
1861*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1862*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_neon, 8),
1863*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_neon, 8),
1864*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_neon, 8),
1865*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_neon, 8),
1866*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_neon, 8),
1867*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_neon, 8),
1868*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_neon, 10),
1869*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_neon, 10),
1870*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_neon, 10),
1871*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_neon, 10),
1872*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_neon, 10),
1873*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_neon, 10),
1874*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_neon, 12),
1875*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_neon, 12),
1876*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_neon, 12),
1877*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_neon, 12),
1878*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_neon, 12),
1879*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_neon, 12),
1880*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1881*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
1882*77c1e3ccSAndroid Build Coastguard Worker };
1883*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON, SADx4Test, ::testing::ValuesIn(x4d_neon_tests));
1884*77c1e3ccSAndroid Build Coastguard Worker const SadSkipMxNParam skip_neon_tests[] = {
1885*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128_neon, -1),
1886*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64_neon, -1),
1887*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128_neon, -1),
1888*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64_neon, -1),
1889*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32_neon, -1),
1890*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64_neon, -1),
1891*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32_neon, -1),
1892*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16_neon, -1),
1893*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32_neon, -1),
1894*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16_neon, -1),
1895*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8_neon, -1),
1896*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad_skip_8x16_neon, -1),
1897*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad_skip_8x8_neon, -1),
1898*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad_skip_8x4_neon, -1),
1899*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad_skip_4x8_neon, -1),
1900*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad_skip_4x4_neon, -1),
1901*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1902*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_neon, 8),
1903*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_neon, 8),
1904*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_neon, 8),
1905*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_neon, 8),
1906*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_neon, 8),
1907*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_neon, 8),
1908*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_neon, 8),
1909*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_neon, 8),
1910*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_neon, 8),
1911*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_neon, 8),
1912*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_neon, 8),
1913*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_neon, 8),
1914*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_neon, 8),
1915*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4_neon, 8),
1916*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_neon, 8),
1917*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4_neon, 8),
1918*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_neon, 10),
1919*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_neon, 10),
1920*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_neon, 10),
1921*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_neon, 10),
1922*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_neon, 10),
1923*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_neon, 10),
1924*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_neon, 10),
1925*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_neon, 10),
1926*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_neon, 10),
1927*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_neon, 10),
1928*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_neon, 10),
1929*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_neon, 10),
1930*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_neon, 10),
1931*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4_neon, 10),
1932*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_neon, 10),
1933*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4_neon, 10),
1934*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_neon, 12),
1935*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_neon, 12),
1936*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_neon, 12),
1937*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_neon, 12),
1938*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_neon, 12),
1939*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_neon, 12),
1940*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_neon, 12),
1941*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_neon, 12),
1942*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_neon, 12),
1943*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_neon, 12),
1944*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_neon, 12),
1945*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_neon, 12),
1946*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_neon, 12),
1947*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4_neon, 12),
1948*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_neon, 12),
1949*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4_neon, 12),
1950*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1951*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
1952*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16_neon, -1),
1953*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8_neon, -1),
1954*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64_neon, -1),
1955*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad_skip_16x4_neon, -1),
1956*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad_skip_8x32_neon, -1),
1957*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad_skip_4x16_neon, -1),
1958*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
1959*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_neon, 8),
1960*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_neon, 8),
1961*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_neon, 8),
1962*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_neon, 8),
1963*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4_neon, 8),
1964*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_neon, 8),
1965*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_neon, 10),
1966*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_neon, 10),
1967*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_neon, 10),
1968*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_neon, 10),
1969*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4_neon, 10),
1970*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_neon, 10),
1971*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_neon, 12),
1972*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_neon, 12),
1973*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_neon, 12),
1974*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_neon, 12),
1975*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4_neon, 12),
1976*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_neon, 12),
1977*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
1978*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
1979*77c1e3ccSAndroid Build Coastguard Worker };
1980*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON, SADSkipTest,
1981*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_neon_tests));
1982*77c1e3ccSAndroid Build Coastguard Worker 
1983*77c1e3ccSAndroid Build Coastguard Worker const SadSkipMxNx4Param skip_x4d_neon_tests[] = {
1984*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128x4d_neon, -1),
1985*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64x4d_neon, -1),
1986*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128x4d_neon, -1),
1987*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64x4d_neon, -1),
1988*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32x4d_neon, -1),
1989*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64x4d_neon, -1),
1990*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32x4d_neon, -1),
1991*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16x4d_neon, -1),
1992*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32x4d_neon, -1),
1993*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16x4d_neon, -1),
1994*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8x4d_neon, -1),
1995*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad_skip_8x16x4d_neon, -1),
1996*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad_skip_8x8x4d_neon, -1),
1997*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad_skip_8x4x4d_neon, -1),
1998*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad_skip_4x8x4d_neon, -1),
1999*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad_skip_4x4x4d_neon, -1),
2000*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2001*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_neon, 8),
2002*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_neon, 8),
2003*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_neon, 8),
2004*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_neon, 8),
2005*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_neon, 8),
2006*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_neon, 8),
2007*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_neon, 8),
2008*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_neon, 8),
2009*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_neon, 8),
2010*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_neon, 8),
2011*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_neon, 8),
2012*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_neon, 8),
2013*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_neon, 8),
2014*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_neon, 8),
2015*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_neon, 8),
2016*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_neon, 8),
2017*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_neon, 10),
2018*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_neon, 10),
2019*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_neon, 10),
2020*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_neon, 10),
2021*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_neon, 10),
2022*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_neon, 10),
2023*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_neon, 10),
2024*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_neon, 10),
2025*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_neon, 10),
2026*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_neon, 10),
2027*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_neon, 10),
2028*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_neon, 10),
2029*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_neon, 10),
2030*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_neon, 10),
2031*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_neon, 10),
2032*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_neon, 10),
2033*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_neon, 12),
2034*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_neon, 12),
2035*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_neon, 12),
2036*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_neon, 12),
2037*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_neon, 12),
2038*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_neon, 12),
2039*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_neon, 12),
2040*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_neon, 12),
2041*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_neon, 12),
2042*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_neon, 12),
2043*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_neon, 12),
2044*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_neon, 12),
2045*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_neon, 12),
2046*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_neon, 12),
2047*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_neon, 12),
2048*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_neon, 12),
2049*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
2050*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2051*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16x4d_neon, -1),
2052*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8x4d_neon, -1),
2053*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64x4d_neon, -1),
2054*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad_skip_16x4x4d_neon, -1),
2055*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad_skip_8x32x4d_neon, -1),
2056*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad_skip_4x16x4d_neon, -1),
2057*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2058*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_neon, 8),
2059*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_neon, 8),
2060*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_neon, 8),
2061*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_neon, 8),
2062*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_neon, 8),
2063*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_neon, 8),
2064*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_neon, 10),
2065*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_neon, 10),
2066*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_neon, 10),
2067*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_neon, 10),
2068*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_neon, 10),
2069*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_neon, 10),
2070*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_neon, 12),
2071*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_neon, 12),
2072*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_neon, 12),
2073*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_neon, 12),
2074*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_neon, 12),
2075*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_neon, 12),
2076*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
2077*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2078*77c1e3ccSAndroid Build Coastguard Worker };
2079*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON, SADSkipx4Test,
2080*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_x4d_neon_tests));
2081*77c1e3ccSAndroid Build Coastguard Worker 
2082*77c1e3ccSAndroid Build Coastguard Worker const SadMxNAvgParam avg_neon_tests[] = {
2083*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_avg_neon, -1),
2084*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_avg_neon, -1),
2085*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_avg_neon, -1),
2086*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_avg_neon, -1),
2087*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_avg_neon, -1),
2088*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_avg_neon, -1),
2089*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_avg_neon, -1),
2090*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_avg_neon, -1),
2091*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32_avg_neon, -1),
2092*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16_avg_neon, -1),
2093*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8_avg_neon, -1),
2094*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16_avg_neon, -1),
2095*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8_avg_neon, -1),
2096*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4_avg_neon, -1),
2097*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8_avg_neon, -1),
2098*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4_avg_neon, -1),
2099*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2100*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_neon, 8),
2101*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_neon, 8),
2102*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_neon, 8),
2103*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_neon, 8),
2104*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_neon, 8),
2105*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_neon, 8),
2106*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_neon, 8),
2107*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_neon, 8),
2108*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_neon, 8),
2109*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_neon, 8),
2110*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_neon, 8),
2111*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_neon, 8),
2112*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_neon, 8),
2113*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_neon, 8),
2114*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_neon, 8),
2115*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_neon, 8),
2116*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_neon, 10),
2117*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_neon, 10),
2118*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_neon, 10),
2119*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_neon, 10),
2120*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_neon, 10),
2121*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_neon, 10),
2122*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_neon, 10),
2123*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_neon, 10),
2124*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_neon, 10),
2125*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_neon, 10),
2126*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_neon, 10),
2127*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_neon, 10),
2128*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_neon, 10),
2129*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_neon, 10),
2130*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_neon, 10),
2131*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_neon, 10),
2132*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_neon, 12),
2133*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_neon, 12),
2134*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_neon, 12),
2135*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_neon, 12),
2136*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_neon, 12),
2137*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_neon, 12),
2138*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_neon, 12),
2139*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_neon, 12),
2140*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_neon, 12),
2141*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_neon, 12),
2142*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_neon, 12),
2143*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_neon, 12),
2144*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_neon, 12),
2145*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_neon, 12),
2146*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_neon, 12),
2147*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_neon, 12),
2148*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
2149*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2150*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16_avg_neon, -1),
2151*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8_avg_neon, -1),
2152*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64_avg_neon, -1),
2153*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4_avg_neon, -1),
2154*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32_avg_neon, -1),
2155*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16_avg_neon, -1),
2156*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2157*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_neon, 8),
2158*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_neon, 8),
2159*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_neon, 8),
2160*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_neon, 8),
2161*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_neon, 8),
2162*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_neon, 8),
2163*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_neon, 10),
2164*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_neon, 10),
2165*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_neon, 10),
2166*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_neon, 10),
2167*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_neon, 10),
2168*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_neon, 10),
2169*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_neon, 12),
2170*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_neon, 12),
2171*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_neon, 12),
2172*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_neon, 12),
2173*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_neon, 12),
2174*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_neon, 12),
2175*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
2176*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2177*77c1e3ccSAndroid Build Coastguard Worker };
2178*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON, SADavgTest, ::testing::ValuesIn(avg_neon_tests));
2179*77c1e3ccSAndroid Build Coastguard Worker 
2180*77c1e3ccSAndroid Build Coastguard Worker const DistWtdSadMxNAvgParam dist_wtd_avg_neon_tests[] = {
2181*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_dist_wtd_sad128x128_avg_neon, -1),
2182*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_dist_wtd_sad128x64_avg_neon, -1),
2183*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_dist_wtd_sad64x128_avg_neon, -1),
2184*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_dist_wtd_sad64x64_avg_neon, -1),
2185*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_dist_wtd_sad64x32_avg_neon, -1),
2186*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_dist_wtd_sad32x64_avg_neon, -1),
2187*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_dist_wtd_sad32x32_avg_neon, -1),
2188*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_dist_wtd_sad32x16_avg_neon, -1),
2189*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_dist_wtd_sad16x32_avg_neon, -1),
2190*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_dist_wtd_sad16x16_avg_neon, -1),
2191*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_dist_wtd_sad16x8_avg_neon, -1),
2192*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_dist_wtd_sad8x16_avg_neon, -1),
2193*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_dist_wtd_sad8x8_avg_neon, -1),
2194*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_dist_wtd_sad8x4_avg_neon, -1),
2195*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_dist_wtd_sad4x8_avg_neon, -1),
2196*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_dist_wtd_sad4x4_avg_neon, -1),
2197*77c1e3ccSAndroid Build Coastguard Worker 
2198*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2199*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_dist_wtd_sad64x16_avg_neon, -1),
2200*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_dist_wtd_sad16x64_avg_neon, -1),
2201*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_dist_wtd_sad32x8_avg_neon, -1),
2202*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_dist_wtd_sad8x32_avg_neon, -1),
2203*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_dist_wtd_sad16x4_avg_neon, -1),
2204*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_dist_wtd_sad4x16_avg_neon, -1),
2205*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2206*77c1e3ccSAndroid Build Coastguard Worker };
2207*77c1e3ccSAndroid Build Coastguard Worker 
2208*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON, DistWtdSADavgTest,
2209*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(dist_wtd_avg_neon_tests));
2210*77c1e3ccSAndroid Build Coastguard Worker 
2211*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x3d_neon_tests[] = {
2212*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x3d_neon, -1),
2213*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x3d_neon, -1),
2214*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x3d_neon, -1),
2215*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x3d_neon, -1),
2216*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x3d_neon, -1),
2217*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x3d_neon, -1),
2218*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x3d_neon, -1),
2219*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x3d_neon, -1),
2220*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32x3d_neon, -1),
2221*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16x3d_neon, -1),
2222*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8x3d_neon, -1),
2223*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16x3d_neon, -1),
2224*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8x3d_neon, -1),
2225*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4x3d_neon, -1),
2226*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8x3d_neon, -1),
2227*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4x3d_neon, -1),
2228*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2229*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_neon, 8),
2230*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_neon, 8),
2231*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_neon, 8),
2232*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_neon, 8),
2233*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_neon, 8),
2234*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_neon, 8),
2235*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_neon, 8),
2236*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_neon, 8),
2237*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_neon, 8),
2238*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_neon, 8),
2239*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_neon, 8),
2240*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x3d_neon, 8),
2241*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x3d_neon, 8),
2242*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x3d_neon, 8),
2243*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x3d_neon, 8),
2244*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x3d_neon, 8),
2245*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_neon, 10),
2246*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_neon, 10),
2247*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_neon, 10),
2248*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_neon, 10),
2249*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_neon, 10),
2250*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_neon, 10),
2251*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_neon, 10),
2252*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_neon, 10),
2253*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_neon, 10),
2254*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_neon, 10),
2255*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_neon, 10),
2256*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x3d_neon, 10),
2257*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x3d_neon, 10),
2258*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x3d_neon, 10),
2259*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x3d_neon, 10),
2260*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x3d_neon, 10),
2261*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_neon, 12),
2262*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_neon, 12),
2263*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_neon, 12),
2264*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_neon, 12),
2265*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_neon, 12),
2266*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_neon, 12),
2267*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_neon, 12),
2268*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_neon, 12),
2269*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_neon, 12),
2270*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_neon, 12),
2271*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_neon, 12),
2272*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x3d_neon, 12),
2273*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x3d_neon, 12),
2274*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x3d_neon, 12),
2275*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x3d_neon, 12),
2276*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x3d_neon, 12),
2277*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
2278*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2279*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x3d_neon, -1),
2280*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x3d_neon, -1),
2281*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64x3d_neon, -1),
2282*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x3d_neon, -1),
2283*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32x3d_neon, -1),
2284*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16x3d_neon, -1),
2285*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2286*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_neon, 8),
2287*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_neon, 8),
2288*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_neon, 8),
2289*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x3d_neon, 8),
2290*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_neon, 8),
2291*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x3d_neon, 8),
2292*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_neon, 10),
2293*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_neon, 10),
2294*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_neon, 10),
2295*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x3d_neon, 10),
2296*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_neon, 10),
2297*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x3d_neon, 10),
2298*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_neon, 12),
2299*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_neon, 12),
2300*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_neon, 12),
2301*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x3d_neon, 12),
2302*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_neon, 12),
2303*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x3d_neon, 12),
2304*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
2305*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2306*77c1e3ccSAndroid Build Coastguard Worker };
2307*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON, SADx3Test, ::testing::ValuesIn(x3d_neon_tests));
2308*77c1e3ccSAndroid Build Coastguard Worker 
2309*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_NEON
2310*77c1e3ccSAndroid Build Coastguard Worker 
2311*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_NEON_DOTPROD
2312*77c1e3ccSAndroid Build Coastguard Worker const SadMxNParam neon_dotprod_tests[] = {
2313*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_neon_dotprod, -1),
2314*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_neon_dotprod, -1),
2315*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_neon_dotprod, -1),
2316*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_neon_dotprod, -1),
2317*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_neon_dotprod, -1),
2318*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_neon_dotprod, -1),
2319*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_neon_dotprod, -1),
2320*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_neon_dotprod, -1),
2321*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32_neon_dotprod, -1),
2322*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16_neon_dotprod, -1),
2323*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8_neon_dotprod, -1),
2324*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2325*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16_neon_dotprod, -1),
2326*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8_neon_dotprod, -1),
2327*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64_neon_dotprod, -1),
2328*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4_neon_dotprod, -1),
2329*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2330*77c1e3ccSAndroid Build Coastguard Worker };
2331*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADTest,
2332*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(neon_dotprod_tests));
2333*77c1e3ccSAndroid Build Coastguard Worker 
2334*77c1e3ccSAndroid Build Coastguard Worker const SadMxNParam skip_neon_dotprod_tests[] = {
2335*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128_neon_dotprod, -1),
2336*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64_neon_dotprod, -1),
2337*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128_neon_dotprod, -1),
2338*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64_neon_dotprod, -1),
2339*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32_neon_dotprod, -1),
2340*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64_neon_dotprod, -1),
2341*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32_neon_dotprod, -1),
2342*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16_neon_dotprod, -1),
2343*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32_neon_dotprod, -1),
2344*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16_neon_dotprod, -1),
2345*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8_neon_dotprod, -1),
2346*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2347*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16_neon_dotprod, -1),
2348*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8_neon_dotprod, -1),
2349*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64_neon_dotprod, -1),
2350*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad_skip_16x4_neon_dotprod, -1),
2351*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2352*77c1e3ccSAndroid Build Coastguard Worker };
2353*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADSkipTest,
2354*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_neon_dotprod_tests));
2355*77c1e3ccSAndroid Build Coastguard Worker 
2356*77c1e3ccSAndroid Build Coastguard Worker const SadMxNAvgParam avg_neon_dotprod_tests[] = {
2357*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_avg_neon_dotprod, -1),
2358*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_avg_neon_dotprod, -1),
2359*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_avg_neon_dotprod, -1),
2360*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_avg_neon_dotprod, -1),
2361*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_avg_neon_dotprod, -1),
2362*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_avg_neon_dotprod, -1),
2363*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_avg_neon_dotprod, -1),
2364*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_avg_neon_dotprod, -1),
2365*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32_avg_neon_dotprod, -1),
2366*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16_avg_neon_dotprod, -1),
2367*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8_avg_neon_dotprod, -1),
2368*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2369*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16_avg_neon_dotprod, -1),
2370*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8_avg_neon_dotprod, -1),
2371*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64_avg_neon_dotprod, -1),
2372*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4_avg_neon_dotprod, -1),
2373*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2374*77c1e3ccSAndroid Build Coastguard Worker };
2375*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADavgTest,
2376*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(avg_neon_dotprod_tests));
2377*77c1e3ccSAndroid Build Coastguard Worker 
2378*77c1e3ccSAndroid Build Coastguard Worker const DistWtdSadMxNAvgParam dist_wtd_avg_neon_dotprod_tests[] = {
2379*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_dist_wtd_sad128x128_avg_neon_dotprod, -1),
2380*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_dist_wtd_sad128x64_avg_neon_dotprod, -1),
2381*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_dist_wtd_sad64x128_avg_neon_dotprod, -1),
2382*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_dist_wtd_sad64x64_avg_neon_dotprod, -1),
2383*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_dist_wtd_sad64x32_avg_neon_dotprod, -1),
2384*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_dist_wtd_sad32x64_avg_neon_dotprod, -1),
2385*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_dist_wtd_sad32x32_avg_neon_dotprod, -1),
2386*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_dist_wtd_sad32x16_avg_neon_dotprod, -1),
2387*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_dist_wtd_sad16x32_avg_neon_dotprod, -1),
2388*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_dist_wtd_sad16x16_avg_neon_dotprod, -1),
2389*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_dist_wtd_sad16x8_avg_neon_dotprod, -1),
2390*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2391*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_dist_wtd_sad64x16_avg_neon_dotprod, -1),
2392*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_dist_wtd_sad16x64_avg_neon_dotprod, -1),
2393*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_dist_wtd_sad32x8_avg_neon_dotprod, -1),
2394*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_dist_wtd_sad16x4_avg_neon_dotprod, -1),
2395*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2396*77c1e3ccSAndroid Build Coastguard Worker };
2397*77c1e3ccSAndroid Build Coastguard Worker 
2398*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, DistWtdSADavgTest,
2399*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(dist_wtd_avg_neon_dotprod_tests));
2400*77c1e3ccSAndroid Build Coastguard Worker 
2401*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x3d_neon_dotprod_tests[] = {
2402*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x3d_neon_dotprod, -1),
2403*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x3d_neon_dotprod, -1),
2404*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x3d_neon_dotprod, -1),
2405*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x3d_neon_dotprod, -1),
2406*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x3d_neon_dotprod, -1),
2407*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x3d_neon_dotprod, -1),
2408*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x3d_neon_dotprod, -1),
2409*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x3d_neon_dotprod, -1),
2410*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32x3d_neon_dotprod, -1),
2411*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16x3d_neon_dotprod, -1),
2412*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8x3d_neon_dotprod, -1),
2413*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2414*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x3d_neon_dotprod, -1),
2415*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x3d_neon_dotprod, -1),
2416*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64x3d_neon_dotprod, -1),
2417*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x3d_neon_dotprod, -1),
2418*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2419*77c1e3ccSAndroid Build Coastguard Worker };
2420*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADx3Test,
2421*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(x3d_neon_dotprod_tests));
2422*77c1e3ccSAndroid Build Coastguard Worker 
2423*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x4d_neon_dotprod_tests[] = {
2424*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x4d_neon_dotprod, -1),
2425*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x4d_neon_dotprod, -1),
2426*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x4d_neon_dotprod, -1),
2427*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x4d_neon_dotprod, -1),
2428*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x4d_neon_dotprod, -1),
2429*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x4d_neon_dotprod, -1),
2430*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x4d_neon_dotprod, -1),
2431*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x4d_neon_dotprod, -1),
2432*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32x4d_neon_dotprod, -1),
2433*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16x4d_neon_dotprod, -1),
2434*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8x4d_neon_dotprod, -1),
2435*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2436*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x4d_neon_dotprod, -1),
2437*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x4d_neon_dotprod, -1),
2438*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64x4d_neon_dotprod, -1),
2439*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x4d_neon_dotprod, -1),
2440*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2441*77c1e3ccSAndroid Build Coastguard Worker };
2442*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADx4Test,
2443*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(x4d_neon_dotprod_tests));
2444*77c1e3ccSAndroid Build Coastguard Worker 
2445*77c1e3ccSAndroid Build Coastguard Worker const SadSkipMxNx4Param skip_x4d_neon_dotprod_tests[] = {
2446*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128x4d_neon_dotprod, -1),
2447*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64x4d_neon_dotprod, -1),
2448*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128x4d_neon_dotprod, -1),
2449*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64x4d_neon_dotprod, -1),
2450*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32x4d_neon_dotprod, -1),
2451*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64x4d_neon_dotprod, -1),
2452*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32x4d_neon_dotprod, -1),
2453*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16x4d_neon_dotprod, -1),
2454*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32x4d_neon_dotprod, -1),
2455*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16x4d_neon_dotprod, -1),
2456*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8x4d_neon_dotprod, -1),
2457*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2458*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16x4d_neon_dotprod, -1),
2459*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8x4d_neon_dotprod, -1),
2460*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64x4d_neon_dotprod, -1),
2461*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad_skip_16x4x4d_neon_dotprod, -1),
2462*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2463*77c1e3ccSAndroid Build Coastguard Worker };
2464*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADSkipx4Test,
2465*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_x4d_neon_dotprod_tests));
2466*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_NEON_DOTPROD
2467*77c1e3ccSAndroid Build Coastguard Worker 
2468*77c1e3ccSAndroid Build Coastguard Worker //------------------------------------------------------------------------------
2469*77c1e3ccSAndroid Build Coastguard Worker // x86 functions
2470*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_SSE2
2471*77c1e3ccSAndroid Build Coastguard Worker const SadMxNParam sse2_tests[] = {
2472*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_sse2, -1),
2473*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_sse2, -1),
2474*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_sse2, -1),
2475*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_sse2, -1),
2476*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_sse2, -1),
2477*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_sse2, -1),
2478*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_sse2, -1),
2479*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_sse2, -1),
2480*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32_sse2, -1),
2481*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16_sse2, -1),
2482*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8_sse2, -1),
2483*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16_sse2, -1),
2484*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8_sse2, -1),
2485*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4_sse2, -1),
2486*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8_sse2, -1),
2487*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4_sse2, -1),
2488*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2489*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_sse2, 8),
2490*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_sse2, 8),
2491*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_sse2, 8),
2492*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_sse2, 8),
2493*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_sse2, 8),
2494*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_sse2, 8),
2495*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_sse2, 8),
2496*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_sse2, 8),
2497*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_sse2, 8),
2498*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_sse2, 8),
2499*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_sse2, 8),
2500*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_sse2, 8),
2501*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_sse2, 8),
2502*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_sse2, 10),
2503*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_sse2, 10),
2504*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_sse2, 10),
2505*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_sse2, 10),
2506*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_sse2, 10),
2507*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_sse2, 10),
2508*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_sse2, 10),
2509*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_sse2, 10),
2510*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_sse2, 10),
2511*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_sse2, 10),
2512*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_sse2, 10),
2513*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_sse2, 10),
2514*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_sse2, 10),
2515*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_sse2, 12),
2516*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_sse2, 12),
2517*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_sse2, 12),
2518*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_sse2, 12),
2519*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_sse2, 12),
2520*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_sse2, 12),
2521*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_sse2, 12),
2522*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_sse2, 12),
2523*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_sse2, 12),
2524*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_sse2, 12),
2525*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_sse2, 12),
2526*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_sse2, 12),
2527*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_sse2, 12),
2528*77c1e3ccSAndroid Build Coastguard Worker #endif
2529*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2530*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16_sse2, -1),
2531*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64_sse2, -1),
2532*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2533*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_sse2, 8),
2534*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_sse2, 8),
2535*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_sse2, 10),
2536*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_sse2, 10),
2537*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_sse2, 12),
2538*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_sse2, 12),
2539*77c1e3ccSAndroid Build Coastguard Worker #endif
2540*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8_sse2, -1),
2541*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32_sse2, -1),
2542*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2543*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_sse2, 8),
2544*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_sse2, 8),
2545*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_sse2, 10),
2546*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_sse2, 10),
2547*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_sse2, 12),
2548*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_sse2, 12),
2549*77c1e3ccSAndroid Build Coastguard Worker #endif
2550*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4_sse2, -1),
2551*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16_sse2, -1),
2552*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2553*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_sse2, 8),
2554*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_sse2, 8),
2555*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_sse2, 10),
2556*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_sse2, 10),
2557*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_sse2, 12),
2558*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_sse2, 12),
2559*77c1e3ccSAndroid Build Coastguard Worker #endif
2560*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2561*77c1e3ccSAndroid Build Coastguard Worker };
2562*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(SSE2, SADTest, ::testing::ValuesIn(sse2_tests));
2563*77c1e3ccSAndroid Build Coastguard Worker 
2564*77c1e3ccSAndroid Build Coastguard Worker const SadSkipMxNParam skip_sse2_tests[] = {
2565*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128_sse2, -1),
2566*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64_sse2, -1),
2567*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128_sse2, -1),
2568*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64_sse2, -1),
2569*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32_sse2, -1),
2570*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64_sse2, -1),
2571*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32_sse2, -1),
2572*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16_sse2, -1),
2573*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32_sse2, -1),
2574*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16_sse2, -1),
2575*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8_sse2, -1),
2576*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad_skip_8x16_sse2, -1),
2577*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad_skip_8x8_sse2, -1),
2578*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad_skip_4x8_sse2, -1),
2579*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2580*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16_sse2, -1),
2581*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64_sse2, -1),
2582*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8_sse2, -1),
2583*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad_skip_8x32_sse2, -1),
2584*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad_skip_4x16_sse2, -1),
2585*77c1e3ccSAndroid Build Coastguard Worker #endif
2586*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2587*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_sse2, 8),
2588*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_sse2, 8),
2589*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_sse2, 8),
2590*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_sse2, 8),
2591*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_sse2, 8),
2592*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_sse2, 8),
2593*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_sse2, 8),
2594*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_sse2, 8),
2595*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_sse2, 8),
2596*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_sse2, 8),
2597*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_sse2, 8),
2598*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2599*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_sse2, 8),
2600*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_sse2, 8),
2601*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_sse2, 8),
2602*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_sse2, 8),
2603*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_sse2, 8),
2604*77c1e3ccSAndroid Build Coastguard Worker #endif
2605*77c1e3ccSAndroid Build Coastguard Worker 
2606*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_sse2, 10),
2607*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_sse2, 10),
2608*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_sse2, 10),
2609*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_sse2, 10),
2610*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_sse2, 10),
2611*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_sse2, 10),
2612*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_sse2, 10),
2613*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_sse2, 10),
2614*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_sse2, 10),
2615*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_sse2, 10),
2616*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_sse2, 10),
2617*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2618*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_sse2, 10),
2619*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_sse2, 10),
2620*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_sse2, 10),
2621*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_sse2, 10),
2622*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_sse2, 10),
2623*77c1e3ccSAndroid Build Coastguard Worker #endif
2624*77c1e3ccSAndroid Build Coastguard Worker 
2625*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_sse2, 12),
2626*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_sse2, 12),
2627*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_sse2, 12),
2628*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_sse2, 12),
2629*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_sse2, 12),
2630*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_sse2, 12),
2631*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_sse2, 12),
2632*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_sse2, 12),
2633*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16_sse2, 12),
2634*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8_sse2, 12),
2635*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8_sse2, 12),
2636*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2637*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16_sse2, 12),
2638*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_sse2, 12),
2639*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8_sse2, 12),
2640*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32_sse2, 12),
2641*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16_sse2, 12),
2642*77c1e3ccSAndroid Build Coastguard Worker #endif
2643*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
2644*77c1e3ccSAndroid Build Coastguard Worker };
2645*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(SSE2, SADSkipTest,
2646*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_sse2_tests));
2647*77c1e3ccSAndroid Build Coastguard Worker 
2648*77c1e3ccSAndroid Build Coastguard Worker const SadMxNAvgParam avg_sse2_tests[] = {
2649*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_avg_sse2, -1),
2650*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_avg_sse2, -1),
2651*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_avg_sse2, -1),
2652*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_avg_sse2, -1),
2653*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_avg_sse2, -1),
2654*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_avg_sse2, -1),
2655*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_avg_sse2, -1),
2656*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_avg_sse2, -1),
2657*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32_avg_sse2, -1),
2658*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16_avg_sse2, -1),
2659*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8_avg_sse2, -1),
2660*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16_avg_sse2, -1),
2661*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8_avg_sse2, -1),
2662*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4_avg_sse2, -1),
2663*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8_avg_sse2, -1),
2664*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4_avg_sse2, -1),
2665*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2666*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_sse2, 8),
2667*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_sse2, 8),
2668*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_sse2, 8),
2669*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_sse2, 8),
2670*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_sse2, 8),
2671*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_sse2, 8),
2672*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_sse2, 8),
2673*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_sse2, 8),
2674*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_sse2, 8),
2675*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_sse2, 8),
2676*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_sse2, 8),
2677*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_sse2, 8),
2678*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_sse2, 8),
2679*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_sse2, 10),
2680*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_sse2, 10),
2681*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_sse2, 10),
2682*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_sse2, 10),
2683*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_sse2, 10),
2684*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_sse2, 10),
2685*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_sse2, 10),
2686*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_sse2, 10),
2687*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_sse2, 10),
2688*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_sse2, 10),
2689*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_sse2, 10),
2690*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_sse2, 10),
2691*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_sse2, 10),
2692*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_sse2, 12),
2693*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_sse2, 12),
2694*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_sse2, 12),
2695*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_sse2, 12),
2696*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_sse2, 12),
2697*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_sse2, 12),
2698*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_sse2, 12),
2699*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_sse2, 12),
2700*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16_avg_sse2, 12),
2701*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8_avg_sse2, 12),
2702*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4_avg_sse2, 12),
2703*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8_avg_sse2, 12),
2704*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4_avg_sse2, 12),
2705*77c1e3ccSAndroid Build Coastguard Worker #endif
2706*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2707*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16_avg_sse2, -1),
2708*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64_avg_sse2, -1),
2709*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2710*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_sse2, 8),
2711*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_sse2, 8),
2712*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_sse2, 10),
2713*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_sse2, 10),
2714*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_sse2, 12),
2715*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_sse2, 12),
2716*77c1e3ccSAndroid Build Coastguard Worker #endif
2717*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8_avg_sse2, -1),
2718*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32_avg_sse2, -1),
2719*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2720*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_sse2, 8),
2721*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_sse2, 8),
2722*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_sse2, 10),
2723*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_sse2, 10),
2724*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_sse2, 12),
2725*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32_avg_sse2, 12),
2726*77c1e3ccSAndroid Build Coastguard Worker #endif
2727*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4_avg_sse2, -1),
2728*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16_avg_sse2, -1),
2729*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2730*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_sse2, 8),
2731*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_sse2, 8),
2732*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_sse2, 10),
2733*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_sse2, 10),
2734*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_sse2, 12),
2735*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16_avg_sse2, 12),
2736*77c1e3ccSAndroid Build Coastguard Worker #endif
2737*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
2738*77c1e3ccSAndroid Build Coastguard Worker };
2739*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(SSE2, SADavgTest, ::testing::ValuesIn(avg_sse2_tests));
2740*77c1e3ccSAndroid Build Coastguard Worker 
2741*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x4d_sse2_tests[] = {
2742*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x4d_sse2, -1),
2743*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x4d_sse2, -1),
2744*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x4d_sse2, -1),
2745*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x4d_sse2, -1),
2746*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x4d_sse2, -1),
2747*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x4d_sse2, -1),
2748*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x4d_sse2, -1),
2749*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x4d_sse2, -1),
2750*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32x4d_sse2, -1),
2751*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16x4d_sse2, -1),
2752*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8x4d_sse2, -1),
2753*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad8x16x4d_sse2, -1),
2754*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad8x8x4d_sse2, -1),
2755*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_sad8x4x4d_sse2, -1),
2756*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad4x8x4d_sse2, -1),
2757*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_sad4x4x4d_sse2, -1),
2758*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2759*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_sse2, 8),
2760*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_sse2, 8),
2761*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_sse2, 8),
2762*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_sse2, 8),
2763*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_sse2, 8),
2764*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_sse2, 8),
2765*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_sse2, 8),
2766*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_sse2, 8),
2767*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_sse2, 8),
2768*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_sse2, 8),
2769*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_sse2, 8),
2770*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_sse2, 8),
2771*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_sse2, 8),
2772*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_sse2, 10),
2773*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_sse2, 10),
2774*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_sse2, 10),
2775*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_sse2, 10),
2776*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_sse2, 10),
2777*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_sse2, 10),
2778*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_sse2, 10),
2779*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_sse2, 10),
2780*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_sse2, 10),
2781*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_sse2, 10),
2782*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_sse2, 10),
2783*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_sse2, 10),
2784*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_sse2, 10),
2785*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_sse2, 12),
2786*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_sse2, 12),
2787*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_sse2, 12),
2788*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_sse2, 12),
2789*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_sse2, 12),
2790*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_sse2, 12),
2791*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_sse2, 12),
2792*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_sse2, 12),
2793*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad8x16x4d_sse2, 12),
2794*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad8x8x4d_sse2, 12),
2795*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_highbd_sad8x4x4d_sse2, 12),
2796*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad4x8x4d_sse2, 12),
2797*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_highbd_sad4x4x4d_sse2, 12),
2798*77c1e3ccSAndroid Build Coastguard Worker #endif
2799*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2800*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x4d_sse2, -1),
2801*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64x4d_sse2, -1),
2802*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2803*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_sse2, 8),
2804*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_sse2, 8),
2805*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_sse2, 10),
2806*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_sse2, 10),
2807*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_sse2, 12),
2808*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_sse2, 12),
2809*77c1e3ccSAndroid Build Coastguard Worker #endif
2810*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x4d_sse2, -1),
2811*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad8x32x4d_sse2, -1),
2812*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2813*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_sse2, 8),
2814*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_sse2, 8),
2815*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_sse2, 10),
2816*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_sse2, 10),
2817*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_sse2, 12),
2818*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad8x32x4d_sse2, 12),
2819*77c1e3ccSAndroid Build Coastguard Worker #endif
2820*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x4d_sse2, -1),
2821*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad4x16x4d_sse2, -1),
2822*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2823*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_sse2, 8),
2824*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_sse2, 8),
2825*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_sse2, 10),
2826*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_sse2, 10),
2827*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_sse2, 12),
2828*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad4x16x4d_sse2, 12),
2829*77c1e3ccSAndroid Build Coastguard Worker #endif
2830*77c1e3ccSAndroid Build Coastguard Worker #endif
2831*77c1e3ccSAndroid Build Coastguard Worker };
2832*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(SSE2, SADx4Test, ::testing::ValuesIn(x4d_sse2_tests));
2833*77c1e3ccSAndroid Build Coastguard Worker 
2834*77c1e3ccSAndroid Build Coastguard Worker const SadSkipMxNx4Param skip_x4d_sse2_tests[] = {
2835*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128x4d_sse2, -1),
2836*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64x4d_sse2, -1),
2837*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128x4d_sse2, -1),
2838*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64x4d_sse2, -1),
2839*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32x4d_sse2, -1),
2840*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64x4d_sse2, -1),
2841*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32x4d_sse2, -1),
2842*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16x4d_sse2, -1),
2843*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32x4d_sse2, -1),
2844*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16x4d_sse2, -1),
2845*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8x4d_sse2, -1),
2846*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_sad_skip_8x16x4d_sse2, -1),
2847*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_sad_skip_8x8x4d_sse2, -1),
2848*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_sad_skip_4x8x4d_sse2, -1),
2849*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2850*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16x4d_sse2, -1),
2851*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64x4d_sse2, -1),
2852*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8x4d_sse2, -1),
2853*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_sad_skip_8x32x4d_sse2, -1),
2854*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_sad_skip_4x16x4d_sse2, -1),
2855*77c1e3ccSAndroid Build Coastguard Worker #endif
2856*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2857*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_sse2, 8),
2858*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_sse2, 8),
2859*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_sse2, 8),
2860*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_sse2, 8),
2861*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_sse2, 8),
2862*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_sse2, 8),
2863*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_sse2, 8),
2864*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_sse2, 8),
2865*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_sse2, 8),
2866*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_sse2, 8),
2867*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_sse2, 8),
2868*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2869*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_sse2, 8),
2870*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_sse2, 8),
2871*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_sse2, 8),
2872*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_sse2, 8),
2873*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_sse2, 8),
2874*77c1e3ccSAndroid Build Coastguard Worker #endif
2875*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_sse2, 10),
2876*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_sse2, 10),
2877*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_sse2, 10),
2878*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_sse2, 10),
2879*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_sse2, 10),
2880*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_sse2, 10),
2881*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_sse2, 10),
2882*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_sse2, 10),
2883*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_sse2, 10),
2884*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_sse2, 10),
2885*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_sse2, 10),
2886*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2887*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_sse2, 10),
2888*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_sse2, 10),
2889*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_sse2, 10),
2890*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_sse2, 10),
2891*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_sse2, 10),
2892*77c1e3ccSAndroid Build Coastguard Worker #endif
2893*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_sse2, 12),
2894*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_sse2, 12),
2895*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_sse2, 12),
2896*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_sse2, 12),
2897*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_sse2, 12),
2898*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_sse2, 12),
2899*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_sse2, 12),
2900*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_sse2, 12),
2901*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_sse2, 12),
2902*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_sse2, 12),
2903*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_sse2, 12),
2904*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2905*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_sse2, 12),
2906*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_sse2, 12),
2907*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_sse2, 12),
2908*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_sse2, 12),
2909*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_sse2, 12),
2910*77c1e3ccSAndroid Build Coastguard Worker #endif
2911*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
2912*77c1e3ccSAndroid Build Coastguard Worker };
2913*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(SSE2, SADSkipx4Test,
2914*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_x4d_sse2_tests));
2915*77c1e3ccSAndroid Build Coastguard Worker 
2916*77c1e3ccSAndroid Build Coastguard Worker const DistWtdSadMxNAvgParam dist_wtd_avg_sse2_tests[] = {
2917*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_dist_wtd_sad128x128_avg_sse2, -1),
2918*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_dist_wtd_sad128x64_avg_sse2, -1),
2919*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_dist_wtd_sad64x128_avg_sse2, -1),
2920*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_dist_wtd_sad64x64_avg_sse2, -1),
2921*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_dist_wtd_sad64x32_avg_sse2, -1),
2922*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_dist_wtd_sad32x64_avg_sse2, -1),
2923*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_dist_wtd_sad32x32_avg_sse2, -1),
2924*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_dist_wtd_sad32x16_avg_sse2, -1),
2925*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_dist_wtd_sad16x32_avg_sse2, -1),
2926*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_dist_wtd_sad16x16_avg_sse2, -1),
2927*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_dist_wtd_sad16x8_avg_sse2, -1),
2928*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16, &aom_dist_wtd_sad8x16_avg_sse2, -1),
2929*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 8, &aom_dist_wtd_sad8x8_avg_sse2, -1),
2930*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 4, &aom_dist_wtd_sad8x4_avg_sse2, -1),
2931*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8, &aom_dist_wtd_sad4x8_avg_sse2, -1),
2932*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 4, &aom_dist_wtd_sad4x4_avg_sse2, -1),
2933*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
2934*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_dist_wtd_sad64x16_avg_sse2, -1),
2935*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_dist_wtd_sad16x64_avg_sse2, -1),
2936*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_dist_wtd_sad32x8_avg_sse2, -1),
2937*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 32, &aom_dist_wtd_sad8x32_avg_sse2, -1),
2938*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_dist_wtd_sad16x4_avg_sse2, -1),
2939*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 16, &aom_dist_wtd_sad4x16_avg_sse2, -1),
2940*77c1e3ccSAndroid Build Coastguard Worker #endif
2941*77c1e3ccSAndroid Build Coastguard Worker };
2942*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(sse2, DistWtdSADavgTest,
2943*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(dist_wtd_avg_sse2_tests));
2944*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_SSE2
2945*77c1e3ccSAndroid Build Coastguard Worker 
2946*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_SSE3
2947*77c1e3ccSAndroid Build Coastguard Worker // Only functions are x3, which do not have tests.
2948*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_SSE3
2949*77c1e3ccSAndroid Build Coastguard Worker 
2950*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_SSE4_1
2951*77c1e3ccSAndroid Build Coastguard Worker // Only functions are x8, which do not have tests.
2952*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_SSE4_1
2953*77c1e3ccSAndroid Build Coastguard Worker 
2954*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_AVX2
2955*77c1e3ccSAndroid Build Coastguard Worker const SadMxNParam avx2_tests[] = {
2956*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_avx2, -1),
2957*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_avx2, -1),
2958*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_avx2, -1),
2959*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_avx2, -1),
2960*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_avx2, -1),
2961*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_avx2, -1),
2962*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_avx2, -1),
2963*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_avx2, -1),
2964*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
2965*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avx2, 8),
2966*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avx2, 10),
2967*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avx2, 12),
2968*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avx2, 8),
2969*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avx2, 10),
2970*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avx2, 12),
2971*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avx2, 8),
2972*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avx2, 10),
2973*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avx2, 12),
2974*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avx2, 8),
2975*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avx2, 10),
2976*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avx2, 12),
2977*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avx2, 8),
2978*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avx2, 10),
2979*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avx2, 12),
2980*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avx2, 8),
2981*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avx2, 10),
2982*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avx2, 12),
2983*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avx2, 8),
2984*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avx2, 10),
2985*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avx2, 12),
2986*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avx2, 8),
2987*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avx2, 10),
2988*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avx2, 12),
2989*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avx2, 8),
2990*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avx2, 10),
2991*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avx2, 12),
2992*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avx2, 8),
2993*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avx2, 10),
2994*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avx2, 12),
2995*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avx2, 8),
2996*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avx2, 10),
2997*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avx2, 12),
2998*77c1e3ccSAndroid Build Coastguard Worker 
2999*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3000*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avx2, 8),
3001*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avx2, 10),
3002*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avx2, 12),
3003*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avx2, 8),
3004*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avx2, 10),
3005*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avx2, 12),
3006*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avx2, 8),
3007*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avx2, 10),
3008*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avx2, 12),
3009*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avx2, 8),
3010*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avx2, 10),
3011*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avx2, 12),
3012*77c1e3ccSAndroid Build Coastguard Worker #endif
3013*77c1e3ccSAndroid Build Coastguard Worker #endif
3014*77c1e3ccSAndroid Build Coastguard Worker };
3015*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(AVX2, SADTest, ::testing::ValuesIn(avx2_tests));
3016*77c1e3ccSAndroid Build Coastguard Worker 
3017*77c1e3ccSAndroid Build Coastguard Worker const SadSkipMxNParam skip_avx2_tests[] = {
3018*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128_avx2, -1),
3019*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64_avx2, -1),
3020*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128_avx2, -1),
3021*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64_avx2, -1),
3022*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32_avx2, -1),
3023*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64_avx2, -1),
3024*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32_avx2, -1),
3025*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16_avx2, -1),
3026*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
3027*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_avx2, 8),
3028*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_avx2, 8),
3029*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_avx2, 8),
3030*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_avx2, 8),
3031*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_avx2, 8),
3032*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_avx2, 8),
3033*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_avx2, 8),
3034*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_avx2, 8),
3035*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_avx2, 8),
3036*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_avx2, 8),
3037*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_avx2, 8),
3038*77c1e3ccSAndroid Build Coastguard Worker 
3039*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_avx2, 10),
3040*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_avx2, 10),
3041*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_avx2, 10),
3042*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_avx2, 10),
3043*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_avx2, 10),
3044*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_avx2, 10),
3045*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_avx2, 10),
3046*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_avx2, 10),
3047*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_avx2, 10),
3048*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_avx2, 10),
3049*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_avx2, 10),
3050*77c1e3ccSAndroid Build Coastguard Worker 
3051*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128_avx2, 12),
3052*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64_avx2, 12),
3053*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128_avx2, 12),
3054*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64_avx2, 12),
3055*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32_avx2, 12),
3056*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64_avx2, 12),
3057*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32_avx2, 12),
3058*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16_avx2, 12),
3059*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32_avx2, 12),
3060*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16_avx2, 12),
3061*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8_avx2, 12),
3062*77c1e3ccSAndroid Build Coastguard Worker 
3063*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3064*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_avx2, 8),
3065*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_avx2, 10),
3066*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64_avx2, 12),
3067*77c1e3ccSAndroid Build Coastguard Worker #endif
3068*77c1e3ccSAndroid Build Coastguard Worker #endif
3069*77c1e3ccSAndroid Build Coastguard Worker };
3070*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(AVX2, SADSkipTest,
3071*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_avx2_tests));
3072*77c1e3ccSAndroid Build Coastguard Worker 
3073*77c1e3ccSAndroid Build Coastguard Worker const SadMxNAvgParam avg_avx2_tests[] = {
3074*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128_avg_avx2, -1),
3075*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64_avg_avx2, -1),
3076*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128_avg_avx2, -1),
3077*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64_avg_avx2, -1),
3078*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32_avg_avx2, -1),
3079*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64_avg_avx2, -1),
3080*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32_avg_avx2, -1),
3081*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16_avg_avx2, -1),
3082*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
3083*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_avx2, 8),
3084*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_avx2, 10),
3085*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128_avg_avx2, 12),
3086*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_avx2, 8),
3087*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_avx2, 10),
3088*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64_avg_avx2, 12),
3089*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_avx2, 8),
3090*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_avx2, 10),
3091*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128_avg_avx2, 12),
3092*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_avx2, 8),
3093*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_avx2, 10),
3094*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64_avg_avx2, 12),
3095*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_avx2, 8),
3096*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_avx2, 10),
3097*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32_avg_avx2, 12),
3098*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_avx2, 8),
3099*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_avx2, 10),
3100*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64_avg_avx2, 12),
3101*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_avx2, 8),
3102*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_avx2, 10),
3103*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32_avg_avx2, 12),
3104*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_avx2, 8),
3105*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_avx2, 10),
3106*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16_avg_avx2, 12),
3107*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_avx2, 8),
3108*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_avx2, 10),
3109*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32_avg_avx2, 12),
3110*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_avx2, 8),
3111*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_avx2, 10),
3112*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16_avg_avx2, 12),
3113*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_avx2, 8),
3114*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_avx2, 10),
3115*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8_avg_avx2, 12),
3116*77c1e3ccSAndroid Build Coastguard Worker 
3117*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3118*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_avx2, 8),
3119*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_avx2, 10),
3120*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16_avg_avx2, 12),
3121*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_avx2, 8),
3122*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_avx2, 10),
3123*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64_avg_avx2, 12),
3124*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_avx2, 8),
3125*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_avx2, 10),
3126*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8_avg_avx2, 12),
3127*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_avx2, 8),
3128*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_avx2, 10),
3129*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4_avg_avx2, 12),
3130*77c1e3ccSAndroid Build Coastguard Worker #endif
3131*77c1e3ccSAndroid Build Coastguard Worker #endif
3132*77c1e3ccSAndroid Build Coastguard Worker };
3133*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(AVX2, SADavgTest, ::testing::ValuesIn(avg_avx2_tests));
3134*77c1e3ccSAndroid Build Coastguard Worker 
3135*77c1e3ccSAndroid Build Coastguard Worker const SadSkipMxNx4Param skip_x4d_avx2_tests[] = {
3136*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad_skip_128x128x4d_avx2, -1),
3137*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad_skip_128x64x4d_avx2, -1),
3138*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad_skip_64x128x4d_avx2, -1),
3139*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad_skip_64x64x4d_avx2, -1),
3140*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad_skip_64x32x4d_avx2, -1),
3141*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad_skip_32x64x4d_avx2, -1),
3142*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad_skip_32x32x4d_avx2, -1),
3143*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad_skip_32x16x4d_avx2, -1),
3144*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad_skip_16x32x4d_avx2, -1),
3145*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad_skip_16x16x4d_avx2, -1),
3146*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad_skip_16x8x4d_avx2, -1),
3147*77c1e3ccSAndroid Build Coastguard Worker 
3148*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
3149*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_avx2, 8),
3150*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_avx2, 8),
3151*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_avx2, 8),
3152*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_avx2, 8),
3153*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_avx2, 8),
3154*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_avx2, 8),
3155*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_avx2, 8),
3156*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_avx2, 8),
3157*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_avx2, 8),
3158*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_avx2, 8),
3159*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_avx2, 8),
3160*77c1e3ccSAndroid Build Coastguard Worker 
3161*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_avx2, 10),
3162*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_avx2, 10),
3163*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_avx2, 10),
3164*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_avx2, 10),
3165*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_avx2, 10),
3166*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_avx2, 10),
3167*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_avx2, 10),
3168*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_avx2, 10),
3169*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_avx2, 10),
3170*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_avx2, 10),
3171*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_avx2, 10),
3172*77c1e3ccSAndroid Build Coastguard Worker 
3173*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_avx2, 12),
3174*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_avx2, 12),
3175*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_avx2, 12),
3176*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_avx2, 12),
3177*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_avx2, 12),
3178*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_avx2, 12),
3179*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_avx2, 12),
3180*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_avx2, 12),
3181*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_avx2, 12),
3182*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_avx2, 12),
3183*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_avx2, 12),
3184*77c1e3ccSAndroid Build Coastguard Worker 
3185*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3186*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_avx2, 8),
3187*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_avx2, 8),
3188*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_avx2, 8),
3189*77c1e3ccSAndroid Build Coastguard Worker 
3190*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_avx2, 10),
3191*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_avx2, 10),
3192*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_avx2, 10),
3193*77c1e3ccSAndroid Build Coastguard Worker 
3194*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_avx2, 12),
3195*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_avx2, 12),
3196*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_avx2, 12),
3197*77c1e3ccSAndroid Build Coastguard Worker #endif
3198*77c1e3ccSAndroid Build Coastguard Worker #endif
3199*77c1e3ccSAndroid Build Coastguard Worker 
3200*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3201*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad_skip_64x16x4d_avx2, -1),
3202*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad_skip_32x8x4d_avx2, -1),
3203*77c1e3ccSAndroid Build Coastguard Worker 
3204*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad_skip_16x64x4d_avx2, -1),
3205*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad_skip_16x4x4d_avx2, -1),
3206*77c1e3ccSAndroid Build Coastguard Worker #endif
3207*77c1e3ccSAndroid Build Coastguard Worker };
3208*77c1e3ccSAndroid Build Coastguard Worker 
3209*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(AVX2, SADSkipx4Test,
3210*77c1e3ccSAndroid Build Coastguard Worker                          ::testing::ValuesIn(skip_x4d_avx2_tests));
3211*77c1e3ccSAndroid Build Coastguard Worker 
3212*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x4d_avx2_tests[] = {
3213*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_sad16x32x4d_avx2, -1),
3214*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_sad16x16x4d_avx2, -1),
3215*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_sad16x8x4d_avx2, -1),
3216*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x4d_avx2, -1),
3217*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x4d_avx2, -1),
3218*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x4d_avx2, -1),
3219*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x4d_avx2, -1),
3220*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x4d_avx2, -1),
3221*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x4d_avx2, -1),
3222*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x4d_avx2, -1),
3223*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x4d_avx2, -1),
3224*77c1e3ccSAndroid Build Coastguard Worker 
3225*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3226*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_sad16x64x4d_avx2, -1),
3227*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x4d_avx2, -1),
3228*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x4d_avx2, -1),
3229*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x4d_avx2, -1),
3230*77c1e3ccSAndroid Build Coastguard Worker #endif
3231*77c1e3ccSAndroid Build Coastguard Worker 
3232*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
3233*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_avx2, 8),
3234*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_avx2, 10),
3235*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x4d_avx2, 12),
3236*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_avx2, 8),
3237*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_avx2, 10),
3238*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x4d_avx2, 12),
3239*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_avx2, 8),
3240*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_avx2, 10),
3241*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x4d_avx2, 12),
3242*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_avx2, 8),
3243*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_avx2, 10),
3244*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x4d_avx2, 12),
3245*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_avx2, 8),
3246*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_avx2, 10),
3247*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x4d_avx2, 12),
3248*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_avx2, 8),
3249*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_avx2, 10),
3250*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x4d_avx2, 12),
3251*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_avx2, 8),
3252*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_avx2, 10),
3253*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x4d_avx2, 12),
3254*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_avx2, 8),
3255*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_avx2, 10),
3256*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x4d_avx2, 12),
3257*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_avx2, 8),
3258*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_avx2, 10),
3259*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x4d_avx2, 12),
3260*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_avx2, 8),
3261*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_avx2, 10),
3262*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x4d_avx2, 12),
3263*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_avx2, 8),
3264*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_avx2, 10),
3265*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x4d_avx2, 12),
3266*77c1e3ccSAndroid Build Coastguard Worker 
3267*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3268*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_avx2, 8),
3269*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_avx2, 10),
3270*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x4d_avx2, 12),
3271*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_avx2, 8),
3272*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_avx2, 10),
3273*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x4d_avx2, 12),
3274*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_avx2, 8),
3275*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_avx2, 10),
3276*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x4d_avx2, 12),
3277*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_avx2, 8),
3278*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_avx2, 10),
3279*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x4d_avx2, 12),
3280*77c1e3ccSAndroid Build Coastguard Worker #endif
3281*77c1e3ccSAndroid Build Coastguard Worker #endif
3282*77c1e3ccSAndroid Build Coastguard Worker };
3283*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(AVX2, SADx4Test, ::testing::ValuesIn(x4d_avx2_tests));
3284*77c1e3ccSAndroid Build Coastguard Worker 
3285*77c1e3ccSAndroid Build Coastguard Worker const SadMxNx4Param x3d_avx2_tests[] = {
3286*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_sad32x64x3d_avx2, -1),
3287*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_sad32x32x3d_avx2, -1),
3288*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_sad32x16x3d_avx2, -1),
3289*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_sad64x128x3d_avx2, -1),
3290*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_sad64x64x3d_avx2, -1),
3291*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_sad64x32x3d_avx2, -1),
3292*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_sad128x128x3d_avx2, -1),
3293*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_sad128x64x3d_avx2, -1),
3294*77c1e3ccSAndroid Build Coastguard Worker 
3295*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3296*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_sad32x8x3d_avx2, -1),
3297*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_sad64x16x3d_avx2, -1),
3298*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_sad16x4x3d_avx2, -1),
3299*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
3300*77c1e3ccSAndroid Build Coastguard Worker 
3301*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
3302*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_avx2, 8),
3303*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_avx2, 10),
3304*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 128, &aom_highbd_sad128x128x3d_avx2, 12),
3305*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_avx2, 8),
3306*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_avx2, 10),
3307*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(128, 64, &aom_highbd_sad128x64x3d_avx2, 12),
3308*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_avx2, 8),
3309*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_avx2, 10),
3310*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128, &aom_highbd_sad64x128x3d_avx2, 12),
3311*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_avx2, 8),
3312*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_avx2, 10),
3313*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 64, &aom_highbd_sad64x64x3d_avx2, 12),
3314*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_avx2, 8),
3315*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_avx2, 10),
3316*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 32, &aom_highbd_sad64x32x3d_avx2, 12),
3317*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_avx2, 8),
3318*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_avx2, 10),
3319*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64, &aom_highbd_sad32x64x3d_avx2, 12),
3320*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_avx2, 8),
3321*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_avx2, 10),
3322*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 32, &aom_highbd_sad32x32x3d_avx2, 12),
3323*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_avx2, 8),
3324*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_avx2, 10),
3325*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 16, &aom_highbd_sad32x16x3d_avx2, 12),
3326*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_avx2, 8),
3327*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_avx2, 10),
3328*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32, &aom_highbd_sad16x32x3d_avx2, 12),
3329*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_avx2, 8),
3330*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_avx2, 10),
3331*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 16, &aom_highbd_sad16x16x3d_avx2, 12),
3332*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_avx2, 8),
3333*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_avx2, 10),
3334*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 8, &aom_highbd_sad16x8x3d_avx2, 12),
3335*77c1e3ccSAndroid Build Coastguard Worker 
3336*77c1e3ccSAndroid Build Coastguard Worker #if !CONFIG_REALTIME_ONLY
3337*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_avx2, 8),
3338*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_avx2, 10),
3339*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 64, &aom_highbd_sad16x64x3d_avx2, 12),
3340*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_avx2, 8),
3341*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_avx2, 10),
3342*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 16, &aom_highbd_sad64x16x3d_avx2, 12),
3343*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_avx2, 8),
3344*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_avx2, 10),
3345*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 8, &aom_highbd_sad32x8x3d_avx2, 12),
3346*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_avx2, 8),
3347*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_avx2, 10),
3348*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 4, &aom_highbd_sad16x4x3d_avx2, 12),
3349*77c1e3ccSAndroid Build Coastguard Worker #endif  // !CONFIG_REALTIME_ONLY
3350*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
3351*77c1e3ccSAndroid Build Coastguard Worker };
3352*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(AVX2, SADx3Test, ::testing::ValuesIn(x3d_avx2_tests));
3353*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_AVX2
3354*77c1e3ccSAndroid Build Coastguard Worker 
3355*77c1e3ccSAndroid Build Coastguard Worker }  // namespace
3356