Revert "Default enable delay adaptation during DTX."

This reverts commit 59bdcbe3c9.

Reason for revert: Breaks downstream test.

Original change's description:
> Default enable delay adaptation during DTX.
>
> Bug: webrtc:10736
> Change-Id: I5dcc431211c6c1c89b4d7d1ab07b23d63c0550d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201385
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32999}

TBR=ivoc@webrtc.org,jakobi@webrtc.org

Change-Id: Iac9eb5e1b8dd76523d841135160dbf547ae153cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10736
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202031
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33000}
This commit is contained in:
Jakob Ivarsson 2021-01-15 15:57:58 +00:00 committed by Commit Bot
parent 59bdcbe3c9
commit 79d9c373c5
4 changed files with 52 additions and 52 deletions

View file

@ -939,58 +939,58 @@ class AcmReceiverBitExactnessOldApi : public ::testing::Test {
defined(WEBRTC_CODEC_ILBC)
TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) {
std::string others_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "e0c966d7b8c36ff60167988fa35d33e0"
: "7d8f6b84abd1e57ec010a53bc2130652";
GetCPUInfo(kAVX2) != 0 ? "1d7b784031599e2c01a3f575f8439f2f"
: "c119fda4ea2c119ff2a720fd0c289071";
std::string win64_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "405a50f0bcb8827e20aa944299fc59f6"
: "0ed5830930f5527a01bbec0ba11f8541";
: "38e70d4e186f8e1a56b929fafcb7c379";
Run(8000,
PlatformChecksum(others_checksum_reference, win64_checksum_reference,
"b892ed69c38b21b16c132ec2ce03aa7b",
"3b03e41731e1cef5ae2b9f9618660b42",
"4598140b5e4f7ee66c5adad609e65a3e",
"5fec8d770778ef7969ec98c56d9eb10f"));
"da7e76687c8c0a9509cd1d57ee1aba3b"));
}
TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) {
std::string others_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "a63c578e1195c8420f453962c6d8519c"
: "6bac83762c1306b932cd25a560155681";
GetCPUInfo(kAVX2) != 0 ? "8884d910e443c244d8593c2e3cef5e63"
: "36dc8c0532ba0efa099e2b6a689cde40";
std::string win64_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "58fd62a5c49ee513f9fa6fe7dbf62c97"
: "0509cf0672f543efb4b050e8cffefb1d";
: "07e4b388168e273fa19da0a167aff782";
Run(16000,
PlatformChecksum(others_checksum_reference, win64_checksum_reference,
"3cea9abbeabbdea9a79719941b241af5",
"06b08d14a72f6e7c72840b1cc9ad204d",
"f2aad418af974a3b1694d5ae5cc2c3c7",
"9d4b92c31c00e321a4cff29ad002d6a2"));
"1d5f9a93f3975e7e491373b81eb5fd14"));
}
TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) {
std::string others_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "8775ce387f44dc5ff4a26da295d5ee7c"
: "e319222ca47733709f90fdf33c8574db";
GetCPUInfo(kAVX2) != 0 ? "73f4fe21996c0af495e2c47e3708e519"
: "c848ce9002d3825056a1eac2a067c0d3";
std::string win64_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "04ce6a1dac5ffdd8438d804623d0132f"
: "39a4a7a1c455b35baeffb9fd193d7858";
: "0e705f6844c75fd57a84734f7c30af87";
Run(32000,
PlatformChecksum(others_checksum_reference, win64_checksum_reference,
"4df55b3b62bcbf4328786d474ae87f61",
"c18e98e5701ec91bba5c026b720d1790",
"100869c8dcde51346c2073e52a272d98",
"ff58d3153d2780a3df6bc2068844cb2d"));
"e35df943bfa3ca32e86b26bf1e37ed8f"));
}
TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) {
std::string others_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "7a55700b7ca9aa60237db58b33e55606"
: "57d1d316c88279f4f3da3511665069a9";
GetCPUInfo(kAVX2) != 0 ? "884243f7e1476931e93eda5de88d1326"
: "ba0f66d538487bba377e721cfac62d1e";
std::string win64_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "f59833d9b0924f4b0704707dd3589f80"
: "74cbe7345e2b6b45c1e455a5d1e921ca";
: "6a480541fb86faa95c7563b9de08104d";
Run(48000,
PlatformChecksum(others_checksum_reference, win64_checksum_reference,
"f52bc7bf0f499c9da25932fdf176c4ec",
"30e617e4b3c9ba1979d1b2e8eba3519b",
"bd44bf97e7899186532f91235cef444d",
"364d403dae55d73cd69e6dbd6b723a4d"));
"90158462a1853b1de50873eebd68dba7"));
}
TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) {
@ -1069,16 +1069,16 @@ TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) {
rtc::scoped_refptr<rtc::RefCountedObject<ADFactory>> factory(
new rtc::RefCountedObject<ADFactory>);
std::string others_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "7a55700b7ca9aa60237db58b33e55606"
: "57d1d316c88279f4f3da3511665069a9";
GetCPUInfo(kAVX2) != 0 ? "884243f7e1476931e93eda5de88d1326"
: "ba0f66d538487bba377e721cfac62d1e";
std::string win64_checksum_reference =
GetCPUInfo(kAVX2) != 0 ? "f59833d9b0924f4b0704707dd3589f80"
: "74cbe7345e2b6b45c1e455a5d1e921ca";
: "6a480541fb86faa95c7563b9de08104d";
Run(48000,
PlatformChecksum(others_checksum_reference, win64_checksum_reference,
"f52bc7bf0f499c9da25932fdf176c4ec",
"30e617e4b3c9ba1979d1b2e8eba3519b",
"bd44bf97e7899186532f91235cef444d",
"364d403dae55d73cd69e6dbd6b723a4d"),
"90158462a1853b1de50873eebd68dba7"),
factory, [](AudioCodingModule* acm) {
acm->SetReceiveCodecs({{0, {"MockPCMu", 8000, 1}},
{103, {"ISAC", 16000, 1}},

View file

@ -50,8 +50,8 @@ DecisionLogic::DecisionLogic(
disallow_time_stretching_(!config.allow_time_stretching),
timescale_countdown_(
tick_timer_->GetNewCountdown(kMinTimescaleInterval + 1)),
estimate_dtx_delay_("estimate_dtx_delay", true),
time_stretch_cn_("time_stretch_cn", true),
estimate_dtx_delay_("estimate_dtx_delay", false),
time_stretch_cn_("time_stretch_cn", false),
target_level_window_ms_("target_level_window",
kDefaultTargetLevelWindowMs,
0,

View file

@ -987,6 +987,15 @@ TEST_F(NetEqImplTest, CodecInternalCng) {
EXPECT_TRUE(neteq_->RegisterPayloadType(kPayloadType,
SdpAudioFormat("opus", 48000, 2)));
// Insert one packet (decoder will return speech).
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));
// Insert second packet (decoder will return CNG).
payload[0] = 1;
rtp_header.sequenceNumber++;
rtp_header.timestamp += kPayloadLengthSamples;
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));
const size_t kMaxOutputSize = static_cast<size_t>(10 * kSampleRateKhz);
AudioFrame output;
AudioFrame::SpeechType expected_type[8] = {
@ -1003,20 +1012,11 @@ TEST_F(NetEqImplTest, CodecInternalCng) {
50 * kSampleRateKhz,
10 * kSampleRateKhz};
// Insert one packet (decoder will return speech).
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));
bool muted;
EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output, &muted));
absl::optional<uint32_t> last_timestamp = neteq_->GetPlayoutTimestamp();
ASSERT_TRUE(last_timestamp);
// Insert second packet (decoder will return CNG).
payload[0] = 1;
rtp_header.sequenceNumber++;
rtp_header.timestamp += kPayloadLengthSamples;
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));
// Lambda for verifying the timestamps.
auto verify_timestamp = [&last_timestamp, &expected_timestamp_increment](
absl::optional<uint32_t> ts, size_t i) {

View file

@ -84,16 +84,16 @@ TEST_F(NetEqDecodingTest, MAYBE_TestBitExactness) {
webrtc::test::ResourcePath("audio_coding/neteq_universal_new", "rtp");
const std::string output_checksum =
PlatformChecksum("6c35140ce4d75874bdd60aa1872400b05fd05ca2",
"ab451bb8301d9a92fbf4de91556b56f1ea38b4ce", "not used",
"6c35140ce4d75874bdd60aa1872400b05fd05ca2",
"64b46bb3c1165537a880ae8404afce2efba456c0");
PlatformChecksum("68ec266d2d152dfc0d938484e7936f6af4f803e3",
"1c243feb35e3e9ab37039eddf5b3c3ecfca3c60c", "not used",
"68ec266d2d152dfc0d938484e7936f6af4f803e3",
"f68c546a43bb25743297c9c0c9027e8424b8e10b");
const std::string network_stats_checksum =
PlatformChecksum("90594d85fa31d3d9584d79293bf7aa4ee55ed751",
"77b9c3640b81aff6a38d69d07dd782d39c15321d", "not used",
"90594d85fa31d3d9584d79293bf7aa4ee55ed751",
"90594d85fa31d3d9584d79293bf7aa4ee55ed751");
PlatformChecksum("2a5516cdc1c6af9f1d9d3c2f95ed292f509311c7",
"e96a7f081ebc111f49c7373d3728274057012ae9", "not used",
"2a5516cdc1c6af9f1d9d3c2f95ed292f509311c7",
"2a5516cdc1c6af9f1d9d3c2f95ed292f509311c7");
DecodeAndCompare(input_rtp_file, output_checksum, network_stats_checksum,
absl::GetFlag(FLAGS_gen_ref));
@ -110,18 +110,18 @@ TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) {
webrtc::test::ResourcePath("audio_coding/neteq_opus", "rtp");
const std::string maybe_sse =
"c7887ff60eecf460332c6c7a28c81561f9e8a40f"
"554ad4133934e3920f97575579a46f674683d77c"
"|de316e2bfb15192edb820fe5fb579d11ff5a524b";
const std::string output_checksum = PlatformChecksum(
maybe_sse, "e39283dd61a89cead3786ef8642d2637cc447296",
"53d8073eb848b70974cba9e26424f4946508fd19", maybe_sse, maybe_sse);
maybe_sse, "b3fac4ad4f6ea384aff676ee1ea816bd70415490",
"373ccd99c147cd3fcef0e7dcad6f87d0f8e5a1c0", maybe_sse, maybe_sse);
const std::string network_stats_checksum =
PlatformChecksum("c438bfa3b018f77691279eb9c63730569f54585c",
"8a474ed0992591e0c84f593824bb05979c3de157",
"9a05378dbf7e6edd56cdeb8ec45bcd6d8589623c",
"c438bfa3b018f77691279eb9c63730569f54585c",
"c438bfa3b018f77691279eb9c63730569f54585c");
PlatformChecksum("ec29e047b019a86ec06e2c40643143dc1975c69f",
"ce6f519bc1220b003944ac5d9db077665a06834e",
"abb686d3ac6fac0001ca8d45a6ca6f5aefb2f9d6",
"ec29e047b019a86ec06e2c40643143dc1975c69f",
"ec29e047b019a86ec06e2c40643143dc1975c69f");
DecodeAndCompare(input_rtp_file, output_checksum, network_stats_checksum,
absl::GetFlag(FLAGS_gen_ref));