Update Opus tests for Opus 1.3
This updates various bitexactness tests and other tests that no longer pass. Bug: webrtc:11325 Change-Id: Ifa3e4b42e303f5573e028dfdf8a108a76f6318ae Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168952 Commit-Queue: Ivo Creusen <ivoc@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30688}
This commit is contained in:
@ -1433,37 +1433,35 @@ TEST_F(AcmSenderBitExactnessOldApi, MAYBE_G722_stereo_20ms) {
|
||||
namespace {
|
||||
// Checksum depends on libopus being compiled with or without SSE.
|
||||
const std::string audio_maybe_sse =
|
||||
"3e285b74510e62062fbd8142dacd16e9|"
|
||||
"fd5d57d6d766908e6a7211e2a5c7f78a";
|
||||
"e0ddf36854059151cdb7a0c4af3d282a"
|
||||
"|32574e78db4eab0c467d3c0785e3b484";
|
||||
const std::string payload_maybe_sse =
|
||||
"78cf8f03157358acdc69f6835caa0d9b|"
|
||||
"b693bd95c2ee2354f92340dd09e9da68";
|
||||
"b43bdf7638b2bc2a5a6f30bdc640b9ed"
|
||||
"|c30d463e7ed10bdd1da9045f80561f27";
|
||||
// Common checksums.
|
||||
const std::string audio_checksum =
|
||||
AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
||||
audio_maybe_sse,
|
||||
audio_maybe_sse,
|
||||
"439e97ad1932c49923b5da029c17dd5e",
|
||||
"038ec90f5f3fc2320f3090f8ecef6bb7",
|
||||
"038ec90f5f3fc2320f3090f8ecef6bb7");
|
||||
"6fcceb83acf427730570bc13eeac920c",
|
||||
"fd96f15d547c4e155daeeef4253b174e",
|
||||
"fd96f15d547c4e155daeeef4253b174e");
|
||||
const std::string payload_checksum =
|
||||
AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
||||
payload_maybe_sse,
|
||||
payload_maybe_sse,
|
||||
"ab88b1a049c36bdfeb7e8b057ef6982a",
|
||||
"27fef7b799393347ec3b5694369a1c36",
|
||||
"27fef7b799393347ec3b5694369a1c36");
|
||||
"4bd846d0aa5656ecd5dfd85701a1b78c",
|
||||
"7efbfc9f8e3b4b2933ae2d01ab919028",
|
||||
"7efbfc9f8e3b4b2933ae2d01ab919028");
|
||||
} // namespace
|
||||
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_F(AcmSenderBitExactnessOldApi, DISABLED_Opus_stereo_20ms) {
|
||||
TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
|
||||
ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
|
||||
Run(audio_checksum, payload_checksum, 50,
|
||||
test::AcmReceiveTestOldApi::kStereoOutput);
|
||||
}
|
||||
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_F(AcmSenderBitExactnessNewApi, DISABLED_OpusFromFormat_stereo_20ms) {
|
||||
TEST_F(AcmSenderBitExactnessNewApi, MAYBE_OpusFromFormat_stereo_20ms) {
|
||||
const auto config = AudioEncoderOpus::SdpToConfig(
|
||||
SdpAudioFormat("opus", 48000, 2, {{"stereo", "1"}}));
|
||||
ASSERT_TRUE(SetUpSender(kTestFileFakeStereo32kHz, 32000));
|
||||
@ -1520,8 +1518,7 @@ TEST_F(AcmSenderBitExactnessNewApi, DISABLED_OpusManyChannels) {
|
||||
50, test::AcmReceiveTestOldApi::kQuadOutput, decoder_factory);
|
||||
}
|
||||
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_F(AcmSenderBitExactnessNewApi, DISABLED_OpusFromFormat_stereo_20ms_voip) {
|
||||
TEST_F(AcmSenderBitExactnessNewApi, OpusFromFormat_stereo_20ms_voip) {
|
||||
auto config = AudioEncoderOpus::SdpToConfig(
|
||||
SdpAudioFormat("opus", 48000, 2, {{"stereo", "1"}}));
|
||||
// If not set, default will be kAudio in case of stereo.
|
||||
@ -1529,22 +1526,21 @@ TEST_F(AcmSenderBitExactnessNewApi, DISABLED_OpusFromFormat_stereo_20ms_voip) {
|
||||
ASSERT_TRUE(SetUpSender(kTestFileFakeStereo32kHz, 32000));
|
||||
ASSERT_NO_FATAL_FAILURE(SetUpTestExternalEncoder(
|
||||
AudioEncoderOpus::MakeAudioEncoder(*config, 120), 120));
|
||||
// Checksum depends on libopus being compiled with or without SSE.
|
||||
const std::string audio_maybe_sse =
|
||||
"b0325df4e8104f04e03af23c0b75800e|"
|
||||
"3cd4e1bc2acd9440bb9e97af34080ffc";
|
||||
"2d7e5797444f75e5bfeaffbd8c25176b"
|
||||
"|408d4bdc05a8c23e46c6ac06c5b917ee";
|
||||
const std::string payload_maybe_sse =
|
||||
"4eab2259b6fe24c22dd242a113e0b3d9|"
|
||||
"4fc0af0aa06c26454af09832d3ec1b4e";
|
||||
"b38b5584cfa7b6999b2e8e996c950c88"
|
||||
"|eb0752ce1b6f2436fefc2e19bd084fb5";
|
||||
Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
||||
audio_maybe_sse, audio_maybe_sse, "1c81121f5d9286a5a865d01dbab22ce8",
|
||||
"11d547f89142e9ef03f37d7ca7f32379",
|
||||
"11d547f89142e9ef03f37d7ca7f32379"),
|
||||
audio_maybe_sse, audio_maybe_sse, "f1cefe107ffdced7694d7f735342adf3",
|
||||
"3b1bfe5dd8ed16ee5b04b93a5b5e7e48",
|
||||
"3b1bfe5dd8ed16ee5b04b93a5b5e7e48"),
|
||||
AcmReceiverBitExactnessOldApi::PlatformChecksum(
|
||||
payload_maybe_sse, payload_maybe_sse,
|
||||
"839ea60399447268ee0f0262a50b75fd",
|
||||
"1815fd5589cad0c6f6cf946c76b81aeb",
|
||||
"1815fd5589cad0c6f6cf946c76b81aeb"),
|
||||
"5e79a2f51c633fe145b6c10ae198d1aa",
|
||||
"e730050cb304d54d853fd285ab0424fa",
|
||||
"e730050cb304d54d853fd285ab0424fa"),
|
||||
50, test::AcmReceiveTestOldApi::kStereoOutput);
|
||||
}
|
||||
|
||||
@ -1621,18 +1617,16 @@ class AcmSetBitRateNewApi : public AcmSetBitRateTest {
|
||||
}
|
||||
};
|
||||
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_F(AcmSetBitRateNewApi, DISABLED_OpusFromFormat_48khz_20ms_10kbps) {
|
||||
TEST_F(AcmSetBitRateNewApi, OpusFromFormat_48khz_20ms_10kbps) {
|
||||
const auto config = AudioEncoderOpus::SdpToConfig(
|
||||
SdpAudioFormat("opus", 48000, 2, {{"maxaveragebitrate", "10000"}}));
|
||||
ASSERT_TRUE(SetUpSender());
|
||||
RegisterExternalSendCodec(AudioEncoderOpus::MakeAudioEncoder(*config, 107),
|
||||
107);
|
||||
RunInner(8000, 12000);
|
||||
RunInner(7000, 12000);
|
||||
}
|
||||
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_F(AcmSetBitRateNewApi, DISABLED_OpusFromFormat_48khz_20ms_50kbps) {
|
||||
TEST_F(AcmSetBitRateNewApi, OpusFromFormat_48khz_20ms_50kbps) {
|
||||
const auto config = AudioEncoderOpus::SdpToConfig(
|
||||
SdpAudioFormat("opus", 48000, 2, {{"maxaveragebitrate", "50000"}}));
|
||||
ASSERT_TRUE(SetUpSender());
|
||||
@ -1740,8 +1734,7 @@ TEST_F(AudioCodingModuleTestOldApi, SendingMonoForStereoInput) {
|
||||
#define MAYBE_OpusFromFormat_48khz_20ms_100kbps \
|
||||
OpusFromFormat_48khz_20ms_100kbps
|
||||
#endif
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_F(AcmSetBitRateNewApi, DISABLED_OpusFromFormat_48khz_20ms_100kbps) {
|
||||
TEST_F(AcmSetBitRateNewApi, MAYBE_OpusFromFormat_48khz_20ms_100kbps) {
|
||||
const auto config = AudioEncoderOpus::SdpToConfig(
|
||||
SdpAudioFormat("opus", 48000, 2, {{"maxaveragebitrate", "100000"}}));
|
||||
ASSERT_TRUE(SetUpSender());
|
||||
|
@ -912,8 +912,7 @@ TEST(AudioEncoderOpusTest, SetMaxPlaybackRateFb) {
|
||||
EXPECT_EQ(64000, config.bitrate_bps);
|
||||
}
|
||||
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_P(AudioEncoderOpusTest, DISABLED_OpusFlagDtxAsNonSpeech) {
|
||||
TEST_P(AudioEncoderOpusTest, OpusFlagDtxAsNonSpeech) {
|
||||
// Create encoder with DTX enabled.
|
||||
AudioEncoderOpusConfig config;
|
||||
config.dtx_enabled = true;
|
||||
@ -970,8 +969,8 @@ TEST_P(AudioEncoderOpusTest, DISABLED_OpusFlagDtxAsNonSpeech) {
|
||||
}
|
||||
}
|
||||
|
||||
// Maximum number of consecutive non-speech packets should exceed 20.
|
||||
EXPECT_GT(max_nonspeech_frames, 20);
|
||||
// Maximum number of consecutive non-speech packets should exceed 15.
|
||||
EXPECT_GT(max_nonspeech_frames, 15);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -101,13 +101,13 @@ float EncodedPowerRatio(AudioEncoder* encoder,
|
||||
|
||||
} // namespace
|
||||
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST(BandwidthAdaptationTest, DISABLED_BandwidthAdaptationTest) {
|
||||
// TODO(ivoc): Remove this test, WebRTC-AdjustOpusBandwidth is obsolete.
|
||||
TEST(BandwidthAdaptationTest, BandwidthAdaptationTest) {
|
||||
test::ScopedFieldTrials override_field_trials(
|
||||
"WebRTC-AdjustOpusBandwidth/Enabled/");
|
||||
|
||||
constexpr float kMaxNarrowbandRatio = 0.0035f;
|
||||
constexpr float kMinWidebandRatio = 0.03f;
|
||||
constexpr float kMinWidebandRatio = 0.01f;
|
||||
|
||||
// Create encoder.
|
||||
AudioEncoderOpusConfig enc_config;
|
||||
|
@ -599,10 +599,9 @@ TEST_F(AudioDecoderG722StereoTest, SetTargetBitrate) {
|
||||
TestSetAndGetTargetBitratesWithFixedCodec(audio_encoder_.get(), 128000);
|
||||
}
|
||||
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_P(AudioDecoderOpusTest, DISABLED_EncodeDecode) {
|
||||
TEST_P(AudioDecoderOpusTest, EncodeDecode) {
|
||||
constexpr int tolerance = 6176;
|
||||
const int channel_diff_tolerance = opus_sample_rate_hz_ == 16000 ? 6 : 0;
|
||||
constexpr int channel_diff_tolerance = 6;
|
||||
constexpr double mse = 238630.0;
|
||||
constexpr int delay = 22; // Delay from input to output.
|
||||
EncodeDecodeTest(0, tolerance, mse, delay, channel_diff_tolerance);
|
||||
|
@ -105,25 +105,23 @@ TEST_F(NetEqDecodingTest, MAYBE_TestBitExactness) {
|
||||
#else
|
||||
#define MAYBE_TestOpusBitExactness DISABLED_TestOpusBitExactness
|
||||
#endif
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_F(NetEqDecodingTest, DISABLED_TestOpusBitExactness) {
|
||||
TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) {
|
||||
const std::string input_rtp_file =
|
||||
webrtc::test::ResourcePath("audio_coding/neteq_opus", "rtp");
|
||||
|
||||
// Checksum depends on libopus being compiled with or without SSE.
|
||||
const std::string maybe_sse =
|
||||
"6b602683ca7285a98118b4824d72f4257952c18f|"
|
||||
"eb0b68bddcac00fc85403df64f83126f8ea9bc93";
|
||||
"554ad4133934e3920f97575579a46f674683d77c"
|
||||
"|de316e2bfb15192edb820fe5fb579d11ff5a524b";
|
||||
const std::string output_checksum = PlatformChecksum(
|
||||
maybe_sse, "f95f2a220c9ca5d60b81c4653d46e0de2bee159f",
|
||||
"6f288a03d34958f62496f18fa85655593eef4dbe", maybe_sse, maybe_sse);
|
||||
maybe_sse, "459c356a0ef245ddff381f7d82d205d426ef2002",
|
||||
"625055e5eb0e6de2c9d170b4494eadc5afab08c8", maybe_sse, maybe_sse);
|
||||
|
||||
const std::string network_stats_checksum =
|
||||
PlatformChecksum("87d2d3e5ca7f1b3fb7a501ffaa51ae29aea74544",
|
||||
"6b8c29e39c82f5479f59726744d0cf3e88e725d3",
|
||||
PlatformChecksum("439a3d0c9b5115e6d4f8387f64ed2d57cae29b0a",
|
||||
"048f33d85d0a32a328b7da42448f560456a5fef0",
|
||||
"c876f2a04c4f0a91da7f084f80e87871b7c5a4a1",
|
||||
"87d2d3e5ca7f1b3fb7a501ffaa51ae29aea74544",
|
||||
"87d2d3e5ca7f1b3fb7a501ffaa51ae29aea74544");
|
||||
"439a3d0c9b5115e6d4f8387f64ed2d57cae29b0a",
|
||||
"439a3d0c9b5115e6d4f8387f64ed2d57cae29b0a");
|
||||
|
||||
DecodeAndCompare(input_rtp_file, output_checksum, network_stats_checksum,
|
||||
absl::GetFlag(FLAGS_gen_ref));
|
||||
@ -135,17 +133,16 @@ TEST_F(NetEqDecodingTest, DISABLED_TestOpusBitExactness) {
|
||||
#else
|
||||
#define MAYBE_TestOpusDtxBitExactness DISABLED_TestOpusDtxBitExactness
|
||||
#endif
|
||||
// TODO(webrtc:11325) Reenable after Opus has been upgraded to 1.3.
|
||||
TEST_F(NetEqDecodingTest, DISABLED_TestOpusDtxBitExactness) {
|
||||
TEST_F(NetEqDecodingTest, MAYBE_TestOpusDtxBitExactness) {
|
||||
const std::string input_rtp_file =
|
||||
webrtc::test::ResourcePath("audio_coding/neteq_opus_dtx", "rtp");
|
||||
|
||||
const std::string maybe_sse =
|
||||
"0bdeb4ccf95a2577e38274360903ad099fc46787|"
|
||||
"f7bbf5d92a0595a2a3445ffbaddfb20e98b6e94e";
|
||||
"df5d1d3019bf3764829b84f4fb315721f4adde29"
|
||||
"|5935d2fad14a69a8b61dbc8e6f2d37c8c0814925";
|
||||
const std::string output_checksum = PlatformChecksum(
|
||||
maybe_sse, "6d200cc51a001b6137abf67db2bb8eeb0375cdee",
|
||||
"36d43761de86b12520cf2e63f97372a2b7c6f939", maybe_sse, maybe_sse);
|
||||
maybe_sse, "551df04e8f45cd99eff28503edf0cf92974898ac",
|
||||
"709a3f0f380393d3a67bace10e2265b90a6ebbeb", maybe_sse, maybe_sse);
|
||||
|
||||
const std::string network_stats_checksum =
|
||||
"8caf49765f35b6862066d3f17531ce44d8e25f60";
|
||||
|
Reference in New Issue
Block a user