]> granicus.if.org Git - libvpx/blob - test/partial_idct_test.cc
Merge "Fix for out of range motion vector bug in sub-pel motion estimation"
[libvpx] / test / partial_idct_test.cc
1 /*
2  *  Copyright (c) 2013 The WebM project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10
11 #include <math.h>
12 #include <stdlib.h>
13 #include <string.h>
14
15 #include <limits>
16
17 #include "third_party/googletest/src/include/gtest/gtest.h"
18
19 #include "./vp9_rtcd.h"
20 #include "./vpx_dsp_rtcd.h"
21 #include "test/acm_random.h"
22 #include "test/clear_system_state.h"
23 #include "test/register_state_check.h"
24 #include "test/util.h"
25 #include "vp9/common/vp9_blockd.h"
26 #include "vp9/common/vp9_scan.h"
27 #include "vpx/vpx_integer.h"
28 #include "vpx_ports/vpx_timer.h"
29
30 using libvpx_test::ACMRandom;
31
32 namespace {
33
34 typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride);
35 typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
36 typedef void (*InvTxfmWithBdFunc)(const tran_low_t *in, uint8_t *out,
37                                   int stride, int bd);
38
39 template <InvTxfmFunc fn>
40 void wrapper(const tran_low_t *in, uint8_t *out, int stride, int bd) {
41   (void)bd;
42   fn(in, out, stride);
43 }
44
45 #if CONFIG_VP9_HIGHBITDEPTH
46 template <InvTxfmWithBdFunc fn>
47 void highbd_wrapper(const tran_low_t *in, uint8_t *out, int stride, int bd) {
48   fn(in, CONVERT_TO_BYTEPTR(out), stride, bd);
49 }
50 #endif
51
52 typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmWithBdFunc, InvTxfmWithBdFunc,
53                         TX_SIZE, int, int, int>
54     PartialInvTxfmParam;
55 const int kMaxNumCoeffs = 1024;
56 const int kCountTestBlock = 1000;
57
58 class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
59  public:
60   virtual ~PartialIDctTest() {}
61   virtual void SetUp() {
62     rnd_.Reset(ACMRandom::DeterministicSeed());
63     ftxfm_ = GET_PARAM(0);
64     full_itxfm_ = GET_PARAM(1);
65     partial_itxfm_ = GET_PARAM(2);
66     tx_size_ = GET_PARAM(3);
67     last_nonzero_ = GET_PARAM(4);
68     bit_depth_ = GET_PARAM(5);
69     pixel_size_ = GET_PARAM(6);
70     mask_ = (1 << bit_depth_) - 1;
71
72     switch (tx_size_) {
73       case TX_4X4: size_ = 4; break;
74       case TX_8X8: size_ = 8; break;
75       case TX_16X16: size_ = 16; break;
76       case TX_32X32: size_ = 32; break;
77       default: FAIL() << "Wrong Size!"; break;
78     }
79
80     // Randomize stride_ to a value less than or equal to 1024
81     stride_ = rnd_(1024) + 1;
82     if (stride_ < size_) {
83       stride_ = size_;
84     }
85     // Align stride_ to 16 if it's bigger than 16.
86     if (stride_ > 16) {
87       stride_ &= ~15;
88     }
89
90     input_block_size_ = size_ * size_;
91     output_block_size_ = size_ * stride_;
92
93     input_block_ = reinterpret_cast<tran_low_t *>(
94         vpx_memalign(16, sizeof(*input_block_) * input_block_size_));
95     output_block_ = reinterpret_cast<uint8_t *>(
96         vpx_memalign(16, pixel_size_ * output_block_size_));
97     output_block_ref_ = reinterpret_cast<uint8_t *>(
98         vpx_memalign(16, pixel_size_ * output_block_size_));
99   }
100
101   virtual void TearDown() {
102     vpx_free(input_block_);
103     input_block_ = NULL;
104     vpx_free(output_block_);
105     output_block_ = NULL;
106     vpx_free(output_block_ref_);
107     output_block_ref_ = NULL;
108     libvpx_test::ClearSystemState();
109   }
110
111   void InitMem() {
112     memset(input_block_, 0, sizeof(*input_block_) * input_block_size_);
113     if (pixel_size_ == 1) {
114       for (int j = 0; j < output_block_size_; ++j) {
115         output_block_[j] = output_block_ref_[j] = rnd_.Rand16() & mask_;
116       }
117     } else {
118       ASSERT_EQ(2, pixel_size_);
119       uint16_t *const output = reinterpret_cast<uint16_t *>(output_block_);
120       uint16_t *const output_ref =
121           reinterpret_cast<uint16_t *>(output_block_ref_);
122       for (int j = 0; j < output_block_size_; ++j) {
123         output[j] = output_ref[j] = rnd_.Rand16() & mask_;
124       }
125     }
126   }
127
128   void InitInput() {
129     const int max_coeff = 32766 / 4;
130     int max_energy_leftover = max_coeff * max_coeff;
131     for (int j = 0; j < last_nonzero_; ++j) {
132       int16_t coeff = static_cast<int16_t>(sqrt(1.0 * max_energy_leftover) *
133                                            (rnd_.Rand16() - 32768) / 65536);
134       max_energy_leftover -= coeff * coeff;
135       if (max_energy_leftover < 0) {
136         max_energy_leftover = 0;
137         coeff = 0;
138       }
139       input_block_[vp9_default_scan_orders[tx_size_].scan[j]] = coeff;
140     }
141   }
142
143  protected:
144   int last_nonzero_;
145   TX_SIZE tx_size_;
146   tran_low_t *input_block_;
147   uint8_t *output_block_;
148   uint8_t *output_block_ref_;
149   int size_;
150   int stride_;
151   int pixel_size_;
152   int input_block_size_;
153   int output_block_size_;
154   int bit_depth_;
155   int mask_;
156   FwdTxfmFunc ftxfm_;
157   InvTxfmWithBdFunc full_itxfm_;
158   InvTxfmWithBdFunc partial_itxfm_;
159   ACMRandom rnd_;
160 };
161
162 TEST_P(PartialIDctTest, RunQuantCheck) {
163   DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]);
164   DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
165
166   InitMem();
167   for (int i = 0; i < kCountTestBlock; ++i) {
168     // Initialize a test block with input range [-mask_, mask_].
169     if (i == 0) {
170       for (int k = 0; k < input_block_size_; ++k) {
171         input_extreme_block[k] = mask_;
172       }
173     } else if (i == 1) {
174       for (int k = 0; k < input_block_size_; ++k) {
175         input_extreme_block[k] = -mask_;
176       }
177     } else {
178       for (int k = 0; k < input_block_size_; ++k) {
179         input_extreme_block[k] = rnd_.Rand8() % 2 ? mask_ : -mask_;
180       }
181     }
182
183     ftxfm_(input_extreme_block, output_ref_block, size_);
184
185     // quantization with minimum allowed step sizes
186     input_block_[0] = (output_ref_block[0] / 4) * 4;
187     for (int k = 1; k < last_nonzero_; ++k) {
188       const int pos = vp9_default_scan_orders[tx_size_].scan[k];
189       input_block_[pos] = (output_ref_block[pos] / 4) * 4;
190     }
191
192     ASM_REGISTER_STATE_CHECK(
193         full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
194     ASM_REGISTER_STATE_CHECK(
195         partial_itxfm_(input_block_, output_block_, stride_, bit_depth_));
196     ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
197                         pixel_size_ * output_block_size_))
198         << "Error: partial inverse transform produces different results";
199   }
200 }
201
202 TEST_P(PartialIDctTest, ResultsMatch) {
203   for (int i = 0; i < kCountTestBlock; ++i) {
204     InitMem();
205     InitInput();
206
207     ASM_REGISTER_STATE_CHECK(
208         full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
209     ASM_REGISTER_STATE_CHECK(
210         partial_itxfm_(input_block_, output_block_, stride_, bit_depth_));
211     ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
212                         pixel_size_ * output_block_size_))
213         << "Error: partial inverse transform produces different results";
214   }
215 }
216
217 TEST_P(PartialIDctTest, AddOutputBlock) {
218   for (int i = 0; i < kCountTestBlock; ++i) {
219     InitMem();
220     for (int j = 0; j < last_nonzero_; ++j) {
221       input_block_[vp9_default_scan_orders[tx_size_].scan[j]] = 10;
222     }
223
224     ASM_REGISTER_STATE_CHECK(
225         full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
226     ASM_REGISTER_STATE_CHECK(
227         partial_itxfm_(input_block_, output_block_, stride_, bit_depth_));
228     ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
229                         pixel_size_ * output_block_size_))
230         << "Error: Transform results are not correctly added to output.";
231   }
232 }
233
234 TEST_P(PartialIDctTest, SingleExtremeCoeff) {
235   const int16_t max_coeff = std::numeric_limits<int16_t>::max();
236   const int16_t min_coeff = std::numeric_limits<int16_t>::min();
237   for (int i = 0; i < last_nonzero_; ++i) {
238     memset(input_block_, 0, sizeof(*input_block_) * input_block_size_);
239     // Run once for min and once for max.
240     for (int j = 0; j < 2; ++j) {
241       const int coeff = j ? min_coeff : max_coeff;
242
243       memset(output_block_, 0, pixel_size_ * output_block_size_);
244       memset(output_block_ref_, 0, pixel_size_ * output_block_size_);
245       input_block_[vp9_default_scan_orders[tx_size_].scan[i]] = coeff;
246
247       ASM_REGISTER_STATE_CHECK(
248           full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
249       ASM_REGISTER_STATE_CHECK(
250           partial_itxfm_(input_block_, output_block_, stride_, bit_depth_));
251       ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
252                           pixel_size_ * output_block_size_))
253           << "Error: Fails with single coeff of " << coeff << " at " << i
254           << ".";
255     }
256   }
257 }
258
259 TEST_P(PartialIDctTest, DISABLED_Speed) {
260   // Keep runtime stable with transform size.
261   const int kCountSpeedTestBlock = 500000000 / input_block_size_;
262   InitMem();
263   InitInput();
264
265   for (int i = 0; i < kCountSpeedTestBlock; ++i) {
266     ASM_REGISTER_STATE_CHECK(
267         full_itxfm_(input_block_, output_block_ref_, stride_, bit_depth_));
268   }
269   vpx_usec_timer timer;
270   vpx_usec_timer_start(&timer);
271   for (int i = 0; i < kCountSpeedTestBlock; ++i) {
272     partial_itxfm_(input_block_, output_block_, stride_, bit_depth_);
273   }
274   libvpx_test::ClearSystemState();
275   vpx_usec_timer_mark(&timer);
276   const int elapsed_time =
277       static_cast<int>(vpx_usec_timer_elapsed(&timer) / 1000);
278   printf("idct%dx%d_%d (bitdepth %d) time: %5d ms\n", size_, size_,
279          last_nonzero_, bit_depth_, elapsed_time);
280
281   ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
282                       pixel_size_ * output_block_size_))
283       << "Error: partial inverse transform produces different results";
284 }
285
286 using std::tr1::make_tuple;
287
288 const PartialInvTxfmParam c_partial_idct_tests[] = {
289 #if CONFIG_VP9_HIGHBITDEPTH
290   make_tuple(
291       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
292       &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>, TX_32X32, 1024, 8, 2),
293   make_tuple(
294       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
295       &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>, TX_32X32, 1024, 10, 2),
296   make_tuple(
297       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
298       &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>, TX_32X32, 1024, 12, 2),
299   make_tuple(
300       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
301       &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>, TX_32X32, 135, 8, 2),
302   make_tuple(
303       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
304       &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>, TX_32X32, 135, 10, 2),
305   make_tuple(
306       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
307       &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>, TX_32X32, 135, 12, 2),
308   make_tuple(
309       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
310       &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>, TX_32X32, 34, 8, 2),
311   make_tuple(
312       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
313       &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>, TX_32X32, 34, 10, 2),
314   make_tuple(
315       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
316       &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>, TX_32X32, 34, 12, 2),
317   make_tuple(&vpx_highbd_fdct32x32_c,
318              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
319              &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>, TX_32X32, 1, 8, 2),
320   make_tuple(&vpx_highbd_fdct32x32_c,
321              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
322              &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>, TX_32X32, 1, 10, 2),
323   make_tuple(&vpx_highbd_fdct32x32_c,
324              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
325              &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>, TX_32X32, 1, 12, 2),
326   make_tuple(
327       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
328       &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>, TX_16X16, 256, 8, 2),
329   make_tuple(
330       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
331       &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>, TX_16X16, 256, 10, 2),
332   make_tuple(
333       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
334       &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>, TX_16X16, 256, 12, 2),
335   make_tuple(
336       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
337       &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>, TX_16X16, 38, 8, 2),
338   make_tuple(
339       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
340       &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>, TX_16X16, 38, 10, 2),
341   make_tuple(
342       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
343       &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>, TX_16X16, 38, 12, 2),
344   make_tuple(
345       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
346       &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>, TX_16X16, 10, 8, 2),
347   make_tuple(
348       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
349       &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>, TX_16X16, 10, 10, 2),
350   make_tuple(
351       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
352       &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>, TX_16X16, 10, 12, 2),
353   make_tuple(&vpx_highbd_fdct16x16_c,
354              &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
355              &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>, TX_16X16, 1, 8, 2),
356   make_tuple(&vpx_highbd_fdct16x16_c,
357              &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
358              &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>, TX_16X16, 1, 10, 2),
359   make_tuple(&vpx_highbd_fdct16x16_c,
360              &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
361              &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>, TX_16X16, 1, 12, 2),
362   make_tuple(&vpx_highbd_fdct8x8_c,
363              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
364              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>, TX_8X8, 64, 8, 2),
365   make_tuple(&vpx_highbd_fdct8x8_c,
366              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
367              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>, TX_8X8, 64, 10, 2),
368   make_tuple(&vpx_highbd_fdct8x8_c,
369              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
370              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>, TX_8X8, 64, 12, 2),
371   make_tuple(&vpx_highbd_fdct8x8_c,
372              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
373              &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>, TX_8X8, 12, 8, 2),
374   make_tuple(&vpx_highbd_fdct8x8_c,
375              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
376              &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>, TX_8X8, 12, 10, 2),
377   make_tuple(&vpx_highbd_fdct8x8_c,
378              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
379              &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>, TX_8X8, 12, 12, 2),
380   make_tuple(&vpx_highbd_fdct8x8_c,
381              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
382              &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>, TX_8X8, 1, 8, 2),
383   make_tuple(&vpx_highbd_fdct8x8_c,
384              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
385              &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>, TX_8X8, 1, 10, 2),
386   make_tuple(&vpx_highbd_fdct8x8_c,
387              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
388              &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>, TX_8X8, 1, 12, 2),
389   make_tuple(&vpx_highbd_fdct4x4_c,
390              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
391              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>, TX_4X4, 16, 8, 2),
392   make_tuple(&vpx_highbd_fdct4x4_c,
393              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
394              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>, TX_4X4, 16, 10, 2),
395   make_tuple(&vpx_highbd_fdct4x4_c,
396              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
397              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>, TX_4X4, 16, 12, 2),
398   make_tuple(&vpx_highbd_fdct4x4_c,
399              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
400              &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>, TX_4X4, 1, 8, 2),
401   make_tuple(&vpx_highbd_fdct4x4_c,
402              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
403              &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>, TX_4X4, 1, 10, 2),
404   make_tuple(&vpx_highbd_fdct4x4_c,
405              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
406              &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>, TX_4X4, 1, 12, 2),
407 #endif  // CONFIG_VP9_HIGHBITDEPTH
408   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
409              &wrapper<vpx_idct32x32_1024_add_c>, TX_32X32, 1024, 8, 1),
410   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
411              &wrapper<vpx_idct32x32_135_add_c>, TX_32X32, 135, 8, 1),
412   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
413              &wrapper<vpx_idct32x32_34_add_c>, TX_32X32, 34, 8, 1),
414   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
415              &wrapper<vpx_idct32x32_1_add_c>, TX_32X32, 1, 8, 1),
416   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
417              &wrapper<vpx_idct16x16_256_add_c>, TX_16X16, 256, 8, 1),
418   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
419              &wrapper<vpx_idct16x16_38_add_c>, TX_16X16, 38, 8, 1),
420   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
421              &wrapper<vpx_idct16x16_10_add_c>, TX_16X16, 10, 8, 1),
422   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
423              &wrapper<vpx_idct16x16_1_add_c>, TX_16X16, 1, 8, 1),
424   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
425              &wrapper<vpx_idct8x8_64_add_c>, TX_8X8, 64, 8, 1),
426   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
427              &wrapper<vpx_idct8x8_12_add_c>, TX_8X8, 12, 8, 1),
428   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
429              &wrapper<vpx_idct8x8_1_add_c>, TX_8X8, 1, 8, 1),
430   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
431              &wrapper<vpx_idct4x4_16_add_c>, TX_4X4, 16, 8, 1),
432   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
433              &wrapper<vpx_idct4x4_1_add_c>, TX_4X4, 1, 8, 1)
434 };
435
436 INSTANTIATE_TEST_CASE_P(C, PartialIDctTest,
437                         ::testing::ValuesIn(c_partial_idct_tests));
438
439 #if HAVE_NEON && !CONFIG_EMULATE_HARDWARE
440 const PartialInvTxfmParam neon_partial_idct_tests[] = {
441 #if CONFIG_VP9_HIGHBITDEPTH
442   make_tuple(&vpx_highbd_fdct32x32_c,
443              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
444              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_neon>, TX_32X32,
445              1024, 8, 2),
446   make_tuple(&vpx_highbd_fdct32x32_c,
447              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
448              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_neon>, TX_32X32,
449              1024, 10, 2),
450   make_tuple(&vpx_highbd_fdct32x32_c,
451              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
452              &highbd_wrapper<vpx_highbd_idct32x32_1024_add_neon>, TX_32X32,
453              1024, 12, 2),
454   make_tuple(
455       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
456       &highbd_wrapper<vpx_highbd_idct32x32_135_add_neon>, TX_32X32, 135, 8, 2),
457   make_tuple(
458       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
459       &highbd_wrapper<vpx_highbd_idct32x32_135_add_neon>, TX_32X32, 135, 10, 2),
460   make_tuple(
461       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
462       &highbd_wrapper<vpx_highbd_idct32x32_135_add_neon>, TX_32X32, 135, 12, 2),
463   make_tuple(
464       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
465       &highbd_wrapper<vpx_highbd_idct32x32_34_add_neon>, TX_32X32, 34, 8, 2),
466   make_tuple(
467       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
468       &highbd_wrapper<vpx_highbd_idct32x32_34_add_neon>, TX_32X32, 34, 10, 2),
469   make_tuple(
470       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
471       &highbd_wrapper<vpx_highbd_idct32x32_34_add_neon>, TX_32X32, 34, 12, 2),
472   make_tuple(
473       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
474       &highbd_wrapper<vpx_highbd_idct32x32_1_add_neon>, TX_32X32, 1, 8, 2),
475   make_tuple(
476       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
477       &highbd_wrapper<vpx_highbd_idct32x32_1_add_neon>, TX_32X32, 1, 10, 2),
478   make_tuple(
479       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
480       &highbd_wrapper<vpx_highbd_idct32x32_1_add_neon>, TX_32X32, 1, 12, 2),
481   make_tuple(
482       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
483       &highbd_wrapper<vpx_highbd_idct16x16_256_add_neon>, TX_16X16, 256, 8, 2),
484   make_tuple(
485       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
486       &highbd_wrapper<vpx_highbd_idct16x16_256_add_neon>, TX_16X16, 256, 10, 2),
487   make_tuple(
488       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
489       &highbd_wrapper<vpx_highbd_idct16x16_256_add_neon>, TX_16X16, 256, 12, 2),
490   make_tuple(
491       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
492       &highbd_wrapper<vpx_highbd_idct16x16_38_add_neon>, TX_16X16, 38, 8, 2),
493   make_tuple(
494       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
495       &highbd_wrapper<vpx_highbd_idct16x16_38_add_neon>, TX_16X16, 38, 10, 2),
496   make_tuple(
497       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
498       &highbd_wrapper<vpx_highbd_idct16x16_38_add_neon>, TX_16X16, 38, 12, 2),
499   make_tuple(
500       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
501       &highbd_wrapper<vpx_highbd_idct16x16_10_add_neon>, TX_16X16, 10, 8, 2),
502   make_tuple(
503       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
504       &highbd_wrapper<vpx_highbd_idct16x16_10_add_neon>, TX_16X16, 10, 10, 2),
505   make_tuple(
506       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
507       &highbd_wrapper<vpx_highbd_idct16x16_10_add_neon>, TX_16X16, 10, 12, 2),
508   make_tuple(
509       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
510       &highbd_wrapper<vpx_highbd_idct16x16_1_add_neon>, TX_16X16, 1, 8, 2),
511   make_tuple(
512       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
513       &highbd_wrapper<vpx_highbd_idct16x16_1_add_neon>, TX_16X16, 1, 10, 2),
514   make_tuple(
515       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
516       &highbd_wrapper<vpx_highbd_idct16x16_1_add_neon>, TX_16X16, 1, 12, 2),
517   make_tuple(&vpx_highbd_fdct8x8_c,
518              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
519              &highbd_wrapper<vpx_highbd_idct8x8_64_add_neon>, TX_8X8, 64, 8, 2),
520   make_tuple(
521       &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
522       &highbd_wrapper<vpx_highbd_idct8x8_64_add_neon>, TX_8X8, 64, 10, 2),
523   make_tuple(
524       &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
525       &highbd_wrapper<vpx_highbd_idct8x8_64_add_neon>, TX_8X8, 64, 12, 2),
526   make_tuple(&vpx_highbd_fdct8x8_c,
527              &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
528              &highbd_wrapper<vpx_highbd_idct8x8_12_add_neon>, TX_8X8, 12, 8, 2),
529   make_tuple(
530       &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
531       &highbd_wrapper<vpx_highbd_idct8x8_12_add_neon>, TX_8X8, 12, 10, 2),
532   make_tuple(
533       &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
534       &highbd_wrapper<vpx_highbd_idct8x8_12_add_neon>, TX_8X8, 12, 12, 2),
535   make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
536              &highbd_wrapper<vpx_highbd_idct8x8_1_add_neon>, TX_8X8, 1, 8, 2),
537   make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
538              &highbd_wrapper<vpx_highbd_idct8x8_1_add_neon>, TX_8X8, 1, 10, 2),
539   make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
540              &highbd_wrapper<vpx_highbd_idct8x8_1_add_neon>, TX_8X8, 1, 12, 2),
541   make_tuple(&vpx_highbd_fdct4x4_c,
542              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
543              &highbd_wrapper<vpx_highbd_idct4x4_16_add_neon>, TX_4X4, 16, 8, 2),
544   make_tuple(
545       &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
546       &highbd_wrapper<vpx_highbd_idct4x4_16_add_neon>, TX_4X4, 16, 10, 2),
547   make_tuple(
548       &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
549       &highbd_wrapper<vpx_highbd_idct4x4_16_add_neon>, TX_4X4, 16, 12, 2),
550   make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
551              &highbd_wrapper<vpx_highbd_idct4x4_1_add_neon>, TX_4X4, 1, 8, 2),
552   make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
553              &highbd_wrapper<vpx_highbd_idct4x4_1_add_neon>, TX_4X4, 1, 10, 2),
554   make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
555              &highbd_wrapper<vpx_highbd_idct4x4_1_add_neon>, TX_4X4, 1, 12, 2),
556 #endif  // CONFIG_VP9_HIGHBITDEPTH
557   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
558              &wrapper<vpx_idct32x32_1024_add_neon>, TX_32X32, 1024, 8, 1),
559   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
560              &wrapper<vpx_idct32x32_135_add_neon>, TX_32X32, 135, 8, 1),
561   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
562              &wrapper<vpx_idct32x32_34_add_neon>, TX_32X32, 34, 8, 1),
563   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
564              &wrapper<vpx_idct32x32_1_add_neon>, TX_32X32, 1, 8, 1),
565   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
566              &wrapper<vpx_idct16x16_256_add_neon>, TX_16X16, 256, 8, 1),
567   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
568              &wrapper<vpx_idct16x16_38_add_neon>, TX_16X16, 38, 8, 1),
569   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
570              &wrapper<vpx_idct16x16_10_add_neon>, TX_16X16, 10, 8, 1),
571   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
572              &wrapper<vpx_idct16x16_1_add_neon>, TX_16X16, 1, 8, 1),
573   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
574              &wrapper<vpx_idct8x8_64_add_neon>, TX_8X8, 64, 8, 1),
575   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
576              &wrapper<vpx_idct8x8_12_add_neon>, TX_8X8, 12, 8, 1),
577   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
578              &wrapper<vpx_idct8x8_1_add_neon>, TX_8X8, 1, 8, 1),
579   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
580              &wrapper<vpx_idct4x4_16_add_neon>, TX_4X4, 16, 8, 1),
581   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
582              &wrapper<vpx_idct4x4_1_add_neon>, TX_4X4, 1, 8, 1)
583 };
584
585 INSTANTIATE_TEST_CASE_P(NEON, PartialIDctTest,
586                         ::testing::ValuesIn(neon_partial_idct_tests));
587 #endif  // HAVE_NEON && !CONFIG_EMULATE_HARDWARE
588
589 #if HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
590 // 32x32_135_ is implemented using the 1024 version.
591 const PartialInvTxfmParam sse2_partial_idct_tests[] = {
592 #if CONFIG_VP9_HIGHBITDEPTH
593   make_tuple(
594       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
595       &highbd_wrapper<vpx_highbd_idct32x32_1_add_sse2>, TX_32X32, 1, 8, 2),
596   make_tuple(
597       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
598       &highbd_wrapper<vpx_highbd_idct32x32_1_add_sse2>, TX_32X32, 1, 10, 2),
599   make_tuple(
600       &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
601       &highbd_wrapper<vpx_highbd_idct32x32_1_add_sse2>, TX_32X32, 1, 12, 2),
602   make_tuple(
603       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
604       &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse2>, TX_16X16, 256, 8, 2),
605   make_tuple(
606       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
607       &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse2>, TX_16X16, 256, 10, 2),
608   make_tuple(
609       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
610       &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse2>, TX_16X16, 256, 12, 2),
611   make_tuple(
612       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
613       &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse2>, TX_16X16, 10, 8, 2),
614   make_tuple(
615       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
616       &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse2>, TX_16X16, 10, 10, 2),
617   make_tuple(
618       &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
619       &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse2>, TX_16X16, 10, 12, 2),
620   make_tuple(&vpx_highbd_fdct8x8_c,
621              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
622              &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse2>, TX_8X8, 64, 8, 2),
623   make_tuple(
624       &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
625       &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse2>, TX_8X8, 64, 10, 2),
626   make_tuple(
627       &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
628       &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse2>, TX_8X8, 64, 12, 2),
629   make_tuple(&vpx_highbd_fdct8x8_c,
630              &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
631              &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse2>, TX_8X8, 12, 8, 2),
632   make_tuple(
633       &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
634       &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse2>, TX_8X8, 12, 10, 2),
635   make_tuple(
636       &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
637       &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse2>, TX_8X8, 12, 12, 2),
638   make_tuple(&vpx_highbd_fdct4x4_c,
639              &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
640              &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse2>, TX_4X4, 16, 8, 2),
641   make_tuple(
642       &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
643       &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse2>, TX_4X4, 16, 10, 2),
644   make_tuple(
645       &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
646       &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse2>, TX_4X4, 16, 12, 2),
647 #endif  // CONFIG_VP9_HIGHBITDEPTH
648   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
649              &wrapper<vpx_idct32x32_1024_add_sse2>, TX_32X32, 1024, 8, 1),
650   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
651              &wrapper<vpx_idct32x32_1024_add_sse2>, TX_32X32, 135, 8, 1),
652   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
653              &wrapper<vpx_idct32x32_34_add_sse2>, TX_32X32, 34, 8, 1),
654   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
655              &wrapper<vpx_idct32x32_1_add_sse2>, TX_32X32, 1, 8, 1),
656   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
657              &wrapper<vpx_idct16x16_256_add_sse2>, TX_16X16, 256, 8, 1),
658   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
659              &wrapper<vpx_idct16x16_10_add_sse2>, TX_16X16, 10, 8, 1),
660   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
661              &wrapper<vpx_idct16x16_1_add_sse2>, TX_16X16, 1, 8, 1),
662   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
663              &wrapper<vpx_idct8x8_64_add_sse2>, TX_8X8, 64, 8, 1),
664   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
665              &wrapper<vpx_idct8x8_12_add_sse2>, TX_8X8, 12, 8, 1),
666   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
667              &wrapper<vpx_idct8x8_1_add_sse2>, TX_8X8, 1, 8, 1),
668   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
669              &wrapper<vpx_idct4x4_16_add_sse2>, TX_4X4, 16, 8, 1),
670   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
671              &wrapper<vpx_idct4x4_1_add_sse2>, TX_4X4, 1, 8, 1)
672 };
673
674 INSTANTIATE_TEST_CASE_P(SSE2, PartialIDctTest,
675                         ::testing::ValuesIn(sse2_partial_idct_tests));
676
677 #endif  // HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
678
679 #if HAVE_SSSE3 && !CONFIG_EMULATE_HARDWARE
680 const PartialInvTxfmParam ssse3_partial_idct_tests[] = {
681   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
682              &wrapper<vpx_idct32x32_1024_add_ssse3>, TX_32X32, 1024, 8, 1),
683   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
684              &wrapper<vpx_idct32x32_135_add_ssse3>, TX_32X32, 135, 8, 1),
685   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
686              &wrapper<vpx_idct32x32_34_add_ssse3>, TX_32X32, 34, 8, 1),
687   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
688              &wrapper<vpx_idct8x8_64_add_ssse3>, TX_8X8, 64, 8, 1),
689   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
690              &wrapper<vpx_idct8x8_12_add_ssse3>, TX_8X8, 12, 8, 1)
691 };
692
693 INSTANTIATE_TEST_CASE_P(SSSE3, PartialIDctTest,
694                         ::testing::ValuesIn(ssse3_partial_idct_tests));
695 #endif  // HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_EMULATE_HARDWARE
696
697 #if HAVE_DSPR2 && !CONFIG_EMULATE_HARDWARE && !CONFIG_VP9_HIGHBITDEPTH
698 const PartialInvTxfmParam dspr2_partial_idct_tests[] = {
699   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
700              &wrapper<vpx_idct32x32_1024_add_dspr2>, TX_32X32, 1024, 8, 1),
701   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
702              &wrapper<vpx_idct32x32_1024_add_dspr2>, TX_32X32, 135, 8, 1),
703   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
704              &wrapper<vpx_idct32x32_34_add_dspr2>, TX_32X32, 34, 8, 1),
705   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
706              &wrapper<vpx_idct32x32_1_add_dspr2>, TX_32X32, 1, 8, 1),
707   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
708              &wrapper<vpx_idct16x16_256_add_dspr2>, TX_16X16, 256, 8, 1),
709   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
710              &wrapper<vpx_idct16x16_10_add_dspr2>, TX_16X16, 10, 8, 1),
711   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
712              &wrapper<vpx_idct16x16_1_add_dspr2>, TX_16X16, 1, 8, 1),
713   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
714              &wrapper<vpx_idct8x8_64_add_dspr2>, TX_8X8, 64, 8, 1),
715   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
716              &wrapper<vpx_idct8x8_12_add_dspr2>, TX_8X8, 12, 8, 1),
717   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
718              &wrapper<vpx_idct8x8_1_add_dspr2>, TX_8X8, 1, 8, 1),
719   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
720              &wrapper<vpx_idct4x4_16_add_dspr2>, TX_4X4, 16, 8, 1),
721   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
722              &wrapper<vpx_idct4x4_1_add_dspr2>, TX_4X4, 1, 8, 1)
723 };
724
725 INSTANTIATE_TEST_CASE_P(DSPR2, PartialIDctTest,
726                         ::testing::ValuesIn(dspr2_partial_idct_tests));
727 #endif  // HAVE_DSPR2 && !CONFIG_EMULATE_HARDWARE && !CONFIG_VP9_HIGHBITDEPTH
728
729 #if HAVE_MSA && !CONFIG_EMULATE_HARDWARE && !CONFIG_VP9_HIGHBITDEPTH
730 // 32x32_135_ is implemented using the 1024 version.
731 const PartialInvTxfmParam msa_partial_idct_tests[] = {
732   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
733              &wrapper<vpx_idct32x32_1024_add_msa>, TX_32X32, 1024, 8, 1),
734   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
735              &wrapper<vpx_idct32x32_1024_add_msa>, TX_32X32, 135, 8, 1),
736   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
737              &wrapper<vpx_idct32x32_34_add_msa>, TX_32X32, 34, 8, 1),
738   make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
739              &wrapper<vpx_idct32x32_1_add_msa>, TX_32X32, 1, 8, 1),
740   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
741              &wrapper<vpx_idct16x16_256_add_msa>, TX_16X16, 256, 8, 1),
742   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
743              &wrapper<vpx_idct16x16_10_add_msa>, TX_16X16, 10, 8, 1),
744   make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
745              &wrapper<vpx_idct16x16_1_add_msa>, TX_16X16, 1, 8, 1),
746   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
747              &wrapper<vpx_idct8x8_64_add_msa>, TX_8X8, 64, 8, 1),
748   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
749              &wrapper<vpx_idct8x8_12_add_msa>, TX_8X8, 12, 8, 1),
750   make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
751              &wrapper<vpx_idct8x8_1_add_msa>, TX_8X8, 1, 8, 1),
752   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
753              &wrapper<vpx_idct4x4_16_add_msa>, TX_4X4, 16, 8, 1),
754   make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
755              &wrapper<vpx_idct4x4_1_add_msa>, TX_4X4, 1, 8, 1)
756 };
757
758 INSTANTIATE_TEST_CASE_P(MSA, PartialIDctTest,
759                         ::testing::ValuesIn(msa_partial_idct_tests));
760 #endif  // HAVE_MSA && !CONFIG_EMULATE_HARDWARE && !CONFIG_VP9_HIGHBITDEPTH
761
762 }  // namespace