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