Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: source/libvpx/test/lpf_8_test.cc

Issue 812033011: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/fdct8x8_test.cc ('k') | source/libvpx/test/partial_idct_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 #include <cmath> 11 #include <cmath>
12 #include <cstdlib> 12 #include <cstdlib>
13 #include <string> 13 #include <string>
14 14
15 #include "third_party/googletest/src/include/gtest/gtest.h" 15 #include "third_party/googletest/src/include/gtest/gtest.h"
16 #include "test/acm_random.h" 16 #include "test/acm_random.h"
17 #include "test/clear_system_state.h" 17 #include "test/clear_system_state.h"
18 #include "test/register_state_check.h" 18 #include "test/register_state_check.h"
19 #include "test/util.h" 19 #include "test/util.h"
20 20
21 #include "./vpx_config.h" 21 #include "./vpx_config.h"
22 #include "./vp9_rtcd.h" 22 #include "./vp9_rtcd.h"
23 #include "vp9/common/vp9_entropy.h" 23 #include "vp9/common/vp9_entropy.h"
24 #include "vp9/common/vp9_loopfilter.h"
24 #include "vpx/vpx_integer.h" 25 #include "vpx/vpx_integer.h"
25 26
26 using libvpx_test::ACMRandom; 27 using libvpx_test::ACMRandom;
27 28
28 namespace { 29 namespace {
29 // Horizontally and Vertically need 32x32: 8 Coeffs preceeding filtered section 30 // Horizontally and Vertically need 32x32: 8 Coeffs preceeding filtered section
30 // 16 Coefs within filtered section 31 // 16 Coefs within filtered section
31 // 8 Coeffs following filtered section 32 // 8 Coeffs following filtered section
32 const int kNumCoeffs = 1024; 33 const int kNumCoeffs = 1024;
33 34
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 100 }
100 101
101 void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, 102 void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
102 const uint8_t *limit, const uint8_t *thresh, 103 const uint8_t *limit, const uint8_t *thresh,
103 int count) { 104 int count) {
104 vp9_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh); 105 vp9_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
105 } 106 }
106 #endif // CONFIG_VP9_HIGHBITDEPTH 107 #endif // CONFIG_VP9_HIGHBITDEPTH
107 #endif // HAVE_SSE2 108 #endif // HAVE_SSE2
108 109
110 #if HAVE_NEON_ASM
111 #if CONFIG_VP9_HIGHBITDEPTH
112 // No neon high bitdepth functions.
113 #else
114 void wrapper_vertical_16_neon(uint8_t *s, int p, const uint8_t *blimit,
115 const uint8_t *limit, const uint8_t *thresh,
116 int count) {
117 vp9_lpf_vertical_16_neon(s, p, blimit, limit, thresh);
118 }
119
120 void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
121 const uint8_t *limit, const uint8_t *thresh,
122 int count) {
123 vp9_lpf_vertical_16_c(s, p, blimit, limit, thresh);
124 }
125
126 void wrapper_vertical_16_dual_neon(uint8_t *s, int p, const uint8_t *blimit,
127 const uint8_t *limit, const uint8_t *thresh,
128 int count) {
129 vp9_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh);
130 }
131
132 void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
133 const uint8_t *limit, const uint8_t *thresh,
134 int count) {
135 vp9_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
136 }
137 #endif // CONFIG_VP9_HIGHBITDEPTH
138 #endif // HAVE_NEON_ASM
139
109 class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> { 140 class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
110 public: 141 public:
111 virtual ~Loop8Test6Param() {} 142 virtual ~Loop8Test6Param() {}
112 virtual void SetUp() { 143 virtual void SetUp() {
113 loopfilter_op_ = GET_PARAM(0); 144 loopfilter_op_ = GET_PARAM(0);
114 ref_loopfilter_op_ = GET_PARAM(1); 145 ref_loopfilter_op_ = GET_PARAM(1);
115 bit_depth_ = GET_PARAM(2); 146 bit_depth_ = GET_PARAM(2);
116 mask_ = (1 << bit_depth_) - 1; 147 mask_ = (1 << bit_depth_) - 1;
117 } 148 }
118 149
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs); 183 DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
153 DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs); 184 DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
154 #else 185 #else
155 DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs); 186 DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
156 DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs); 187 DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
157 #endif // CONFIG_VP9_HIGHBITDEPTH 188 #endif // CONFIG_VP9_HIGHBITDEPTH
158 int err_count_total = 0; 189 int err_count_total = 0;
159 int first_failure = -1; 190 int first_failure = -1;
160 for (int i = 0; i < count_test_block; ++i) { 191 for (int i = 0; i < count_test_block; ++i) {
161 int err_count = 0; 192 int err_count = 0;
162 uint8_t tmp = rnd.Rand8(); 193 uint8_t tmp = static_cast<uint8_t>(rnd(3 * MAX_LOOP_FILTER + 4));
163 DECLARE_ALIGNED(16, const uint8_t, blimit[16]) = { 194 DECLARE_ALIGNED(16, const uint8_t, blimit[16]) = {
164 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 195 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
165 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 196 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
166 }; 197 };
167 tmp = rnd.Rand8(); 198 tmp = static_cast<uint8_t>(rnd(MAX_LOOP_FILTER));
168 DECLARE_ALIGNED(16, const uint8_t, limit[16]) = { 199 DECLARE_ALIGNED(16, const uint8_t, limit[16]) = {
169 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 200 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
170 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 201 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
171 }; 202 };
172 tmp = rnd.Rand8(); 203 tmp = rnd.Rand8();
173 DECLARE_ALIGNED(16, const uint8_t, thresh[16]) = { 204 DECLARE_ALIGNED(16, const uint8_t, thresh[16]) = {
174 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 205 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
175 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 206 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
176 }; 207 };
177 int32_t p = kNumCoeffs/32; 208 int32_t p = kNumCoeffs/32;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 #if CONFIG_VP9_HIGHBITDEPTH 267 #if CONFIG_VP9_HIGHBITDEPTH
237 const int32_t bd = bit_depth_; 268 const int32_t bd = bit_depth_;
238 DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs); 269 DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
239 DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs); 270 DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
240 #else 271 #else
241 DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs); 272 DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
242 DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs); 273 DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
243 #endif // CONFIG_VP9_HIGHBITDEPTH 274 #endif // CONFIG_VP9_HIGHBITDEPTH
244 int err_count_total = 0; 275 int err_count_total = 0;
245 int first_failure = -1; 276 int first_failure = -1;
277
278 // NOTE: The code in vp9_loopfilter.c:update_sharpness computes mblim as a
279 // function of sharpness_lvl and the loopfilter lvl as:
280 // block_inside_limit = lvl >> ((sharpness_lvl > 0) + (sharpness_lvl > 4));
281 // ...
282 // vpx_memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
283 // SIMD_WIDTH);
284 // This means that the largest value for mblim will occur when sharpness_lvl
285 // is equal to 0, and lvl is equal to its greatest value (MAX_LOOP_FILTER).
286 // In this case block_inside_limit will be equal to MAX_LOOP_FILTER and
287 // therefore mblim will be equal to (2 * (lvl + 2) + block_inside_limit) =
288 // 2 * (MAX_LOOP_FILTER + 2) + MAX_LOOP_FILTER = 3 * MAX_LOOP_FILTER + 4
289
246 for (int i = 0; i < count_test_block; ++i) { 290 for (int i = 0; i < count_test_block; ++i) {
247 int err_count = 0; 291 int err_count = 0;
248 uint8_t tmp = rnd.Rand8(); 292 uint8_t tmp = static_cast<uint8_t>(rnd(3 * MAX_LOOP_FILTER + 4));
249 DECLARE_ALIGNED(16, const uint8_t, blimit[16]) = { 293 DECLARE_ALIGNED(16, const uint8_t, blimit[16]) = {
250 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 294 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
251 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 295 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
252 }; 296 };
253 tmp = rnd.Rand8(); 297 tmp = static_cast<uint8_t>(rnd(MAX_LOOP_FILTER));
254 DECLARE_ALIGNED(16, const uint8_t, limit[16]) = { 298 DECLARE_ALIGNED(16, const uint8_t, limit[16]) = {
255 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 299 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
256 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 300 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
257 }; 301 };
258 tmp = rnd.Rand8(); 302 tmp = rnd.Rand8();
259 DECLARE_ALIGNED(16, const uint8_t, thresh[16]) = { 303 DECLARE_ALIGNED(16, const uint8_t, thresh[16]) = {
260 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 304 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
261 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 305 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
262 }; 306 };
263 int32_t p = kNumCoeffs / 32; 307 int32_t p = kNumCoeffs / 32;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs); 341 DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
298 DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs); 342 DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
299 #else 343 #else
300 DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs); 344 DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
301 DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs); 345 DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
302 #endif // CONFIG_VP9_HIGHBITDEPTH 346 #endif // CONFIG_VP9_HIGHBITDEPTH
303 int err_count_total = 0; 347 int err_count_total = 0;
304 int first_failure = -1; 348 int first_failure = -1;
305 for (int i = 0; i < count_test_block; ++i) { 349 for (int i = 0; i < count_test_block; ++i) {
306 int err_count = 0; 350 int err_count = 0;
307 uint8_t tmp = rnd.Rand8(); 351 uint8_t tmp = static_cast<uint8_t>(rnd(3 * MAX_LOOP_FILTER + 4));
308 DECLARE_ALIGNED(16, const uint8_t, blimit0[16]) = { 352 DECLARE_ALIGNED(16, const uint8_t, blimit0[16]) = {
309 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 353 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
310 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 354 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
311 }; 355 };
312 tmp = rnd.Rand8(); 356 tmp = static_cast<uint8_t>(rnd(MAX_LOOP_FILTER));
313 DECLARE_ALIGNED(16, const uint8_t, limit0[16]) = { 357 DECLARE_ALIGNED(16, const uint8_t, limit0[16]) = {
314 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 358 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
315 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 359 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
316 }; 360 };
317 tmp = rnd.Rand8(); 361 tmp = rnd.Rand8();
318 DECLARE_ALIGNED(16, const uint8_t, thresh0[16]) = { 362 DECLARE_ALIGNED(16, const uint8_t, thresh0[16]) = {
319 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 363 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
320 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 364 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
321 }; 365 };
322 tmp = rnd.Rand8(); 366 tmp = static_cast<uint8_t>(rnd(3 * MAX_LOOP_FILTER + 4));
323 DECLARE_ALIGNED(16, const uint8_t, blimit1[16]) = { 367 DECLARE_ALIGNED(16, const uint8_t, blimit1[16]) = {
324 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 368 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
325 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 369 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
326 }; 370 };
327 tmp = rnd.Rand8(); 371 tmp = static_cast<uint8_t>(rnd(MAX_LOOP_FILTER));
328 DECLARE_ALIGNED(16, const uint8_t, limit1[16]) = { 372 DECLARE_ALIGNED(16, const uint8_t, limit1[16]) = {
329 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 373 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
330 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 374 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
331 }; 375 };
332 tmp = rnd.Rand8(); 376 tmp = rnd.Rand8();
333 DECLARE_ALIGNED(16, const uint8_t, thresh1[16]) = { 377 DECLARE_ALIGNED(16, const uint8_t, thresh1[16]) = {
334 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 378 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
335 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 379 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
336 }; 380 };
337 int32_t p = kNumCoeffs / 32; 381 int32_t p = kNumCoeffs / 32;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs); 443 DECLARE_ALIGNED_ARRAY(16, uint16_t, s, kNumCoeffs);
400 DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs); 444 DECLARE_ALIGNED_ARRAY(16, uint16_t, ref_s, kNumCoeffs);
401 #else 445 #else
402 DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs); 446 DECLARE_ALIGNED_ARRAY(8, uint8_t, s, kNumCoeffs);
403 DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs); 447 DECLARE_ALIGNED_ARRAY(8, uint8_t, ref_s, kNumCoeffs);
404 #endif // CONFIG_VP9_HIGHBITDEPTH 448 #endif // CONFIG_VP9_HIGHBITDEPTH
405 int err_count_total = 0; 449 int err_count_total = 0;
406 int first_failure = -1; 450 int first_failure = -1;
407 for (int i = 0; i < count_test_block; ++i) { 451 for (int i = 0; i < count_test_block; ++i) {
408 int err_count = 0; 452 int err_count = 0;
409 uint8_t tmp = rnd.Rand8(); 453 uint8_t tmp = static_cast<uint8_t>(rnd(3 * MAX_LOOP_FILTER + 4));
410 DECLARE_ALIGNED(16, const uint8_t, blimit0[16]) = { 454 DECLARE_ALIGNED(16, const uint8_t, blimit0[16]) = {
411 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 455 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
412 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 456 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
413 }; 457 };
414 tmp = rnd.Rand8(); 458 tmp = static_cast<uint8_t>(rnd(MAX_LOOP_FILTER));
415 DECLARE_ALIGNED(16, const uint8_t, limit0[16]) = { 459 DECLARE_ALIGNED(16, const uint8_t, limit0[16]) = {
416 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 460 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
417 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 461 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
418 }; 462 };
419 tmp = rnd.Rand8(); 463 tmp = rnd.Rand8();
420 DECLARE_ALIGNED(16, const uint8_t, thresh0[16]) = { 464 DECLARE_ALIGNED(16, const uint8_t, thresh0[16]) = {
421 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 465 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
422 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 466 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
423 }; 467 };
424 tmp = rnd.Rand8(); 468 tmp = static_cast<uint8_t>(rnd(3 * MAX_LOOP_FILTER + 4));
425 DECLARE_ALIGNED(16, const uint8_t, blimit1[16]) = { 469 DECLARE_ALIGNED(16, const uint8_t, blimit1[16]) = {
426 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 470 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
427 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 471 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
428 }; 472 };
429 tmp = rnd.Rand8(); 473 tmp = static_cast<uint8_t>(rnd(MAX_LOOP_FILTER));
430 DECLARE_ALIGNED(16, const uint8_t, limit1[16]) = { 474 DECLARE_ALIGNED(16, const uint8_t, limit1[16]) = {
431 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 475 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
432 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 476 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
433 }; 477 };
434 tmp = rnd.Rand8(); 478 tmp = rnd.Rand8();
435 DECLARE_ALIGNED(16, const uint8_t, thresh1[16]) = { 479 DECLARE_ALIGNED(16, const uint8_t, thresh1[16]) = {
436 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, 480 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp,
437 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp 481 tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp
438 }; 482 };
439 int32_t p = kNumCoeffs / 32; // TODO(pdlf) can we have non-square here? 483 int32_t p = kNumCoeffs / 32; // TODO(pdlf) can we have non-square here?
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 &vp9_highbd_lpf_vertical_8_c, 12), 556 &vp9_highbd_lpf_vertical_8_c, 12),
513 make_tuple(&wrapper_vertical_16_sse2, 557 make_tuple(&wrapper_vertical_16_sse2,
514 &wrapper_vertical_16_c, 12), 558 &wrapper_vertical_16_c, 12),
515 make_tuple(&wrapper_vertical_16_dual_sse2, 559 make_tuple(&wrapper_vertical_16_dual_sse2,
516 &wrapper_vertical_16_dual_c, 8), 560 &wrapper_vertical_16_dual_c, 8),
517 make_tuple(&wrapper_vertical_16_dual_sse2, 561 make_tuple(&wrapper_vertical_16_dual_sse2,
518 &wrapper_vertical_16_dual_c, 10), 562 &wrapper_vertical_16_dual_c, 10),
519 make_tuple(&wrapper_vertical_16_dual_sse2, 563 make_tuple(&wrapper_vertical_16_dual_sse2,
520 &wrapper_vertical_16_dual_c, 12))); 564 &wrapper_vertical_16_dual_c, 12)));
521 #else 565 #else
522 // TODO(peter.derivaz): re-enable after these handle the expanded range [0, 255]
523 // returned from Rand8().
524 INSTANTIATE_TEST_CASE_P( 566 INSTANTIATE_TEST_CASE_P(
525 DISABLED_SSE2, Loop8Test6Param, 567 SSE2, Loop8Test6Param,
526 ::testing::Values( 568 ::testing::Values(
527 make_tuple(&vp9_lpf_horizontal_8_sse2, &vp9_lpf_horizontal_8_c, 8), 569 make_tuple(&vp9_lpf_horizontal_8_sse2, &vp9_lpf_horizontal_8_c, 8),
528 make_tuple(&vp9_lpf_horizontal_16_sse2, &vp9_lpf_horizontal_16_c, 8), 570 make_tuple(&vp9_lpf_horizontal_16_sse2, &vp9_lpf_horizontal_16_c, 8),
529 make_tuple(&vp9_lpf_vertical_8_sse2, &vp9_lpf_vertical_8_c, 8), 571 make_tuple(&vp9_lpf_vertical_8_sse2, &vp9_lpf_vertical_8_c, 8),
530 make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8))); 572 make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8)));
531 #endif // CONFIG_VP9_HIGHBITDEPTH 573 #endif // CONFIG_VP9_HIGHBITDEPTH
532 #endif 574 #endif
533 575
534 #if HAVE_AVX2 && (!CONFIG_VP9_HIGHBITDEPTH) 576 #if HAVE_AVX2 && (!CONFIG_VP9_HIGHBITDEPTH)
535 // TODO(peter.derivaz): re-enable after these handle the expanded range [0, 255]
536 // returned from Rand8().
537 INSTANTIATE_TEST_CASE_P( 577 INSTANTIATE_TEST_CASE_P(
538 DISABLED_AVX2, Loop8Test6Param, 578 AVX2, Loop8Test6Param,
539 ::testing::Values( 579 ::testing::Values(
540 make_tuple(&vp9_lpf_horizontal_16_avx2, &vp9_lpf_horizontal_16_c, 8))); 580 make_tuple(&vp9_lpf_horizontal_16_avx2, &vp9_lpf_horizontal_16_c, 8)));
541 #endif 581 #endif
542 582
543 #if HAVE_SSE2 583 #if HAVE_SSE2
544 #if CONFIG_VP9_HIGHBITDEPTH 584 #if CONFIG_VP9_HIGHBITDEPTH
545 INSTANTIATE_TEST_CASE_P( 585 INSTANTIATE_TEST_CASE_P(
546 SSE2, Loop8Test9Param, 586 SSE2, Loop8Test9Param,
547 ::testing::Values( 587 ::testing::Values(
548 make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2, 588 make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
(...skipping 14 matching lines...) Expand all
563 &vp9_highbd_lpf_vertical_8_dual_c, 10), 603 &vp9_highbd_lpf_vertical_8_dual_c, 10),
564 make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2, 604 make_tuple(&vp9_highbd_lpf_horizontal_4_dual_sse2,
565 &vp9_highbd_lpf_horizontal_4_dual_c, 12), 605 &vp9_highbd_lpf_horizontal_4_dual_c, 12),
566 make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2, 606 make_tuple(&vp9_highbd_lpf_horizontal_8_dual_sse2,
567 &vp9_highbd_lpf_horizontal_8_dual_c, 12), 607 &vp9_highbd_lpf_horizontal_8_dual_c, 12),
568 make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2, 608 make_tuple(&vp9_highbd_lpf_vertical_4_dual_sse2,
569 &vp9_highbd_lpf_vertical_4_dual_c, 12), 609 &vp9_highbd_lpf_vertical_4_dual_c, 12),
570 make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2, 610 make_tuple(&vp9_highbd_lpf_vertical_8_dual_sse2,
571 &vp9_highbd_lpf_vertical_8_dual_c, 12))); 611 &vp9_highbd_lpf_vertical_8_dual_c, 12)));
572 #else 612 #else
573 // TODO(peter.derivaz): re-enable after these handle the expanded range [0, 255]
574 // returned from Rand8().
575 INSTANTIATE_TEST_CASE_P( 613 INSTANTIATE_TEST_CASE_P(
576 DISABLED_SSE2, Loop8Test9Param, 614 SSE2, Loop8Test9Param,
577 ::testing::Values( 615 ::testing::Values(
578 make_tuple(&vp9_lpf_horizontal_4_dual_sse2, 616 make_tuple(&vp9_lpf_horizontal_4_dual_sse2,
579 &vp9_lpf_horizontal_4_dual_c, 8), 617 &vp9_lpf_horizontal_4_dual_c, 8),
580 make_tuple(&vp9_lpf_horizontal_8_dual_sse2, 618 make_tuple(&vp9_lpf_horizontal_8_dual_sse2,
581 &vp9_lpf_horizontal_8_dual_c, 8), 619 &vp9_lpf_horizontal_8_dual_c, 8),
582 make_tuple(&vp9_lpf_vertical_4_dual_sse2, 620 make_tuple(&vp9_lpf_vertical_4_dual_sse2,
583 &vp9_lpf_vertical_4_dual_c, 8), 621 &vp9_lpf_vertical_4_dual_c, 8),
584 make_tuple(&vp9_lpf_vertical_8_dual_sse2, 622 make_tuple(&vp9_lpf_vertical_8_dual_sse2,
585 &vp9_lpf_vertical_8_dual_c, 8))); 623 &vp9_lpf_vertical_8_dual_c, 8)));
586 #endif // CONFIG_VP9_HIGHBITDEPTH 624 #endif // CONFIG_VP9_HIGHBITDEPTH
587 #endif 625 #endif
588 626
627 #if HAVE_NEON
628 #if CONFIG_VP9_HIGHBITDEPTH
629 // No neon high bitdepth functions.
630 #else
631 INSTANTIATE_TEST_CASE_P(
632 NEON, Loop8Test6Param,
633 ::testing::Values(
634 #if HAVE_NEON_ASM
635 // Using #if inside the macro is unsupported on MSVS but the tests are not
636 // currently built for MSVS with ARM and NEON.
637 make_tuple(&vp9_lpf_horizontal_16_neon,
638 &vp9_lpf_horizontal_16_c, 8),
639 make_tuple(&wrapper_vertical_16_neon,
640 &wrapper_vertical_16_c, 8),
641 make_tuple(&wrapper_vertical_16_dual_neon,
642 &wrapper_vertical_16_dual_c, 8),
643 make_tuple(&vp9_lpf_horizontal_8_neon,
644 &vp9_lpf_horizontal_8_c, 8),
645 make_tuple(&vp9_lpf_vertical_8_neon,
646 &vp9_lpf_vertical_8_c, 8),
647 #endif // HAVE_NEON_ASM
648 make_tuple(&vp9_lpf_horizontal_4_neon,
649 &vp9_lpf_horizontal_4_c, 8),
650 make_tuple(&vp9_lpf_vertical_4_neon,
651 &vp9_lpf_vertical_4_c, 8)));
652 INSTANTIATE_TEST_CASE_P(
653 NEON, Loop8Test9Param,
654 ::testing::Values(
655 #if HAVE_NEON_ASM
656 make_tuple(&vp9_lpf_horizontal_8_dual_neon,
657 &vp9_lpf_horizontal_8_dual_c, 8),
658 make_tuple(&vp9_lpf_vertical_8_dual_neon,
659 &vp9_lpf_vertical_8_dual_c, 8),
660 #endif // HAVE_NEON_ASM
661 make_tuple(&vp9_lpf_horizontal_4_dual_neon,
662 &vp9_lpf_horizontal_4_dual_c, 8),
663 make_tuple(&vp9_lpf_vertical_4_dual_neon,
664 &vp9_lpf_vertical_4_dual_c, 8)));
665 #endif // CONFIG_VP9_HIGHBITDEPTH
666 #endif // HAVE_NEON
667
589 } // namespace 668 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/fdct8x8_test.cc ('k') | source/libvpx/test/partial_idct_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698