NetEq background noise generation off by default

This CL turns the background noise generation in NetEq off by default. The noise generation used to kick in during long-duration packet losses, when there was no point in extrapolating the latest audio any longer. However, this sometimes produces annoying noise in situations where silence would have been preferable.

With this change, a long packet-loss concealment will be faded out to zeros instead of a low noise.

Reference files are updated where needed.

BUG=3519
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/20109004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6882 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2014-08-13 09:45:40 +00:00
parent c27543d297
commit 023f12fb6e
7 changed files with 23 additions and 15 deletions

View File

@ -1 +1 @@
391952a2268cb04b636a6b41868774619a8ae34f
e5e2d0ff26d16339cf0f37a3512bfa2d390a9a9a

View File

@ -1 +1 @@
49d12cf21b37f2da3f52cf2ab76ecb08adbb2a69
f587883b7c371ee8d87dbf1b0f07525af7d959b8

View File

@ -1 +1 @@
49d12cf21b37f2da3f52cf2ab76ecb08adbb2a69
f587883b7c371ee8d87dbf1b0f07525af7d959b8

View File

@ -1 +1 @@
84972ecea6a0bf85b873f109c88697eab44cedd3
08266b198e7686b3cd9330813e0d2cd72fc8fdc2

View File

@ -561,30 +561,38 @@ class AcmReceiverBitExactness : public ::testing::Test {
};
TEST_F(AcmReceiverBitExactness, 8kHzOutput) {
// TODO(henrik.lundin) Update the android checksum once the android bots are
// running this test again.
Run(8000,
PlatformChecksum("a53573d9a44a53ea852056e9550fbd53",
PlatformChecksum("bd6f8d9602cd82444ea2539e674df747",
"7924385273062b9f07aa3d4dff30d601",
"c54fd4a532cdb400bca2758d3a941eee"));
"8a8440f5511eb729221b9aac25cda3a0"));
}
TEST_F(AcmReceiverBitExactness, 16kHzOutput) {
// TODO(henrik.lundin) Update the android checksum once the android bots are
// running this test again.
Run(16000,
PlatformChecksum("16ed8ee37bad45de2e1ad2b34c7c3910",
PlatformChecksum("a39bc6ee0c4eb15f3ad2f43cebcc571d",
"d1d3dde41da936f80fa63d718fbc0fc0",
"68a8b57a0672356f846b3cea51e49903"));
"7be583092c5adbcb0f6cd66eca20ea63"));
}
TEST_F(AcmReceiverBitExactness, 32kHzOutput) {
// TODO(henrik.lundin) Update the android checksum once the android bots are
// running this test again.
Run(32000,
PlatformChecksum("f0f41f494d5d811f5a1cfce8fd89d9db",
PlatformChecksum("80964572aaa2dc92f9e34896dd3802b3",
"23b82b2605e3aab3d4d9e67dba341355",
"f2a69bcdedca515e548cd2c5af75d046"));
"3a84188abe9fca25fedd6034760f3e22"));
}
TEST_F(AcmReceiverBitExactness, 48kHzOutput) {
// TODO(henrik.lundin) Update the android checksum once the android bots are
// running this test again.
Run(48000,
PlatformChecksum("77730099d995180ab6cb60379d4a9715",
PlatformChecksum("8aacde91f390e0d5a9c2ed571a25fd37",
"580c2d0b273ffa8fa0796d784908cbdb",
"5c1bdee51750e13fbb9413bc9280c0dd"));
"89b4b19bdb4de40f1d88302ef8cb9f9b"));
}
} // namespace webrtc

View File

@ -861,8 +861,8 @@ void Expand::GenerateBackgroundNoise(int16_t* random_vector,
mute_slope,
noise_samples);
} else if (bgn_mute_factor < 16384) {
// If mode is kBgnOff, or if kBgnFade has started fading,
// Use regular |mute_slope|.
// If mode is kBgnOn, or if kBgnFade has started fading,
// use regular |mute_slope|.
if (!stop_muting_ && bgn_mode != NetEq::kBgnOff &&
!(bgn_mode == NetEq::kBgnFade && too_many_expands)) {
DspHelper::UnmuteSignal(noise_samples,

View File

@ -74,7 +74,7 @@ class NetEq {
max_packets_in_buffer(50),
// |max_delay_ms| has the same effect as calling SetMaximumDelay().
max_delay_ms(2000),
background_noise_mode(kBgnOn) {}
background_noise_mode(kBgnOff) {}
int sample_rate_hz; // Initial vale. Will change with input data.
bool enable_audio_classifier;