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

Side by Side Diff: webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer_unittest.cc

Issue 1913603002: Compensate for the compression gain in the IntelligibilityEnhancer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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) 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 intelligibility_enhancer->ProcessRenderAudio( 231 intelligibility_enhancer->ProcessRenderAudio(
232 render_audio_buffer->split_channels_f(kBand0To8kHz), 232 render_audio_buffer->split_channels_f(kBand0To8kHz),
233 IntelligibilityEnhancerSampleRate(sample_rate_hz), 233 IntelligibilityEnhancerSampleRate(sample_rate_hz),
234 render_audio_buffer->num_channels()); 234 render_audio_buffer->num_channels());
235 235
236 noise_suppressor->AnalyzeCaptureAudio(capture_audio_buffer); 236 noise_suppressor->AnalyzeCaptureAudio(capture_audio_buffer);
237 noise_suppressor->ProcessCaptureAudio(capture_audio_buffer); 237 noise_suppressor->ProcessCaptureAudio(capture_audio_buffer);
238 238
239 intelligibility_enhancer->SetCaptureNoiseEstimate( 239 intelligibility_enhancer->SetCaptureNoiseEstimate(
240 noise_suppressor->NoiseEstimate()); 240 noise_suppressor->NoiseEstimate(), 0);
241 241
242 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { 242 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) {
243 render_audio_buffer->MergeFrequencyBands(); 243 render_audio_buffer->MergeFrequencyBands();
244 } 244 }
245 } 245 }
246 246
247 // Processes a specified amount of frames, verifies the results and reports 247 // Processes a specified amount of frames, verifies the results and reports
248 // any errors. 248 // any errors.
249 void RunBitexactnessTest(int sample_rate_hz, 249 void RunBitexactnessTest(int sample_rate_hz,
250 size_t num_channels, 250 size_t num_channels,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 } 449 }
450 450
451 TEST(IntelligibilityEnhancerBitExactnessTest, DISABLED_Stereo48kHz) { 451 TEST(IntelligibilityEnhancerBitExactnessTest, DISABLED_Stereo48kHz) {
452 const float kOutputReference[] = {-0.009276f, -0.001601f, -0.008255f, 452 const float kOutputReference[] = {-0.009276f, -0.001601f, -0.008255f,
453 -0.012975f, -0.015940f, -0.017820f}; 453 -0.012975f, -0.015940f, -0.017820f};
454 454
455 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2, kOutputReference); 455 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2, kOutputReference);
456 } 456 }
457 457
458 } // namespace webrtc 458 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698