2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
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.
17 #include "third_party/googletest/src/include/gtest/gtest.h"
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"
30 using libvpx_test::ACMRandom;
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,
39 template <InvTxfmFunc fn>
40 void wrapper(const tran_low_t *in, uint8_t *out, int stride, int bd) {
45 #if CONFIG_VP9_HIGHBITDEPTH
46 typedef void (*InvTxfmHighbdFunc)(const tran_low_t *in, uint16_t *out,
48 template <InvTxfmHighbdFunc fn>
49 void highbd_wrapper(const tran_low_t *in, uint8_t *out, int stride, int bd) {
50 fn(in, CAST_TO_SHORTPTR(out), stride, bd);
54 typedef std::tuple<FwdTxfmFunc, InvTxfmWithBdFunc, InvTxfmWithBdFunc, TX_SIZE,
57 const int kMaxNumCoeffs = 1024;
58 const int kCountTestBlock = 1000;
60 class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
62 virtual ~PartialIDctTest() {}
63 virtual void SetUp() {
64 rnd_.Reset(ACMRandom::DeterministicSeed());
65 fwd_txfm_ = GET_PARAM(0);
66 full_inv_txfm_ = GET_PARAM(1);
67 partial_inv_txfm_ = GET_PARAM(2);
68 tx_size_ = GET_PARAM(3);
69 last_nonzero_ = GET_PARAM(4);
70 bit_depth_ = GET_PARAM(5);
71 pixel_size_ = GET_PARAM(6);
72 mask_ = (1 << bit_depth_) - 1;
75 case TX_4X4: size_ = 4; break;
76 case TX_8X8: size_ = 8; break;
77 case TX_16X16: size_ = 16; break;
78 case TX_32X32: size_ = 32; break;
79 default: FAIL() << "Wrong Size!"; break;
82 // Randomize stride_ to a value less than or equal to 1024
83 stride_ = rnd_(1024) + 1;
84 if (stride_ < size_) {
87 // Align stride_ to 16 if it's bigger than 16.
92 input_block_size_ = size_ * size_;
93 output_block_size_ = size_ * stride_;
95 input_block_ = reinterpret_cast<tran_low_t *>(
96 vpx_memalign(16, sizeof(*input_block_) * input_block_size_));
97 output_block_ = reinterpret_cast<uint8_t *>(
98 vpx_memalign(16, pixel_size_ * output_block_size_));
99 output_block_ref_ = reinterpret_cast<uint8_t *>(
100 vpx_memalign(16, pixel_size_ * output_block_size_));
103 virtual void TearDown() {
104 vpx_free(input_block_);
105 input_block_ = nullptr;
106 vpx_free(output_block_);
107 output_block_ = nullptr;
108 vpx_free(output_block_ref_);
109 output_block_ref_ = nullptr;
110 libvpx_test::ClearSystemState();
114 memset(input_block_, 0, sizeof(*input_block_) * input_block_size_);
115 if (pixel_size_ == 1) {
116 for (int j = 0; j < output_block_size_; ++j) {
117 output_block_[j] = output_block_ref_[j] = rnd_.Rand16() & mask_;
120 ASSERT_EQ(2, pixel_size_);
121 uint16_t *const output = reinterpret_cast<uint16_t *>(output_block_);
122 uint16_t *const output_ref =
123 reinterpret_cast<uint16_t *>(output_block_ref_);
124 for (int j = 0; j < output_block_size_; ++j) {
125 output[j] = output_ref[j] = rnd_.Rand16() & mask_;
131 const int64_t max_coeff = (32766 << (bit_depth_ - 8)) / 4;
132 int64_t max_energy_leftover = max_coeff * max_coeff;
133 for (int j = 0; j < last_nonzero_; ++j) {
134 tran_low_t coeff = static_cast<tran_low_t>(
135 sqrt(1.0 * max_energy_leftover) * (rnd_.Rand16() - 32768) / 65536);
136 max_energy_leftover -= static_cast<int64_t>(coeff) * coeff;
137 if (max_energy_leftover < 0) {
138 max_energy_leftover = 0;
141 input_block_[vp9_default_scan_orders[tx_size_].scan[j]] = coeff;
146 if (memcmp(output_block_ref_, output_block_,
147 pixel_size_ * output_block_size_)) {
149 for (int y = 0; y < size_; y++) {
150 for (int x = 0; x < size_; x++) {
151 if (pixel_size_ == 1) {
152 ref = output_block_ref_[y * stride_ + x];
153 opt = output_block_[y * stride_ + x];
155 ref = reinterpret_cast<uint16_t *>(
156 output_block_ref_)[y * stride_ + x];
157 opt = reinterpret_cast<uint16_t *>(output_block_)[y * stride_ + x];
160 printf("dest[%d][%d] diff:%6d (ref),%6d (opt)\n", y, x, ref, opt);
165 printf("\ninput_block_:\n");
166 for (int y = 0; y < size_; y++) {
167 for (int x = 0; x < size_; x++) {
168 printf("%6d,", input_block_[y * size_ + x]);
178 tran_low_t *input_block_;
179 uint8_t *output_block_;
180 uint8_t *output_block_ref_;
184 int input_block_size_;
185 int output_block_size_;
188 FwdTxfmFunc fwd_txfm_;
189 InvTxfmWithBdFunc full_inv_txfm_;
190 InvTxfmWithBdFunc partial_inv_txfm_;
194 TEST_P(PartialIDctTest, RunQuantCheck) {
195 const int count_test_block = (size_ != 4) ? kCountTestBlock : 65536;
196 DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]);
197 DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
201 for (int i = 0; i < count_test_block; ++i) {
202 // Initialize a test block with input range [-mask_, mask_].
205 for (int k = 0; k < input_block_size_; ++k) {
206 input_extreme_block[k] = mask_;
209 for (int k = 0; k < input_block_size_; ++k) {
210 input_extreme_block[k] = -mask_;
213 for (int k = 0; k < input_block_size_; ++k) {
214 input_extreme_block[k] = rnd_.Rand8() % 2 ? mask_ : -mask_;
218 // Try all possible combinations.
219 for (int k = 0; k < input_block_size_; ++k) {
220 input_extreme_block[k] = (i & (1 << k)) ? mask_ : -mask_;
224 fwd_txfm_(input_extreme_block, output_ref_block, size_);
226 // quantization with minimum allowed step sizes
227 input_block_[0] = (output_ref_block[0] / 4) * 4;
228 for (int k = 1; k < last_nonzero_; ++k) {
229 const int pos = vp9_default_scan_orders[tx_size_].scan[k];
230 input_block_[pos] = (output_ref_block[pos] / 4) * 4;
233 ASM_REGISTER_STATE_CHECK(
234 full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
235 ASM_REGISTER_STATE_CHECK(
236 partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_));
237 ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
238 pixel_size_ * output_block_size_))
239 << "Error: partial inverse transform produces different results";
243 TEST_P(PartialIDctTest, ResultsMatch) {
244 for (int i = 0; i < kCountTestBlock; ++i) {
248 ASM_REGISTER_STATE_CHECK(
249 full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
250 ASM_REGISTER_STATE_CHECK(
251 partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_));
252 ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
253 pixel_size_ * output_block_size_))
254 << "Error: partial inverse transform produces different results";
258 TEST_P(PartialIDctTest, AddOutputBlock) {
259 for (int i = 0; i < kCountTestBlock; ++i) {
261 for (int j = 0; j < last_nonzero_; ++j) {
262 input_block_[vp9_default_scan_orders[tx_size_].scan[j]] = 10;
265 ASM_REGISTER_STATE_CHECK(
266 full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
267 ASM_REGISTER_STATE_CHECK(
268 partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_));
269 ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
270 pixel_size_ * output_block_size_))
271 << "Error: Transform results are not correctly added to output.";
275 TEST_P(PartialIDctTest, SingleExtremeCoeff) {
276 const int16_t max_coeff = std::numeric_limits<int16_t>::max();
277 const int16_t min_coeff = std::numeric_limits<int16_t>::min();
278 for (int i = 0; i < last_nonzero_; ++i) {
279 memset(input_block_, 0, sizeof(*input_block_) * input_block_size_);
280 // Run once for min and once for max.
281 for (int j = 0; j < 2; ++j) {
282 const int coeff = j ? min_coeff : max_coeff;
284 memset(output_block_, 0, pixel_size_ * output_block_size_);
285 memset(output_block_ref_, 0, pixel_size_ * output_block_size_);
286 input_block_[vp9_default_scan_orders[tx_size_].scan[i]] = coeff;
288 ASM_REGISTER_STATE_CHECK(
289 full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
290 ASM_REGISTER_STATE_CHECK(
291 partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_));
292 ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
293 pixel_size_ * output_block_size_))
294 << "Error: Fails with single coeff of " << coeff << " at " << i
300 TEST_P(PartialIDctTest, DISABLED_Speed) {
301 // Keep runtime stable with transform size.
302 const int kCountSpeedTestBlock = 500000000 / input_block_size_;
306 for (int i = 0; i < kCountSpeedTestBlock; ++i) {
307 ASM_REGISTER_STATE_CHECK(
308 full_inv_txfm_(input_block_, output_block_ref_, stride_, bit_depth_));
310 vpx_usec_timer timer;
311 vpx_usec_timer_start(&timer);
312 for (int i = 0; i < kCountSpeedTestBlock; ++i) {
313 partial_inv_txfm_(input_block_, output_block_, stride_, bit_depth_);
315 libvpx_test::ClearSystemState();
316 vpx_usec_timer_mark(&timer);
317 const int elapsed_time =
318 static_cast<int>(vpx_usec_timer_elapsed(&timer) / 1000);
319 printf("idct%dx%d_%d (%s %d) time: %5d ms\n", size_, size_, last_nonzero_,
320 (pixel_size_ == 1) ? "bitdepth" : "high bitdepth", bit_depth_,
322 ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
323 pixel_size_ * output_block_size_))
324 << "Error: partial inverse transform produces different results";
327 using std::make_tuple;
329 const PartialInvTxfmParam c_partial_idct_tests[] = {
330 #if CONFIG_VP9_HIGHBITDEPTH
332 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
333 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>, TX_32X32, 1024, 8, 2),
335 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
336 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>, TX_32X32, 1024, 10, 2),
338 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
339 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>, TX_32X32, 1024, 12, 2),
341 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
342 &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>, TX_32X32, 135, 8, 2),
344 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
345 &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>, TX_32X32, 135, 10, 2),
347 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
348 &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>, TX_32X32, 135, 12, 2),
350 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
351 &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>, TX_32X32, 34, 8, 2),
353 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
354 &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>, TX_32X32, 34, 10, 2),
356 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
357 &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>, TX_32X32, 34, 12, 2),
358 make_tuple(&vpx_highbd_fdct32x32_c,
359 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
360 &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>, TX_32X32, 1, 8, 2),
361 make_tuple(&vpx_highbd_fdct32x32_c,
362 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
363 &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>, TX_32X32, 1, 10, 2),
364 make_tuple(&vpx_highbd_fdct32x32_c,
365 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
366 &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>, TX_32X32, 1, 12, 2),
368 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
369 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>, TX_16X16, 256, 8, 2),
371 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
372 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>, TX_16X16, 256, 10, 2),
374 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
375 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>, TX_16X16, 256, 12, 2),
377 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
378 &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>, TX_16X16, 38, 8, 2),
380 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
381 &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>, TX_16X16, 38, 10, 2),
383 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
384 &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>, TX_16X16, 38, 12, 2),
386 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
387 &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>, TX_16X16, 10, 8, 2),
389 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
390 &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>, TX_16X16, 10, 10, 2),
392 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
393 &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>, TX_16X16, 10, 12, 2),
394 make_tuple(&vpx_highbd_fdct16x16_c,
395 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
396 &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>, TX_16X16, 1, 8, 2),
397 make_tuple(&vpx_highbd_fdct16x16_c,
398 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
399 &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>, TX_16X16, 1, 10, 2),
400 make_tuple(&vpx_highbd_fdct16x16_c,
401 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
402 &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>, TX_16X16, 1, 12, 2),
403 make_tuple(&vpx_highbd_fdct8x8_c,
404 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
405 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>, TX_8X8, 64, 8, 2),
406 make_tuple(&vpx_highbd_fdct8x8_c,
407 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
408 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>, TX_8X8, 64, 10, 2),
409 make_tuple(&vpx_highbd_fdct8x8_c,
410 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
411 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>, TX_8X8, 64, 12, 2),
412 make_tuple(&vpx_highbd_fdct8x8_c,
413 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
414 &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>, TX_8X8, 12, 8, 2),
415 make_tuple(&vpx_highbd_fdct8x8_c,
416 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
417 &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>, TX_8X8, 12, 10, 2),
418 make_tuple(&vpx_highbd_fdct8x8_c,
419 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
420 &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>, TX_8X8, 12, 12, 2),
421 make_tuple(&vpx_highbd_fdct8x8_c,
422 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
423 &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>, TX_8X8, 1, 8, 2),
424 make_tuple(&vpx_highbd_fdct8x8_c,
425 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
426 &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>, TX_8X8, 1, 10, 2),
427 make_tuple(&vpx_highbd_fdct8x8_c,
428 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
429 &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>, TX_8X8, 1, 12, 2),
430 make_tuple(&vpx_highbd_fdct4x4_c,
431 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
432 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>, TX_4X4, 16, 8, 2),
433 make_tuple(&vpx_highbd_fdct4x4_c,
434 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
435 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>, TX_4X4, 16, 10, 2),
436 make_tuple(&vpx_highbd_fdct4x4_c,
437 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
438 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>, TX_4X4, 16, 12, 2),
439 make_tuple(&vpx_highbd_fdct4x4_c,
440 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
441 &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>, TX_4X4, 1, 8, 2),
442 make_tuple(&vpx_highbd_fdct4x4_c,
443 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
444 &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>, TX_4X4, 1, 10, 2),
445 make_tuple(&vpx_highbd_fdct4x4_c,
446 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
447 &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>, TX_4X4, 1, 12, 2),
448 #endif // CONFIG_VP9_HIGHBITDEPTH
449 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
450 &wrapper<vpx_idct32x32_1024_add_c>, TX_32X32, 1024, 8, 1),
451 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
452 &wrapper<vpx_idct32x32_135_add_c>, TX_32X32, 135, 8, 1),
453 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
454 &wrapper<vpx_idct32x32_34_add_c>, TX_32X32, 34, 8, 1),
455 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
456 &wrapper<vpx_idct32x32_1_add_c>, TX_32X32, 1, 8, 1),
457 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
458 &wrapper<vpx_idct16x16_256_add_c>, TX_16X16, 256, 8, 1),
459 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
460 &wrapper<vpx_idct16x16_38_add_c>, TX_16X16, 38, 8, 1),
461 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
462 &wrapper<vpx_idct16x16_10_add_c>, TX_16X16, 10, 8, 1),
463 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
464 &wrapper<vpx_idct16x16_1_add_c>, TX_16X16, 1, 8, 1),
465 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
466 &wrapper<vpx_idct8x8_64_add_c>, TX_8X8, 64, 8, 1),
467 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
468 &wrapper<vpx_idct8x8_12_add_c>, TX_8X8, 12, 8, 1),
469 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
470 &wrapper<vpx_idct8x8_1_add_c>, TX_8X8, 1, 8, 1),
471 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
472 &wrapper<vpx_idct4x4_16_add_c>, TX_4X4, 16, 8, 1),
473 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
474 &wrapper<vpx_idct4x4_1_add_c>, TX_4X4, 1, 8, 1)
477 INSTANTIATE_TEST_SUITE_P(C, PartialIDctTest,
478 ::testing::ValuesIn(c_partial_idct_tests));
480 #if !CONFIG_EMULATE_HARDWARE
483 const PartialInvTxfmParam neon_partial_idct_tests[] = {
484 #if CONFIG_VP9_HIGHBITDEPTH
485 make_tuple(&vpx_highbd_fdct32x32_c,
486 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
487 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_neon>, TX_32X32,
489 make_tuple(&vpx_highbd_fdct32x32_c,
490 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
491 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_neon>, TX_32X32,
493 make_tuple(&vpx_highbd_fdct32x32_c,
494 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
495 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_neon>, TX_32X32,
498 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
499 &highbd_wrapper<vpx_highbd_idct32x32_135_add_neon>, TX_32X32, 135, 8, 2),
501 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
502 &highbd_wrapper<vpx_highbd_idct32x32_135_add_neon>, TX_32X32, 135, 10, 2),
504 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
505 &highbd_wrapper<vpx_highbd_idct32x32_135_add_neon>, TX_32X32, 135, 12, 2),
507 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
508 &highbd_wrapper<vpx_highbd_idct32x32_34_add_neon>, TX_32X32, 34, 8, 2),
510 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
511 &highbd_wrapper<vpx_highbd_idct32x32_34_add_neon>, TX_32X32, 34, 10, 2),
513 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
514 &highbd_wrapper<vpx_highbd_idct32x32_34_add_neon>, TX_32X32, 34, 12, 2),
516 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>,
517 &highbd_wrapper<vpx_highbd_idct32x32_1_add_neon>, TX_32X32, 1, 8, 2),
519 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>,
520 &highbd_wrapper<vpx_highbd_idct32x32_1_add_neon>, TX_32X32, 1, 10, 2),
522 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>,
523 &highbd_wrapper<vpx_highbd_idct32x32_1_add_neon>, TX_32X32, 1, 12, 2),
525 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
526 &highbd_wrapper<vpx_highbd_idct16x16_256_add_neon>, TX_16X16, 256, 8, 2),
528 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
529 &highbd_wrapper<vpx_highbd_idct16x16_256_add_neon>, TX_16X16, 256, 10, 2),
531 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
532 &highbd_wrapper<vpx_highbd_idct16x16_256_add_neon>, TX_16X16, 256, 12, 2),
534 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
535 &highbd_wrapper<vpx_highbd_idct16x16_38_add_neon>, TX_16X16, 38, 8, 2),
537 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
538 &highbd_wrapper<vpx_highbd_idct16x16_38_add_neon>, TX_16X16, 38, 10, 2),
540 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
541 &highbd_wrapper<vpx_highbd_idct16x16_38_add_neon>, TX_16X16, 38, 12, 2),
543 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
544 &highbd_wrapper<vpx_highbd_idct16x16_10_add_neon>, TX_16X16, 10, 8, 2),
546 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
547 &highbd_wrapper<vpx_highbd_idct16x16_10_add_neon>, TX_16X16, 10, 10, 2),
549 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
550 &highbd_wrapper<vpx_highbd_idct16x16_10_add_neon>, TX_16X16, 10, 12, 2),
552 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>,
553 &highbd_wrapper<vpx_highbd_idct16x16_1_add_neon>, TX_16X16, 1, 8, 2),
555 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>,
556 &highbd_wrapper<vpx_highbd_idct16x16_1_add_neon>, TX_16X16, 1, 10, 2),
558 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>,
559 &highbd_wrapper<vpx_highbd_idct16x16_1_add_neon>, TX_16X16, 1, 12, 2),
560 make_tuple(&vpx_highbd_fdct8x8_c,
561 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
562 &highbd_wrapper<vpx_highbd_idct8x8_64_add_neon>, TX_8X8, 64, 8, 2),
564 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
565 &highbd_wrapper<vpx_highbd_idct8x8_64_add_neon>, TX_8X8, 64, 10, 2),
567 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
568 &highbd_wrapper<vpx_highbd_idct8x8_64_add_neon>, TX_8X8, 64, 12, 2),
569 make_tuple(&vpx_highbd_fdct8x8_c,
570 &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
571 &highbd_wrapper<vpx_highbd_idct8x8_12_add_neon>, TX_8X8, 12, 8, 2),
573 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
574 &highbd_wrapper<vpx_highbd_idct8x8_12_add_neon>, TX_8X8, 12, 10, 2),
576 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
577 &highbd_wrapper<vpx_highbd_idct8x8_12_add_neon>, TX_8X8, 12, 12, 2),
578 make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
579 &highbd_wrapper<vpx_highbd_idct8x8_1_add_neon>, TX_8X8, 1, 8, 2),
580 make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
581 &highbd_wrapper<vpx_highbd_idct8x8_1_add_neon>, TX_8X8, 1, 10, 2),
582 make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
583 &highbd_wrapper<vpx_highbd_idct8x8_1_add_neon>, TX_8X8, 1, 12, 2),
584 make_tuple(&vpx_highbd_fdct4x4_c,
585 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
586 &highbd_wrapper<vpx_highbd_idct4x4_16_add_neon>, TX_4X4, 16, 8, 2),
588 &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
589 &highbd_wrapper<vpx_highbd_idct4x4_16_add_neon>, TX_4X4, 16, 10, 2),
591 &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
592 &highbd_wrapper<vpx_highbd_idct4x4_16_add_neon>, TX_4X4, 16, 12, 2),
593 make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
594 &highbd_wrapper<vpx_highbd_idct4x4_1_add_neon>, TX_4X4, 1, 8, 2),
595 make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
596 &highbd_wrapper<vpx_highbd_idct4x4_1_add_neon>, TX_4X4, 1, 10, 2),
597 make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
598 &highbd_wrapper<vpx_highbd_idct4x4_1_add_neon>, TX_4X4, 1, 12, 2),
599 #endif // CONFIG_VP9_HIGHBITDEPTH
600 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
601 &wrapper<vpx_idct32x32_1024_add_neon>, TX_32X32, 1024, 8, 1),
602 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_135_add_c>,
603 &wrapper<vpx_idct32x32_135_add_neon>, TX_32X32, 135, 8, 1),
604 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_34_add_c>,
605 &wrapper<vpx_idct32x32_34_add_neon>, TX_32X32, 34, 8, 1),
606 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1_add_c>,
607 &wrapper<vpx_idct32x32_1_add_neon>, TX_32X32, 1, 8, 1),
608 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
609 &wrapper<vpx_idct16x16_256_add_neon>, TX_16X16, 256, 8, 1),
610 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_38_add_c>,
611 &wrapper<vpx_idct16x16_38_add_neon>, TX_16X16, 38, 8, 1),
612 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_10_add_c>,
613 &wrapper<vpx_idct16x16_10_add_neon>, TX_16X16, 10, 8, 1),
614 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_1_add_c>,
615 &wrapper<vpx_idct16x16_1_add_neon>, TX_16X16, 1, 8, 1),
616 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
617 &wrapper<vpx_idct8x8_64_add_neon>, TX_8X8, 64, 8, 1),
618 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_12_add_c>,
619 &wrapper<vpx_idct8x8_12_add_neon>, TX_8X8, 12, 8, 1),
620 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_1_add_c>,
621 &wrapper<vpx_idct8x8_1_add_neon>, TX_8X8, 1, 8, 1),
622 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
623 &wrapper<vpx_idct4x4_16_add_neon>, TX_4X4, 16, 8, 1),
624 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_1_add_c>,
625 &wrapper<vpx_idct4x4_1_add_neon>, TX_4X4, 1, 8, 1)
628 INSTANTIATE_TEST_SUITE_P(NEON, PartialIDctTest,
629 ::testing::ValuesIn(neon_partial_idct_tests));
633 // 32x32_135_ is implemented using the 1024 version.
634 const PartialInvTxfmParam sse2_partial_idct_tests[] = {
635 #if CONFIG_VP9_HIGHBITDEPTH
636 make_tuple(&vpx_highbd_fdct32x32_c,
637 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
638 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_sse2>, TX_32X32,
640 make_tuple(&vpx_highbd_fdct32x32_c,
641 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
642 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_sse2>, TX_32X32,
644 make_tuple(&vpx_highbd_fdct32x32_c,
645 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
646 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_sse2>, TX_32X32,
649 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
650 &highbd_wrapper<vpx_highbd_idct32x32_135_add_sse2>, TX_32X32, 135, 8, 2),
652 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
653 &highbd_wrapper<vpx_highbd_idct32x32_135_add_sse2>, TX_32X32, 135, 10, 2),
655 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
656 &highbd_wrapper<vpx_highbd_idct32x32_135_add_sse2>, TX_32X32, 135, 12, 2),
658 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
659 &highbd_wrapper<vpx_highbd_idct32x32_34_add_sse2>, TX_32X32, 34, 8, 2),
661 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
662 &highbd_wrapper<vpx_highbd_idct32x32_34_add_sse2>, TX_32X32, 34, 10, 2),
664 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
665 &highbd_wrapper<vpx_highbd_idct32x32_34_add_sse2>, TX_32X32, 34, 12, 2),
667 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>,
668 &highbd_wrapper<vpx_highbd_idct32x32_1_add_sse2>, TX_32X32, 1, 8, 2),
670 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>,
671 &highbd_wrapper<vpx_highbd_idct32x32_1_add_sse2>, TX_32X32, 1, 10, 2),
673 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_1_add_c>,
674 &highbd_wrapper<vpx_highbd_idct32x32_1_add_sse2>, TX_32X32, 1, 12, 2),
676 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
677 &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse2>, TX_16X16, 256, 8, 2),
679 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
680 &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse2>, TX_16X16, 256, 10, 2),
682 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
683 &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse2>, TX_16X16, 256, 12, 2),
685 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
686 &highbd_wrapper<vpx_highbd_idct16x16_38_add_sse2>, TX_16X16, 38, 8, 2),
688 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
689 &highbd_wrapper<vpx_highbd_idct16x16_38_add_sse2>, TX_16X16, 38, 10, 2),
691 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
692 &highbd_wrapper<vpx_highbd_idct16x16_38_add_sse2>, TX_16X16, 38, 12, 2),
694 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
695 &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse2>, TX_16X16, 10, 8, 2),
697 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
698 &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse2>, TX_16X16, 10, 10, 2),
700 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
701 &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse2>, TX_16X16, 10, 12, 2),
703 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>,
704 &highbd_wrapper<vpx_highbd_idct16x16_1_add_sse2>, TX_16X16, 1, 8, 2),
706 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>,
707 &highbd_wrapper<vpx_highbd_idct16x16_1_add_sse2>, TX_16X16, 1, 10, 2),
709 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_1_add_c>,
710 &highbd_wrapper<vpx_highbd_idct16x16_1_add_sse2>, TX_16X16, 1, 12, 2),
711 make_tuple(&vpx_highbd_fdct8x8_c,
712 &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
713 &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse2>, TX_8X8, 64, 8, 2),
715 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
716 &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse2>, TX_8X8, 64, 10, 2),
718 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
719 &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse2>, TX_8X8, 64, 12, 2),
720 make_tuple(&vpx_highbd_fdct8x8_c,
721 &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
722 &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse2>, TX_8X8, 12, 8, 2),
724 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
725 &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse2>, TX_8X8, 12, 10, 2),
727 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
728 &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse2>, TX_8X8, 12, 12, 2),
729 make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
730 &highbd_wrapper<vpx_highbd_idct8x8_1_add_sse2>, TX_8X8, 1, 8, 2),
731 make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
732 &highbd_wrapper<vpx_highbd_idct8x8_1_add_sse2>, TX_8X8, 1, 10, 2),
733 make_tuple(&vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_1_add_c>,
734 &highbd_wrapper<vpx_highbd_idct8x8_1_add_sse2>, TX_8X8, 1, 12, 2),
735 make_tuple(&vpx_highbd_fdct4x4_c,
736 &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
737 &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse2>, TX_4X4, 16, 8, 2),
739 &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
740 &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse2>, TX_4X4, 16, 10, 2),
742 &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
743 &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse2>, TX_4X4, 16, 12, 2),
744 make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
745 &highbd_wrapper<vpx_highbd_idct4x4_1_add_sse2>, TX_4X4, 1, 8, 2),
746 make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
747 &highbd_wrapper<vpx_highbd_idct4x4_1_add_sse2>, TX_4X4, 1, 10, 2),
748 make_tuple(&vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_1_add_c>,
749 &highbd_wrapper<vpx_highbd_idct4x4_1_add_sse2>, TX_4X4, 1, 12, 2),
750 #endif // CONFIG_VP9_HIGHBITDEPTH
751 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
752 &wrapper<vpx_idct32x32_1024_add_sse2>, TX_32X32, 1024, 8, 1),
753 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_135_add_c>,
754 &wrapper<vpx_idct32x32_135_add_sse2>, TX_32X32, 135, 8, 1),
755 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_34_add_c>,
756 &wrapper<vpx_idct32x32_34_add_sse2>, TX_32X32, 34, 8, 1),
757 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1_add_c>,
758 &wrapper<vpx_idct32x32_1_add_sse2>, TX_32X32, 1, 8, 1),
759 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
760 &wrapper<vpx_idct16x16_256_add_sse2>, TX_16X16, 256, 8, 1),
761 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_38_add_c>,
762 &wrapper<vpx_idct16x16_38_add_sse2>, TX_16X16, 38, 8, 1),
763 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_10_add_c>,
764 &wrapper<vpx_idct16x16_10_add_sse2>, TX_16X16, 10, 8, 1),
765 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_1_add_c>,
766 &wrapper<vpx_idct16x16_1_add_sse2>, TX_16X16, 1, 8, 1),
767 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
768 &wrapper<vpx_idct8x8_64_add_sse2>, TX_8X8, 64, 8, 1),
769 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_12_add_c>,
770 &wrapper<vpx_idct8x8_12_add_sse2>, TX_8X8, 12, 8, 1),
771 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_1_add_c>,
772 &wrapper<vpx_idct8x8_1_add_sse2>, TX_8X8, 1, 8, 1),
773 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
774 &wrapper<vpx_idct4x4_16_add_sse2>, TX_4X4, 16, 8, 1),
775 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_1_add_c>,
776 &wrapper<vpx_idct4x4_1_add_sse2>, TX_4X4, 1, 8, 1)
779 INSTANTIATE_TEST_SUITE_P(SSE2, PartialIDctTest,
780 ::testing::ValuesIn(sse2_partial_idct_tests));
785 const PartialInvTxfmParam ssse3_partial_idct_tests[] = {
786 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_135_add_c>,
787 &wrapper<vpx_idct32x32_135_add_ssse3>, TX_32X32, 135, 8, 1),
788 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_34_add_c>,
789 &wrapper<vpx_idct32x32_34_add_ssse3>, TX_32X32, 34, 8, 1),
790 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_12_add_c>,
791 &wrapper<vpx_idct8x8_12_add_ssse3>, TX_8X8, 12, 8, 1)
794 INSTANTIATE_TEST_SUITE_P(SSSE3, PartialIDctTest,
795 ::testing::ValuesIn(ssse3_partial_idct_tests));
798 #if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
799 const PartialInvTxfmParam sse4_1_partial_idct_tests[] = {
800 make_tuple(&vpx_highbd_fdct32x32_c,
801 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
802 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_sse4_1>, TX_32X32,
804 make_tuple(&vpx_highbd_fdct32x32_c,
805 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
806 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_sse4_1>, TX_32X32,
808 make_tuple(&vpx_highbd_fdct32x32_c,
809 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_c>,
810 &highbd_wrapper<vpx_highbd_idct32x32_1024_add_sse4_1>, TX_32X32,
812 make_tuple(&vpx_highbd_fdct32x32_c,
813 &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
814 &highbd_wrapper<vpx_highbd_idct32x32_135_add_sse4_1>, TX_32X32,
816 make_tuple(&vpx_highbd_fdct32x32_c,
817 &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
818 &highbd_wrapper<vpx_highbd_idct32x32_135_add_sse4_1>, TX_32X32,
820 make_tuple(&vpx_highbd_fdct32x32_c,
821 &highbd_wrapper<vpx_highbd_idct32x32_135_add_c>,
822 &highbd_wrapper<vpx_highbd_idct32x32_135_add_sse4_1>, TX_32X32,
825 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
826 &highbd_wrapper<vpx_highbd_idct32x32_34_add_sse4_1>, TX_32X32, 34, 8, 2),
828 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
829 &highbd_wrapper<vpx_highbd_idct32x32_34_add_sse4_1>, TX_32X32, 34, 10, 2),
831 &vpx_highbd_fdct32x32_c, &highbd_wrapper<vpx_highbd_idct32x32_34_add_c>,
832 &highbd_wrapper<vpx_highbd_idct32x32_34_add_sse4_1>, TX_32X32, 34, 12, 2),
833 make_tuple(&vpx_highbd_fdct16x16_c,
834 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
835 &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse4_1>, TX_16X16,
837 make_tuple(&vpx_highbd_fdct16x16_c,
838 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
839 &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse4_1>, TX_16X16,
841 make_tuple(&vpx_highbd_fdct16x16_c,
842 &highbd_wrapper<vpx_highbd_idct16x16_256_add_c>,
843 &highbd_wrapper<vpx_highbd_idct16x16_256_add_sse4_1>, TX_16X16,
846 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
847 &highbd_wrapper<vpx_highbd_idct16x16_38_add_sse4_1>, TX_16X16, 38, 8, 2),
849 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
850 &highbd_wrapper<vpx_highbd_idct16x16_38_add_sse4_1>, TX_16X16, 38, 10, 2),
852 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_38_add_c>,
853 &highbd_wrapper<vpx_highbd_idct16x16_38_add_sse4_1>, TX_16X16, 38, 12, 2),
855 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
856 &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse4_1>, TX_16X16, 10, 8, 2),
858 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
859 &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse4_1>, TX_16X16, 10, 10, 2),
861 &vpx_highbd_fdct16x16_c, &highbd_wrapper<vpx_highbd_idct16x16_10_add_c>,
862 &highbd_wrapper<vpx_highbd_idct16x16_10_add_sse4_1>, TX_16X16, 10, 12, 2),
864 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
865 &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse4_1>, TX_8X8, 64, 8, 2),
867 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
868 &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse4_1>, TX_8X8, 64, 10, 2),
870 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_64_add_c>,
871 &highbd_wrapper<vpx_highbd_idct8x8_64_add_sse4_1>, TX_8X8, 64, 12, 2),
873 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
874 &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse4_1>, TX_8X8, 12, 8, 2),
876 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
877 &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse4_1>, TX_8X8, 12, 10, 2),
879 &vpx_highbd_fdct8x8_c, &highbd_wrapper<vpx_highbd_idct8x8_12_add_c>,
880 &highbd_wrapper<vpx_highbd_idct8x8_12_add_sse4_1>, TX_8X8, 12, 12, 2),
882 &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
883 &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse4_1>, TX_4X4, 16, 8, 2),
885 &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
886 &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse4_1>, TX_4X4, 16, 10, 2),
888 &vpx_highbd_fdct4x4_c, &highbd_wrapper<vpx_highbd_idct4x4_16_add_c>,
889 &highbd_wrapper<vpx_highbd_idct4x4_16_add_sse4_1>, TX_4X4, 16, 12, 2)
892 INSTANTIATE_TEST_SUITE_P(SSE4_1, PartialIDctTest,
893 ::testing::ValuesIn(sse4_1_partial_idct_tests));
894 #endif // HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
896 #if HAVE_DSPR2 && !CONFIG_VP9_HIGHBITDEPTH
897 const PartialInvTxfmParam dspr2_partial_idct_tests[] = {
898 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
899 &wrapper<vpx_idct32x32_1024_add_dspr2>, TX_32X32, 1024, 8, 1),
900 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_34_add_c>,
901 &wrapper<vpx_idct32x32_34_add_dspr2>, TX_32X32, 34, 8, 1),
902 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1_add_c>,
903 &wrapper<vpx_idct32x32_1_add_dspr2>, TX_32X32, 1, 8, 1),
904 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
905 &wrapper<vpx_idct16x16_256_add_dspr2>, TX_16X16, 256, 8, 1),
906 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_10_add_c>,
907 &wrapper<vpx_idct16x16_10_add_dspr2>, TX_16X16, 10, 8, 1),
908 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_1_add_c>,
909 &wrapper<vpx_idct16x16_1_add_dspr2>, TX_16X16, 1, 8, 1),
910 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
911 &wrapper<vpx_idct8x8_64_add_dspr2>, TX_8X8, 64, 8, 1),
912 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_12_add_c>,
913 &wrapper<vpx_idct8x8_12_add_dspr2>, TX_8X8, 12, 8, 1),
914 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_1_add_c>,
915 &wrapper<vpx_idct8x8_1_add_dspr2>, TX_8X8, 1, 8, 1),
916 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
917 &wrapper<vpx_idct4x4_16_add_dspr2>, TX_4X4, 16, 8, 1),
918 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_1_add_c>,
919 &wrapper<vpx_idct4x4_1_add_dspr2>, TX_4X4, 1, 8, 1)
922 INSTANTIATE_TEST_SUITE_P(DSPR2, PartialIDctTest,
923 ::testing::ValuesIn(dspr2_partial_idct_tests));
924 #endif // HAVE_DSPR2 && !CONFIG_VP9_HIGHBITDEPTH
926 #if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH
927 // 32x32_135_ is implemented using the 1024 version.
928 const PartialInvTxfmParam msa_partial_idct_tests[] = {
929 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
930 &wrapper<vpx_idct32x32_1024_add_msa>, TX_32X32, 1024, 8, 1),
931 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_34_add_c>,
932 &wrapper<vpx_idct32x32_34_add_msa>, TX_32X32, 34, 8, 1),
933 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1_add_c>,
934 &wrapper<vpx_idct32x32_1_add_msa>, TX_32X32, 1, 8, 1),
935 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_256_add_c>,
936 &wrapper<vpx_idct16x16_256_add_msa>, TX_16X16, 256, 8, 1),
937 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_10_add_c>,
938 &wrapper<vpx_idct16x16_10_add_msa>, TX_16X16, 10, 8, 1),
939 make_tuple(&vpx_fdct16x16_c, &wrapper<vpx_idct16x16_1_add_c>,
940 &wrapper<vpx_idct16x16_1_add_msa>, TX_16X16, 1, 8, 1),
941 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_64_add_c>,
942 &wrapper<vpx_idct8x8_64_add_msa>, TX_8X8, 64, 8, 1),
943 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_12_add_c>,
944 &wrapper<vpx_idct8x8_12_add_msa>, TX_8X8, 12, 8, 1),
945 make_tuple(&vpx_fdct8x8_c, &wrapper<vpx_idct8x8_1_add_c>,
946 &wrapper<vpx_idct8x8_1_add_msa>, TX_8X8, 1, 8, 1),
947 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_16_add_c>,
948 &wrapper<vpx_idct4x4_16_add_msa>, TX_4X4, 16, 8, 1),
949 make_tuple(&vpx_fdct4x4_c, &wrapper<vpx_idct4x4_1_add_c>,
950 &wrapper<vpx_idct4x4_1_add_msa>, TX_4X4, 1, 8, 1)
953 INSTANTIATE_TEST_SUITE_P(MSA, PartialIDctTest,
954 ::testing::ValuesIn(msa_partial_idct_tests));
955 #endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH
957 #if HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH
958 const PartialInvTxfmParam lsx_partial_idct_tests[] = {
959 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1024_add_c>,
960 &wrapper<vpx_idct32x32_1024_add_lsx>, TX_32X32, 1024, 8, 1),
961 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_34_add_c>,
962 &wrapper<vpx_idct32x32_34_add_lsx>, TX_32X32, 34, 8, 1),
963 make_tuple(&vpx_fdct32x32_c, &wrapper<vpx_idct32x32_1_add_c>,
964 &wrapper<vpx_idct32x32_1_add_lsx>, TX_32X32, 1, 8, 1),
967 INSTANTIATE_TEST_SUITE_P(LSX, PartialIDctTest,
968 ::testing::ValuesIn(lsx_partial_idct_tests));
969 #endif // HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH
971 #endif // !CONFIG_EMULATE_HARDWARE