xref: /aosp_15_r20/external/libaom/test/av1_convolve_scale_test.cc (revision 77c1e3ccc04c968bd2bc212e87364f250e820521)
1*77c1e3ccSAndroid Build Coastguard Worker /*
2*77c1e3ccSAndroid Build Coastguard Worker  * Copyright (c) 2017, 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 <tuple>
13*77c1e3ccSAndroid Build Coastguard Worker #include <vector>
14*77c1e3ccSAndroid Build Coastguard Worker 
15*77c1e3ccSAndroid Build Coastguard Worker #include "gtest/gtest.h"
16*77c1e3ccSAndroid Build Coastguard Worker 
17*77c1e3ccSAndroid Build Coastguard Worker #include "config/aom_config.h"
18*77c1e3ccSAndroid Build Coastguard Worker #include "config/av1_rtcd.h"
19*77c1e3ccSAndroid Build Coastguard Worker 
20*77c1e3ccSAndroid Build Coastguard Worker #include "aom_ports/aom_timer.h"
21*77c1e3ccSAndroid Build Coastguard Worker #include "test/acm_random.h"
22*77c1e3ccSAndroid Build Coastguard Worker #include "test/register_state_check.h"
23*77c1e3ccSAndroid Build Coastguard Worker #include "test/util.h"
24*77c1e3ccSAndroid Build Coastguard Worker 
25*77c1e3ccSAndroid Build Coastguard Worker #include "av1/common/common_data.h"
26*77c1e3ccSAndroid Build Coastguard Worker #include "av1/common/filter.h"
27*77c1e3ccSAndroid Build Coastguard Worker 
28*77c1e3ccSAndroid Build Coastguard Worker namespace {
29*77c1e3ccSAndroid Build Coastguard Worker const int kTestIters = 10;
30*77c1e3ccSAndroid Build Coastguard Worker const int kPerfIters = 1000;
31*77c1e3ccSAndroid Build Coastguard Worker 
32*77c1e3ccSAndroid Build Coastguard Worker const int kVPad = 32;
33*77c1e3ccSAndroid Build Coastguard Worker const int kHPad = 32;
34*77c1e3ccSAndroid Build Coastguard Worker const int kXStepQn = 16;
35*77c1e3ccSAndroid Build Coastguard Worker const int kYStepQn = 20;
36*77c1e3ccSAndroid Build Coastguard Worker 
37*77c1e3ccSAndroid Build Coastguard Worker const int kNumFilterBanks = SWITCHABLE_FILTERS;
38*77c1e3ccSAndroid Build Coastguard Worker 
39*77c1e3ccSAndroid Build Coastguard Worker using libaom_test::ACMRandom;
40*77c1e3ccSAndroid Build Coastguard Worker using std::make_tuple;
41*77c1e3ccSAndroid Build Coastguard Worker using std::tuple;
42*77c1e3ccSAndroid Build Coastguard Worker 
43*77c1e3ccSAndroid Build Coastguard Worker template <typename SrcPixel>
44*77c1e3ccSAndroid Build Coastguard Worker class TestImage {
45*77c1e3ccSAndroid Build Coastguard Worker  public:
TestImage(int w,int h,int bd)46*77c1e3ccSAndroid Build Coastguard Worker   TestImage(int w, int h, int bd) : w_(w), h_(h), bd_(bd) {
47*77c1e3ccSAndroid Build Coastguard Worker     assert(bd < 16);
48*77c1e3ccSAndroid Build Coastguard Worker     assert(bd <= 8 * static_cast<int>(sizeof(SrcPixel)));
49*77c1e3ccSAndroid Build Coastguard Worker 
50*77c1e3ccSAndroid Build Coastguard Worker     // Pad width by 2*kHPad and then round up to the next multiple of 16
51*77c1e3ccSAndroid Build Coastguard Worker     // to get src_stride_. Add another 16 for dst_stride_ (to make sure
52*77c1e3ccSAndroid Build Coastguard Worker     // something goes wrong if we use the wrong one)
53*77c1e3ccSAndroid Build Coastguard Worker     src_stride_ = (w_ + 2 * kHPad + 15) & ~15;
54*77c1e3ccSAndroid Build Coastguard Worker     dst_stride_ = src_stride_ + 16;
55*77c1e3ccSAndroid Build Coastguard Worker 
56*77c1e3ccSAndroid Build Coastguard Worker     // Allocate image data
57*77c1e3ccSAndroid Build Coastguard Worker     src_data_.resize(2 * src_block_size());
58*77c1e3ccSAndroid Build Coastguard Worker     dst_data_.resize(2 * dst_block_size());
59*77c1e3ccSAndroid Build Coastguard Worker     dst_16_data_.resize(2 * dst_block_size());
60*77c1e3ccSAndroid Build Coastguard Worker   }
61*77c1e3ccSAndroid Build Coastguard Worker 
62*77c1e3ccSAndroid Build Coastguard Worker   void Initialize(ACMRandom *rnd);
63*77c1e3ccSAndroid Build Coastguard Worker   void Check() const;
64*77c1e3ccSAndroid Build Coastguard Worker 
src_stride() const65*77c1e3ccSAndroid Build Coastguard Worker   int src_stride() const { return src_stride_; }
dst_stride() const66*77c1e3ccSAndroid Build Coastguard Worker   int dst_stride() const { return dst_stride_; }
67*77c1e3ccSAndroid Build Coastguard Worker 
src_block_size() const68*77c1e3ccSAndroid Build Coastguard Worker   int src_block_size() const { return (h_ + 2 * kVPad) * src_stride(); }
dst_block_size() const69*77c1e3ccSAndroid Build Coastguard Worker   int dst_block_size() const { return (h_ + 2 * kVPad) * dst_stride(); }
70*77c1e3ccSAndroid Build Coastguard Worker 
GetSrcData(bool ref,bool borders) const71*77c1e3ccSAndroid Build Coastguard Worker   const SrcPixel *GetSrcData(bool ref, bool borders) const {
72*77c1e3ccSAndroid Build Coastguard Worker     const SrcPixel *block = &src_data_[ref ? 0 : src_block_size()];
73*77c1e3ccSAndroid Build Coastguard Worker     return borders ? block : block + kHPad + src_stride_ * kVPad;
74*77c1e3ccSAndroid Build Coastguard Worker   }
75*77c1e3ccSAndroid Build Coastguard Worker 
GetDstData(bool ref,bool borders)76*77c1e3ccSAndroid Build Coastguard Worker   SrcPixel *GetDstData(bool ref, bool borders) {
77*77c1e3ccSAndroid Build Coastguard Worker     SrcPixel *block = &dst_data_[ref ? 0 : dst_block_size()];
78*77c1e3ccSAndroid Build Coastguard Worker     return borders ? block : block + kHPad + dst_stride_ * kVPad;
79*77c1e3ccSAndroid Build Coastguard Worker   }
80*77c1e3ccSAndroid Build Coastguard Worker 
GetDst16Data(bool ref,bool borders)81*77c1e3ccSAndroid Build Coastguard Worker   CONV_BUF_TYPE *GetDst16Data(bool ref, bool borders) {
82*77c1e3ccSAndroid Build Coastguard Worker     CONV_BUF_TYPE *block = &dst_16_data_[ref ? 0 : dst_block_size()];
83*77c1e3ccSAndroid Build Coastguard Worker     return borders ? block : block + kHPad + dst_stride_ * kVPad;
84*77c1e3ccSAndroid Build Coastguard Worker   }
85*77c1e3ccSAndroid Build Coastguard Worker 
86*77c1e3ccSAndroid Build Coastguard Worker  private:
87*77c1e3ccSAndroid Build Coastguard Worker   int w_, h_, bd_;
88*77c1e3ccSAndroid Build Coastguard Worker   int src_stride_, dst_stride_;
89*77c1e3ccSAndroid Build Coastguard Worker 
90*77c1e3ccSAndroid Build Coastguard Worker   std::vector<SrcPixel> src_data_;
91*77c1e3ccSAndroid Build Coastguard Worker   std::vector<SrcPixel> dst_data_;
92*77c1e3ccSAndroid Build Coastguard Worker   std::vector<CONV_BUF_TYPE> dst_16_data_;
93*77c1e3ccSAndroid Build Coastguard Worker };
94*77c1e3ccSAndroid Build Coastguard Worker 
95*77c1e3ccSAndroid Build Coastguard Worker template <typename Pixel>
FillEdge(ACMRandom * rnd,int num_pixels,int bd,bool trash,Pixel * data)96*77c1e3ccSAndroid Build Coastguard Worker void FillEdge(ACMRandom *rnd, int num_pixels, int bd, bool trash, Pixel *data) {
97*77c1e3ccSAndroid Build Coastguard Worker   if (!trash) {
98*77c1e3ccSAndroid Build Coastguard Worker     memset(data, 0, sizeof(*data) * num_pixels);
99*77c1e3ccSAndroid Build Coastguard Worker     return;
100*77c1e3ccSAndroid Build Coastguard Worker   }
101*77c1e3ccSAndroid Build Coastguard Worker   const Pixel mask = (1 << bd) - 1;
102*77c1e3ccSAndroid Build Coastguard Worker   for (int i = 0; i < num_pixels; ++i) data[i] = rnd->Rand16() & mask;
103*77c1e3ccSAndroid Build Coastguard Worker }
104*77c1e3ccSAndroid Build Coastguard Worker 
105*77c1e3ccSAndroid Build Coastguard Worker template <typename Pixel>
PrepBuffers(ACMRandom * rnd,int w,int h,int stride,int bd,bool trash_edges,Pixel * data)106*77c1e3ccSAndroid Build Coastguard Worker void PrepBuffers(ACMRandom *rnd, int w, int h, int stride, int bd,
107*77c1e3ccSAndroid Build Coastguard Worker                  bool trash_edges, Pixel *data) {
108*77c1e3ccSAndroid Build Coastguard Worker   assert(rnd);
109*77c1e3ccSAndroid Build Coastguard Worker   const Pixel mask = (1 << bd) - 1;
110*77c1e3ccSAndroid Build Coastguard Worker 
111*77c1e3ccSAndroid Build Coastguard Worker   // Fill in the first buffer with random data
112*77c1e3ccSAndroid Build Coastguard Worker   // Top border
113*77c1e3ccSAndroid Build Coastguard Worker   FillEdge(rnd, stride * kVPad, bd, trash_edges, data);
114*77c1e3ccSAndroid Build Coastguard Worker   for (int r = 0; r < h; ++r) {
115*77c1e3ccSAndroid Build Coastguard Worker     Pixel *row_data = data + (kVPad + r) * stride;
116*77c1e3ccSAndroid Build Coastguard Worker     // Left border, contents, right border
117*77c1e3ccSAndroid Build Coastguard Worker     FillEdge(rnd, kHPad, bd, trash_edges, row_data);
118*77c1e3ccSAndroid Build Coastguard Worker     for (int c = 0; c < w; ++c) row_data[kHPad + c] = rnd->Rand16() & mask;
119*77c1e3ccSAndroid Build Coastguard Worker     FillEdge(rnd, kHPad, bd, trash_edges, row_data + kHPad + w);
120*77c1e3ccSAndroid Build Coastguard Worker   }
121*77c1e3ccSAndroid Build Coastguard Worker   // Bottom border
122*77c1e3ccSAndroid Build Coastguard Worker   FillEdge(rnd, stride * kVPad, bd, trash_edges, data + stride * (kVPad + h));
123*77c1e3ccSAndroid Build Coastguard Worker 
124*77c1e3ccSAndroid Build Coastguard Worker   const int bpp = sizeof(*data);
125*77c1e3ccSAndroid Build Coastguard Worker   const int block_elts = stride * (h + 2 * kVPad);
126*77c1e3ccSAndroid Build Coastguard Worker   const int block_size = bpp * block_elts;
127*77c1e3ccSAndroid Build Coastguard Worker 
128*77c1e3ccSAndroid Build Coastguard Worker   // Now copy that to the second buffer
129*77c1e3ccSAndroid Build Coastguard Worker   memcpy(data + block_elts, data, block_size);
130*77c1e3ccSAndroid Build Coastguard Worker }
131*77c1e3ccSAndroid Build Coastguard Worker 
132*77c1e3ccSAndroid Build Coastguard Worker template <typename SrcPixel>
Initialize(ACMRandom * rnd)133*77c1e3ccSAndroid Build Coastguard Worker void TestImage<SrcPixel>::Initialize(ACMRandom *rnd) {
134*77c1e3ccSAndroid Build Coastguard Worker   PrepBuffers(rnd, w_, h_, src_stride_, bd_, false, &src_data_[0]);
135*77c1e3ccSAndroid Build Coastguard Worker   PrepBuffers(rnd, w_, h_, dst_stride_, bd_, true, &dst_data_[0]);
136*77c1e3ccSAndroid Build Coastguard Worker   PrepBuffers(rnd, w_, h_, dst_stride_, bd_, true, &dst_16_data_[0]);
137*77c1e3ccSAndroid Build Coastguard Worker }
138*77c1e3ccSAndroid Build Coastguard Worker 
139*77c1e3ccSAndroid Build Coastguard Worker template <typename SrcPixel>
Check() const140*77c1e3ccSAndroid Build Coastguard Worker void TestImage<SrcPixel>::Check() const {
141*77c1e3ccSAndroid Build Coastguard Worker   // If memcmp returns 0, there's nothing to do.
142*77c1e3ccSAndroid Build Coastguard Worker   const int num_pixels = dst_block_size();
143*77c1e3ccSAndroid Build Coastguard Worker   const SrcPixel *ref_dst = &dst_data_[0];
144*77c1e3ccSAndroid Build Coastguard Worker   const SrcPixel *tst_dst = &dst_data_[num_pixels];
145*77c1e3ccSAndroid Build Coastguard Worker 
146*77c1e3ccSAndroid Build Coastguard Worker   const CONV_BUF_TYPE *ref_16_dst = &dst_16_data_[0];
147*77c1e3ccSAndroid Build Coastguard Worker   const CONV_BUF_TYPE *tst_16_dst = &dst_16_data_[num_pixels];
148*77c1e3ccSAndroid Build Coastguard Worker 
149*77c1e3ccSAndroid Build Coastguard Worker   if (0 == memcmp(ref_dst, tst_dst, sizeof(*ref_dst) * num_pixels)) {
150*77c1e3ccSAndroid Build Coastguard Worker     if (0 == memcmp(ref_16_dst, tst_16_dst, sizeof(*ref_16_dst) * num_pixels))
151*77c1e3ccSAndroid Build Coastguard Worker       return;
152*77c1e3ccSAndroid Build Coastguard Worker   }
153*77c1e3ccSAndroid Build Coastguard Worker   // Otherwise, iterate through the buffer looking for differences (including
154*77c1e3ccSAndroid Build Coastguard Worker   // the edges)
155*77c1e3ccSAndroid Build Coastguard Worker   const int stride = dst_stride_;
156*77c1e3ccSAndroid Build Coastguard Worker   for (int r = 0; r < h_ + 2 * kVPad; ++r) {
157*77c1e3ccSAndroid Build Coastguard Worker     for (int c = 0; c < w_ + 2 * kHPad; ++c) {
158*77c1e3ccSAndroid Build Coastguard Worker       const int32_t ref_value = ref_dst[r * stride + c];
159*77c1e3ccSAndroid Build Coastguard Worker       const int32_t tst_value = tst_dst[r * stride + c];
160*77c1e3ccSAndroid Build Coastguard Worker 
161*77c1e3ccSAndroid Build Coastguard Worker       EXPECT_EQ(tst_value, ref_value)
162*77c1e3ccSAndroid Build Coastguard Worker           << "Error at row: " << (r - kVPad) << ", col: " << (c - kHPad);
163*77c1e3ccSAndroid Build Coastguard Worker     }
164*77c1e3ccSAndroid Build Coastguard Worker   }
165*77c1e3ccSAndroid Build Coastguard Worker 
166*77c1e3ccSAndroid Build Coastguard Worker   for (int r = 0; r < h_ + 2 * kVPad; ++r) {
167*77c1e3ccSAndroid Build Coastguard Worker     for (int c = 0; c < w_ + 2 * kHPad; ++c) {
168*77c1e3ccSAndroid Build Coastguard Worker       const int32_t ref_value = ref_16_dst[r * stride + c];
169*77c1e3ccSAndroid Build Coastguard Worker       const int32_t tst_value = tst_16_dst[r * stride + c];
170*77c1e3ccSAndroid Build Coastguard Worker 
171*77c1e3ccSAndroid Build Coastguard Worker       EXPECT_EQ(tst_value, ref_value)
172*77c1e3ccSAndroid Build Coastguard Worker           << "Error in 16 bit buffer "
173*77c1e3ccSAndroid Build Coastguard Worker           << "Error at row: " << (r - kVPad) << ", col: " << (c - kHPad);
174*77c1e3ccSAndroid Build Coastguard Worker     }
175*77c1e3ccSAndroid Build Coastguard Worker   }
176*77c1e3ccSAndroid Build Coastguard Worker }
177*77c1e3ccSAndroid Build Coastguard Worker 
178*77c1e3ccSAndroid Build Coastguard Worker typedef tuple<int, int> BlockDimension;
179*77c1e3ccSAndroid Build Coastguard Worker 
180*77c1e3ccSAndroid Build Coastguard Worker struct BaseParams {
BaseParams__anon35c25fe60111::BaseParams181*77c1e3ccSAndroid Build Coastguard Worker   BaseParams(BlockDimension dimensions) : dims(dimensions) {}
182*77c1e3ccSAndroid Build Coastguard Worker 
183*77c1e3ccSAndroid Build Coastguard Worker   BlockDimension dims;
184*77c1e3ccSAndroid Build Coastguard Worker };
185*77c1e3ccSAndroid Build Coastguard Worker 
186*77c1e3ccSAndroid Build Coastguard Worker template <typename SrcPixel>
187*77c1e3ccSAndroid Build Coastguard Worker class ConvolveScaleTestBase : public ::testing::Test {
188*77c1e3ccSAndroid Build Coastguard Worker  public:
ConvolveScaleTestBase()189*77c1e3ccSAndroid Build Coastguard Worker   ConvolveScaleTestBase() : image_(nullptr) {}
~ConvolveScaleTestBase()190*77c1e3ccSAndroid Build Coastguard Worker   ~ConvolveScaleTestBase() override { delete image_; }
191*77c1e3ccSAndroid Build Coastguard Worker 
192*77c1e3ccSAndroid Build Coastguard Worker   // Implemented by subclasses (SetUp depends on the parameters passed
193*77c1e3ccSAndroid Build Coastguard Worker   // in and RunOne depends on the function to be tested. These can't
194*77c1e3ccSAndroid Build Coastguard Worker   // be templated for low/high bit depths because they have different
195*77c1e3ccSAndroid Build Coastguard Worker   // numbers of parameters)
196*77c1e3ccSAndroid Build Coastguard Worker   void SetUp() override = 0;
197*77c1e3ccSAndroid Build Coastguard Worker   virtual void RunOne(bool ref) = 0;
198*77c1e3ccSAndroid Build Coastguard Worker 
199*77c1e3ccSAndroid Build Coastguard Worker  protected:
SetParams(const BaseParams & params,int bd)200*77c1e3ccSAndroid Build Coastguard Worker   void SetParams(const BaseParams &params, int bd) {
201*77c1e3ccSAndroid Build Coastguard Worker     width_ = std::get<0>(params.dims);
202*77c1e3ccSAndroid Build Coastguard Worker     height_ = std::get<1>(params.dims);
203*77c1e3ccSAndroid Build Coastguard Worker     bd_ = bd;
204*77c1e3ccSAndroid Build Coastguard Worker 
205*77c1e3ccSAndroid Build Coastguard Worker     delete image_;
206*77c1e3ccSAndroid Build Coastguard Worker     image_ = new TestImage<SrcPixel>(width_, height_, bd_);
207*77c1e3ccSAndroid Build Coastguard Worker     ASSERT_NE(image_, nullptr);
208*77c1e3ccSAndroid Build Coastguard Worker   }
209*77c1e3ccSAndroid Build Coastguard Worker 
GetConvParams()210*77c1e3ccSAndroid Build Coastguard Worker   std::vector<ConvolveParams> GetConvParams() {
211*77c1e3ccSAndroid Build Coastguard Worker     std::vector<ConvolveParams> convolve_params;
212*77c1e3ccSAndroid Build Coastguard Worker 
213*77c1e3ccSAndroid Build Coastguard Worker     ConvolveParams param_no_compound =
214*77c1e3ccSAndroid Build Coastguard Worker         get_conv_params_no_round(0, 0, nullptr, 0, 0, bd_);
215*77c1e3ccSAndroid Build Coastguard Worker     convolve_params.push_back(param_no_compound);
216*77c1e3ccSAndroid Build Coastguard Worker 
217*77c1e3ccSAndroid Build Coastguard Worker     ConvolveParams param_compound_avg =
218*77c1e3ccSAndroid Build Coastguard Worker         get_conv_params_no_round(1, 0, nullptr, 0, 1, bd_);
219*77c1e3ccSAndroid Build Coastguard Worker     convolve_params.push_back(param_compound_avg);
220*77c1e3ccSAndroid Build Coastguard Worker 
221*77c1e3ccSAndroid Build Coastguard Worker     ConvolveParams param_compound_avg_dist_wtd = param_compound_avg;
222*77c1e3ccSAndroid Build Coastguard Worker     param_compound_avg_dist_wtd.use_dist_wtd_comp_avg = 1;
223*77c1e3ccSAndroid Build Coastguard Worker 
224*77c1e3ccSAndroid Build Coastguard Worker     for (int i = 0; i < 2; ++i) {
225*77c1e3ccSAndroid Build Coastguard Worker       for (int j = 0; j < 4; ++j) {
226*77c1e3ccSAndroid Build Coastguard Worker         param_compound_avg_dist_wtd.fwd_offset = quant_dist_lookup_table[j][i];
227*77c1e3ccSAndroid Build Coastguard Worker         param_compound_avg_dist_wtd.bck_offset =
228*77c1e3ccSAndroid Build Coastguard Worker             quant_dist_lookup_table[j][1 - i];
229*77c1e3ccSAndroid Build Coastguard Worker         convolve_params.push_back(param_compound_avg_dist_wtd);
230*77c1e3ccSAndroid Build Coastguard Worker       }
231*77c1e3ccSAndroid Build Coastguard Worker     }
232*77c1e3ccSAndroid Build Coastguard Worker 
233*77c1e3ccSAndroid Build Coastguard Worker     return convolve_params;
234*77c1e3ccSAndroid Build Coastguard Worker   }
235*77c1e3ccSAndroid Build Coastguard Worker 
Run()236*77c1e3ccSAndroid Build Coastguard Worker   void Run() {
237*77c1e3ccSAndroid Build Coastguard Worker     ACMRandom rnd(ACMRandom::DeterministicSeed());
238*77c1e3ccSAndroid Build Coastguard Worker     std::vector<ConvolveParams> conv_params = GetConvParams();
239*77c1e3ccSAndroid Build Coastguard Worker 
240*77c1e3ccSAndroid Build Coastguard Worker     for (int i = 0; i < kTestIters; ++i) {
241*77c1e3ccSAndroid Build Coastguard Worker       for (int subpel_search = USE_2_TAPS; subpel_search <= USE_8_TAPS;
242*77c1e3ccSAndroid Build Coastguard Worker            ++subpel_search) {
243*77c1e3ccSAndroid Build Coastguard Worker         for (int filter_bank_y = 0; filter_bank_y < kNumFilterBanks;
244*77c1e3ccSAndroid Build Coastguard Worker              ++filter_bank_y) {
245*77c1e3ccSAndroid Build Coastguard Worker           const InterpFilter filter_y =
246*77c1e3ccSAndroid Build Coastguard Worker               static_cast<InterpFilter>(filter_bank_y);
247*77c1e3ccSAndroid Build Coastguard Worker           filter_y_ =
248*77c1e3ccSAndroid Build Coastguard Worker               av1_get_interp_filter_params_with_block_size(filter_y, width_);
249*77c1e3ccSAndroid Build Coastguard Worker 
250*77c1e3ccSAndroid Build Coastguard Worker           for (int filter_bank_x = 0; filter_bank_x < kNumFilterBanks;
251*77c1e3ccSAndroid Build Coastguard Worker                ++filter_bank_x) {
252*77c1e3ccSAndroid Build Coastguard Worker             const InterpFilter filter_x =
253*77c1e3ccSAndroid Build Coastguard Worker                 static_cast<InterpFilter>(filter_bank_x);
254*77c1e3ccSAndroid Build Coastguard Worker             filter_x_ =
255*77c1e3ccSAndroid Build Coastguard Worker                 av1_get_interp_filter_params_with_block_size(filter_x, width_);
256*77c1e3ccSAndroid Build Coastguard Worker 
257*77c1e3ccSAndroid Build Coastguard Worker             for (const auto c : conv_params) {
258*77c1e3ccSAndroid Build Coastguard Worker               convolve_params_ = c;
259*77c1e3ccSAndroid Build Coastguard Worker               Prep(&rnd);
260*77c1e3ccSAndroid Build Coastguard Worker               RunOne(true);
261*77c1e3ccSAndroid Build Coastguard Worker               RunOne(false);
262*77c1e3ccSAndroid Build Coastguard Worker               image_->Check();
263*77c1e3ccSAndroid Build Coastguard Worker             }
264*77c1e3ccSAndroid Build Coastguard Worker           }
265*77c1e3ccSAndroid Build Coastguard Worker         }
266*77c1e3ccSAndroid Build Coastguard Worker       }
267*77c1e3ccSAndroid Build Coastguard Worker     }
268*77c1e3ccSAndroid Build Coastguard Worker   }
SpeedTest()269*77c1e3ccSAndroid Build Coastguard Worker   void SpeedTest() {
270*77c1e3ccSAndroid Build Coastguard Worker     ACMRandom rnd(ACMRandom::DeterministicSeed());
271*77c1e3ccSAndroid Build Coastguard Worker     Prep(&rnd);
272*77c1e3ccSAndroid Build Coastguard Worker 
273*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer ref_timer;
274*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer_start(&ref_timer);
275*77c1e3ccSAndroid Build Coastguard Worker     for (int i = 0; i < kPerfIters; ++i) RunOne(true);
276*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer_mark(&ref_timer);
277*77c1e3ccSAndroid Build Coastguard Worker     const int64_t ref_time = aom_usec_timer_elapsed(&ref_timer);
278*77c1e3ccSAndroid Build Coastguard Worker 
279*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer tst_timer;
280*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer_start(&tst_timer);
281*77c1e3ccSAndroid Build Coastguard Worker     for (int i = 0; i < kPerfIters; ++i) RunOne(false);
282*77c1e3ccSAndroid Build Coastguard Worker     aom_usec_timer_mark(&tst_timer);
283*77c1e3ccSAndroid Build Coastguard Worker     const int64_t tst_time = aom_usec_timer_elapsed(&tst_timer);
284*77c1e3ccSAndroid Build Coastguard Worker 
285*77c1e3ccSAndroid Build Coastguard Worker     std::cout << "[          ] C time = " << ref_time / 1000
286*77c1e3ccSAndroid Build Coastguard Worker               << " ms, SIMD time = " << tst_time / 1000 << " ms\n";
287*77c1e3ccSAndroid Build Coastguard Worker 
288*77c1e3ccSAndroid Build Coastguard Worker     EXPECT_GT(ref_time, tst_time)
289*77c1e3ccSAndroid Build Coastguard Worker         << "Error: CDEFSpeedTest, SIMD slower than C.\n"
290*77c1e3ccSAndroid Build Coastguard Worker         << "C time: " << ref_time << " us\n"
291*77c1e3ccSAndroid Build Coastguard Worker         << "SIMD time: " << tst_time << " us\n";
292*77c1e3ccSAndroid Build Coastguard Worker   }
293*77c1e3ccSAndroid Build Coastguard Worker 
RandomSubpel(ACMRandom * rnd)294*77c1e3ccSAndroid Build Coastguard Worker   static int RandomSubpel(ACMRandom *rnd) {
295*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t subpel_mode = rnd->Rand8();
296*77c1e3ccSAndroid Build Coastguard Worker     if ((subpel_mode & 7) == 0) {
297*77c1e3ccSAndroid Build Coastguard Worker       return 0;
298*77c1e3ccSAndroid Build Coastguard Worker     } else if ((subpel_mode & 7) == 1) {
299*77c1e3ccSAndroid Build Coastguard Worker       return SCALE_SUBPEL_SHIFTS - 1;
300*77c1e3ccSAndroid Build Coastguard Worker     } else {
301*77c1e3ccSAndroid Build Coastguard Worker       return 1 + rnd->PseudoUniform(SCALE_SUBPEL_SHIFTS - 2);
302*77c1e3ccSAndroid Build Coastguard Worker     }
303*77c1e3ccSAndroid Build Coastguard Worker   }
304*77c1e3ccSAndroid Build Coastguard Worker 
Prep(ACMRandom * rnd)305*77c1e3ccSAndroid Build Coastguard Worker   void Prep(ACMRandom *rnd) {
306*77c1e3ccSAndroid Build Coastguard Worker     assert(rnd);
307*77c1e3ccSAndroid Build Coastguard Worker 
308*77c1e3ccSAndroid Build Coastguard Worker     // Choose subpel_x_ and subpel_y_. They should be less than
309*77c1e3ccSAndroid Build Coastguard Worker     // SCALE_SUBPEL_SHIFTS; we also want to add extra weight to
310*77c1e3ccSAndroid Build Coastguard Worker     // "interesting" values: 0 and SCALE_SUBPEL_SHIFTS - 1
311*77c1e3ccSAndroid Build Coastguard Worker     subpel_x_ = RandomSubpel(rnd);
312*77c1e3ccSAndroid Build Coastguard Worker     subpel_y_ = RandomSubpel(rnd);
313*77c1e3ccSAndroid Build Coastguard Worker 
314*77c1e3ccSAndroid Build Coastguard Worker     image_->Initialize(rnd);
315*77c1e3ccSAndroid Build Coastguard Worker   }
316*77c1e3ccSAndroid Build Coastguard Worker 
317*77c1e3ccSAndroid Build Coastguard Worker   int width_, height_, bd_;
318*77c1e3ccSAndroid Build Coastguard Worker   int subpel_x_, subpel_y_;
319*77c1e3ccSAndroid Build Coastguard Worker   const InterpFilterParams *filter_x_, *filter_y_;
320*77c1e3ccSAndroid Build Coastguard Worker   TestImage<SrcPixel> *image_;
321*77c1e3ccSAndroid Build Coastguard Worker   ConvolveParams convolve_params_;
322*77c1e3ccSAndroid Build Coastguard Worker };
323*77c1e3ccSAndroid Build Coastguard Worker 
324*77c1e3ccSAndroid Build Coastguard Worker typedef tuple<int, int> BlockDimension;
325*77c1e3ccSAndroid Build Coastguard Worker 
326*77c1e3ccSAndroid Build Coastguard Worker typedef void (*LowbdConvolveFunc)(const uint8_t *src, int src_stride,
327*77c1e3ccSAndroid Build Coastguard Worker                                   uint8_t *dst, int dst_stride, int w, int h,
328*77c1e3ccSAndroid Build Coastguard Worker                                   const InterpFilterParams *filter_params_x,
329*77c1e3ccSAndroid Build Coastguard Worker                                   const InterpFilterParams *filter_params_y,
330*77c1e3ccSAndroid Build Coastguard Worker                                   const int subpel_x_qn, const int x_step_qn,
331*77c1e3ccSAndroid Build Coastguard Worker                                   const int subpel_y_qn, const int y_step_qn,
332*77c1e3ccSAndroid Build Coastguard Worker                                   ConvolveParams *conv_params);
333*77c1e3ccSAndroid Build Coastguard Worker 
334*77c1e3ccSAndroid Build Coastguard Worker // Test parameter list:
335*77c1e3ccSAndroid Build Coastguard Worker //  <tst_fun, dims, avg>
336*77c1e3ccSAndroid Build Coastguard Worker typedef tuple<LowbdConvolveFunc, BlockDimension> LowBDParams;
337*77c1e3ccSAndroid Build Coastguard Worker 
338*77c1e3ccSAndroid Build Coastguard Worker class LowBDConvolveScaleTest
339*77c1e3ccSAndroid Build Coastguard Worker     : public ConvolveScaleTestBase<uint8_t>,
340*77c1e3ccSAndroid Build Coastguard Worker       public ::testing::WithParamInterface<LowBDParams> {
341*77c1e3ccSAndroid Build Coastguard Worker  public:
342*77c1e3ccSAndroid Build Coastguard Worker   ~LowBDConvolveScaleTest() override = default;
343*77c1e3ccSAndroid Build Coastguard Worker 
SetUp()344*77c1e3ccSAndroid Build Coastguard Worker   void SetUp() override {
345*77c1e3ccSAndroid Build Coastguard Worker     tst_fun_ = GET_PARAM(0);
346*77c1e3ccSAndroid Build Coastguard Worker 
347*77c1e3ccSAndroid Build Coastguard Worker     const BlockDimension &block = GET_PARAM(1);
348*77c1e3ccSAndroid Build Coastguard Worker     const int bd = 8;
349*77c1e3ccSAndroid Build Coastguard Worker 
350*77c1e3ccSAndroid Build Coastguard Worker     SetParams(BaseParams(block), bd);
351*77c1e3ccSAndroid Build Coastguard Worker   }
352*77c1e3ccSAndroid Build Coastguard Worker 
RunOne(bool ref)353*77c1e3ccSAndroid Build Coastguard Worker   void RunOne(bool ref) override {
354*77c1e3ccSAndroid Build Coastguard Worker     const uint8_t *src = image_->GetSrcData(ref, false);
355*77c1e3ccSAndroid Build Coastguard Worker     uint8_t *dst = image_->GetDstData(ref, false);
356*77c1e3ccSAndroid Build Coastguard Worker     convolve_params_.dst = image_->GetDst16Data(ref, false);
357*77c1e3ccSAndroid Build Coastguard Worker     const int src_stride = image_->src_stride();
358*77c1e3ccSAndroid Build Coastguard Worker     const int dst_stride = image_->dst_stride();
359*77c1e3ccSAndroid Build Coastguard Worker     if (ref) {
360*77c1e3ccSAndroid Build Coastguard Worker       av1_convolve_2d_scale_c(src, src_stride, dst, dst_stride, width_, height_,
361*77c1e3ccSAndroid Build Coastguard Worker                               filter_x_, filter_y_, subpel_x_, kXStepQn,
362*77c1e3ccSAndroid Build Coastguard Worker                               subpel_y_, kYStepQn, &convolve_params_);
363*77c1e3ccSAndroid Build Coastguard Worker     } else {
364*77c1e3ccSAndroid Build Coastguard Worker       tst_fun_(src, src_stride, dst, dst_stride, width_, height_, filter_x_,
365*77c1e3ccSAndroid Build Coastguard Worker                filter_y_, subpel_x_, kXStepQn, subpel_y_, kYStepQn,
366*77c1e3ccSAndroid Build Coastguard Worker                &convolve_params_);
367*77c1e3ccSAndroid Build Coastguard Worker     }
368*77c1e3ccSAndroid Build Coastguard Worker   }
369*77c1e3ccSAndroid Build Coastguard Worker 
370*77c1e3ccSAndroid Build Coastguard Worker  private:
371*77c1e3ccSAndroid Build Coastguard Worker   LowbdConvolveFunc tst_fun_;
372*77c1e3ccSAndroid Build Coastguard Worker };
373*77c1e3ccSAndroid Build Coastguard Worker 
374*77c1e3ccSAndroid Build Coastguard Worker const BlockDimension kBlockDim[] = {
375*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(2, 2),    make_tuple(2, 4),    make_tuple(4, 4),
376*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(4, 8),    make_tuple(8, 4),    make_tuple(8, 8),
377*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(8, 16),   make_tuple(16, 8),   make_tuple(16, 16),
378*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(16, 32),  make_tuple(32, 16),  make_tuple(32, 32),
379*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(32, 64),  make_tuple(64, 32),  make_tuple(64, 64),
380*77c1e3ccSAndroid Build Coastguard Worker   make_tuple(64, 128), make_tuple(128, 64), make_tuple(128, 128),
381*77c1e3ccSAndroid Build Coastguard Worker };
382*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(LowBDConvolveScaleTest,Check)383*77c1e3ccSAndroid Build Coastguard Worker TEST_P(LowBDConvolveScaleTest, Check) { Run(); }
TEST_P(LowBDConvolveScaleTest,DISABLED_Speed)384*77c1e3ccSAndroid Build Coastguard Worker TEST_P(LowBDConvolveScaleTest, DISABLED_Speed) { SpeedTest(); }
385*77c1e3ccSAndroid Build Coastguard Worker 
386*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(
387*77c1e3ccSAndroid Build Coastguard Worker     C, LowBDConvolveScaleTest,
388*77c1e3ccSAndroid Build Coastguard Worker     ::testing::Combine(::testing::Values(av1_convolve_2d_scale_c),
389*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBlockDim)));
390*77c1e3ccSAndroid Build Coastguard Worker 
391*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_NEON
392*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(
393*77c1e3ccSAndroid Build Coastguard Worker     NEON, LowBDConvolveScaleTest,
394*77c1e3ccSAndroid Build Coastguard Worker     ::testing::Combine(::testing::Values(av1_convolve_2d_scale_neon),
395*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBlockDim)));
396*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_NEON
397*77c1e3ccSAndroid Build Coastguard Worker 
398*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_NEON_DOTPROD
399*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(
400*77c1e3ccSAndroid Build Coastguard Worker     NEON_DOTPROD, LowBDConvolveScaleTest,
401*77c1e3ccSAndroid Build Coastguard Worker     ::testing::Combine(::testing::Values(av1_convolve_2d_scale_neon_dotprod),
402*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBlockDim)));
403*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_NEON_DOTPROD
404*77c1e3ccSAndroid Build Coastguard Worker 
405*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_NEON_I8MM
406*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(
407*77c1e3ccSAndroid Build Coastguard Worker     NEON_I8MM, LowBDConvolveScaleTest,
408*77c1e3ccSAndroid Build Coastguard Worker     ::testing::Combine(::testing::Values(av1_convolve_2d_scale_neon_i8mm),
409*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBlockDim)));
410*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_NEON_I8MM
411*77c1e3ccSAndroid Build Coastguard Worker 
412*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_SSE4_1
413*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(
414*77c1e3ccSAndroid Build Coastguard Worker     SSE4_1, LowBDConvolveScaleTest,
415*77c1e3ccSAndroid Build Coastguard Worker     ::testing::Combine(::testing::Values(av1_convolve_2d_scale_sse4_1),
416*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBlockDim)));
417*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_SSE4_1
418*77c1e3ccSAndroid Build Coastguard Worker 
419*77c1e3ccSAndroid Build Coastguard Worker #if CONFIG_AV1_HIGHBITDEPTH
420*77c1e3ccSAndroid Build Coastguard Worker typedef void (*HighbdConvolveFunc)(const uint16_t *src, int src_stride,
421*77c1e3ccSAndroid Build Coastguard Worker                                    uint16_t *dst, int dst_stride, int w, int h,
422*77c1e3ccSAndroid Build Coastguard Worker                                    const InterpFilterParams *filter_params_x,
423*77c1e3ccSAndroid Build Coastguard Worker                                    const InterpFilterParams *filter_params_y,
424*77c1e3ccSAndroid Build Coastguard Worker                                    const int subpel_x_qn, const int x_step_qn,
425*77c1e3ccSAndroid Build Coastguard Worker                                    const int subpel_y_qn, const int y_step_qn,
426*77c1e3ccSAndroid Build Coastguard Worker                                    ConvolveParams *conv_params, int bd);
427*77c1e3ccSAndroid Build Coastguard Worker 
428*77c1e3ccSAndroid Build Coastguard Worker // Test parameter list:
429*77c1e3ccSAndroid Build Coastguard Worker //  <tst_fun, dims, avg, bd>
430*77c1e3ccSAndroid Build Coastguard Worker typedef tuple<HighbdConvolveFunc, BlockDimension, int> HighBDParams;
431*77c1e3ccSAndroid Build Coastguard Worker 
432*77c1e3ccSAndroid Build Coastguard Worker class HighBDConvolveScaleTest
433*77c1e3ccSAndroid Build Coastguard Worker     : public ConvolveScaleTestBase<uint16_t>,
434*77c1e3ccSAndroid Build Coastguard Worker       public ::testing::WithParamInterface<HighBDParams> {
435*77c1e3ccSAndroid Build Coastguard Worker  public:
436*77c1e3ccSAndroid Build Coastguard Worker   ~HighBDConvolveScaleTest() override = default;
437*77c1e3ccSAndroid Build Coastguard Worker 
SetUp()438*77c1e3ccSAndroid Build Coastguard Worker   void SetUp() override {
439*77c1e3ccSAndroid Build Coastguard Worker     tst_fun_ = GET_PARAM(0);
440*77c1e3ccSAndroid Build Coastguard Worker 
441*77c1e3ccSAndroid Build Coastguard Worker     const BlockDimension &block = GET_PARAM(1);
442*77c1e3ccSAndroid Build Coastguard Worker     const int bd = GET_PARAM(2);
443*77c1e3ccSAndroid Build Coastguard Worker 
444*77c1e3ccSAndroid Build Coastguard Worker     SetParams(BaseParams(block), bd);
445*77c1e3ccSAndroid Build Coastguard Worker   }
446*77c1e3ccSAndroid Build Coastguard Worker 
RunOne(bool ref)447*77c1e3ccSAndroid Build Coastguard Worker   void RunOne(bool ref) override {
448*77c1e3ccSAndroid Build Coastguard Worker     const uint16_t *src = image_->GetSrcData(ref, false);
449*77c1e3ccSAndroid Build Coastguard Worker     uint16_t *dst = image_->GetDstData(ref, false);
450*77c1e3ccSAndroid Build Coastguard Worker     convolve_params_.dst = image_->GetDst16Data(ref, false);
451*77c1e3ccSAndroid Build Coastguard Worker     const int src_stride = image_->src_stride();
452*77c1e3ccSAndroid Build Coastguard Worker     const int dst_stride = image_->dst_stride();
453*77c1e3ccSAndroid Build Coastguard Worker 
454*77c1e3ccSAndroid Build Coastguard Worker     if (ref) {
455*77c1e3ccSAndroid Build Coastguard Worker       av1_highbd_convolve_2d_scale_c(src, src_stride, dst, dst_stride, width_,
456*77c1e3ccSAndroid Build Coastguard Worker                                      height_, filter_x_, filter_y_, subpel_x_,
457*77c1e3ccSAndroid Build Coastguard Worker                                      kXStepQn, subpel_y_, kYStepQn,
458*77c1e3ccSAndroid Build Coastguard Worker                                      &convolve_params_, bd_);
459*77c1e3ccSAndroid Build Coastguard Worker     } else {
460*77c1e3ccSAndroid Build Coastguard Worker       tst_fun_(src, src_stride, dst, dst_stride, width_, height_, filter_x_,
461*77c1e3ccSAndroid Build Coastguard Worker                filter_y_, subpel_x_, kXStepQn, subpel_y_, kYStepQn,
462*77c1e3ccSAndroid Build Coastguard Worker                &convolve_params_, bd_);
463*77c1e3ccSAndroid Build Coastguard Worker     }
464*77c1e3ccSAndroid Build Coastguard Worker   }
465*77c1e3ccSAndroid Build Coastguard Worker 
466*77c1e3ccSAndroid Build Coastguard Worker  private:
467*77c1e3ccSAndroid Build Coastguard Worker   HighbdConvolveFunc tst_fun_;
468*77c1e3ccSAndroid Build Coastguard Worker };
469*77c1e3ccSAndroid Build Coastguard Worker 
470*77c1e3ccSAndroid Build Coastguard Worker const int kBDs[] = { 8, 10, 12 };
471*77c1e3ccSAndroid Build Coastguard Worker 
TEST_P(HighBDConvolveScaleTest,Check)472*77c1e3ccSAndroid Build Coastguard Worker TEST_P(HighBDConvolveScaleTest, Check) { Run(); }
TEST_P(HighBDConvolveScaleTest,DISABLED_Speed)473*77c1e3ccSAndroid Build Coastguard Worker TEST_P(HighBDConvolveScaleTest, DISABLED_Speed) { SpeedTest(); }
474*77c1e3ccSAndroid Build Coastguard Worker 
475*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(
476*77c1e3ccSAndroid Build Coastguard Worker     C, HighBDConvolveScaleTest,
477*77c1e3ccSAndroid Build Coastguard Worker     ::testing::Combine(::testing::Values(av1_highbd_convolve_2d_scale_c),
478*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBlockDim),
479*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBDs)));
480*77c1e3ccSAndroid Build Coastguard Worker 
481*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_SSE4_1
482*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(
483*77c1e3ccSAndroid Build Coastguard Worker     SSE4_1, HighBDConvolveScaleTest,
484*77c1e3ccSAndroid Build Coastguard Worker     ::testing::Combine(::testing::Values(av1_highbd_convolve_2d_scale_sse4_1),
485*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBlockDim),
486*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBDs)));
487*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_SSE4_1
488*77c1e3ccSAndroid Build Coastguard Worker 
489*77c1e3ccSAndroid Build Coastguard Worker #if HAVE_NEON
490*77c1e3ccSAndroid Build Coastguard Worker INSTANTIATE_TEST_SUITE_P(
491*77c1e3ccSAndroid Build Coastguard Worker     NEON, HighBDConvolveScaleTest,
492*77c1e3ccSAndroid Build Coastguard Worker     ::testing::Combine(::testing::Values(av1_highbd_convolve_2d_scale_neon),
493*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBlockDim),
494*77c1e3ccSAndroid Build Coastguard Worker                        ::testing::ValuesIn(kBDs)));
495*77c1e3ccSAndroid Build Coastguard Worker 
496*77c1e3ccSAndroid Build Coastguard Worker #endif  // HAVE_NEON
497*77c1e3ccSAndroid Build Coastguard Worker 
498*77c1e3ccSAndroid Build Coastguard Worker #endif  // CONFIG_AV1_HIGHBITDEPTH
499*77c1e3ccSAndroid Build Coastguard Worker }  // namespace
500