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

Unified Diff: webrtc/common_audio/signal_processing/splitting_filter.c

Issue 2274083002: Replace calls to assert() with RTC_DCHECK_*() in .c code (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 4 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/common_audio/signal_processing/splitting_filter.c
diff --git a/webrtc/common_audio/signal_processing/splitting_filter.c b/webrtc/common_audio/signal_processing/splitting_filter.c
index ba6e77dc6f9fde0a01ed4e1e23df39bc30f357a0..1400623a726591f66d67183eaaa89f97b91309eb 100644
--- a/webrtc/common_audio/signal_processing/splitting_filter.c
+++ b/webrtc/common_audio/signal_processing/splitting_filter.c
@@ -13,10 +13,9 @@
*
*/
+#include "webrtc/base/checks.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include <assert.h>
-
// Maximum number of samples in a low/high-band frame.
enum
{
@@ -136,8 +135,8 @@ void WebRtcSpl_AnalysisQMF(const int16_t* in_data, size_t in_data_length,
int32_t filter1[kMaxBandFrameLength];
int32_t filter2[kMaxBandFrameLength];
const size_t band_length = in_data_length / 2;
- assert(in_data_length % 2 == 0);
- assert(band_length <= kMaxBandFrameLength);
+ RTC_DCHECK_EQ(0, in_data_length % 2);
+ RTC_DCHECK_LE(band_length, kMaxBandFrameLength);
// Split even and odd samples. Also shift them to Q10.
for (i = 0, k = 0; i < band_length; i++, k += 2)
@@ -175,7 +174,7 @@ void WebRtcSpl_SynthesisQMF(const int16_t* low_band, const int16_t* high_band,
int32_t filter2[kMaxBandFrameLength];
size_t i;
int16_t k;
- assert(band_length <= kMaxBandFrameLength);
+ RTC_DCHECK_LE(band_length, kMaxBandFrameLength);
// Obtain the sum and difference channels out of upper and lower-band channels.
// Also shift to Q10 domain.

Powered by Google App Engine
This is Rietveld 408576698