Remove legacy weirdness in Merge::Downsample

In practice, this will have only marginal effect. The length_limit
was increased from 6.7 ms to 10 ms. This is compared with the
input_length, which is equal to the decoded frame size. Thus,
this change will only affect encoded frame sizes in this range
(including 10 ms).

BUG=2696
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9969004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5700 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2014-03-14 12:28:39 +00:00
parent f45a55083f
commit 367000fa8d

View File

@ -248,7 +248,7 @@ void Merge::Downsample(const int16_t* input, int input_length,
int num_coefficients;
int decimation_factor = fs_hz_ / 4000;
static const int kCompensateDelay = 0;
int length_limit = fs_hz_ / 100;
int length_limit = fs_hz_ / 100; // 10 ms in samples.
if (fs_hz_ == 8000) {
filter_coefficients = DspHelper::kDownsample8kHzTbl;
num_coefficients = 3;
@ -261,8 +261,6 @@ void Merge::Downsample(const int16_t* input, int input_length,
} else { // fs_hz_ == 48000
filter_coefficients = DspHelper::kDownsample48kHzTbl;
num_coefficients = 7;
// TODO(hlundin) Why is |length_limit| not 480 (legacy)?
length_limit = 320;
}
int signal_offset = num_coefficients - 1;
WebRtcSpl_DownsampleFast(&expanded_signal[signal_offset],