OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 case TX_16X16: | 67 case TX_16X16: |
68 size = 16; | 68 size = 16; |
69 break; | 69 break; |
70 case TX_32X32: | 70 case TX_32X32: |
71 size = 32; | 71 size = 32; |
72 break; | 72 break; |
73 default: | 73 default: |
74 FAIL() << "Wrong Size!"; | 74 FAIL() << "Wrong Size!"; |
75 break; | 75 break; |
76 } | 76 } |
77 DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block1, kMaxNumCoeffs); | 77 DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]); |
78 DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block2, kMaxNumCoeffs); | 78 DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]); |
79 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst1, kMaxNumCoeffs); | 79 DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]); |
80 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst2, kMaxNumCoeffs); | 80 DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]); |
81 | 81 |
82 const int count_test_block = 1000; | 82 const int count_test_block = 1000; |
83 const int block_size = size * size; | 83 const int block_size = size * size; |
84 | 84 |
85 DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kMaxNumCoeffs); | 85 DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]); |
86 DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kMaxNumCoeffs); | 86 DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]); |
87 | 87 |
88 int max_error = 0; | 88 int max_error = 0; |
89 for (int i = 0; i < count_test_block; ++i) { | 89 for (int i = 0; i < count_test_block; ++i) { |
90 // clear out destination buffer | 90 // clear out destination buffer |
91 memset(dst1, 0, sizeof(*dst1) * block_size); | 91 memset(dst1, 0, sizeof(*dst1) * block_size); |
92 memset(dst2, 0, sizeof(*dst2) * block_size); | 92 memset(dst2, 0, sizeof(*dst2) * block_size); |
93 memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size); | 93 memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size); |
94 memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size); | 94 memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size); |
95 | 95 |
96 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 96 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 case TX_16X16: | 146 case TX_16X16: |
147 size = 16; | 147 size = 16; |
148 break; | 148 break; |
149 case TX_32X32: | 149 case TX_32X32: |
150 size = 32; | 150 size = 32; |
151 break; | 151 break; |
152 default: | 152 default: |
153 FAIL() << "Wrong Size!"; | 153 FAIL() << "Wrong Size!"; |
154 break; | 154 break; |
155 } | 155 } |
156 DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block1, kMaxNumCoeffs); | 156 DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]); |
157 DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_coef_block2, kMaxNumCoeffs); | 157 DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]); |
158 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst1, kMaxNumCoeffs); | 158 DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]); |
159 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst2, kMaxNumCoeffs); | 159 DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]); |
160 const int count_test_block = 1000; | 160 const int count_test_block = 1000; |
161 const int max_coeff = 32766 / 4; | 161 const int max_coeff = 32766 / 4; |
162 const int block_size = size * size; | 162 const int block_size = size * size; |
163 int max_error = 0; | 163 int max_error = 0; |
164 for (int i = 0; i < count_test_block; ++i) { | 164 for (int i = 0; i < count_test_block; ++i) { |
165 // clear out destination buffer | 165 // clear out destination buffer |
166 memset(dst1, 0, sizeof(*dst1) * block_size); | 166 memset(dst1, 0, sizeof(*dst1) * block_size); |
167 memset(dst2, 0, sizeof(*dst2) * block_size); | 167 memset(dst2, 0, sizeof(*dst2) * block_size); |
168 memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size); | 168 memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size); |
169 memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size); | 169 memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 !CONFIG_EMULATE_HARDWARE | 298 !CONFIG_EMULATE_HARDWARE |
299 INSTANTIATE_TEST_CASE_P( | 299 INSTANTIATE_TEST_CASE_P( |
300 SSSE3_64, PartialIDctTest, | 300 SSSE3_64, PartialIDctTest, |
301 ::testing::Values( | 301 ::testing::Values( |
302 make_tuple(&vp9_fdct8x8_c, | 302 make_tuple(&vp9_fdct8x8_c, |
303 &vp9_idct8x8_64_add_c, | 303 &vp9_idct8x8_64_add_c, |
304 &vp9_idct8x8_12_add_ssse3, | 304 &vp9_idct8x8_12_add_ssse3, |
305 TX_8X8, 12))); | 305 TX_8X8, 12))); |
306 #endif | 306 #endif |
307 | 307 |
308 #if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 308 #if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
309 INSTANTIATE_TEST_CASE_P( | 309 INSTANTIATE_TEST_CASE_P( |
310 SSSE3, PartialIDctTest, | 310 MSA, PartialIDctTest, |
311 ::testing::Values( | 311 ::testing::Values( |
| 312 make_tuple(&vp9_fdct32x32_c, |
| 313 &vp9_idct32x32_1024_add_c, |
| 314 &vp9_idct32x32_34_add_msa, |
| 315 TX_32X32, 34), |
| 316 make_tuple(&vp9_fdct32x32_c, |
| 317 &vp9_idct32x32_1024_add_c, |
| 318 &vp9_idct32x32_1_add_msa, |
| 319 TX_32X32, 1), |
312 make_tuple(&vp9_fdct16x16_c, | 320 make_tuple(&vp9_fdct16x16_c, |
313 &vp9_idct16x16_256_add_c, | 321 &vp9_idct16x16_256_add_c, |
314 &vp9_idct16x16_10_add_ssse3, | 322 &vp9_idct16x16_10_add_msa, |
315 TX_16X16, 10))); | 323 TX_16X16, 10), |
316 #endif | 324 make_tuple(&vp9_fdct16x16_c, |
| 325 &vp9_idct16x16_256_add_c, |
| 326 &vp9_idct16x16_1_add_msa, |
| 327 TX_16X16, 1))); |
| 328 #endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 329 |
317 } // namespace | 330 } // namespace |
OLD | NEW |