blob: a11f41c855183c371c454ecc1b0d24d343b7e595 [file] [log] [blame]
andrew@webrtc.org08df9b22014-12-16 20:57:15 +00001/*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
aluebsb0ad43b2015-11-20 00:11:53 -080011#include <iostream>
kwiberg62eaacf2016-02-17 06:39:05 -080012#include <memory>
peah60a189f2016-05-24 20:54:40 -070013
14#include <string.h>
andrew@webrtc.org08df9b22014-12-16 20:57:15 +000015
16#include "gflags/gflags.h"
andrew@webrtc.org08df9b22014-12-16 20:57:15 +000017#include "webrtc/modules/audio_processing/include/audio_processing.h"
peah60a189f2016-05-24 20:54:40 -070018#include "webrtc/modules/audio_processing/test/aec_dump_based_simulator.h"
19#include "webrtc/modules/audio_processing/test/audio_processing_simulator.h"
20#include "webrtc/modules/audio_processing/test/wav_based_simulator.h"
andrew@webrtc.org08df9b22014-12-16 20:57:15 +000021
peah60a189f2016-05-24 20:54:40 -070022namespace webrtc {
23namespace test {
Peter Kasting69558702016-01-12 16:26:35 -080024namespace {
25
peah60a189f2016-05-24 20:54:40 -070026const int kParameterNotSpecifiedValue = -10000;
27
28const char kUsageDescription[] =
29 "Usage: audioproc_f [options] -i <input.wav>\n"
30 " or\n"
31 " audioproc_f [options] -dump_input <aec_dump>\n"
32 "\n\n"
33 "Command-line tool to simulate a call using the audio "
34 "processing module, either based on wav files or "
35 "protobuf debug dump recordings.";
36
37DEFINE_string(dump_input, "", "Aec dump input filename");
38DEFINE_string(dump_output, "", "Aec dump output filename");
39DEFINE_string(i, "", "Forward stream input wav filename");
40DEFINE_string(o, "", "Forward stream output wav filename");
41DEFINE_string(ri, "", "Reverse stream input wav filename");
42DEFINE_string(ro, "", "Reverse stream output wav filename");
peahdf80fd12016-12-09 02:43:40 -080043DEFINE_string(artificial_nearend, "", "Artificial nearend wav filename");
peah60a189f2016-05-24 20:54:40 -070044DEFINE_int32(output_num_channels,
45 kParameterNotSpecifiedValue,
46 "Number of forward stream output channels");
47DEFINE_int32(reverse_output_num_channels,
48 kParameterNotSpecifiedValue,
49 "Number of Reverse stream output channels");
50DEFINE_int32(output_sample_rate_hz,
51 kParameterNotSpecifiedValue,
52 "Forward stream output sample rate in Hz");
53DEFINE_int32(reverse_output_sample_rate_hz,
54 kParameterNotSpecifiedValue,
55 "Reverse stream output sample rate in Hz");
56DEFINE_string(mic_positions,
57 "",
58 "Space delimited cartesian coordinates of microphones in "
59 "meters. The coordinates of each point are contiguous. For a "
60 "two element array: \"x1 y1 z1 x2 y2 z2\"");
61DEFINE_int32(target_angle_degrees,
62 90,
63 "The azimuth of the target in degrees (0-359). Only applies to "
64 "beamforming.");
65DEFINE_bool(fixed_interface,
66 false,
67 "Use the fixed interface when operating on wav files");
68DEFINE_int32(aec,
69 kParameterNotSpecifiedValue,
70 "Activate (1) or deactivate(0) the echo canceller");
71DEFINE_int32(aecm,
72 kParameterNotSpecifiedValue,
73 "Activate (1) or deactivate(0) the mobile echo controller");
ivoc0bff12a2016-11-17 00:55:43 -080074DEFINE_int32(ed,
ivoc87d1a782016-11-14 07:55:03 -080075 kParameterNotSpecifiedValue,
76 "Activate (1) or deactivate (0) the residual echo detector");
ivoc0bff12a2016-11-17 00:55:43 -080077DEFINE_string(ed_graph, "", "Output filename for graph of echo likelihood");
peah60a189f2016-05-24 20:54:40 -070078DEFINE_int32(agc,
79 kParameterNotSpecifiedValue,
80 "Activate (1) or deactivate(0) the AGC");
alessiob3ec96df2017-05-22 06:57:06 -070081DEFINE_int32(agc2,
82 kParameterNotSpecifiedValue,
83 "Activate (1) or deactivate(0) the AGC2");
peah60a189f2016-05-24 20:54:40 -070084DEFINE_int32(hpf,
85 kParameterNotSpecifiedValue,
86 "Activate (1) or deactivate(0) the high-pass filter");
87DEFINE_int32(ns,
88 kParameterNotSpecifiedValue,
89 "Activate (1) or deactivate(0) the noise suppressor");
90DEFINE_int32(ts,
91 kParameterNotSpecifiedValue,
92 "Activate (1) or deactivate(0) the transient suppressor");
93DEFINE_int32(bf,
94 kParameterNotSpecifiedValue,
95 "Activate (1) or deactivate(0) the beamformer");
96DEFINE_int32(ie,
97 kParameterNotSpecifiedValue,
98 "Activate (1) or deactivate(0) the intelligibility enhancer");
99DEFINE_int32(vad,
100 kParameterNotSpecifiedValue,
101 "Activate (1) or deactivate(0) the voice activity detector");
102DEFINE_int32(le,
103 kParameterNotSpecifiedValue,
104 "Activate (1) or deactivate(0) the level estimator");
105DEFINE_bool(all_default,
106 false,
107 "Activate all of the default components (will be overridden by any "
108 "other settings)");
109DEFINE_int32(aec_suppression_level,
110 kParameterNotSpecifiedValue,
111 "Set the aec suppression level (0-2)");
112DEFINE_int32(delay_agnostic,
113 kParameterNotSpecifiedValue,
114 "Activate (1) or deactivate(0) the AEC delay agnostic mode");
115DEFINE_int32(extended_filter,
116 kParameterNotSpecifiedValue,
117 "Activate (1) or deactivate(0) the AEC extended filter mode");
118DEFINE_int32(drift_compensation,
119 kParameterNotSpecifiedValue,
120 "Activate (1) or deactivate(0) the drift compensation");
121DEFINE_int32(aec3,
122 kParameterNotSpecifiedValue,
123 "Activate (1) or deactivate(0) the experimental AEC mode AEC3");
peahca4cac72016-06-29 15:26:12 -0700124DEFINE_int32(lc,
125 kParameterNotSpecifiedValue,
126 "Activate (1) or deactivate(0) the level control");
aleloia3b2add2017-02-14 02:07:49 -0800127DEFINE_int32(experimental_agc,
128 kParameterNotSpecifiedValue,
129 "Activate (1) or deactivate(0) the experimental AGC");
peah60a189f2016-05-24 20:54:40 -0700130DEFINE_int32(
131 refined_adaptive_filter,
132 kParameterNotSpecifiedValue,
133 "Activate (1) or deactivate(0) the refined adaptive filter functionality");
134DEFINE_int32(aecm_routing_mode,
135 kParameterNotSpecifiedValue,
136 "Specify the AECM routing mode (0-4)");
137DEFINE_int32(aecm_comfort_noise,
138 kParameterNotSpecifiedValue,
139 "Activate (1) or deactivate(0) the AECM comfort noise");
140DEFINE_int32(agc_mode,
141 kParameterNotSpecifiedValue,
142 "Specify the AGC mode (0-2)");
143DEFINE_int32(agc_target_level,
144 kParameterNotSpecifiedValue,
145 "Specify the AGC target level (0-31)");
146DEFINE_int32(agc_limiter,
147 kParameterNotSpecifiedValue,
148 "Activate (1) or deactivate(0) the level estimator");
149DEFINE_int32(agc_compression_gain,
150 kParameterNotSpecifiedValue,
151 "Specify the AGC compression gain (0-90)");
152DEFINE_int32(vad_likelihood,
153 kParameterNotSpecifiedValue,
154 "Specify the VAD likelihood (0-3)");
155DEFINE_int32(ns_level,
156 kParameterNotSpecifiedValue,
157 "Specify the NS level (0-3)");
158DEFINE_int32(stream_delay,
159 kParameterNotSpecifiedValue,
160 "Specify the stream delay in ms to use");
161DEFINE_int32(stream_drift_samples,
162 kParameterNotSpecifiedValue,
163 "Specify the number of stream drift samples to use");
164DEFINE_bool(performance_report, false, "Report the APM performance ");
165DEFINE_bool(verbose, false, "Produce verbose output");
166DEFINE_bool(bitexactness_report,
167 false,
168 "Report bitexactness for aec dump result reproduction");
169DEFINE_bool(discard_settings_in_aecdump,
170 false,
171 "Discard any config settings specified in the aec dump");
172DEFINE_bool(store_intermediate_output,
173 false,
174 "Creates new output files after each init");
peah5ad5de32016-12-09 03:18:22 -0800175DEFINE_string(custom_call_order_file, "", "Custom process API call order file");
peah60a189f2016-05-24 20:54:40 -0700176
177void SetSettingIfSpecified(const std::string value,
178 rtc::Optional<std::string>* parameter) {
179 if (value.compare("") != 0) {
180 *parameter = rtc::Optional<std::string>(value);
181 }
182}
183
184void SetSettingIfSpecified(int value, rtc::Optional<int>* parameter) {
185 if (value != kParameterNotSpecifiedValue) {
186 *parameter = rtc::Optional<int>(value);
187 }
188}
189
190void SetSettingIfFlagSet(int32_t flag, rtc::Optional<bool>* parameter) {
191 if (flag == 0) {
192 *parameter = rtc::Optional<bool>(false);
193 } else if (flag == 1) {
194 *parameter = rtc::Optional<bool>(true);
195 }
196}
197
198SimulationSettings CreateSettings() {
199 SimulationSettings settings;
200 if (FLAGS_all_default) {
201 settings.use_le = rtc::Optional<bool>(true);
202 settings.use_vad = rtc::Optional<bool>(true);
203 settings.use_ie = rtc::Optional<bool>(false);
204 settings.use_bf = rtc::Optional<bool>(false);
205 settings.use_ts = rtc::Optional<bool>(true);
206 settings.use_ns = rtc::Optional<bool>(true);
207 settings.use_hpf = rtc::Optional<bool>(true);
208 settings.use_agc = rtc::Optional<bool>(true);
209 settings.use_aec = rtc::Optional<bool>(true);
210 settings.use_aecm = rtc::Optional<bool>(false);
ivoc0bff12a2016-11-17 00:55:43 -0800211 settings.use_ed = rtc::Optional<bool>(false);
peah60a189f2016-05-24 20:54:40 -0700212 }
213 SetSettingIfSpecified(FLAGS_dump_input, &settings.aec_dump_input_filename);
214 SetSettingIfSpecified(FLAGS_dump_output, &settings.aec_dump_output_filename);
215 SetSettingIfSpecified(FLAGS_i, &settings.input_filename);
216 SetSettingIfSpecified(FLAGS_o, &settings.output_filename);
217 SetSettingIfSpecified(FLAGS_ri, &settings.reverse_input_filename);
218 SetSettingIfSpecified(FLAGS_ro, &settings.reverse_output_filename);
peahdf80fd12016-12-09 02:43:40 -0800219 SetSettingIfSpecified(FLAGS_artificial_nearend,
220 &settings.artificial_nearend_filename);
peah60a189f2016-05-24 20:54:40 -0700221 SetSettingIfSpecified(FLAGS_output_num_channels,
222 &settings.output_num_channels);
223 SetSettingIfSpecified(FLAGS_reverse_output_num_channels,
224 &settings.reverse_output_num_channels);
225 SetSettingIfSpecified(FLAGS_output_sample_rate_hz,
226 &settings.output_sample_rate_hz);
227 SetSettingIfSpecified(FLAGS_reverse_output_sample_rate_hz,
228 &settings.reverse_output_sample_rate_hz);
229 SetSettingIfSpecified(FLAGS_mic_positions, &settings.microphone_positions);
230 settings.target_angle_degrees = FLAGS_target_angle_degrees;
231 SetSettingIfFlagSet(FLAGS_aec, &settings.use_aec);
232 SetSettingIfFlagSet(FLAGS_aecm, &settings.use_aecm);
ivoc0bff12a2016-11-17 00:55:43 -0800233 SetSettingIfFlagSet(FLAGS_ed, &settings.use_ed);
234 SetSettingIfSpecified(FLAGS_ed_graph, &settings.ed_graph_output_filename);
peah60a189f2016-05-24 20:54:40 -0700235 SetSettingIfFlagSet(FLAGS_agc, &settings.use_agc);
alessiob3ec96df2017-05-22 06:57:06 -0700236 SetSettingIfFlagSet(FLAGS_agc2, &settings.use_agc2);
peah60a189f2016-05-24 20:54:40 -0700237 SetSettingIfFlagSet(FLAGS_hpf, &settings.use_hpf);
238 SetSettingIfFlagSet(FLAGS_ns, &settings.use_ns);
239 SetSettingIfFlagSet(FLAGS_ts, &settings.use_ts);
240 SetSettingIfFlagSet(FLAGS_bf, &settings.use_bf);
241 SetSettingIfFlagSet(FLAGS_ie, &settings.use_ie);
242 SetSettingIfFlagSet(FLAGS_vad, &settings.use_vad);
243 SetSettingIfFlagSet(FLAGS_le, &settings.use_le);
244 SetSettingIfSpecified(FLAGS_aec_suppression_level,
245 &settings.aec_suppression_level);
246 SetSettingIfFlagSet(FLAGS_delay_agnostic, &settings.use_delay_agnostic);
247 SetSettingIfFlagSet(FLAGS_extended_filter, &settings.use_extended_filter);
248 SetSettingIfFlagSet(FLAGS_drift_compensation,
249 &settings.use_drift_compensation);
250 SetSettingIfFlagSet(FLAGS_refined_adaptive_filter,
251 &settings.use_refined_adaptive_filter);
252
253 SetSettingIfFlagSet(FLAGS_aec3, &settings.use_aec3);
peahca4cac72016-06-29 15:26:12 -0700254 SetSettingIfFlagSet(FLAGS_lc, &settings.use_lc);
aleloia3b2add2017-02-14 02:07:49 -0800255 SetSettingIfFlagSet(FLAGS_experimental_agc, &settings.use_experimental_agc);
peah60a189f2016-05-24 20:54:40 -0700256 SetSettingIfSpecified(FLAGS_aecm_routing_mode, &settings.aecm_routing_mode);
257 SetSettingIfFlagSet(FLAGS_aecm_comfort_noise,
258 &settings.use_aecm_comfort_noise);
259 SetSettingIfSpecified(FLAGS_agc_mode, &settings.agc_mode);
260 SetSettingIfSpecified(FLAGS_agc_target_level, &settings.agc_target_level);
261 SetSettingIfFlagSet(FLAGS_agc_limiter, &settings.use_agc_limiter);
262 SetSettingIfSpecified(FLAGS_agc_compression_gain,
263 &settings.agc_compression_gain);
264 SetSettingIfSpecified(FLAGS_vad_likelihood, &settings.vad_likelihood);
265 SetSettingIfSpecified(FLAGS_ns_level, &settings.ns_level);
266 SetSettingIfSpecified(FLAGS_stream_delay, &settings.stream_delay);
267 SetSettingIfSpecified(FLAGS_stream_drift_samples,
268 &settings.stream_drift_samples);
peah5ad5de32016-12-09 03:18:22 -0800269 SetSettingIfSpecified(FLAGS_custom_call_order_file,
270 &settings.custom_call_order_filename);
peah60a189f2016-05-24 20:54:40 -0700271 settings.report_performance = FLAGS_performance_report;
272 settings.use_verbose_logging = FLAGS_verbose;
273 settings.report_bitexactness = FLAGS_bitexactness_report;
274 settings.discard_all_settings_in_aecdump = FLAGS_discard_settings_in_aecdump;
275 settings.fixed_interface = FLAGS_fixed_interface;
276 settings.store_intermediate_output = FLAGS_store_intermediate_output;
277
278 return settings;
279}
280
281void ReportConditionalErrorAndExit(bool condition, std::string message) {
282 if (condition) {
283 std::cerr << message << std::endl;
284 exit(1);
285 }
286}
287
288void PerformBasicParameterSanityChecks(const SimulationSettings& settings) {
289 if (settings.input_filename || settings.reverse_input_filename) {
290 ReportConditionalErrorAndExit(!!settings.aec_dump_input_filename,
291 "Error: The aec dump cannot be specified "
292 "together with input wav files!\n");
293
peahdf80fd12016-12-09 02:43:40 -0800294 ReportConditionalErrorAndExit(!!settings.artificial_nearend_filename,
295 "Error: The artificial nearend cannot be "
296 "specified together with input wav files!\n");
297
peah60a189f2016-05-24 20:54:40 -0700298 ReportConditionalErrorAndExit(!settings.input_filename,
299 "Error: When operating at wav files, the "
300 "input wav filename must be "
301 "specified!\n");
302
303 ReportConditionalErrorAndExit(
304 settings.reverse_output_filename && !settings.reverse_input_filename,
305 "Error: When operating at wav files, the reverse input wav filename "
306 "must be specified if the reverse output wav filename is specified!\n");
307 } else {
308 ReportConditionalErrorAndExit(!settings.aec_dump_input_filename,
309 "Error: Either the aec dump or the wav "
310 "input files must be specified!\n");
311 }
312
313 ReportConditionalErrorAndExit(
314 settings.use_aec && *settings.use_aec && settings.use_aecm &&
315 *settings.use_aecm,
316 "Error: The AEC and the AECM cannot be activated at the same time!\n");
317
318 ReportConditionalErrorAndExit(
319 settings.output_sample_rate_hz && *settings.output_sample_rate_hz <= 0,
320 "Error: --output_sample_rate_hz must be positive!\n");
321
322 ReportConditionalErrorAndExit(
323 settings.reverse_output_sample_rate_hz &&
324 settings.output_sample_rate_hz &&
325 *settings.output_sample_rate_hz <= 0,
326 "Error: --reverse_output_sample_rate_hz must be positive!\n");
327
328 ReportConditionalErrorAndExit(
329 settings.output_num_channels && *settings.output_num_channels <= 0,
330 "Error: --output_num_channels must be positive!\n");
331
332 ReportConditionalErrorAndExit(
333 settings.reverse_output_num_channels &&
334 *settings.reverse_output_num_channels <= 0,
335 "Error: --reverse_output_num_channels must be positive!\n");
336
337 ReportConditionalErrorAndExit(
338 settings.use_bf && *settings.use_bf && !settings.microphone_positions,
339 "Error: --mic_positions must be specified when the beamformer is "
340 "activated.\n");
341
342 ReportConditionalErrorAndExit(
343 settings.target_angle_degrees < 0 || settings.target_angle_degrees > 359,
344 "Error: -target_angle_degrees must be specified between 0 and 359.\n");
345
346 ReportConditionalErrorAndExit(
347 settings.aec_suppression_level &&
348 ((*settings.aec_suppression_level) < 0 ||
349 (*settings.aec_suppression_level) > 2),
350 "Error: --aec_suppression_level must be specified between 0 and 2.\n");
351
352 ReportConditionalErrorAndExit(
353 settings.aecm_routing_mode && ((*settings.aecm_routing_mode) < 0 ||
354 (*settings.aecm_routing_mode) > 4),
355 "Error: --aecm_routing_mode must be specified between 0 and 4.\n");
356
357 ReportConditionalErrorAndExit(
358 settings.agc_target_level && ((*settings.agc_target_level) < 0 ||
359 (*settings.agc_target_level) > 31),
360 "Error: --agc_target_level must be specified between 0 and 31.\n");
361
362 ReportConditionalErrorAndExit(
363 settings.agc_compression_gain && ((*settings.agc_compression_gain) < 0 ||
364 (*settings.agc_compression_gain) > 90),
365 "Error: --agc_compression_gain must be specified between 0 and 90.\n");
366
367 ReportConditionalErrorAndExit(
368 settings.vad_likelihood &&
369 ((*settings.vad_likelihood) < 0 || (*settings.vad_likelihood) > 3),
370 "Error: --vad_likelihood must be specified between 0 and 3.\n");
371
372 ReportConditionalErrorAndExit(
373 settings.ns_level &&
374 ((*settings.ns_level) < 0 || (*settings.ns_level) > 3),
375 "Error: --ns_level must be specified between 0 and 3.\n");
376
377 ReportConditionalErrorAndExit(
378 settings.report_bitexactness && !settings.aec_dump_input_filename,
379 "Error: --bitexactness_report can only be used when operating on an "
380 "aecdump\n");
381
peah5ad5de32016-12-09 03:18:22 -0800382 ReportConditionalErrorAndExit(
383 settings.custom_call_order_filename && settings.aec_dump_input_filename,
384 "Error: --custom_call_order_file cannot be used when operating on an "
385 "aecdump\n");
386
peah60a189f2016-05-24 20:54:40 -0700387 auto valid_wav_name = [](const std::string& wav_file_name) {
388 if (wav_file_name.size() < 5) {
389 return false;
390 }
391 if ((wav_file_name.compare(wav_file_name.size() - 4, 4, ".wav") == 0) ||
392 (wav_file_name.compare(wav_file_name.size() - 4, 4, ".WAV") == 0)) {
393 return true;
394 }
395 return false;
396 };
397
398 ReportConditionalErrorAndExit(
399 settings.input_filename && (!valid_wav_name(*settings.input_filename)),
400 "Error: --i must be a valid .wav file name.\n");
401
402 ReportConditionalErrorAndExit(
403 settings.output_filename && (!valid_wav_name(*settings.output_filename)),
404 "Error: --o must be a valid .wav file name.\n");
405
406 ReportConditionalErrorAndExit(
407 settings.reverse_input_filename &&
408 (!valid_wav_name(*settings.reverse_input_filename)),
409 "Error: --ri must be a valid .wav file name.\n");
410
411 ReportConditionalErrorAndExit(
412 settings.reverse_output_filename &&
413 (!valid_wav_name(*settings.reverse_output_filename)),
414 "Error: --ro must be a valid .wav file name.\n");
peahdf80fd12016-12-09 02:43:40 -0800415
416 ReportConditionalErrorAndExit(
417 settings.artificial_nearend_filename &&
418 !valid_wav_name(*settings.artificial_nearend_filename),
419 "Error: --artifical_nearend must be a valid .wav file name.\n");
Peter Kasting69558702016-01-12 16:26:35 -0800420}
421
422} // namespace
423
andrew@webrtc.org08df9b22014-12-16 20:57:15 +0000424int main(int argc, char* argv[]) {
peah60a189f2016-05-24 20:54:40 -0700425 google::SetUsageMessage(kUsageDescription);
andrew@webrtc.org08df9b22014-12-16 20:57:15 +0000426 google::ParseCommandLineFlags(&argc, &argv, true);
427
peah60a189f2016-05-24 20:54:40 -0700428 SimulationSettings settings = CreateSettings();
429 PerformBasicParameterSanityChecks(settings);
430 std::unique_ptr<AudioProcessingSimulator> processor;
andrew@webrtc.org08df9b22014-12-16 20:57:15 +0000431
peah60a189f2016-05-24 20:54:40 -0700432 if (settings.aec_dump_input_filename) {
433 processor.reset(new AecDumpBasedSimulator(settings));
aluebsb0ad43b2015-11-20 00:11:53 -0800434 } else {
peah60a189f2016-05-24 20:54:40 -0700435 processor.reset(new WavBasedSimulator(settings));
andrewbdafe312015-10-29 23:42:54 -0700436 }
437
peah60a189f2016-05-24 20:54:40 -0700438 processor->Process();
aluebsb0ad43b2015-11-20 00:11:53 -0800439
peah60a189f2016-05-24 20:54:40 -0700440 if (settings.report_performance) {
aluebsb0ad43b2015-11-20 00:11:53 -0800441 const auto& proc_time = processor->proc_time();
Niels Möllerd28db7f2016-05-10 16:31:47 +0200442 int64_t exec_time_us = proc_time.sum / rtc::kNumNanosecsPerMicrosec;
peah60a189f2016-05-24 20:54:40 -0700443 std::cout << std::endl
444 << "Execution time: " << exec_time_us * 1e-6 << " s, File time: "
445 << processor->get_num_process_stream_calls() * 1.f /
446 AudioProcessingSimulator::kChunksPerSecond
447 << std::endl
448 << "Time per fwd stream chunk (mean, max, min): " << std::endl
449 << exec_time_us * 1.f / processor->get_num_process_stream_calls()
450 << " us, " << 1.f * proc_time.max / rtc::kNumNanosecsPerMicrosec
451 << " us, " << 1.f * proc_time.min / rtc::kNumNanosecsPerMicrosec
452 << " us" << std::endl;
453 }
454
455 if (settings.report_bitexactness && settings.aec_dump_input_filename) {
456 if (processor->OutputWasBitexact()) {
457 std::cout << "The processing was bitexact.";
458 } else {
459 std::cout << "The processing was not bitexact.";
460 }
Alejandro Luebs5d22c002015-04-15 11:26:40 -0700461 }
aluebsb0ad43b2015-11-20 00:11:53 -0800462
andrew@webrtc.org08df9b22014-12-16 20:57:15 +0000463 return 0;
464}
465
peah60a189f2016-05-24 20:54:40 -0700466} // namespace test
andrew@webrtc.org08df9b22014-12-16 20:57:15 +0000467} // namespace webrtc
468
469int main(int argc, char* argv[]) {
peah60a189f2016-05-24 20:54:40 -0700470 return webrtc::test::main(argc, argv);
andrew@webrtc.org08df9b22014-12-16 20:57:15 +0000471}