Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 bf.interf_angles_radians_[0]); | 240 bf.interf_angles_radians_[0]); |
| 241 EXPECT_FLOAT_EQ(M_PI / 2.f + bf.away_radians_, | 241 EXPECT_FLOAT_EQ(M_PI / 2.f + bf.away_radians_, |
| 242 bf.interf_angles_radians_[1]); | 242 bf.interf_angles_radians_[1]); |
| 243 bf.AimAt(AzimuthToSphericalPoint(bf.away_radians_ / 2.f)); | 243 bf.AimAt(AzimuthToSphericalPoint(bf.away_radians_ / 2.f)); |
| 244 EXPECT_EQ(2u, bf.interf_angles_radians_.size()); | 244 EXPECT_EQ(2u, bf.interf_angles_radians_.size()); |
| 245 EXPECT_FLOAT_EQ(-bf.away_radians_ / 2.f, bf.interf_angles_radians_[0]); | 245 EXPECT_FLOAT_EQ(-bf.away_radians_ / 2.f, bf.interf_angles_radians_[0]); |
| 246 EXPECT_FLOAT_EQ(3.f * bf.away_radians_ / 2.f, bf.interf_angles_radians_[1]); | 246 EXPECT_FLOAT_EQ(3.f * bf.away_radians_ / 2.f, bf.interf_angles_radians_[1]); |
| 247 } | 247 } |
| 248 } | 248 } |
| 249 | 249 |
| 250 // TODO(peah): Add bitexactness tests for scenarios with more than 2 input | |
|
aluebs-webrtc
2016/03/29 18:59:48
Maybe move this TODO above CreateArrayGeometry?
peah-webrtc
2016/03/29 21:05:01
Done.
| |
| 251 // channels. | |
| 252 | |
| 253 // TODO(peah): Reenable all bitexactness tests once the division-by-zero issue | |
| 254 // has been resolved. | |
| 255 | |
| 250 // TODO(peah): Investigate why the nonlinear_beamformer.cc causes a DCHECK in | 256 // TODO(peah): Investigate why the nonlinear_beamformer.cc causes a DCHECK in |
| 251 // this setup. | 257 // this setup. |
| 252 TEST(BeamformerBitExactnessTest, | 258 TEST(BeamformerBitExactnessTest, |
| 253 DISABLED_Stereo8kHz_ArrayGeometry1_TargetDirection1) { | 259 DISABLED_Stereo8kHz_ArrayGeometry1_TargetDirection1) { |
| 254 const float kOutputReference[] = {0.001318f, -0.001091f, 0.000990f, | 260 const float kOutputReference[] = {0.001318f, -0.001091f, 0.000990f, |
| 255 0.001318f, -0.001091f, 0.000990f}; | 261 0.001318f, -0.001091f, 0.000990f}; |
| 256 | 262 |
| 257 RunBitExactnessTest(AudioProcessing::kSampleRate8kHz, CreateArrayGeometry(1), | 263 RunBitExactnessTest(AudioProcessing::kSampleRate8kHz, CreateArrayGeometry(1), |
| 258 TargetDirection1, kOutputReference); | 264 TargetDirection1, kOutputReference); |
| 259 } | 265 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 364 TEST(BeamformerBitExactnessTest, | 370 TEST(BeamformerBitExactnessTest, |
| 365 DISABLED_Stereo16kHz_ArrayGeometry3_TargetDirection1) { | 371 DISABLED_Stereo16kHz_ArrayGeometry3_TargetDirection1) { |
| 366 const float kOutputReference[] = {-0.000161f, 0.000171f, -0.000096f, | 372 const float kOutputReference[] = {-0.000161f, 0.000171f, -0.000096f, |
| 367 0.001007f, 0.000427f, 0.000977f}; | 373 0.001007f, 0.000427f, 0.000977f}; |
| 368 | 374 |
| 369 RunBitExactnessTest(AudioProcessing::kSampleRate16kHz, CreateArrayGeometry(3), | 375 RunBitExactnessTest(AudioProcessing::kSampleRate16kHz, CreateArrayGeometry(3), |
| 370 TargetDirection1, kOutputReference); | 376 TargetDirection1, kOutputReference); |
| 371 } | 377 } |
| 372 | 378 |
| 373 } // namespace webrtc | 379 } // namespace webrtc |
| OLD | NEW |