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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6458 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
minyue@webrtc.org
2014-06-17 08:02:05 +00:00
parent 44a317a698
commit 8f8503d947
12 changed files with 249 additions and 433 deletions

View File

@ -252,10 +252,14 @@ 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; // Uses a factor 2/3 scaling.
info.codec_type = kDecoderOpus;
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
.WillRepeatedly(Return(&info));
@ -273,8 +277,7 @@ TEST(TimestampScaler, TestOpusLargeStep) {
scaler.ToInternal(external_timestamp, kRtpPayloadType));
// Scale back.
EXPECT_EQ(external_timestamp, scaler.ToExternal(internal_timestamp));
// Internal timestamp should be incremented with twice the step.
internal_timestamp += 2 * kStep / 3;
internal_timestamp += kStep;
}
EXPECT_CALL(db, Die()); // Called when database object is deleted.
@ -283,7 +286,7 @@ TEST(TimestampScaler, TestOpusLargeStep) {
TEST(TimestampScaler, TestIsacFbLargeStep) {
MockDecoderDatabase db;
DecoderDatabase::DecoderInfo info;
info.codec_type = kDecoderISACfb; // Uses a factor 2/3 scaling.
info.codec_type = kDecoderISACfb;
static const uint8_t kRtpPayloadType = 17;
EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
.WillRepeatedly(Return(&info));
@ -301,7 +304,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 twice the step.
// Internal timestamp should be incremented with two-thirds the step.
internal_timestamp += 2 * kStep / 3;
}