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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 ftxfm_(input_extreme_block, output_ref_block, size); | 112 ftxfm_(input_extreme_block, output_ref_block, size); |
113 | 113 |
114 // quantization with maximum allowed step sizes | 114 // quantization with maximum allowed step sizes |
115 test_coef_block1[0] = (output_ref_block[0] / 1336) * 1336; | 115 test_coef_block1[0] = (output_ref_block[0] / 1336) * 1336; |
116 for (int j = 1; j < last_nonzero_; ++j) | 116 for (int j = 1; j < last_nonzero_; ++j) |
117 test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]] | 117 test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]] |
118 = (output_ref_block[j] / 1828) * 1828; | 118 = (output_ref_block[j] / 1828) * 1828; |
119 } | 119 } |
120 | 120 |
121 REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size)); | 121 ASM_REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size)); |
122 REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block1, dst2, size)); | 122 ASM_REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block1, dst2, size)); |
123 | 123 |
124 for (int j = 0; j < block_size; ++j) { | 124 for (int j = 0; j < block_size; ++j) { |
125 const int diff = dst1[j] - dst2[j]; | 125 const int diff = dst1[j] - dst2[j]; |
126 const int error = diff * diff; | 126 const int error = diff * diff; |
127 if (max_error < error) | 127 if (max_error < error) |
128 max_error = error; | 128 max_error = error; |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 EXPECT_EQ(0, max_error) | 132 EXPECT_EQ(0, max_error) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 if (max_energy_leftover < 0) { | 175 if (max_energy_leftover < 0) { |
176 max_energy_leftover = 0; | 176 max_energy_leftover = 0; |
177 coef = 0; | 177 coef = 0; |
178 } | 178 } |
179 test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]] = coef; | 179 test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]] = coef; |
180 } | 180 } |
181 | 181 |
182 memcpy(test_coef_block2, test_coef_block1, | 182 memcpy(test_coef_block2, test_coef_block1, |
183 sizeof(*test_coef_block2) * block_size); | 183 sizeof(*test_coef_block2) * block_size); |
184 | 184 |
185 REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size)); | 185 ASM_REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size)); |
186 REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block2, dst2, size)); | 186 ASM_REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block2, dst2, size)); |
187 | 187 |
188 for (int j = 0; j < block_size; ++j) { | 188 for (int j = 0; j < block_size; ++j) { |
189 const int diff = dst1[j] - dst2[j]; | 189 const int diff = dst1[j] - dst2[j]; |
190 const int error = diff * diff; | 190 const int error = diff * diff; |
191 if (max_error < error) | 191 if (max_error < error) |
192 max_error = error; | 192 max_error = error; |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 EXPECT_EQ(0, max_error) | 196 EXPECT_EQ(0, max_error) |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 #if HAVE_SSSE3 | 306 #if HAVE_SSSE3 |
307 INSTANTIATE_TEST_CASE_P( | 307 INSTANTIATE_TEST_CASE_P( |
308 SSSE3, PartialIDctTest, | 308 SSSE3, PartialIDctTest, |
309 ::testing::Values( | 309 ::testing::Values( |
310 make_tuple(&vp9_fdct16x16_c, | 310 make_tuple(&vp9_fdct16x16_c, |
311 &vp9_idct16x16_256_add_c, | 311 &vp9_idct16x16_256_add_c, |
312 &vp9_idct16x16_10_add_ssse3, | 312 &vp9_idct16x16_10_add_ssse3, |
313 TX_16X16, 10))); | 313 TX_16X16, 10))); |
314 #endif | 314 #endif |
315 } // namespace | 315 } // namespace |
OLD | NEW |