Revert 6458 "Since NetEq4 is ready to handle 48 kHz codec, it is..."

> Since NetEq4 is ready to handle 48 kHz codec, it is good to remove the 48-to-32kHz downsampling of Opus output. This facilitates webrtc to make full use of Opus's bandwidth and eliminates unneeded computation in resampling.
> 
> TEST=passed_all_trybots
> R=henrik.lundin@webrtc.org, tina.legrand@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/16619005

TBR=minyue@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6462 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
minyue@webrtc.org
2014-06-17 09:50:12 +00:00
parent 851a09e71a
commit d42da54768
12 changed files with 433 additions and 249 deletions

View File

@ -218,8 +218,6 @@ void OpusTest::Run(TestPackStereo* channel, int channels, int bitrate,
int written_samples = 0;
int read_samples = 0;
int decoded_samples = 0;
bool first_packet = true;
uint32_t start_time_stamp = 0;
channel->reset_payload_size();
counter_ = 0;
@ -326,10 +324,6 @@ void OpusTest::Run(TestPackStereo* channel, int channels, int bitrate,
// Send data to the channel. "channel" will handle the loss simulation.
channel->SendData(kAudioFrameSpeech, payload_type_, rtp_timestamp_,
bitstream, bitstream_len_byte, NULL);
if (first_packet) {
first_packet = false;
start_time_stamp = rtp_timestamp_;
}
rtp_timestamp_ += frame_length;
read_samples += frame_length * channels;
}
@ -350,11 +344,9 @@ void OpusTest::Run(TestPackStereo* channel, int channels, int bitrate,
// Write stand-alone speech to file.
out_file_standalone_.Write10MsData(out_audio, decoded_samples * channels);
if (audio_frame.timestamp_ > start_time_stamp) {
// Number of channels should be the same for both stand-alone and
// ACM-decoding.
EXPECT_EQ(audio_frame.num_channels_, channels);
}
// Number of channels should be the same for both stand-alone and
// ACM-decoding.
EXPECT_EQ(audio_frame.num_channels_, channels);
decoded_samples = 0;
}
@ -375,13 +367,13 @@ void OpusTest::OpenOutFile(int test_number) {
file_stream << webrtc::test::OutputPath() << "opustest_out_"
<< test_number << ".pcm";
file_name = file_stream.str();
out_file_.Open(file_name, 48000, "wb");
out_file_.Open(file_name, 32000, "wb");
file_stream.str("");
file_name = file_stream.str();
file_stream << webrtc::test::OutputPath() << "opusstandalone_out_"
<< test_number << ".pcm";
file_name = file_stream.str();
out_file_standalone_.Open(file_name, 48000, "wb");
out_file_standalone_.Open(file_name, 32000, "wb");
}
} // namespace webrtc