| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 73 } |
| 74 | 74 |
| 75 typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride); | 75 typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride); |
| 76 typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride); | 76 typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride); |
| 77 | 77 |
| 78 typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t> | 78 typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t> |
| 79 Trans32x32Param; | 79 Trans32x32Param; |
| 80 | 80 |
| 81 #if CONFIG_VP9_HIGHBITDEPTH | 81 #if CONFIG_VP9_HIGHBITDEPTH |
| 82 void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) { | 82 void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) { |
| 83 vp9_high_idct32x32_1024_add_c(in, out, stride, 10); | 83 vp9_highbd_idct32x32_1024_add_c(in, out, stride, 10); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) { | 86 void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) { |
| 87 vp9_high_idct32x32_1024_add_c(in, out, stride, 12); | 87 vp9_highbd_idct32x32_1024_add_c(in, out, stride, 12); |
| 88 } | 88 } |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> { | 91 class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> { |
| 92 public: | 92 public: |
| 93 virtual ~Trans32x32Test() {} | 93 virtual ~Trans32x32Test() {} |
| 94 virtual void SetUp() { | 94 virtual void SetUp() { |
| 95 fwd_txfm_ = GET_PARAM(0); | 95 fwd_txfm_ = GET_PARAM(0); |
| 96 inv_txfm_ = GET_PARAM(1); | 96 inv_txfm_ = GET_PARAM(1); |
| 97 version_ = GET_PARAM(2); // 0: high precision forward transform | 97 version_ = GET_PARAM(2); // 0: high precision forward transform |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 } | 304 } |
| 305 } | 305 } |
| 306 } | 306 } |
| 307 | 307 |
| 308 using std::tr1::make_tuple; | 308 using std::tr1::make_tuple; |
| 309 | 309 |
| 310 #if CONFIG_VP9_HIGHBITDEPTH | 310 #if CONFIG_VP9_HIGHBITDEPTH |
| 311 INSTANTIATE_TEST_CASE_P( | 311 INSTANTIATE_TEST_CASE_P( |
| 312 C, Trans32x32Test, | 312 C, Trans32x32Test, |
| 313 ::testing::Values( | 313 ::testing::Values( |
| 314 make_tuple(&vp9_high_fdct32x32_c, | 314 make_tuple(&vp9_highbd_fdct32x32_c, |
| 315 &idct32x32_10, 0, VPX_BITS_10), | 315 &idct32x32_10, 0, VPX_BITS_10), |
| 316 make_tuple(&vp9_high_fdct32x32_rd_c, | 316 make_tuple(&vp9_highbd_fdct32x32_rd_c, |
| 317 &idct32x32_10, 1, VPX_BITS_10), | 317 &idct32x32_10, 1, VPX_BITS_10), |
| 318 make_tuple(&vp9_high_fdct32x32_c, | 318 make_tuple(&vp9_highbd_fdct32x32_c, |
| 319 &idct32x32_12, 0, VPX_BITS_12), | 319 &idct32x32_12, 0, VPX_BITS_12), |
| 320 make_tuple(&vp9_high_fdct32x32_rd_c, | 320 make_tuple(&vp9_highbd_fdct32x32_rd_c, |
| 321 &idct32x32_12, 1, VPX_BITS_12), | 321 &idct32x32_12, 1, VPX_BITS_12), |
| 322 make_tuple(&vp9_fdct32x32_c, | 322 make_tuple(&vp9_fdct32x32_c, |
| 323 &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8), | 323 &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8), |
| 324 make_tuple(&vp9_fdct32x32_rd_c, | 324 make_tuple(&vp9_fdct32x32_rd_c, |
| 325 &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8))); | 325 &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8))); |
| 326 #else | 326 #else |
| 327 INSTANTIATE_TEST_CASE_P( | 327 INSTANTIATE_TEST_CASE_P( |
| 328 C, Trans32x32Test, | 328 C, Trans32x32Test, |
| 329 ::testing::Values( | 329 ::testing::Values( |
| 330 make_tuple(&vp9_fdct32x32_c, | 330 make_tuple(&vp9_fdct32x32_c, |
| 331 &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8), | 331 &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8), |
| 332 make_tuple(&vp9_fdct32x32_rd_c, | 332 make_tuple(&vp9_fdct32x32_rd_c, |
| 333 &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8))); | 333 &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8))); |
| 334 #endif | 334 #endif |
| 335 | 335 |
| 336 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH | 336 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 337 INSTANTIATE_TEST_CASE_P( | 337 INSTANTIATE_TEST_CASE_P( |
| 338 NEON, Trans32x32Test, | 338 NEON, Trans32x32Test, |
| 339 ::testing::Values( | 339 ::testing::Values( |
| 340 make_tuple(&vp9_fdct32x32_c, | 340 make_tuple(&vp9_fdct32x32_c, |
| 341 &vp9_idct32x32_1024_add_neon, 0, VPX_BITS_8), | 341 &vp9_idct32x32_1024_add_neon, 0, VPX_BITS_8), |
| 342 make_tuple(&vp9_fdct32x32_rd_c, | 342 make_tuple(&vp9_fdct32x32_rd_c, |
| 343 &vp9_idct32x32_1024_add_neon, 1, VPX_BITS_8))); | 343 &vp9_idct32x32_1024_add_neon, 1, VPX_BITS_8))); |
| 344 #endif | 344 #endif |
| 345 | 345 |
| 346 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH | 346 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 347 INSTANTIATE_TEST_CASE_P( | 347 INSTANTIATE_TEST_CASE_P( |
| 348 SSE2, Trans32x32Test, | 348 SSE2, Trans32x32Test, |
| 349 ::testing::Values( | 349 ::testing::Values( |
| 350 make_tuple(&vp9_fdct32x32_sse2, | 350 make_tuple(&vp9_fdct32x32_sse2, |
| 351 &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8), | 351 &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8), |
| 352 make_tuple(&vp9_fdct32x32_rd_sse2, | 352 make_tuple(&vp9_fdct32x32_rd_sse2, |
| 353 &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); | 353 &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); |
| 354 #endif | 354 #endif |
| 355 | 355 |
| 356 #if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH | 356 #if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 357 INSTANTIATE_TEST_CASE_P( | 357 INSTANTIATE_TEST_CASE_P( |
| 358 AVX2, Trans32x32Test, | 358 AVX2, Trans32x32Test, |
| 359 ::testing::Values( | 359 ::testing::Values( |
| 360 make_tuple(&vp9_fdct32x32_avx2, | 360 make_tuple(&vp9_fdct32x32_avx2, |
| 361 &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8), | 361 &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8), |
| 362 make_tuple(&vp9_fdct32x32_rd_avx2, | 362 make_tuple(&vp9_fdct32x32_rd_avx2, |
| 363 &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); | 363 &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); |
| 364 #endif | 364 #endif |
| 365 } // namespace | 365 } // namespace |
| OLD | NEW |