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

Unified Diff: webrtc/modules/audio_processing/aecm/aecm_core_mips.cc

Issue 2320053003: webrtc/modules/audio_processing: Use RTC_DCHECK() instead of assert() (Closed)
Patch Set: rebase Created 4 years, 3 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
Index: webrtc/modules/audio_processing/aecm/aecm_core_mips.cc
diff --git a/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc b/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc
index e625a46ec5f2ef00629d7bbd7146fbccfea990c9..7d898f8cf49384a8c34c863b98357a901df0a787 100644
--- a/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc
+++ b/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc
@@ -10,8 +10,7 @@
#include "webrtc/modules/audio_processing/aecm/aecm_core.h"
-#include <assert.h>
-
+#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_processing/aecm/echo_control_mobile.h"
#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
@@ -995,7 +994,7 @@ int WebRtcAecm_ProcessBlock(AecmCore* aecm,
}
zeros16 = WebRtcSpl_NormW16(aecm->nearFilt[i]);
- assert(zeros16 >= 0); // |zeros16| is a norm, hence non-negative.
+ RTC_DCHECK_GE(zeros16, 0); // |zeros16| is a norm, hence non-negative.
dfa_clean_q_domain_diff = aecm->dfaCleanQDomain - aecm->dfaCleanQDomainOld;
if (zeros16 < dfa_clean_q_domain_diff && aecm->nearFilt[i]) {
tmp16no1 = aecm->nearFilt[i] << zeros16;
@@ -1119,7 +1118,7 @@ int WebRtcAecm_ProcessBlock(AecmCore* aecm,
avgHnl32 += (int32_t)hnl[i];
}
- assert(kMaxPrefBand - kMinPrefBand + 1 > 0);
+ RTC_DCHECK_GT(kMaxPrefBand - kMinPrefBand + 1, 0);
avgHnl32 /= (kMaxPrefBand - kMinPrefBand + 1);
for (i = kMaxPrefBand; i < PART_LEN1; i++) {
@@ -1271,8 +1270,8 @@ static void ComfortNoise(AecmCore* aecm,
int16_t shiftFromNearToNoise = kNoiseEstQDomain - aecm->dfaCleanQDomain;
int16_t minTrackShift = 9;
- assert(shiftFromNearToNoise >= 0);
- assert(shiftFromNearToNoise < 16);
+ RTC_DCHECK_GE(shiftFromNearToNoise, 0);
+ RTC_DCHECK_LT(shiftFromNearToNoise, 16);
if (aecm->noiseEstCtr < 100) {
// Track the minimum more quickly initially.
« no previous file with comments | « webrtc/modules/audio_processing/aecm/aecm_core_c.cc ('k') | webrtc/modules/audio_processing/aecm/aecm_core_neon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698