Less strict audio codec tests to accomodate opus switch to SSE.
Expected checksums depend on whether libopus is built with SSE or not. Since we have no robust way to know that and we cannot enforce all clients to use SSE, we accept both results. Bug: webrtc:9530 Bug: webrtc:9995 Change-Id: I9f0464ffec15df91eafe15d89c61e2140f341cb1 Reviewed-on: https://webrtc-review.googlesource.com/c/110789 Commit-Queue: Yves Gerey <yvesg@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25633}
This commit is contained in:
@ -234,7 +234,14 @@ void ResultSink::VerifyChecksum(const std::string& checksum) {
|
||||
buffer.resize(digest_->Size());
|
||||
digest_->Finish(&buffer[0], buffer.size());
|
||||
const std::string result = rtc::hex_encode(&buffer[0], digest_->Size());
|
||||
EXPECT_EQ(checksum, result);
|
||||
if (checksum.size() == result.size()) {
|
||||
EXPECT_EQ(checksum, result);
|
||||
} else {
|
||||
// Check result is one the '|'-separated checksums.
|
||||
EXPECT_NE(checksum.find(result), std::string::npos)
|
||||
<< result << " should be one of these:\n"
|
||||
<< checksum;
|
||||
}
|
||||
}
|
||||
|
||||
class NetEqDecodingTest : public ::testing::Test {
|
||||
@ -501,12 +508,13 @@ TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) {
|
||||
const std::string input_rtp_file =
|
||||
webrtc::test::ResourcePath("audio_coding/neteq_opus", "rtp");
|
||||
|
||||
const std::string output_checksum =
|
||||
PlatformChecksum("14a63b3c7b925c82296be4bafc71bec85f2915c2",
|
||||
"b7b7ed802b0e18ee416973bf3b9ae98599b0181d",
|
||||
"5876e52dda90d5ca433c3726555b907b97c86374",
|
||||
"14a63b3c7b925c82296be4bafc71bec85f2915c2",
|
||||
"14a63b3c7b925c82296be4bafc71bec85f2915c2");
|
||||
// Checksum depends on libopus being compiled with or without SSE.
|
||||
const std::string maybe_sse =
|
||||
"14a63b3c7b925c82296be4bafc71bec85f2915c2|"
|
||||
"2c05677daa968d6c68b92adf4affb7cd9bb4d363";
|
||||
const std::string output_checksum = PlatformChecksum(
|
||||
maybe_sse, "b7b7ed802b0e18ee416973bf3b9ae98599b0181d",
|
||||
"5876e52dda90d5ca433c3726555b907b97c86374", maybe_sse, maybe_sse);
|
||||
|
||||
const std::string network_stats_checksum =
|
||||
PlatformChecksum("adb3272498e436d1c019cbfd71610e9510c54497",
|
||||
@ -536,12 +544,12 @@ TEST_F(NetEqDecodingTest, MAYBE_TestOpusDtxBitExactness) {
|
||||
const std::string input_rtp_file =
|
||||
webrtc::test::ResourcePath("audio_coding/neteq_opus_dtx", "rtp");
|
||||
|
||||
const std::string output_checksum =
|
||||
PlatformChecksum("713af6c92881f5aab1285765ee6680da9d1c06ce",
|
||||
"3ec991b96872123f1554c03c543ca5d518431e46",
|
||||
"da9f9a2d94e0c2d67342fad4965d7b91cda50b25",
|
||||
"713af6c92881f5aab1285765ee6680da9d1c06ce",
|
||||
"713af6c92881f5aab1285765ee6680da9d1c06ce");
|
||||
const std::string maybe_sse =
|
||||
"713af6c92881f5aab1285765ee6680da9d1c06ce|"
|
||||
"2ac10c4e79aeedd0df2863b079da5848b40f00b5";
|
||||
const std::string output_checksum = PlatformChecksum(
|
||||
maybe_sse, "3ec991b96872123f1554c03c543ca5d518431e46",
|
||||
"da9f9a2d94e0c2d67342fad4965d7b91cda50b25", maybe_sse, maybe_sse);
|
||||
|
||||
const std::string network_stats_checksum =
|
||||
"bab58dc587d956f326056d7340c96eb9d2d3cc21";
|
||||
|
||||
Reference in New Issue
Block a user