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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 } | 75 } |
76 | 76 |
77 typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride); | 77 typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride); |
78 typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride); | 78 typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride); |
79 | 79 |
80 typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t> | 80 typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t> |
81 Trans32x32Param; | 81 Trans32x32Param; |
82 | 82 |
83 #if CONFIG_VP9_HIGHBITDEPTH | 83 #if CONFIG_VP9_HIGHBITDEPTH |
84 void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) { | 84 void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) { |
85 vp9_highbd_idct32x32_1024_add_c(in, out, stride, 8); | 85 vpx_highbd_idct32x32_1024_add_c(in, out, stride, 8); |
86 } | 86 } |
87 | 87 |
88 void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) { | 88 void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) { |
89 vp9_highbd_idct32x32_1024_add_c(in, out, stride, 10); | 89 vpx_highbd_idct32x32_1024_add_c(in, out, stride, 10); |
90 } | 90 } |
91 | 91 |
92 void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) { | 92 void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) { |
93 vp9_highbd_idct32x32_1024_add_c(in, out, stride, 12); | 93 vpx_highbd_idct32x32_1024_add_c(in, out, stride, 12); |
94 } | 94 } |
95 #endif // CONFIG_VP9_HIGHBITDEPTH | 95 #endif // CONFIG_VP9_HIGHBITDEPTH |
96 | 96 |
97 class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> { | 97 class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> { |
98 public: | 98 public: |
99 virtual ~Trans32x32Test() {} | 99 virtual ~Trans32x32Test() {} |
100 virtual void SetUp() { | 100 virtual void SetUp() { |
101 fwd_txfm_ = GET_PARAM(0); | 101 fwd_txfm_ = GET_PARAM(0); |
102 inv_txfm_ = GET_PARAM(1); | 102 inv_txfm_ = GET_PARAM(1); |
103 version_ = GET_PARAM(2); // 0: high precision forward transform | 103 version_ = GET_PARAM(2); // 0: high precision forward transform |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 ::testing::Values( | 317 ::testing::Values( |
318 make_tuple(&vpx_highbd_fdct32x32_c, | 318 make_tuple(&vpx_highbd_fdct32x32_c, |
319 &idct32x32_10, 0, VPX_BITS_10), | 319 &idct32x32_10, 0, VPX_BITS_10), |
320 make_tuple(&vpx_highbd_fdct32x32_rd_c, | 320 make_tuple(&vpx_highbd_fdct32x32_rd_c, |
321 &idct32x32_10, 1, VPX_BITS_10), | 321 &idct32x32_10, 1, VPX_BITS_10), |
322 make_tuple(&vpx_highbd_fdct32x32_c, | 322 make_tuple(&vpx_highbd_fdct32x32_c, |
323 &idct32x32_12, 0, VPX_BITS_12), | 323 &idct32x32_12, 0, VPX_BITS_12), |
324 make_tuple(&vpx_highbd_fdct32x32_rd_c, | 324 make_tuple(&vpx_highbd_fdct32x32_rd_c, |
325 &idct32x32_12, 1, VPX_BITS_12), | 325 &idct32x32_12, 1, VPX_BITS_12), |
326 make_tuple(&vpx_fdct32x32_c, | 326 make_tuple(&vpx_fdct32x32_c, |
327 &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8), | 327 &vpx_idct32x32_1024_add_c, 0, VPX_BITS_8), |
328 make_tuple(&vpx_fdct32x32_rd_c, | 328 make_tuple(&vpx_fdct32x32_rd_c, |
329 &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8))); | 329 &vpx_idct32x32_1024_add_c, 1, VPX_BITS_8))); |
330 #else | 330 #else |
331 INSTANTIATE_TEST_CASE_P( | 331 INSTANTIATE_TEST_CASE_P( |
332 C, Trans32x32Test, | 332 C, Trans32x32Test, |
333 ::testing::Values( | 333 ::testing::Values( |
334 make_tuple(&vpx_fdct32x32_c, | 334 make_tuple(&vpx_fdct32x32_c, |
335 &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8), | 335 &vpx_idct32x32_1024_add_c, 0, VPX_BITS_8), |
336 make_tuple(&vpx_fdct32x32_rd_c, | 336 make_tuple(&vpx_fdct32x32_rd_c, |
337 &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8))); | 337 &vpx_idct32x32_1024_add_c, 1, VPX_BITS_8))); |
338 #endif // CONFIG_VP9_HIGHBITDEPTH | 338 #endif // CONFIG_VP9_HIGHBITDEPTH |
339 | 339 |
340 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 340 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
341 INSTANTIATE_TEST_CASE_P( | 341 INSTANTIATE_TEST_CASE_P( |
342 NEON, Trans32x32Test, | 342 NEON, Trans32x32Test, |
343 ::testing::Values( | 343 ::testing::Values( |
344 make_tuple(&vpx_fdct32x32_c, | 344 make_tuple(&vpx_fdct32x32_c, |
345 &vp9_idct32x32_1024_add_neon, 0, VPX_BITS_8), | 345 &vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8), |
346 make_tuple(&vpx_fdct32x32_rd_c, | 346 make_tuple(&vpx_fdct32x32_rd_c, |
347 &vp9_idct32x32_1024_add_neon, 1, VPX_BITS_8))); | 347 &vpx_idct32x32_1024_add_neon, 1, VPX_BITS_8))); |
348 #endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 348 #endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
349 | 349 |
350 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 350 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
351 INSTANTIATE_TEST_CASE_P( | 351 INSTANTIATE_TEST_CASE_P( |
352 SSE2, Trans32x32Test, | 352 SSE2, Trans32x32Test, |
353 ::testing::Values( | 353 ::testing::Values( |
354 make_tuple(&vpx_fdct32x32_sse2, | 354 make_tuple(&vpx_fdct32x32_sse2, |
355 &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8), | 355 &vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8), |
356 make_tuple(&vpx_fdct32x32_rd_sse2, | 356 make_tuple(&vpx_fdct32x32_rd_sse2, |
357 &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); | 357 &vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); |
358 #endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 358 #endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
359 | 359 |
360 #if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 360 #if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
361 INSTANTIATE_TEST_CASE_P( | 361 INSTANTIATE_TEST_CASE_P( |
362 SSE2, Trans32x32Test, | 362 SSE2, Trans32x32Test, |
363 ::testing::Values( | 363 ::testing::Values( |
364 make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10), | 364 make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10), |
365 make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1, | 365 make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1, |
366 VPX_BITS_10), | 366 VPX_BITS_10), |
367 make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12), | 367 make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12), |
368 make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1, | 368 make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1, |
369 VPX_BITS_12), | 369 VPX_BITS_12), |
370 make_tuple(&vpx_fdct32x32_sse2, &vp9_idct32x32_1024_add_c, 0, | 370 make_tuple(&vpx_fdct32x32_sse2, &vpx_idct32x32_1024_add_c, 0, |
371 VPX_BITS_8), | 371 VPX_BITS_8), |
372 make_tuple(&vpx_fdct32x32_rd_sse2, &vp9_idct32x32_1024_add_c, 1, | 372 make_tuple(&vpx_fdct32x32_rd_sse2, &vpx_idct32x32_1024_add_c, 1, |
373 VPX_BITS_8))); | 373 VPX_BITS_8))); |
374 #endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 374 #endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
375 | 375 |
376 #if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 376 #if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
377 INSTANTIATE_TEST_CASE_P( | 377 INSTANTIATE_TEST_CASE_P( |
378 AVX2, Trans32x32Test, | 378 AVX2, Trans32x32Test, |
379 ::testing::Values( | 379 ::testing::Values( |
380 make_tuple(&vpx_fdct32x32_avx2, | 380 make_tuple(&vpx_fdct32x32_avx2, |
381 &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8), | 381 &vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8), |
382 make_tuple(&vpx_fdct32x32_rd_avx2, | 382 make_tuple(&vpx_fdct32x32_rd_avx2, |
383 &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); | 383 &vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); |
384 #endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 384 #endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
385 | 385 |
386 #if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 386 #if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
387 INSTANTIATE_TEST_CASE_P( | 387 INSTANTIATE_TEST_CASE_P( |
388 MSA, Trans32x32Test, | 388 MSA, Trans32x32Test, |
389 ::testing::Values( | 389 ::testing::Values( |
390 make_tuple(&vpx_fdct32x32_msa, | 390 make_tuple(&vpx_fdct32x32_msa, |
391 &vp9_idct32x32_1024_add_msa, 0, VPX_BITS_8), | 391 &vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8), |
392 make_tuple(&vpx_fdct32x32_rd_msa, | 392 make_tuple(&vpx_fdct32x32_rd_msa, |
393 &vp9_idct32x32_1024_add_msa, 1, VPX_BITS_8))); | 393 &vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8))); |
394 #endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 394 #endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
395 } // namespace | 395 } // namespace |
OLD | NEW |