• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2017, Alliance for Open Media. All rights reserved
3  *
4  * This source code is subject to the terms of the BSD 2 Clause License and
5  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6  * was not distributed with this source code in the LICENSE file, you can
7  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8  * Media Patent License 1.0 was not distributed with this source code in the
9  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10  */
11 
12 #include <tuple>
13 #include <vector>
14 
15 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
16 
17 #include "config/av1_rtcd.h"
18 
19 #include "aom_ports/aom_timer.h"
20 #include "test/acm_random.h"
21 #include "test/register_state_check.h"
22 #include "test/util.h"
23 
24 #include "av1/common/common_data.h"
25 
26 namespace {
27 const int kTestIters = 10;
28 const int kPerfIters = 1000;
29 
30 const int kVPad = 32;
31 const int kHPad = 32;
32 const int kXStepQn = 16;
33 const int kYStepQn = 20;
34 
35 using libaom_test::ACMRandom;
36 using std::make_tuple;
37 using std::tuple;
38 
39 enum NTaps { EIGHT_TAP, TEN_TAP, TWELVE_TAP };
NTapsToInt(NTaps ntaps)40 int NTapsToInt(NTaps ntaps) { return 8 + static_cast<int>(ntaps) * 2; }
41 
42 // A 16-bit filter with a configurable number of taps.
43 class TestFilter {
44  public:
45   void set(NTaps ntaps, bool backwards);
46 
47   InterpFilterParams params_;
48 
49  private:
50   std::vector<int16_t> coeffs_;
51 };
52 
set(NTaps ntaps,bool backwards)53 void TestFilter::set(NTaps ntaps, bool backwards) {
54   const int n = NTapsToInt(ntaps);
55   assert(n >= 8 && n <= 12);
56 
57   // The filter has n * SUBPEL_SHIFTS proper elements and an extra 8 bogus
58   // elements at the end so that convolutions can read off the end safely.
59   coeffs_.resize(n * SUBPEL_SHIFTS + 8);
60 
61   // The coefficients are pretty much arbitrary, but convolutions shouldn't
62   // over or underflow. For the first filter (subpels = 0), we use an
63   // increasing or decreasing ramp (depending on the backwards parameter). We
64   // don't want any zero coefficients, so we make it have an x-intercept at -1
65   // or n. To ensure absence of under/overflow, we normalise the area under the
66   // ramp to be I = 1 << FILTER_BITS (so that convolving a constant function
67   // gives the identity).
68   //
69   // When increasing, the function has the form:
70   //
71   //   f(x) = A * (x + 1)
72   //
73   // Summing and rearranging for A gives A = 2 * I / (n * (n + 1)). If the
74   // filter is reversed, we have the same A but with formula
75   //
76   //   g(x) = A * (n - x)
77   const int I = 1 << FILTER_BITS;
78   const float A = 2.f * I / (n * (n + 1.f));
79   for (int i = 0; i < n; ++i) {
80     coeffs_[i] = static_cast<int16_t>(A * (backwards ? (n - i) : (i + 1)));
81   }
82 
83   // For the other filters, make them slightly different by swapping two
84   // columns. Filter k will have the columns (k % n) and (7 * k) % n swapped.
85   const size_t filter_size = sizeof(coeffs_[0] * n);
86   int16_t *const filter0 = &coeffs_[0];
87   for (int k = 1; k < SUBPEL_SHIFTS; ++k) {
88     int16_t *filterk = &coeffs_[k * n];
89     memcpy(filterk, filter0, filter_size);
90 
91     const int idx0 = k % n;
92     const int idx1 = (7 * k) % n;
93 
94     const int16_t tmp = filterk[idx0];
95     filterk[idx0] = filterk[idx1];
96     filterk[idx1] = tmp;
97   }
98 
99   // Finally, write some rubbish at the end to make sure we don't use it.
100   for (int i = 0; i < 8; ++i) coeffs_[n * SUBPEL_SHIFTS + i] = 123 + i;
101 
102   // Fill in params
103   params_.filter_ptr = &coeffs_[0];
104   params_.taps = n;
105   // These are ignored by the functions being tested. Set them to whatever.
106   params_.interp_filter = EIGHTTAP_REGULAR;
107 }
108 
109 template <typename SrcPixel>
110 class TestImage {
111  public:
TestImage(int w,int h,int bd)112   TestImage(int w, int h, int bd) : w_(w), h_(h), bd_(bd) {
113     assert(bd < 16);
114     assert(bd <= 8 * static_cast<int>(sizeof(SrcPixel)));
115 
116     // Pad width by 2*kHPad and then round up to the next multiple of 16
117     // to get src_stride_. Add another 16 for dst_stride_ (to make sure
118     // something goes wrong if we use the wrong one)
119     src_stride_ = (w_ + 2 * kHPad + 15) & ~15;
120     dst_stride_ = src_stride_ + 16;
121 
122     // Allocate image data
123     src_data_.resize(2 * src_block_size());
124     dst_data_.resize(2 * dst_block_size());
125     dst_16_data_.resize(2 * dst_block_size());
126   }
127 
128   void Initialize(ACMRandom *rnd);
129   void Check() const;
130 
src_stride() const131   int src_stride() const { return src_stride_; }
dst_stride() const132   int dst_stride() const { return dst_stride_; }
133 
src_block_size() const134   int src_block_size() const { return (h_ + 2 * kVPad) * src_stride(); }
dst_block_size() const135   int dst_block_size() const { return (h_ + 2 * kVPad) * dst_stride(); }
136 
GetSrcData(bool ref,bool borders) const137   const SrcPixel *GetSrcData(bool ref, bool borders) const {
138     const SrcPixel *block = &src_data_[ref ? 0 : src_block_size()];
139     return borders ? block : block + kHPad + src_stride_ * kVPad;
140   }
141 
GetDstData(bool ref,bool borders)142   SrcPixel *GetDstData(bool ref, bool borders) {
143     SrcPixel *block = &dst_data_[ref ? 0 : dst_block_size()];
144     return borders ? block : block + kHPad + dst_stride_ * kVPad;
145   }
146 
GetDst16Data(bool ref,bool borders)147   CONV_BUF_TYPE *GetDst16Data(bool ref, bool borders) {
148     CONV_BUF_TYPE *block = &dst_16_data_[ref ? 0 : dst_block_size()];
149     return borders ? block : block + kHPad + dst_stride_ * kVPad;
150   }
151 
152  private:
153   int w_, h_, bd_;
154   int src_stride_, dst_stride_;
155 
156   std::vector<SrcPixel> src_data_;
157   std::vector<SrcPixel> dst_data_;
158   std::vector<CONV_BUF_TYPE> dst_16_data_;
159 };
160 
161 template <typename Pixel>
FillEdge(ACMRandom * rnd,int num_pixels,int bd,bool trash,Pixel * data)162 void FillEdge(ACMRandom *rnd, int num_pixels, int bd, bool trash, Pixel *data) {
163   if (!trash) {
164     memset(data, 0, sizeof(*data) * num_pixels);
165     return;
166   }
167   const Pixel mask = (1 << bd) - 1;
168   for (int i = 0; i < num_pixels; ++i) data[i] = rnd->Rand16() & mask;
169 }
170 
171 template <typename Pixel>
PrepBuffers(ACMRandom * rnd,int w,int h,int stride,int bd,bool trash_edges,Pixel * data)172 void PrepBuffers(ACMRandom *rnd, int w, int h, int stride, int bd,
173                  bool trash_edges, Pixel *data) {
174   assert(rnd);
175   const Pixel mask = (1 << bd) - 1;
176 
177   // Fill in the first buffer with random data
178   // Top border
179   FillEdge(rnd, stride * kVPad, bd, trash_edges, data);
180   for (int r = 0; r < h; ++r) {
181     Pixel *row_data = data + (kVPad + r) * stride;
182     // Left border, contents, right border
183     FillEdge(rnd, kHPad, bd, trash_edges, row_data);
184     for (int c = 0; c < w; ++c) row_data[kHPad + c] = rnd->Rand16() & mask;
185     FillEdge(rnd, kHPad, bd, trash_edges, row_data + kHPad + w);
186   }
187   // Bottom border
188   FillEdge(rnd, stride * kVPad, bd, trash_edges, data + stride * (kVPad + h));
189 
190   const int bpp = sizeof(*data);
191   const int block_elts = stride * (h + 2 * kVPad);
192   const int block_size = bpp * block_elts;
193 
194   // Now copy that to the second buffer
195   memcpy(data + block_elts, data, block_size);
196 }
197 
198 template <typename SrcPixel>
Initialize(ACMRandom * rnd)199 void TestImage<SrcPixel>::Initialize(ACMRandom *rnd) {
200   PrepBuffers(rnd, w_, h_, src_stride_, bd_, false, &src_data_[0]);
201   PrepBuffers(rnd, w_, h_, dst_stride_, bd_, true, &dst_data_[0]);
202   PrepBuffers(rnd, w_, h_, dst_stride_, bd_, true, &dst_16_data_[0]);
203 }
204 
205 template <typename SrcPixel>
Check() const206 void TestImage<SrcPixel>::Check() const {
207   // If memcmp returns 0, there's nothing to do.
208   const int num_pixels = dst_block_size();
209   const SrcPixel *ref_dst = &dst_data_[0];
210   const SrcPixel *tst_dst = &dst_data_[num_pixels];
211 
212   const CONV_BUF_TYPE *ref_16_dst = &dst_16_data_[0];
213   const CONV_BUF_TYPE *tst_16_dst = &dst_16_data_[num_pixels];
214 
215   if (0 == memcmp(ref_dst, tst_dst, sizeof(*ref_dst) * num_pixels)) {
216     if (0 == memcmp(ref_16_dst, tst_16_dst, sizeof(*ref_16_dst) * num_pixels))
217       return;
218   }
219   // Otherwise, iterate through the buffer looking for differences (including
220   // the edges)
221   const int stride = dst_stride_;
222   for (int r = 0; r < h_ + 2 * kVPad; ++r) {
223     for (int c = 0; c < w_ + 2 * kHPad; ++c) {
224       const int32_t ref_value = ref_dst[r * stride + c];
225       const int32_t tst_value = tst_dst[r * stride + c];
226 
227       EXPECT_EQ(tst_value, ref_value)
228           << "Error at row: " << (r - kVPad) << ", col: " << (c - kHPad);
229     }
230   }
231 
232   for (int r = 0; r < h_ + 2 * kVPad; ++r) {
233     for (int c = 0; c < w_ + 2 * kHPad; ++c) {
234       const int32_t ref_value = ref_16_dst[r * stride + c];
235       const int32_t tst_value = tst_16_dst[r * stride + c];
236 
237       EXPECT_EQ(tst_value, ref_value)
238           << "Error in 16 bit buffer "
239           << "Error at row: " << (r - kVPad) << ", col: " << (c - kHPad);
240     }
241   }
242 }
243 
244 typedef tuple<int, int> BlockDimension;
245 
246 struct BaseParams {
BaseParams__anon2484c9840111::BaseParams247   BaseParams(BlockDimension dimensions, NTaps num_taps_x, NTaps num_taps_y,
248              bool average)
249       : dims(dimensions), ntaps_x(num_taps_x), ntaps_y(num_taps_y),
250         avg(average) {}
251 
252   BlockDimension dims;
253   NTaps ntaps_x, ntaps_y;
254   bool avg;
255 };
256 
257 template <typename SrcPixel>
258 class ConvolveScaleTestBase : public ::testing::Test {
259  public:
ConvolveScaleTestBase()260   ConvolveScaleTestBase() : image_(nullptr) {}
~ConvolveScaleTestBase()261   ~ConvolveScaleTestBase() override { delete image_; }
262 
263   // Implemented by subclasses (SetUp depends on the parameters passed
264   // in and RunOne depends on the function to be tested. These can't
265   // be templated for low/high bit depths because they have different
266   // numbers of parameters)
267   void SetUp() override = 0;
268   virtual void RunOne(bool ref) = 0;
269 
270  protected:
SetParams(const BaseParams & params,int bd)271   void SetParams(const BaseParams &params, int bd) {
272     width_ = std::get<0>(params.dims);
273     height_ = std::get<1>(params.dims);
274     ntaps_x_ = params.ntaps_x;
275     ntaps_y_ = params.ntaps_y;
276     bd_ = bd;
277     avg_ = params.avg;
278 
279     filter_x_.set(ntaps_x_, false);
280     filter_y_.set(ntaps_y_, true);
281     convolve_params_ =
282         get_conv_params_no_round(avg_ != false, 0, nullptr, 0, 1, bd);
283 
284     delete image_;
285     image_ = new TestImage<SrcPixel>(width_, height_, bd_);
286     ASSERT_NE(image_, nullptr);
287   }
288 
SetConvParamOffset(int i,int j,int is_compound,int do_average,int use_dist_wtd_comp_avg)289   void SetConvParamOffset(int i, int j, int is_compound, int do_average,
290                           int use_dist_wtd_comp_avg) {
291     if (i == -1 && j == -1) {
292       convolve_params_.use_dist_wtd_comp_avg = use_dist_wtd_comp_avg;
293       convolve_params_.is_compound = is_compound;
294       convolve_params_.do_average = do_average;
295     } else {
296       convolve_params_.use_dist_wtd_comp_avg = use_dist_wtd_comp_avg;
297       convolve_params_.fwd_offset = quant_dist_lookup_table[j][i];
298       convolve_params_.bck_offset = quant_dist_lookup_table[j][1 - i];
299       convolve_params_.is_compound = is_compound;
300       convolve_params_.do_average = do_average;
301     }
302   }
303 
Run()304   void Run() {
305     ACMRandom rnd(ACMRandom::DeterministicSeed());
306     for (int i = 0; i < kTestIters; ++i) {
307       int is_compound = 0;
308       SetConvParamOffset(-1, -1, is_compound, 0, 0);
309       Prep(&rnd);
310       RunOne(true);
311       RunOne(false);
312       image_->Check();
313 
314       is_compound = 1;
315       for (int do_average = 0; do_average < 2; do_average++) {
316         for (int use_dist_wtd_comp_avg = 0; use_dist_wtd_comp_avg < 2;
317              use_dist_wtd_comp_avg++) {
318           for (int j = 0; j < 2; ++j) {
319             for (int k = 0; k < 4; ++k) {
320               SetConvParamOffset(j, k, is_compound, do_average,
321                                  use_dist_wtd_comp_avg);
322               Prep(&rnd);
323               RunOne(true);
324               RunOne(false);
325               image_->Check();
326             }
327           }
328         }
329       }
330     }
331   }
332 
SpeedTest()333   void SpeedTest() {
334     ACMRandom rnd(ACMRandom::DeterministicSeed());
335     Prep(&rnd);
336 
337     aom_usec_timer ref_timer;
338     aom_usec_timer_start(&ref_timer);
339     for (int i = 0; i < kPerfIters; ++i) RunOne(true);
340     aom_usec_timer_mark(&ref_timer);
341     const int64_t ref_time = aom_usec_timer_elapsed(&ref_timer);
342 
343     aom_usec_timer tst_timer;
344     aom_usec_timer_start(&tst_timer);
345     for (int i = 0; i < kPerfIters; ++i) RunOne(false);
346     aom_usec_timer_mark(&tst_timer);
347     const int64_t tst_time = aom_usec_timer_elapsed(&tst_timer);
348 
349     std::cout << "[          ] C time = " << ref_time / 1000
350               << " ms, SIMD time = " << tst_time / 1000 << " ms\n";
351 
352     EXPECT_GT(ref_time, tst_time)
353         << "Error: CDEFSpeedTest, SIMD slower than C.\n"
354         << "C time: " << ref_time << " us\n"
355         << "SIMD time: " << tst_time << " us\n";
356   }
357 
RandomSubpel(ACMRandom * rnd)358   static int RandomSubpel(ACMRandom *rnd) {
359     const uint8_t subpel_mode = rnd->Rand8();
360     if ((subpel_mode & 7) == 0) {
361       return 0;
362     } else if ((subpel_mode & 7) == 1) {
363       return SCALE_SUBPEL_SHIFTS - 1;
364     } else {
365       return 1 + rnd->PseudoUniform(SCALE_SUBPEL_SHIFTS - 2);
366     }
367   }
368 
Prep(ACMRandom * rnd)369   void Prep(ACMRandom *rnd) {
370     assert(rnd);
371 
372     // Choose subpel_x_ and subpel_y_. They should be less than
373     // SCALE_SUBPEL_SHIFTS; we also want to add extra weight to "interesting"
374     // values: 0 and SCALE_SUBPEL_SHIFTS - 1
375     subpel_x_ = RandomSubpel(rnd);
376     subpel_y_ = RandomSubpel(rnd);
377 
378     image_->Initialize(rnd);
379   }
380 
381   int width_, height_, bd_;
382   NTaps ntaps_x_, ntaps_y_;
383   bool avg_;
384   int subpel_x_, subpel_y_;
385   TestFilter filter_x_, filter_y_;
386   TestImage<SrcPixel> *image_;
387   ConvolveParams convolve_params_;
388 };
389 
390 typedef tuple<int, int> BlockDimension;
391 
392 typedef void (*LowbdConvolveFunc)(const uint8_t *src, int src_stride,
393                                   uint8_t *dst, int dst_stride, int w, int h,
394                                   const InterpFilterParams *filter_params_x,
395                                   const InterpFilterParams *filter_params_y,
396                                   const int subpel_x_qn, const int x_step_qn,
397                                   const int subpel_y_qn, const int y_step_qn,
398                                   ConvolveParams *conv_params);
399 
400 // Test parameter list:
401 //  <tst_fun, dims, ntaps_x, ntaps_y, avg>
402 typedef tuple<LowbdConvolveFunc, BlockDimension, NTaps, NTaps, bool>
403     LowBDParams;
404 
405 class LowBDConvolveScaleTest
406     : public ConvolveScaleTestBase<uint8_t>,
407       public ::testing::WithParamInterface<LowBDParams> {
408  public:
409   ~LowBDConvolveScaleTest() override = default;
410 
SetUp()411   void SetUp() override {
412     tst_fun_ = GET_PARAM(0);
413 
414     const BlockDimension &block = GET_PARAM(1);
415     const NTaps ntaps_x = GET_PARAM(2);
416     const NTaps ntaps_y = GET_PARAM(3);
417     const int bd = 8;
418     const bool avg = GET_PARAM(4);
419 
420     SetParams(BaseParams(block, ntaps_x, ntaps_y, avg), bd);
421   }
422 
RunOne(bool ref)423   void RunOne(bool ref) override {
424     const uint8_t *src = image_->GetSrcData(ref, false);
425     uint8_t *dst = image_->GetDstData(ref, false);
426     convolve_params_.dst = image_->GetDst16Data(ref, false);
427     const int src_stride = image_->src_stride();
428     const int dst_stride = image_->dst_stride();
429     if (ref) {
430       av1_convolve_2d_scale_c(src, src_stride, dst, dst_stride, width_, height_,
431                               &filter_x_.params_, &filter_y_.params_, subpel_x_,
432                               kXStepQn, subpel_y_, kYStepQn, &convolve_params_);
433     } else {
434       tst_fun_(src, src_stride, dst, dst_stride, width_, height_,
435                &filter_x_.params_, &filter_y_.params_, subpel_x_, kXStepQn,
436                subpel_y_, kYStepQn, &convolve_params_);
437     }
438   }
439 
440  private:
441   LowbdConvolveFunc tst_fun_;
442 };
443 
444 const BlockDimension kBlockDim[] = {
445   make_tuple(2, 2),    make_tuple(2, 4),    make_tuple(4, 4),
446   make_tuple(4, 8),    make_tuple(8, 4),    make_tuple(8, 8),
447   make_tuple(8, 16),   make_tuple(16, 8),   make_tuple(16, 16),
448   make_tuple(16, 32),  make_tuple(32, 16),  make_tuple(32, 32),
449   make_tuple(32, 64),  make_tuple(64, 32),  make_tuple(64, 64),
450   make_tuple(64, 128), make_tuple(128, 64), make_tuple(128, 128),
451 };
452 
453 const NTaps kNTaps[] = { EIGHT_TAP };
454 
TEST_P(LowBDConvolveScaleTest,Check)455 TEST_P(LowBDConvolveScaleTest, Check) { Run(); }
TEST_P(LowBDConvolveScaleTest,DISABLED_Speed)456 TEST_P(LowBDConvolveScaleTest, DISABLED_Speed) { SpeedTest(); }
457 
458 INSTANTIATE_TEST_SUITE_P(
459     C, LowBDConvolveScaleTest,
460     ::testing::Combine(::testing::Values(av1_convolve_2d_scale_c),
461                        ::testing::ValuesIn(kBlockDim),
462                        ::testing::ValuesIn(kNTaps), ::testing::ValuesIn(kNTaps),
463                        ::testing::Bool()));
464 
465 #if HAVE_SSE4_1
466 INSTANTIATE_TEST_SUITE_P(
467     SSE4_1, LowBDConvolveScaleTest,
468     ::testing::Combine(::testing::Values(av1_convolve_2d_scale_sse4_1),
469                        ::testing::ValuesIn(kBlockDim),
470                        ::testing::ValuesIn(kNTaps), ::testing::ValuesIn(kNTaps),
471                        ::testing::Bool()));
472 #endif  // HAVE_SSE4_1
473 
474 #if CONFIG_AV1_HIGHBITDEPTH
475 typedef void (*HighbdConvolveFunc)(const uint16_t *src, int src_stride,
476                                    uint16_t *dst, int dst_stride, int w, int h,
477                                    const InterpFilterParams *filter_params_x,
478                                    const InterpFilterParams *filter_params_y,
479                                    const int subpel_x_qn, const int x_step_qn,
480                                    const int subpel_y_qn, const int y_step_qn,
481                                    ConvolveParams *conv_params, int bd);
482 
483 // Test parameter list:
484 //  <tst_fun, dims, ntaps_x, ntaps_y, avg, bd>
485 typedef tuple<HighbdConvolveFunc, BlockDimension, NTaps, NTaps, bool, int>
486     HighBDParams;
487 
488 class HighBDConvolveScaleTest
489     : public ConvolveScaleTestBase<uint16_t>,
490       public ::testing::WithParamInterface<HighBDParams> {
491  public:
492   ~HighBDConvolveScaleTest() override = default;
493 
SetUp()494   void SetUp() override {
495     tst_fun_ = GET_PARAM(0);
496 
497     const BlockDimension &block = GET_PARAM(1);
498     const NTaps ntaps_x = GET_PARAM(2);
499     const NTaps ntaps_y = GET_PARAM(3);
500     const bool avg = GET_PARAM(4);
501     const int bd = GET_PARAM(5);
502 
503     SetParams(BaseParams(block, ntaps_x, ntaps_y, avg), bd);
504   }
505 
RunOne(bool ref)506   void RunOne(bool ref) override {
507     const uint16_t *src = image_->GetSrcData(ref, false);
508     uint16_t *dst = image_->GetDstData(ref, false);
509     convolve_params_.dst = image_->GetDst16Data(ref, false);
510     const int src_stride = image_->src_stride();
511     const int dst_stride = image_->dst_stride();
512 
513     if (ref) {
514       av1_highbd_convolve_2d_scale_c(
515           src, src_stride, dst, dst_stride, width_, height_, &filter_x_.params_,
516           &filter_y_.params_, subpel_x_, kXStepQn, subpel_y_, kYStepQn,
517           &convolve_params_, bd_);
518     } else {
519       tst_fun_(src, src_stride, dst, dst_stride, width_, height_,
520                &filter_x_.params_, &filter_y_.params_, subpel_x_, kXStepQn,
521                subpel_y_, kYStepQn, &convolve_params_, bd_);
522     }
523   }
524 
525  private:
526   HighbdConvolveFunc tst_fun_;
527 };
528 
529 const int kBDs[] = { 8, 10, 12 };
530 
TEST_P(HighBDConvolveScaleTest,Check)531 TEST_P(HighBDConvolveScaleTest, Check) { Run(); }
TEST_P(HighBDConvolveScaleTest,DISABLED_Speed)532 TEST_P(HighBDConvolveScaleTest, DISABLED_Speed) { SpeedTest(); }
533 
534 INSTANTIATE_TEST_SUITE_P(
535     C, HighBDConvolveScaleTest,
536     ::testing::Combine(::testing::Values(av1_highbd_convolve_2d_scale_c),
537                        ::testing::ValuesIn(kBlockDim),
538                        ::testing::ValuesIn(kNTaps), ::testing::ValuesIn(kNTaps),
539                        ::testing::Bool(), ::testing::ValuesIn(kBDs)));
540 
541 #if HAVE_SSE4_1
542 INSTANTIATE_TEST_SUITE_P(
543     SSE4_1, HighBDConvolveScaleTest,
544     ::testing::Combine(::testing::Values(av1_highbd_convolve_2d_scale_sse4_1),
545                        ::testing::ValuesIn(kBlockDim),
546                        ::testing::ValuesIn(kNTaps), ::testing::ValuesIn(kNTaps),
547                        ::testing::Bool(), ::testing::ValuesIn(kBDs)));
548 #endif  // HAVE_SSE4_1
549 
550 #if HAVE_NEON
551 INSTANTIATE_TEST_SUITE_P(
552     NEON, HighBDConvolveScaleTest,
553     ::testing::Combine(::testing::Values(av1_highbd_convolve_2d_scale_neon),
554                        ::testing::ValuesIn(kBlockDim),
555                        ::testing::ValuesIn(kNTaps), ::testing::ValuesIn(kNTaps),
556                        ::testing::Bool(), ::testing::ValuesIn(kBDs)));
557 
558 #endif  // HAVE_NEON
559 
560 #endif  // CONFIG_AV1_HIGHBITDEPTH
561 }  // namespace
562