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

Side by Side Diff: webrtc/modules/audio_processing/test/process_test.cc

Issue 2090583002: New module for the adaptive level controlling functionality in the audio processing module (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Temporarily deactivated the level controller until the CL with the proper tuning has been landed Created 4 years, 5 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 printf(" --ns_low\n"); 101 printf(" --ns_low\n");
102 printf(" --ns_moderate\n"); 102 printf(" --ns_moderate\n");
103 printf(" --ns_high\n"); 103 printf(" --ns_high\n");
104 printf(" --ns_very_high\n"); 104 printf(" --ns_very_high\n");
105 printf(" --ns_prob_file FILE\n"); 105 printf(" --ns_prob_file FILE\n");
106 printf("\n -vad Voice activity detection\n"); 106 printf("\n -vad Voice activity detection\n");
107 printf(" --vad_out_file FILE\n"); 107 printf(" --vad_out_file FILE\n");
108 printf("\n -expns Experimental noise suppression\n"); 108 printf("\n -expns Experimental noise suppression\n");
109 printf("\n Level metrics (enabled by default)\n"); 109 printf("\n Level metrics (enabled by default)\n");
110 printf(" --no_level_metrics\n"); 110 printf(" --no_level_metrics\n");
111 printf(" --level_control\n");
111 printf("\n"); 112 printf("\n");
112 printf("Modifiers:\n"); 113 printf("Modifiers:\n");
113 printf(" --noasm Disable SSE optimization.\n"); 114 printf(" --noasm Disable SSE optimization.\n");
114 printf(" --add_delay DELAY Add DELAY ms to input value.\n"); 115 printf(" --add_delay DELAY Add DELAY ms to input value.\n");
115 printf(" --delay DELAY Override input delay with DELAY ms.\n"); 116 printf(" --delay DELAY Override input delay with DELAY ms.\n");
116 printf(" --perf Measure performance.\n"); 117 printf(" --perf Measure performance.\n");
117 printf(" --quiet Suppress text output.\n"); 118 printf(" --quiet Suppress text output.\n");
118 printf(" --no_progress Suppress progress.\n"); 119 printf(" --no_progress Suppress progress.\n");
119 printf(" --raw_output Raw output instead of WAV file.\n"); 120 printf(" --raw_output Raw output instead of WAV file.\n");
120 printf(" --debug_file FILE Dump a debug recording.\n"); 121 printf(" --debug_file FILE Dump a debug recording.\n");
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } else if (strcmp(argv[i], "--aec_suppression_level") == 0) { 254 } else if (strcmp(argv[i], "--aec_suppression_level") == 0) {
254 i++; 255 i++;
255 ASSERT_LT(i, argc) << "Specify level after --aec_suppression_level"; 256 ASSERT_LT(i, argc) << "Specify level after --aec_suppression_level";
256 int suppression_level; 257 int suppression_level;
257 ASSERT_EQ(1, sscanf(argv[i], "%d", &suppression_level)); 258 ASSERT_EQ(1, sscanf(argv[i], "%d", &suppression_level));
258 ASSERT_EQ(apm->kNoError, 259 ASSERT_EQ(apm->kNoError,
259 apm->echo_cancellation()->set_suppression_level( 260 apm->echo_cancellation()->set_suppression_level(
260 static_cast<webrtc::EchoCancellation::SuppressionLevel>( 261 static_cast<webrtc::EchoCancellation::SuppressionLevel>(
261 suppression_level))); 262 suppression_level)));
262 263
264 } else if (strcmp(argv[i], "--level_control") == 0) {
265 config.Set<LevelControl>(new LevelControl(true));
266
263 } else if (strcmp(argv[i], "--extended_filter") == 0) { 267 } else if (strcmp(argv[i], "--extended_filter") == 0) {
264 config.Set<ExtendedFilter>(new ExtendedFilter(true)); 268 config.Set<ExtendedFilter>(new ExtendedFilter(true));
265 269
266 } else if (strcmp(argv[i], "--no_reported_delay") == 0) { 270 } else if (strcmp(argv[i], "--no_reported_delay") == 0) {
267 config.Set<DelayAgnostic>(new DelayAgnostic(true)); 271 config.Set<DelayAgnostic>(new DelayAgnostic(true));
268 272
269 } else if (strcmp(argv[i], "--delay_agnostic") == 0) { 273 } else if (strcmp(argv[i], "--delay_agnostic") == 0) {
270 config.Set<DelayAgnostic>(new DelayAgnostic(true)); 274 config.Set<DelayAgnostic>(new DelayAgnostic(true));
271 275
272 } else if (strcmp(argv[i], "--aec3") == 0) { 276 } else if (strcmp(argv[i], "--aec3") == 0) {
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 } // namespace 1155 } // namespace
1152 } // namespace webrtc 1156 } // namespace webrtc
1153 1157
1154 int main(int argc, char* argv[]) { 1158 int main(int argc, char* argv[]) {
1155 webrtc::void_main(argc, argv); 1159 webrtc::void_main(argc, argv);
1156 1160
1157 // Optional, but removes memory leak noise from Valgrind. 1161 // Optional, but removes memory leak noise from Valgrind.
1158 google::protobuf::ShutdownProtobufLibrary(); 1162 google::protobuf::ShutdownProtobufLibrary();
1159 return 0; 1163 return 0;
1160 } 1164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698