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

Unified Diff: webrtc/modules/audio_coding/neteq/merge.h

Issue 1925053002: Revert of Avoiding overflow in cross correlation in NetEq. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_coding/neteq/expand.cc ('k') | webrtc/modules/audio_coding/neteq/merge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/merge.h
diff --git a/webrtc/modules/audio_coding/neteq/merge.h b/webrtc/modules/audio_coding/neteq/merge.h
index 95dea5a885ad6ab7df148085a21401dbdc154d9b..a168502c271361dc239f577d275a2f393bc30d62 100644
--- a/webrtc/modules/audio_coding/neteq/merge.h
+++ b/webrtc/modules/audio_coding/neteq/merge.h
@@ -69,10 +69,11 @@
// of samples that were taken from the |sync_buffer_|.
size_t GetExpandedSignal(size_t* old_length, size_t* expand_period);
- // Analyzes |input| and |expanded_signal| and returns muting factor (Q14) to
- // be used on the new data.
+ // Analyzes |input| and |expanded_signal| to find maximum values. Returns
+ // a muting factor (Q14) to be used on the new data.
int16_t SignalScaling(const int16_t* input, size_t input_length,
- const int16_t* expanded_signal) const;
+ const int16_t* expanded_signal,
+ int16_t* expanded_max, int16_t* input_max) const;
// Downsamples |input| (|input_length| samples) and |expanded_signal| to
// 4 kHz sample rate. The downsampled signals are written to
@@ -83,7 +84,8 @@
// Calculates cross-correlation between |input_downsampled_| and
// |expanded_downsampled_|, and finds the correlation maximum. The maximizing
// lag is returned.
- size_t CorrelateAndPeakSearch(size_t start_position, size_t input_length,
+ size_t CorrelateAndPeakSearch(int16_t expanded_max, int16_t input_max,
+ size_t start_position, size_t input_length,
size_t expand_period) const;
const int fs_mult_; // fs_hz_ / 8000.
« no previous file with comments | « webrtc/modules/audio_coding/neteq/expand.cc ('k') | webrtc/modules/audio_coding/neteq/merge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698