NetEq4: Removing templatization for AudioMultiVector
This saves approx 6% runtime for neteq4_speed_test. $ time out/Release/neteq4_speed_test --runtime_ms=50000000 BUG=1363 R=minyue@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2320006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4885 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -20,7 +20,7 @@ PreemptiveExpand::ReturnCodes PreemptiveExpand::Process(
|
||||
const int16_t* input,
|
||||
int input_length,
|
||||
int old_data_length,
|
||||
AudioMultiVector<int16_t>* output,
|
||||
AudioMultiVector* output,
|
||||
int16_t* length_change_samples) {
|
||||
old_data_length_per_channel_ = old_data_length;
|
||||
// Input length must be (almost) 30 ms.
|
||||
@@ -56,7 +56,7 @@ void PreemptiveExpand::SetParametersForPassiveSpeech(size_t len,
|
||||
PreemptiveExpand::ReturnCodes PreemptiveExpand::CheckCriteriaAndStretch(
|
||||
const int16_t *input, size_t input_length, size_t peak_index,
|
||||
int16_t best_correlation, bool active_speech,
|
||||
AudioMultiVector<int16_t>* output) const {
|
||||
AudioMultiVector* output) const {
|
||||
// Pre-calculate common multiplication with |fs_mult_|.
|
||||
// 120 corresponds to 15 ms.
|
||||
int fs_mult_120 = fs_mult_ * 120;
|
||||
@@ -75,7 +75,7 @@ PreemptiveExpand::ReturnCodes PreemptiveExpand::CheckCriteriaAndStretch(
|
||||
output->PushBackInterleaved(
|
||||
input, (unmodified_length + peak_index) * num_channels_);
|
||||
// Copy the last |peak_index| samples up to 15 ms to |temp_vector|.
|
||||
AudioMultiVector<int16_t> temp_vector(num_channels_);
|
||||
AudioMultiVector temp_vector(num_channels_);
|
||||
temp_vector.PushBackInterleaved(
|
||||
&input[(unmodified_length - peak_index) * num_channels_],
|
||||
peak_index * num_channels_);
|
||||
|
||||
Reference in New Issue
Block a user