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

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

Issue 341293003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 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/dct16x16_test.cc ('k') | source/libvpx/test/decode_to_md5.sh » ('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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs); 172 DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
173 DECLARE_ALIGNED_ARRAY(16, int16_t, output_ref_block, kNumCoeffs); 173 DECLARE_ALIGNED_ARRAY(16, int16_t, output_ref_block, kNumCoeffs);
174 DECLARE_ALIGNED_ARRAY(16, int16_t, output_block, kNumCoeffs); 174 DECLARE_ALIGNED_ARRAY(16, int16_t, output_block, kNumCoeffs);
175 175
176 for (int i = 0; i < count_test_block; ++i) { 176 for (int i = 0; i < count_test_block; ++i) {
177 // Initialize a test block with input range [-255, 255]. 177 // Initialize a test block with input range [-255, 255].
178 for (int j = 0; j < kNumCoeffs; ++j) { 178 for (int j = 0; j < kNumCoeffs; ++j) {
179 input_block[j] = rnd.Rand8() - rnd.Rand8(); 179 input_block[j] = rnd.Rand8() - rnd.Rand8();
180 input_extreme_block[j] = rnd.Rand8() & 1 ? 255 : -255; 180 input_extreme_block[j] = rnd.Rand8() & 1 ? 255 : -255;
181 } 181 }
182 if (i == 0) 182 if (i == 0) {
183 for (int j = 0; j < kNumCoeffs; ++j) 183 for (int j = 0; j < kNumCoeffs; ++j)
184 input_extreme_block[j] = 255; 184 input_extreme_block[j] = 255;
185 if (i == 1) 185 } else if (i == 1) {
186 for (int j = 0; j < kNumCoeffs; ++j) 186 for (int j = 0; j < kNumCoeffs; ++j)
187 input_extreme_block[j] = -255; 187 input_extreme_block[j] = -255;
188 }
188 189
189 const int stride = 32; 190 const int stride = 32;
190 vp9_fdct32x32_c(input_extreme_block, output_ref_block, stride); 191 vp9_fdct32x32_c(input_extreme_block, output_ref_block, stride);
191 REGISTER_STATE_CHECK(fwd_txfm_(input_extreme_block, output_block, stride)); 192 REGISTER_STATE_CHECK(fwd_txfm_(input_extreme_block, output_block, stride));
192 193
193 // The minimum quant value is 4. 194 // The minimum quant value is 4.
194 for (int j = 0; j < kNumCoeffs; ++j) { 195 for (int j = 0; j < kNumCoeffs; ++j) {
195 if (version_ == 0) { 196 if (version_ == 0) {
196 EXPECT_EQ(output_block[j], output_ref_block[j]) 197 EXPECT_EQ(output_block[j], output_ref_block[j])
197 << "Error: 32x32 FDCT versions have mismatched coefficients"; 198 << "Error: 32x32 FDCT versions have mismatched coefficients";
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 #if HAVE_AVX2 272 #if HAVE_AVX2
272 INSTANTIATE_TEST_CASE_P( 273 INSTANTIATE_TEST_CASE_P(
273 AVX2, Trans32x32Test, 274 AVX2, Trans32x32Test,
274 ::testing::Values( 275 ::testing::Values(
275 make_tuple(&vp9_fdct32x32_avx2, 276 make_tuple(&vp9_fdct32x32_avx2,
276 &vp9_idct32x32_1024_add_sse2, 0), 277 &vp9_idct32x32_1024_add_sse2, 0),
277 make_tuple(&vp9_fdct32x32_rd_avx2, 278 make_tuple(&vp9_fdct32x32_rd_avx2,
278 &vp9_idct32x32_1024_add_sse2, 1))); 279 &vp9_idct32x32_1024_add_sse2, 1)));
279 #endif 280 #endif
280 } // namespace 281 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/dct16x16_test.cc ('k') | source/libvpx/test/decode_to_md5.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698