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

Side by Side Diff: webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc

Issue 2257733002: Corrected the testvectors for the level controller bitexactness test (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | 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) 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 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // frames. 62 // frames.
63 const float kVectorElementErrorBound = 1.0f / 32768.0f; 63 const float kVectorElementErrorBound = 1.0f / 32768.0f;
64 EXPECT_TRUE(test::VerifyDeinterleavedArray( 64 EXPECT_TRUE(test::VerifyDeinterleavedArray(
65 capture_config.num_frames(), capture_config.num_channels(), 65 capture_config.num_frames(), capture_config.num_channels(),
66 output_reference, capture_output, kVectorElementErrorBound)); 66 output_reference, capture_output, kVectorElementErrorBound));
67 } 67 }
68 68
69 } // namespace 69 } // namespace
70 70
71 TEST(LevelControlBitExactnessTest, DISABLED_Mono8kHz) { 71 TEST(LevelControlBitExactnessTest, DISABLED_Mono8kHz) {
72 const float kOutputReference[] = {-0.023242f, -0.020266f, -0.015097f}; 72 const float kOutputReference[] = {-0.013939f, -0.012154f, -0.009054f};
73 RunBitexactnessTest(AudioProcessing::kSampleRate8kHz, 1, kOutputReference); 73 RunBitexactnessTest(AudioProcessing::kSampleRate8kHz, 1,
74 kOutputReference);
74 } 75 }
75 76
76 TEST(LevelControlBitExactnessTest, DISABLED_Mono16kHz) { 77 TEST(LevelControlBitExactnessTest, DISABLED_Mono16kHz) {
77 const float kOutputReference[] = {-0.019461f, -0.018761f, -0.018481f}; 78 const float kOutputReference[] = {-0.013706f, -0.013215f, -0.013018f};
78 RunBitexactnessTest(AudioProcessing::kSampleRate16kHz, 1, kOutputReference); 79 RunBitexactnessTest(AudioProcessing::kSampleRate16kHz, 1,
80 kOutputReference);
79 } 81 }
80 82
81 TEST(LevelControlBitExactnessTest, DISABLED_Mono32kHz) { 83 TEST(LevelControlBitExactnessTest, DISABLED_Mono32kHz) {
82 const float kOutputReference[] = {-0.016872f, -0.019118f, -0.018722f}; 84 const float kOutputReference[] = {-0.014495f, -0.016425f, -0.016085f};
83 RunBitexactnessTest(AudioProcessing::kSampleRate32kHz, 1, kOutputReference); 85 RunBitexactnessTest(AudioProcessing::kSampleRate32kHz, 1,
86 kOutputReference);
84 } 87 }
85 88
86 // TODO(peah): Investigate why this particular testcase differ between Android 89 // TODO(peah): Investigate why this particular testcase differ between Android
87 // and the rest of the platforms. 90 // and the rest of the platforms.
88 TEST(LevelControlBitExactnessTest, DISABLED_Mono48kHz) { 91 TEST(LevelControlBitExactnessTest, DISABLED_Mono48kHz) {
89 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \ 92 #if !(defined(WEBRTC_ARCH_ARM64) || defined(WEBRTC_ARCH_ARM) || \
90 defined(WEBRTC_ANDROID)) 93 defined(WEBRTC_ANDROID))
91 const float kOutputReference[] = {-0.016771f, -0.017831f, -0.020482f}; 94 const float kOutputReference[] = {-0.014277f, -0.015180f, -0.017437f};
92 #else 95 #else
93 const float kOutputReference[] = {-0.015949f, -0.016957f, -0.019478f}; 96 const float kOutputReference[] = {-0.015949f, -0.016957f, -0.019478f};
94 #endif 97 #endif
95 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 1, kOutputReference); 98 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 1,
99 kOutputReference);
96 } 100 }
97 101
98 TEST(LevelControlBitExactnessTest, DISABLED_Stereo8kHz) { 102 TEST(LevelControlBitExactnessTest, DISABLED_Stereo8kHz) {
99 const float kOutputReference[] = {-0.019304f, -0.011600f, -0.016690f, 103 const float kOutputReference[] = {-0.014063f, -0.008450f, -0.012159f,
100 -0.071335f, -0.031849f, -0.065694f}; 104 -0.051967f, -0.023202f, -0.047858f};
101 RunBitexactnessTest(AudioProcessing::kSampleRate8kHz, 2, kOutputReference); 105 RunBitexactnessTest(AudioProcessing::kSampleRate8kHz, 2,
106 kOutputReference);
102 } 107 }
103 108
104 TEST(LevelControlBitExactnessTest, DISABLED_Stereo16kHz) { 109 TEST(LevelControlBitExactnessTest, DISABLED_Stereo16kHz) {
105 const float kOutputReference[] = {-0.016302f, -0.007559f, -0.015668f, 110 const float kOutputReference[] = {-0.012714f, -0.005896f, -0.012220f,
106 -0.068346f, -0.031476f, -0.066065f}; 111 -0.053306f, -0.024549f, -0.051527f};
107 RunBitexactnessTest(AudioProcessing::kSampleRate16kHz, 2, kOutputReference); 112 RunBitexactnessTest(AudioProcessing::kSampleRate16kHz, 2,
113 kOutputReference);
108 } 114 }
109 115
110 TEST(LevelControlBitExactnessTest, DISABLED_Stereo32kHz) { 116 TEST(LevelControlBitExactnessTest, DISABLED_Stereo32kHz) {
111 const float kOutputReference[] = {-0.013944f, -0.008337f, -0.015972f, 117 const float kOutputReference[] = {-0.011737f, -0.007018f, -0.013446f,
112 -0.063563f, -0.031233f, -0.066784f}; 118 -0.053505f, -0.026292f, -0.056221f};
113 RunBitexactnessTest(AudioProcessing::kSampleRate32kHz, 2, kOutputReference); 119 RunBitexactnessTest(AudioProcessing::kSampleRate32kHz, 2,
120 kOutputReference);
114 } 121 }
115 122
116 TEST(LevelControlBitExactnessTest, DISABLED_Stereo48kHz) { 123 TEST(LevelControlBitExactnessTest, DISABLED_Stereo48kHz) {
117 const float kOutputReference[] = {-0.013652f, -0.008125f, -0.014593f, 124 const float kOutputReference[] = {-0.010643f, -0.006334f, -0.011377f,
118 -0.062963f, -0.030270f, -0.064727f}; 125 -0.049088f, -0.023600f, -0.050465f};
119 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2, kOutputReference); 126 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2,
127 kOutputReference);
120 } 128 }
121 129
130
131
122 } // namespace webrtc 132 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698