Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1168)

Unified Diff: webrtc/modules/audio_coding/neteq/normal.cc

Issue 2814363002: Fixing check for when overlap-add is not 1 ms (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/normal.cc
diff --git a/webrtc/modules/audio_coding/neteq/normal.cc b/webrtc/modules/audio_coding/neteq/normal.cc
index 1a7bc68033fb359579bcab83fa74d16949c9e3ec..7442df1384c3d4092b562a717d8404aa2578c08b 100644
--- a/webrtc/modules/audio_coding/neteq/normal.cc
+++ b/webrtc/modules/audio_coding/neteq/normal.cc
@@ -145,11 +145,8 @@ int Normal::Process(const int16_t* input,
((1 << 14) - win_up_Q14) * expanded[channel_ix][i] + (1 << 13)) >>
14;
}
- if (fs_hz_ == 48000) {
- RTC_DCHECK_EQ(win_up_Q14, (1 << 14) - 16);
- } else {
- RTC_DCHECK_EQ(win_up_Q14, 1 << 14);
- }
+ RTC_DCHECK_GT(win_up_Q14,
+ (1 << 14) - 32); // Worst case rouding is a length of 34
}
} else if (last_mode == kModeRfc3389Cng) {
RTC_DCHECK_EQ(output->Channels(), 1); // Not adapted for multi-channel yet.
@@ -187,11 +184,8 @@ int Normal::Process(const int16_t* input,
((1 << 14) - win_up_Q14) * cng_output[i] + (1 << 13)) >>
14;
}
- if (fs_hz_ == 48000) {
- RTC_DCHECK_EQ(win_up_Q14, (1 << 14) - 16);
- } else {
- RTC_DCHECK_EQ(win_up_Q14, 1 << 14);
- }
+ RTC_DCHECK_GT(win_up_Q14,
+ (1 << 14) - 32); // Worst case rouding is a length of 34
} else if (external_mute_factor_array[0] < 16384) {
// Previous was neither of Expand, FadeToBGN or RFC3389_CNG, but we are
// still ramping up from previous muting.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698