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

Unified Diff: webrtc/modules/audio_processing/aecm/aecm_core_neon.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
« no previous file with comments | « webrtc/modules/audio_processing/aecm/aecm_core_mips.cc ('k') | webrtc/modules/audio_processing/agc/agc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/aecm/aecm_core_neon.cc
diff --git a/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc b/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc
index 81c7667d981d680694782b658c1b4e1e7e288952..bc368f207c493b8787698efc769466f1d2713616 100644
--- a/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc
+++ b/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc
@@ -11,8 +11,8 @@
#include "webrtc/modules/audio_processing/aecm/aecm_core.h"
#include <arm_neon.h>
-#include <assert.h>
+#include "webrtc/base/checks.h"
#include "webrtc/common_audio/signal_processing/include/real_fft.h"
// TODO(kma): Re-write the corresponding assembly file, the offset
@@ -104,9 +104,9 @@ void WebRtcAecm_CalcLinearEnergiesNeon(AecmCore* aecm,
void WebRtcAecm_StoreAdaptiveChannelNeon(AecmCore* aecm,
const uint16_t* far_spectrum,
int32_t* echo_est) {
- assert((uintptr_t)echo_est % 32 == 0);
- assert((uintptr_t)(aecm->channelStored) % 16 == 0);
- assert((uintptr_t)(aecm->channelAdapt16) % 16 == 0);
+ RTC_DCHECK_EQ(0u, (uintptr_t)echo_est % 32);
+ RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelStored % 16);
+ RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt16 % 16);
// This is C code of following optimized code.
// During startup we store the channel every block.
@@ -161,9 +161,9 @@ void WebRtcAecm_StoreAdaptiveChannelNeon(AecmCore* aecm,
}
void WebRtcAecm_ResetAdaptiveChannelNeon(AecmCore* aecm) {
- assert((uintptr_t)(aecm->channelStored) % 16 == 0);
- assert((uintptr_t)(aecm->channelAdapt16) % 16 == 0);
- assert((uintptr_t)(aecm->channelAdapt32) % 32 == 0);
+ RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelStored % 16);
+ RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt16 % 16);
+ RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt32 % 32);
// The C code of following optimized code.
// for (i = 0; i < PART_LEN1; i++) {
« no previous file with comments | « webrtc/modules/audio_processing/aecm/aecm_core_mips.cc ('k') | webrtc/modules/audio_processing/agc/agc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698