webrtc/modules/audio_processing/agc2
Alessio Bazzica 05f5d636e5 RNN VAD: pitch search optimizations (part 4)
Add inverted lags index to simplify the loop in
`FindBestPitchPeriod48kHz()`. Instead of looping over 294 items,
only loop over the relevant ones (up to 10) by keeping track of
the relevant indexes.

The benchmark has shown a slight improvement (about +6x).

Benchmarked as follows:
```
out/release/modules_unittests \
  --gtest_filter=*RnnVadTest.DISABLED_RnnVadPerformance* \
  --gtest_also_run_disabled_tests --logs
```

Results:

      | baseline             | this CL
------+----------------------+------------------------
run 1 | 22.8319 +/- 1.46554  | 22.1951 +/- 0.747611
      | 389.367x             | 400.539x
------+----------------------+------------------------
run 2 | 22.4286 +/- 0.726449 | 22.2718 +/- 0.963738
      | 396.369x             | 399.16x
------+----------------------+------------------------
run 2 | 22.5688 +/- 0.831341 | 22.4166 +/- 0.953362
      | 393.906x             | 396.581x

This CL also moved `PitchPseudoInterpolationInvLagAutoCorr()`
into `FindBestPitchPeriod48kHz()`.

Bug: webrtc:10480
Change-Id: Id4e6d755045c3198a80fa94a0a7463577d909b7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191764
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32590}
2020-11-11 15:51:52 +00:00
..
rnn_vad RNN VAD: pitch search optimizations (part 4) 2020-11-11 15:51:52 +00:00
adaptive_agc.cc AGC2: max output noise level now part of config 2020-10-01 17:06:40 +00:00
adaptive_agc.h AGC2: max adaptation speed now part of config 2020-10-01 16:15:28 +00:00
adaptive_digital_gain_applier.cc AGC2 logs 2020-10-05 15:34:52 +00:00
adaptive_digital_gain_applier.h AGC2: max output noise level now part of config 2020-10-01 17:06:40 +00:00
adaptive_digital_gain_applier_unittest.cc AGC2: max output noise level now part of config 2020-10-01 17:06:40 +00:00
adaptive_mode_level_estimator.cc Introduce RTC_CHECK_NOTREACHED(), an always-checking RTC_NOTREACHED() 2020-11-09 10:47:55 +00:00
adaptive_mode_level_estimator.h AGC2 adaptive digital controller config: new params 2020-09-30 22:29:14 +00:00
adaptive_mode_level_estimator_agc.cc AGC2 AdaptiveModeLevelEstimator: cache last level estimate 2020-09-29 15:45:22 +00:00
adaptive_mode_level_estimator_agc.h AGC2 VadWithLevel(::LevelAndProbability) renamed + injectable VAD 2020-09-25 12:11:12 +00:00
adaptive_mode_level_estimator_unittest.cc AGC2 adaptive digital controller config: new params 2020-09-30 22:29:14 +00:00
agc2_common.h AGC2: max output noise level now part of config 2020-10-01 17:06:40 +00:00
agc2_testing_common.cc Fixed Digital mode of AGC2 implementation finished. 2018-02-20 15:59:25 +00:00
agc2_testing_common.h Delete unneeded includes of basictypes.h. 2018-05-21 19:35:08 +00:00
agc2_testing_common_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
biquad_filter.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
biquad_filter.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
biquad_filter_unittest.cc AGC2 RNN VAD: Feature extraction. 2018-05-15 10:02:20 +00:00
BUILD.gn AGC2 adaptive digital controller config: new params 2020-09-30 22:29:14 +00:00
compute_interpolated_gain_curve.cc AGC2 Limiter class renamed. 2018-10-23 15:20:52 +00:00
compute_interpolated_gain_curve.h Fixed Digital mode of AGC2 implementation finished. 2018-02-20 15:59:25 +00:00
down_sampler.cc Format almost everything. 2019-07-08 13:45:15 +00:00
down_sampler.h Delete macros RTC_DISALLOW_ASSIGN and RTC_DISALLOW_IMPLICIT_CONSTRUCTORS 2020-09-29 10:19:20 +00:00
fixed_digital_level_estimator.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
fixed_digital_level_estimator.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
fixed_digital_level_estimator_unittest.cc Fixed Digital mode of AGC2 implementation finished. 2018-02-20 15:59:25 +00:00
fixed_gain_controller.cc AGC2: renaming GainCurveApplier to Limiter. 2018-10-30 16:00:18 +00:00
gain_applier.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
gain_applier.h webrtc: Remove semicolons. 2019-02-20 16:02:59 +00:00
gain_applier_unittest.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
interpolated_gain_curve.cc Format almost everything. 2019-07-08 13:45:15 +00:00
interpolated_gain_curve.h Format almost everything. 2019-07-08 13:45:15 +00:00
interpolated_gain_curve_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
limiter.cc Fix AGC2 fixed-adaptive gain controllers order. 2018-11-01 20:35:36 +00:00
limiter.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
limiter_db_gain_curve.cc AGC2 Limiter class renamed. 2018-10-23 15:20:52 +00:00
limiter_db_gain_curve.h AGC2 Limiter class renamed. 2018-10-23 15:20:52 +00:00
limiter_db_gain_curve_unittest.cc AGC2 Limiter class renamed. 2018-10-23 15:20:52 +00:00
limiter_unittest.cc AGC2: renaming GainCurveApplier to Limiter. 2018-10-30 16:00:18 +00:00
noise_level_estimator.cc Format almost everything. 2019-07-08 13:45:15 +00:00
noise_level_estimator.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
noise_level_estimator_unittest.cc Noise level estimation for AGC2. 2018-04-04 18:23:55 +00:00
noise_spectrum_estimator.cc Format almost everything. 2019-07-08 13:45:15 +00:00
noise_spectrum_estimator.h Delete macros RTC_DISALLOW_ASSIGN and RTC_DISALLOW_IMPLICIT_CONSTRUCTORS 2020-09-29 10:19:20 +00:00
saturation_protector.cc AGC2 AdaptiveModeLevelEstimator min consecutive speech frames (2/3) 2020-09-29 11:02:10 +00:00
saturation_protector.h AGC2 AdaptiveModeLevelEstimator min consecutive speech frames (2/3) 2020-09-29 11:02:10 +00:00
saturation_protector_unittest.cc AGC2 remove incorrect field trial parsing functions 2020-09-29 13:33:15 +00:00
signal_classifier.cc Refactor cpu_features_wrapper.h functions from C to C++. 2020-09-07 08:44:24 +00:00
signal_classifier.h Delete macros RTC_DISALLOW_ASSIGN and RTC_DISALLOW_IMPLICIT_CONSTRUCTORS 2020-09-29 10:19:20 +00:00
signal_classifier_unittest.cc Noise level estimation for AGC2. 2018-04-04 18:23:55 +00:00
vad_with_level.cc AGC2 VAD probability: instant decay / slow attack 2020-09-25 14:03:17 +00:00
vad_with_level.h AGC2 VAD probability: instant decay / slow attack 2020-09-25 14:03:17 +00:00
vad_with_level_unittest.cc AGC2 VAD probability: instant decay / slow attack 2020-09-25 14:03:17 +00:00
vector_float_frame.cc Add FixedGainController and move GainController2 in APM. 2018-02-16 10:56:38 +00:00
vector_float_frame.h AGC2-fixed-digital: Level Estimator 2018-02-16 13:55:18 +00:00