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

Side by Side Diff: webrtc/modules/audio_processing/echo_cancellation_unittest.cc

Issue 1841213002: Renamed the test::BitExactFrame method to test::VectorDifferenceBounded. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changed name of the StackedFrameDifferenceBounded and VectorDifferenceBounded methods Created 4 years, 8 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 #include <vector> 10 #include <vector>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 &capture_output); 118 &capture_output);
119 119
120 EXPECT_EQ(stream_has_echo_reference, 120 EXPECT_EQ(stream_has_echo_reference,
121 static_cast<EchoCancellation*>(&echo_canceller)->stream_has_echo()); 121 static_cast<EchoCancellation*>(&echo_canceller)->stream_has_echo());
122 122
123 // Compare the output with the reference. Only the first values of the output 123 // Compare the output with the reference. Only the first values of the output
124 // from last frame processed are compared in order not having to specify all 124 // from last frame processed are compared in order not having to specify all
125 // preceeding frames as testvectors. As the algorithm being tested has a 125 // preceeding frames as testvectors. As the algorithm being tested has a
126 // memory, testing only the last frame implicitly also tests the preceeding 126 // memory, testing only the last frame implicitly also tests the preceeding
127 // frames. 127 // frames.
128 const float kTolerance = 1.0f / 32768.0f; 128 const float kElementErrorBound = 1.0f / 32768.0f;
129 EXPECT_TRUE(test::BitExactFrame( 129 EXPECT_TRUE(test::VerifyDeinterleavedArray(
130 capture_config.num_frames(), capture_config.num_channels(), 130 capture_config.num_frames(), capture_config.num_channels(),
131 output_reference, capture_output, kTolerance)); 131 output_reference, capture_output, kElementErrorBound));
132 } 132 }
133 133
134 const bool kStreamHasEchoReference = false; 134 const bool kStreamHasEchoReference = false;
135 135
136 } // namespace 136 } // namespace
137 137
138 // TODO(peah): Activate all these tests for ARM and ARM64 once the issue on the 138 // TODO(peah): Activate all these tests for ARM and ARM64 once the issue on the
139 // Chromium ARM and ARM64 boths have been identified. 139 // Chromium ARM and ARM64 boths have been identified.
140 140
141 TEST(EchoCancellationBitExactnessTest, 141 TEST(EchoCancellationBitExactnessTest,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 const float kOutputReference[] = {-0.003500f, -0.001894f, -0.003176f, 250 const float kOutputReference[] = {-0.003500f, -0.001894f, -0.003176f,
251 -0.003500f, -0.001894f, -0.003176f}; 251 -0.003500f, -0.001894f, -0.003176f};
252 RunBitexactnessTest(48000, 2, 0, false, 0, 252 RunBitexactnessTest(48000, 2, 0, false, 0,
253 EchoCancellation::SuppressionLevel::kHighSuppression, 253 EchoCancellation::SuppressionLevel::kHighSuppression,
254 kStreamHasEchoReference, kOutputReference); 254 kStreamHasEchoReference, kOutputReference);
255 } 255 }
256 256
257 } // namespace webrtc 257 } // namespace webrtc
258 258
259 #endif 259 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698