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

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

Issue 111463005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years 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/dct16x16_test.cc ('k') | source/libvpx/test/decode_perf_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) 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 reference_32x32_dct_1d(temp_in, temp_out, 1); 70 reference_32x32_dct_1d(temp_in, temp_out, 1);
71 // Scale by some magic number 71 // Scale by some magic number
72 for (int j = 0; j < 32; ++j) 72 for (int j = 0; j < 32; ++j)
73 output[j + i * 32] = temp_out[j] / 4; 73 output[j + i * 32] = temp_out[j] / 4;
74 } 74 }
75 } 75 }
76 76
77 typedef void (*fwd_txfm_t)(const int16_t *in, int16_t *out, int stride); 77 typedef void (*fwd_txfm_t)(const int16_t *in, int16_t *out, int stride);
78 typedef void (*inv_txfm_t)(const int16_t *in, uint8_t *out, int stride); 78 typedef void (*inv_txfm_t)(const int16_t *in, uint8_t *out, int stride);
79 79
80 class Trans32x32Test : public PARAMS(fwd_txfm_t, inv_txfm_t, int) { 80 typedef std::tr1::tuple<fwd_txfm_t, inv_txfm_t, int> trans_32x32_param_t;
81
82 class Trans32x32Test : public ::testing::TestWithParam<trans_32x32_param_t> {
81 public: 83 public:
82 virtual ~Trans32x32Test() {} 84 virtual ~Trans32x32Test() {}
83 virtual void SetUp() { 85 virtual void SetUp() {
84 fwd_txfm_ = GET_PARAM(0); 86 fwd_txfm_ = GET_PARAM(0);
85 inv_txfm_ = GET_PARAM(1); 87 inv_txfm_ = GET_PARAM(1);
86 version_ = GET_PARAM(2); // 0: high precision forward transform 88 version_ = GET_PARAM(2); // 0: high precision forward transform
87 // 1: low precision version for rd loop 89 // 1: low precision version for rd loop
88 } 90 }
89 91
90 virtual void TearDown() { libvpx_test::ClearSystemState(); } 92 virtual void TearDown() { libvpx_test::ClearSystemState(); }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 253
252 #if HAVE_SSE2 254 #if HAVE_SSE2
253 INSTANTIATE_TEST_CASE_P( 255 INSTANTIATE_TEST_CASE_P(
254 SSE2, Trans32x32Test, 256 SSE2, Trans32x32Test,
255 ::testing::Values( 257 ::testing::Values(
256 make_tuple(&vp9_fdct32x32_sse2, 258 make_tuple(&vp9_fdct32x32_sse2,
257 &vp9_idct32x32_1024_add_sse2, 0), 259 &vp9_idct32x32_1024_add_sse2, 0),
258 make_tuple(&vp9_fdct32x32_rd_sse2, 260 make_tuple(&vp9_fdct32x32_rd_sse2,
259 &vp9_idct32x32_1024_add_sse2, 1))); 261 &vp9_idct32x32_1024_add_sse2, 1)));
260 #endif 262 #endif
263
264 #if HAVE_AVX2
265 INSTANTIATE_TEST_CASE_P(
266 AVX2, Trans32x32Test,
267 ::testing::Values(
268 make_tuple(&vp9_fdct32x32_avx2,
269 &vp9_idct32x32_1024_add_sse2, 0),
270 make_tuple(&vp9_fdct32x32_rd_avx2,
271 &vp9_idct32x32_1024_add_sse2, 1)));
272 #endif
261 } // namespace 273 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/dct16x16_test.cc ('k') | source/libvpx/test/decode_perf_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698