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:
henrik.lundin@webrtc.org
2013-09-30 20:38:44 +00:00
parent 6ad6a07fd3
commit fd11bbfb56
31 changed files with 145 additions and 170 deletions

View File

@@ -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_);