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

Side by Side Diff: webrtc/modules/audio_processing/test/audio_processing_unittest.cc

Issue 1644133002: Calculating ERLE in AEC more properly. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 10 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
« no previous file with comments | « webrtc/modules/audio_processing/aec/aec_core.cc ('k') | no next file » | 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 WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 for (size_t i = 1; i < length; i++) { 197 for (size_t i = 1; i < length; i++) {
198 max_data = std::max(max_data, AbsValue(frame.data_[i])); 198 max_data = std::max(max_data, AbsValue(frame.data_[i]));
199 } 199 }
200 200
201 return max_data; 201 return max_data;
202 } 202 }
203 203
204 #if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE) 204 #if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
205 void TestStats(const AudioProcessing::Statistic& test, 205 void TestStats(const AudioProcessing::Statistic& test,
206 const audioproc::Test::Statistic& reference) { 206 const audioproc::Test::Statistic& reference) {
207 EXPECT_NEAR(reference.instant(), test.instant, 1); 207 EXPECT_NEAR(reference.instant(), test.instant, 2);
208 EXPECT_EQ(reference.average(), test.average); 208 EXPECT_NEAR(reference.average(), test.average, 2);
209 EXPECT_EQ(reference.maximum(), test.maximum); 209 EXPECT_NEAR(reference.maximum(), test.maximum, 2);
210 EXPECT_NEAR(reference.minimum(), test.minimum, 1); 210 EXPECT_NEAR(reference.minimum(), test.minimum, 2);
211 } 211 }
212 212
213 void WriteStatsMessage(const AudioProcessing::Statistic& output, 213 void WriteStatsMessage(const AudioProcessing::Statistic& output,
214 audioproc::Test::Statistic* msg) { 214 audioproc::Test::Statistic* msg) {
215 msg->set_instant(output.instant); 215 msg->set_instant(output.instant);
216 msg->set_average(output.average); 216 msg->set_average(output.average);
217 msg->set_maximum(output.maximum); 217 msg->set_maximum(output.maximum);
218 msg->set_minimum(output.minimum); 218 msg->set_minimum(output.minimum);
219 } 219 }
220 #endif 220 #endif
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2764 std::tr1::make_tuple(16000, 32000, 48000, 32000, 25, 35), 2764 std::tr1::make_tuple(16000, 32000, 48000, 32000, 25, 35),
2765 std::tr1::make_tuple(16000, 32000, 32000, 32000, 25, 0), 2765 std::tr1::make_tuple(16000, 32000, 32000, 32000, 25, 0),
2766 std::tr1::make_tuple(16000, 32000, 16000, 32000, 25, 20), 2766 std::tr1::make_tuple(16000, 32000, 16000, 32000, 25, 20),
2767 std::tr1::make_tuple(16000, 16000, 48000, 16000, 35, 20), 2767 std::tr1::make_tuple(16000, 16000, 48000, 16000, 35, 20),
2768 std::tr1::make_tuple(16000, 16000, 32000, 16000, 40, 20), 2768 std::tr1::make_tuple(16000, 16000, 32000, 16000, 40, 20),
2769 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); 2769 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0)));
2770 #endif 2770 #endif
2771 2771
2772 } // namespace 2772 } // namespace
2773 } // namespace webrtc 2773 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/aec/aec_core.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698