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

Side by Side Diff: webrtc/common_audio/resampler/sinc_resampler_unittest.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 resampler.kernel_storage_.get() + 1, resampler.kernel_storage_.get(), 156 resampler.kernel_storage_.get() + 1, resampler.kernel_storage_.get(),
157 resampler.kernel_storage_.get(), kKernelInterpolationFactor); 157 resampler.kernel_storage_.get(), kKernelInterpolationFactor);
158 result2 = resampler.CONVOLVE_FUNC( 158 result2 = resampler.CONVOLVE_FUNC(
159 resampler.kernel_storage_.get() + 1, resampler.kernel_storage_.get(), 159 resampler.kernel_storage_.get() + 1, resampler.kernel_storage_.get(),
160 resampler.kernel_storage_.get(), kKernelInterpolationFactor); 160 resampler.kernel_storage_.get(), kKernelInterpolationFactor);
161 EXPECT_NEAR(result2, result, kEpsilon); 161 EXPECT_NEAR(result2, result, kEpsilon);
162 } 162 }
163 #endif 163 #endif
164 164
165 // Benchmark for the various Convolve() methods. Make sure to build with 165 // Benchmark for the various Convolve() methods. Make sure to build with
166 // branding=Chrome so that DCHECKs are compiled out when benchmarking. Original 166 // branding=Chrome so that RTC_DCHECKs are compiled out when benchmarking.
167 // benchmarks were run with --convolve-iterations=50000000. 167 // Original benchmarks were run with --convolve-iterations=50000000.
168 TEST(SincResamplerTest, ConvolveBenchmark) { 168 TEST(SincResamplerTest, ConvolveBenchmark) {
169 // Initialize a dummy resampler. 169 // Initialize a dummy resampler.
170 MockSource mock_source; 170 MockSource mock_source;
171 SincResampler resampler(kSampleRateRatio, SincResampler::kDefaultRequestSize, 171 SincResampler resampler(kSampleRateRatio, SincResampler::kDefaultRequestSize,
172 &mock_source); 172 &mock_source);
173 173
174 // Retrieve benchmark iterations from command line. 174 // Retrieve benchmark iterations from command line.
175 // TODO(ajm): Reintroduce this as a command line option. 175 // TODO(ajm): Reintroduce this as a command line option.
176 const int kConvolveIterations = 1000000; 176 const int kConvolveIterations = 1000000;
177 177
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 std::tr1::make_tuple(11025, 192000, kResamplingRMSError, -62.61), 380 std::tr1::make_tuple(11025, 192000, kResamplingRMSError, -62.61),
381 std::tr1::make_tuple(16000, 192000, kResamplingRMSError, -63.14), 381 std::tr1::make_tuple(16000, 192000, kResamplingRMSError, -63.14),
382 std::tr1::make_tuple(22050, 192000, kResamplingRMSError, -62.42), 382 std::tr1::make_tuple(22050, 192000, kResamplingRMSError, -62.42),
383 std::tr1::make_tuple(32000, 192000, kResamplingRMSError, -63.38), 383 std::tr1::make_tuple(32000, 192000, kResamplingRMSError, -63.38),
384 std::tr1::make_tuple(44100, 192000, kResamplingRMSError, -62.63), 384 std::tr1::make_tuple(44100, 192000, kResamplingRMSError, -62.63),
385 std::tr1::make_tuple(48000, 192000, kResamplingRMSError, -73.44), 385 std::tr1::make_tuple(48000, 192000, kResamplingRMSError, -73.44),
386 std::tr1::make_tuple(96000, 192000, kResamplingRMSError, -73.52), 386 std::tr1::make_tuple(96000, 192000, kResamplingRMSError, -73.52),
387 std::tr1::make_tuple(192000, 192000, kResamplingRMSError, -73.52))); 387 std::tr1::make_tuple(192000, 192000, kResamplingRMSError, -73.52)));
388 388
389 } // namespace webrtc 389 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_audio/resampler/push_sinc_resampler.cc ('k') | webrtc/common_audio/sparse_fir_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698