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 |
11 #include <math.h> | 11 #include <math.h> |
12 #include <stdlib.h> | 12 #include <stdlib.h> |
13 | 13 |
14 #include <algorithm> | 14 #include <algorithm> |
15 #include <memory> | 15 #include <memory> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/test/gtest.h" | |
19 #include "webrtc/base/array_view.h" | 18 #include "webrtc/base/array_view.h" |
20 #include "webrtc/base/arraysize.h" | 19 #include "webrtc/base/arraysize.h" |
21 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 20 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
22 #include "webrtc/modules/audio_processing/audio_buffer.h" | 21 #include "webrtc/modules/audio_processing/audio_buffer.h" |
23 #include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhanc
er.h" | 22 #include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhanc
er.h" |
24 #include "webrtc/modules/audio_processing/noise_suppression_impl.h" | 23 #include "webrtc/modules/audio_processing/noise_suppression_impl.h" |
25 #include "webrtc/modules/audio_processing/test/audio_buffer_tools.h" | 24 #include "webrtc/modules/audio_processing/test/audio_buffer_tools.h" |
26 #include "webrtc/modules/audio_processing/test/bitexactness_tools.h" | 25 #include "webrtc/modules/audio_processing/test/bitexactness_tools.h" |
| 26 #include "webrtc/test/gtest.h" |
27 | 27 |
28 namespace webrtc { | 28 namespace webrtc { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // Target output for ERB create test. Generated with matlab. | 32 // Target output for ERB create test. Generated with matlab. |
33 const float kTestCenterFreqs[] = { | 33 const float kTestCenterFreqs[] = { |
34 14.5213f, 29.735f, 45.6781f, 62.3884f, 79.9058f, 98.2691f, 117.521f, | 34 14.5213f, 29.735f, 45.6781f, 62.3884f, 79.9058f, 98.2691f, 117.521f, |
35 137.708f, 158.879f, 181.084f, 204.378f, 228.816f, 254.459f, 281.371f, | 35 137.708f, 158.879f, 181.084f, 204.378f, 228.816f, 254.459f, 281.371f, |
36 309.618f, 339.273f, 370.411f, 403.115f, 437.469f, 473.564f, 511.497f, | 36 309.618f, 339.273f, 370.411f, 403.115f, 437.469f, 473.564f, 511.497f, |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 } | 527 } |
528 | 528 |
529 TEST(IntelligibilityEnhancerBitExactnessTest, DISABLED_Stereo48kHz) { | 529 TEST(IntelligibilityEnhancerBitExactnessTest, DISABLED_Stereo48kHz) { |
530 const float kOutputReference[] = {-0.009276f, -0.001601f, -0.008255f, | 530 const float kOutputReference[] = {-0.009276f, -0.001601f, -0.008255f, |
531 -0.012975f, -0.015940f, -0.017820f}; | 531 -0.012975f, -0.015940f, -0.017820f}; |
532 | 532 |
533 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2, kOutputReference); | 533 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2, kOutputReference); |
534 } | 534 } |
535 | 535 |
536 } // namespace webrtc | 536 } // namespace webrtc |
OLD | NEW |