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

@ -252,14 +252,10 @@ TEST(TimestampScaler, TestG722Reset) {
EXPECT_CALL(db, Die()); // Called when database object is deleted.
}
// TODO(minyue): This test becomes trivial since Opus does not need a timestamp
// scaler. Therefore, this test may be removed in future. There is no harm to
// keep it, since it can be taken as a test case for the situation of a trivial
// timestamp scaler.
TEST(TimestampScaler, TestOpusLargeStep) {
MockDecoderDatabase db;
DecoderDatabase::DecoderInfo info;
info.codec_type = kDecoderOpus;
info.codec_type = kDecoderOpus; // Uses a factor 2/3 scaling.
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
.WillRepeatedly(Return(&info));
@ -277,7 +273,8 @@ TEST(TimestampScaler, TestOpusLargeStep) {
scaler.ToInternal(external_timestamp, kRtpPayloadType));
// Scale back.
EXPECT_EQ(external_timestamp, scaler.ToExternal(internal_timestamp));
internal_timestamp += kStep;
// Internal timestamp should be incremented with twice the step.
internal_timestamp += 2 * kStep / 3;
}
EXPECT_CALL(db, Die()); // Called when database object is deleted.
@ -286,7 +283,7 @@ TEST(TimestampScaler, TestOpusLargeStep) {
TEST(TimestampScaler, TestIsacFbLargeStep) {
MockDecoderDatabase db;
DecoderDatabase::DecoderInfo info;
info.codec_type = kDecoderISACfb;
info.codec_type = kDecoderISACfb; // Uses a factor 2/3 scaling.
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
.WillRepeatedly(Return(&info));
@ -304,7 +301,7 @@ TEST(TimestampScaler, TestIsacFbLargeStep) {
scaler.ToInternal(external_timestamp, kRtpPayloadType));
// Scale back.
EXPECT_EQ(external_timestamp, scaler.ToExternal(internal_timestamp));
// Internal timestamp should be incremented with two-thirds the step.
// Internal timestamp should be incremented with twice the step.
internal_timestamp += 2 * kStep / 3;
}