This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "RNN VAD: pitch search optimizations (part 1)"
This reverts commit 9da3e17. Reason for revert: bug in ComputePitchPeriod48kHz() Original change's description: > RNN VAD: pitch search optimizations (part 1) > > TL;DR this CL improves efficiency and includes several code > readability improvements mainly triggered by the comments to > patch set #10. > > Highlights: > - Split `FindBestPitchPeriods()` into 12 and 24 kHz versions > to hard-code the input size and simplify the 24 kHz version > - Loop in `ComputePitchPeriod48kHz()` (new name for > `RefinePitchPeriod48kHz()`) removed since the lags for which > we need to compute the auto correlation are a few > - `ComputePitchGainThreshold()` was only used in unit tests; it's been > moved into the anon ns and the test removed > > This CL makes `ComputePitchPeriod48kHz()` is about 10% faster (measured > with https://webrtc-review.googlesource.com/c/src/+/191320/4/modules/audio_processing/agc2/rnn_vad/pitch_search_internal_unittest.cc). > The realtime factor has improved by about +14%. > > Benchmarked as follows: > ``` > out/release/modules_unittests \ > --gtest_filter=*RnnVadTest.DISABLED_RnnVadPerformance* \ > --gtest_also_run_disabled_tests --logs > ``` > > Results: > > | baseline | this CL > ------+----------------------+------------------------ > run 1 | 24.0231 +/- 0.591016 | 23.568 +/- 0.990788 > | 370.06x | 377.207x > ------+----------------------+------------------------ > run 2 | 24.0485 +/- 0.957498 | 23.3714 +/- 0.857523 > | 369.67x | 380.379x > ------+----------------------+------------------------ > run 2 | 25.4091 +/- 2.6123 | 23.709 +/- 1.04477 > | 349.875x | 374.963x > > Bug: webrtc:10480 > Change-Id: I9a3e9164b2442114b928de506c92a547c273882f > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191320 > Reviewed-by: Per Åhgren <peah@webrtc.org> > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32568} TBR=alessiob@webrtc.org,peah@webrtc.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:10480 Change-Id: I2a91f4f29566f872a7dfa220b31c6c625ed075db Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192660 Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32581}
- Loading branch information
Showing
13 changed files
with
450 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by a BSD-style license | ||
* that can be found in the LICENSE file in the root of the source | ||
* tree. An additional intellectual property rights grant can be found | ||
* in the file PATENTS. All contributing project authors may | ||
* be found in the AUTHORS file in the root of the source tree. | ||
*/ | ||
|
||
#ifndef MODULES_AUDIO_PROCESSING_AGC2_RNN_VAD_PITCH_INFO_H_ | ||
#define MODULES_AUDIO_PROCESSING_AGC2_RNN_VAD_PITCH_INFO_H_ | ||
|
||
namespace webrtc { | ||
namespace rnn_vad { | ||
|
||
// Stores pitch period and gain information. The pitch gain measures the | ||
// strength of the pitch (the higher, the stronger). | ||
struct PitchInfo { | ||
PitchInfo() : period(0), gain(0.f) {} | ||
PitchInfo(int p, float g) : period(p), gain(g) {} | ||
int period; | ||
float gain; | ||
}; | ||
|
||
} // namespace rnn_vad | ||
} // namespace webrtc | ||
|
||
#endif // MODULES_AUDIO_PROCESSING_AGC2_RNN_VAD_PITCH_INFO_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.