Add a new NetEq decoding unit test for Opus with DTX
This tests NetEq with a stream encoded with Opus using it's internal DTX/CNG. Also adding a new resource file which is encoded using Opus with DTX. Bug: webrtc:8488 Change-Id: Icfba5bc5dc7f9c9d0e637a90f4df674e8ba40358 Reviewed-on: https://webrtc-review.googlesource.com/26028 Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20905}
This commit is contained in:

committed by
Commit Bot

parent
2492984441
commit
e9619f8f81
@ -121,6 +121,7 @@ if (rtc_include_tests) {
|
||||
"../resources/att-downlink.rx",
|
||||
"../resources/att-uplink.rx",
|
||||
"../resources/audio_coding/neteq_opus.rtp",
|
||||
"../resources/audio_coding/neteq_opus_dtx.rtp",
|
||||
"../resources/audio_coding/neteq_universal_new.rtp",
|
||||
"../resources/audio_coding/speech_mono_16kHz.pcm",
|
||||
"../resources/audio_coding/speech_mono_32_48kHz.pcm",
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "rtc_base/protobuf_utils.h"
|
||||
#include "rtc_base/sha1digest.h"
|
||||
#include "rtc_base/stringencode.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/testsupport/fileutils.h"
|
||||
#include "typedefs.h" // NOLINT(build/include)
|
||||
@ -526,6 +527,48 @@ TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) {
|
||||
FLAG_gen_ref);
|
||||
}
|
||||
|
||||
// This test fixture is identical to NetEqDecodingTest, except that it enables
|
||||
// the WebRTC-NetEqOpusDtxDelayFix field trial.
|
||||
// TODO(bugs.webrtc.org/8488): When the field trial is over and the feature is
|
||||
// default enabled, remove this fixture class and let the
|
||||
// TestOpusDtxBitExactness test build directly on NetEqDecodingTest.
|
||||
class NetEqDecodingTestWithOpusDtxFieldTrial : public NetEqDecodingTest {
|
||||
public:
|
||||
NetEqDecodingTestWithOpusDtxFieldTrial()
|
||||
: override_field_trials_("WebRTC-NetEqOpusDtxDelayFix/Enabled/") {}
|
||||
|
||||
private:
|
||||
test::ScopedFieldTrials override_field_trials_;
|
||||
};
|
||||
|
||||
#if !defined(WEBRTC_IOS) && \
|
||||
defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \
|
||||
defined(WEBRTC_CODEC_OPUS)
|
||||
#define MAYBE_TestOpusDtxBitExactness TestOpusDtxBitExactness
|
||||
#else
|
||||
#define MAYBE_TestOpusDtxBitExactness DISABLED_TestOpusDtxBitExactness
|
||||
#endif
|
||||
TEST_F(NetEqDecodingTestWithOpusDtxFieldTrial, 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 network_stats_checksum =
|
||||
"bab58dc587d956f326056d7340c96eb9d2d3cc21";
|
||||
|
||||
const std::string rtcp_stats_checksum =
|
||||
"ac27a7f305efb58b39bf123dccee25dee5758e63";
|
||||
|
||||
DecodeAndCompare(input_rtp_file, output_checksum, network_stats_checksum,
|
||||
rtcp_stats_checksum, FLAG_gen_ref);
|
||||
}
|
||||
|
||||
// Use fax mode to avoid time-scaling. This is to simplify the testing of
|
||||
// packet waiting times in the packet buffer.
|
||||
class NetEqDecodingTestFaxMode : public NetEqDecodingTest {
|
||||
|
1
resources/audio_coding/neteq_opus_dtx.rtp.sha1
Normal file
1
resources/audio_coding/neteq_opus_dtx.rtp.sha1
Normal file
@ -0,0 +1 @@
|
||||
5a86fd997857eeb778d7986799ed6a6525b4792c
|
Reference in New Issue
Block a user