From 06b869f11a36c5abfb5e49a81ce7f88b2aa905d4 Mon Sep 17 00:00:00 2001 From: "henrik.lundin" Date: Wed, 14 Oct 2015 03:44:52 -0700 Subject: [PATCH] Delete iSAC-fb from NetEq This is no longer used. Related code in the iSAC codec itself will be deleted a follow-up CL. BUG=4210 Review URL: https://codereview.webrtc.org/1404463003 Cr-Commit-Position: refs/heads/master@{#10272} --- .../audio_coding/neteq/audio_decoder_impl.cc | 3 -- .../audio_coding/neteq/audio_decoder_impl.h | 1 - .../neteq/audio_decoder_unittest.cc | 2 -- .../audio_coding/neteq/neteq_unittest.cc | 2 -- .../audio_coding/neteq/timestamp_scaler.cc | 1 - .../neteq/timestamp_scaler_unittest.cc | 28 ------------------- 6 files changed, 37 deletions(-) diff --git a/webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc b/webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc index afad9b1d6b..de4f470234 100644 --- a/webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc +++ b/webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc @@ -87,7 +87,6 @@ bool CodecSupported(NetEqDecoder codec_type) { #endif #ifdef WEBRTC_CODEC_ISAC case kDecoderISACswb: - case kDecoderISACfb: #endif case kDecoderPCM16B: case kDecoderPCM16Bwb: @@ -150,7 +149,6 @@ int CodecSampleRateHz(NetEqDecoder codec_type) { } #ifdef WEBRTC_CODEC_ISAC case kDecoderISACswb: - case kDecoderISACfb: #endif case kDecoderPCM16Bswb32kHz: case kDecoderPCM16Bswb32kHz_2ch: @@ -200,7 +198,6 @@ AudioDecoder* CreateAudioDecoder(NetEqDecoder codec_type) { #elif defined(WEBRTC_CODEC_ISAC) case kDecoderISAC: case kDecoderISACswb: - case kDecoderISACfb: return new AudioDecoderIsac(); #endif case kDecoderPCM16B: diff --git a/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h b/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h index 48ef50259f..6214787941 100644 --- a/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h +++ b/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h @@ -64,7 +64,6 @@ enum NetEqDecoder { kDecoderILBC, kDecoderISAC, kDecoderISACswb, - kDecoderISACfb, kDecoderPCM16B, kDecoderPCM16Bwb, kDecoderPCM16Bswb32kHz, diff --git a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc index 0eafd7dd52..8ee860c35c 100644 --- a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc +++ b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc @@ -687,7 +687,6 @@ TEST(AudioDecoder, CodecSampleRateHz) { EXPECT_EQ(has_ilbc ? 8000 : -1, CodecSampleRateHz(kDecoderILBC)); EXPECT_EQ(has_isac ? 16000 : -1, CodecSampleRateHz(kDecoderISAC)); EXPECT_EQ(has_isac_swb ? 32000 : -1, CodecSampleRateHz(kDecoderISACswb)); - EXPECT_EQ(has_isac_swb ? 32000 : -1, CodecSampleRateHz(kDecoderISACfb)); EXPECT_EQ(8000, CodecSampleRateHz(kDecoderPCM16B)); EXPECT_EQ(16000, CodecSampleRateHz(kDecoderPCM16Bwb)); EXPECT_EQ(32000, CodecSampleRateHz(kDecoderPCM16Bswb32kHz)); @@ -719,7 +718,6 @@ TEST(AudioDecoder, CodecSupported) { EXPECT_EQ(has_ilbc, CodecSupported(kDecoderILBC)); EXPECT_EQ(has_isac, CodecSupported(kDecoderISAC)); EXPECT_EQ(has_isac_swb, CodecSupported(kDecoderISACswb)); - EXPECT_EQ(has_isac_swb, CodecSupported(kDecoderISACfb)); EXPECT_TRUE(CodecSupported(kDecoderPCM16B)); EXPECT_TRUE(CodecSupported(kDecoderPCM16Bwb)); EXPECT_TRUE(CodecSupported(kDecoderPCM16Bswb32kHz)); diff --git a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc index 6dfcac0d3a..9aec87fef6 100644 --- a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc +++ b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc @@ -318,8 +318,6 @@ void NetEqDecodingTest::LoadDecoders() { #ifdef WEBRTC_CODEC_ISAC // Load iSAC SWB. ASSERT_EQ(0, neteq_->RegisterPayloadType(kDecoderISACswb, 104)); - // Load iSAC FB. - ASSERT_EQ(0, neteq_->RegisterPayloadType(kDecoderISACfb, 105)); #endif // Load PCM16B nb. ASSERT_EQ(0, neteq_->RegisterPayloadType(kDecoderPCM16B, 93)); diff --git a/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc b/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc index 8bc0f2d0fc..950c09cdd9 100644 --- a/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc +++ b/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc @@ -52,7 +52,6 @@ uint32_t TimestampScaler::ToInternal(uint32_t external_timestamp, denominator_ = 1; break; } - case kDecoderISACfb: case kDecoderCNGswb48kHz: { // Use timestamp scaling with factor 2/3 (32 kHz sample rate, but RTP // timestamps run on 48 kHz). diff --git a/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc b/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc index 4b6d940aeb..aed8a4675b 100644 --- a/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc +++ b/webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc @@ -283,34 +283,6 @@ TEST(TimestampScaler, TestOpusLargeStep) { EXPECT_CALL(db, Die()); // Called when database object is deleted. } -TEST(TimestampScaler, TestIsacFbLargeStep) { - MockDecoderDatabase db; - DecoderDatabase::DecoderInfo info; - info.codec_type = kDecoderISACfb; - static const uint8_t kRtpPayloadType = 17; - EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) - .WillRepeatedly(Return(&info)); - - TimestampScaler scaler(db); - // Test both sides of the timestamp wrap-around. - static const uint32_t kStep = 960; - uint32_t external_timestamp = 0; - // |external_timestamp| will be a large positive value. - external_timestamp = external_timestamp - 5 * kStep; - uint32_t internal_timestamp = external_timestamp; - for (; external_timestamp != 5 * kStep; external_timestamp += kStep) { - // Scale to internal timestamp. - EXPECT_EQ(internal_timestamp, - 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 += 2 * kStep / 3; - } - - EXPECT_CALL(db, Die()); // Called when database object is deleted. -} - TEST(TimestampScaler, Failures) { static const uint8_t kRtpPayloadType = 17; MockDecoderDatabase db;