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 |
11 | 11 |
12 #include <string.h> | 12 #include <string.h> |
13 #include <limits.h> | 13 #include <limits.h> |
14 #include <stdio.h> | 14 #include <stdio.h> |
15 | 15 |
16 #include "./vpx_config.h" | 16 #include "./vpx_config.h" |
17 #include "./vpx_dsp_rtcd.h" | 17 #include "./vpx_dsp_rtcd.h" |
18 #include "vpx_mem/vpx_mem.h" | 18 #include "vpx_mem/vpx_mem.h" |
19 | 19 #include "vpx_ports/mem.h" |
20 /* Needed for ROUND_POWER_OF_TWO and CONVERT_TO* macros, both of which should be | |
21 * moved to a more generic location. Alternatively the *avg functions could be | |
22 * restricted to VP9 builds, but it would be better to avoid that sort of | |
23 * specificity. | |
24 * TODO(johannkoenig): move these macros to a common location. | |
25 */ | |
26 #if CONFIG_VP9_HIGHBITDEPTH | |
27 #include "vp9/common/vp9_common.h" | |
28 #endif // CONFIG_VP9_HIGHBITDEPTH | |
29 | |
30 #ifndef ROUND_POWER_OF_TWO | |
31 #define ROUND_POWER_OF_TWO(value, n) \ | |
32 (((value) + (1 << ((n) - 1))) >> (n)) | |
33 #endif // ROUND_POWER_OF_TWO | |
34 | |
35 | 20 |
36 #include "test/acm_random.h" | 21 #include "test/acm_random.h" |
37 #include "test/clear_system_state.h" | 22 #include "test/clear_system_state.h" |
38 #include "test/register_state_check.h" | 23 #include "test/register_state_check.h" |
39 #include "test/util.h" | 24 #include "test/util.h" |
40 #include "third_party/googletest/src/include/gtest/gtest.h" | 25 #include "third_party/googletest/src/include/gtest/gtest.h" |
41 #include "vpx/vpx_codec.h" | 26 #include "vpx/vpx_codec.h" |
42 | 27 |
43 | 28 |
44 typedef unsigned int (*SadMxNFunc)(const uint8_t *src_ptr, | 29 typedef unsigned int (*SadMxNFunc)(const uint8_t *src_ptr, |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 const SadMxNx4Func sad64x64x4d_avx2 = vpx_sad64x64x4d_avx2; | 1108 const SadMxNx4Func sad64x64x4d_avx2 = vpx_sad64x64x4d_avx2; |
1124 const SadMxNx4Func sad32x32x4d_avx2 = vpx_sad32x32x4d_avx2; | 1109 const SadMxNx4Func sad32x32x4d_avx2 = vpx_sad32x32x4d_avx2; |
1125 const SadMxNx4Param x4d_avx2_tests[] = { | 1110 const SadMxNx4Param x4d_avx2_tests[] = { |
1126 make_tuple(64, 64, sad64x64x4d_avx2, -1), | 1111 make_tuple(64, 64, sad64x64x4d_avx2, -1), |
1127 make_tuple(32, 32, sad32x32x4d_avx2, -1), | 1112 make_tuple(32, 32, sad32x32x4d_avx2, -1), |
1128 }; | 1113 }; |
1129 INSTANTIATE_TEST_CASE_P(AVX2, SADx4Test, ::testing::ValuesIn(x4d_avx2_tests)); | 1114 INSTANTIATE_TEST_CASE_P(AVX2, SADx4Test, ::testing::ValuesIn(x4d_avx2_tests)); |
1130 #endif // HAVE_AVX2 | 1115 #endif // HAVE_AVX2 |
1131 | 1116 |
1132 } // namespace | 1117 } // namespace |
OLD | NEW |