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

Unified Diff: webrtc/modules/audio_processing/splitting_filter.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 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/splitting_filter.cc
diff --git a/webrtc/modules/audio_processing/splitting_filter.cc b/webrtc/modules/audio_processing/splitting_filter.cc
index 06af56e7bdf19d00f8e363593e2b8ce857603c38..60427e2db698b6b555a719c5f33c75febfc6728e 100644
--- a/webrtc/modules/audio_processing/splitting_filter.cc
+++ b/webrtc/modules/audio_processing/splitting_filter.cc
@@ -20,7 +20,7 @@ SplittingFilter::SplittingFilter(int num_channels,
size_t num_bands,
size_t num_frames)
: num_bands_(num_bands) {
- CHECK(num_bands_ == 2 || num_bands_ == 3);
+ RTC_CHECK(num_bands_ == 2 || num_bands_ == 3);
if (num_bands_ == 2) {
two_bands_states_.resize(num_channels);
} else if (num_bands_ == 3) {
@@ -32,10 +32,10 @@ SplittingFilter::SplittingFilter(int num_channels,
void SplittingFilter::Analysis(const IFChannelBuffer* data,
IFChannelBuffer* bands) {
- DCHECK_EQ(num_bands_, bands->num_bands());
- DCHECK_EQ(data->num_channels(), bands->num_channels());
- DCHECK_EQ(data->num_frames(),
- bands->num_frames_per_band() * bands->num_bands());
+ RTC_DCHECK_EQ(num_bands_, bands->num_bands());
+ RTC_DCHECK_EQ(data->num_channels(), bands->num_channels());
+ RTC_DCHECK_EQ(data->num_frames(),
+ bands->num_frames_per_band() * bands->num_bands());
if (bands->num_bands() == 2) {
TwoBandsAnalysis(data, bands);
} else if (bands->num_bands() == 3) {
@@ -45,10 +45,10 @@ void SplittingFilter::Analysis(const IFChannelBuffer* data,
void SplittingFilter::Synthesis(const IFChannelBuffer* bands,
IFChannelBuffer* data) {
- DCHECK_EQ(num_bands_, bands->num_bands());
- DCHECK_EQ(data->num_channels(), bands->num_channels());
- DCHECK_EQ(data->num_frames(),
- bands->num_frames_per_band() * bands->num_bands());
+ RTC_DCHECK_EQ(num_bands_, bands->num_bands());
+ RTC_DCHECK_EQ(data->num_channels(), bands->num_channels());
+ RTC_DCHECK_EQ(data->num_frames(),
+ bands->num_frames_per_band() * bands->num_bands());
if (bands->num_bands() == 2) {
TwoBandsSynthesis(bands, data);
} else if (bands->num_bands() == 3) {
@@ -58,7 +58,8 @@ void SplittingFilter::Synthesis(const IFChannelBuffer* bands,
void SplittingFilter::TwoBandsAnalysis(const IFChannelBuffer* data,
IFChannelBuffer* bands) {
- DCHECK_EQ(static_cast<int>(two_bands_states_.size()), data->num_channels());
+ RTC_DCHECK_EQ(static_cast<int>(two_bands_states_.size()),
+ data->num_channels());
for (size_t i = 0; i < two_bands_states_.size(); ++i) {
WebRtcSpl_AnalysisQMF(data->ibuf_const()->channels()[i],
data->num_frames(),
@@ -71,7 +72,8 @@ void SplittingFilter::TwoBandsAnalysis(const IFChannelBuffer* data,
void SplittingFilter::TwoBandsSynthesis(const IFChannelBuffer* bands,
IFChannelBuffer* data) {
- DCHECK_EQ(static_cast<int>(two_bands_states_.size()), data->num_channels());
+ RTC_DCHECK_EQ(static_cast<int>(two_bands_states_.size()),
+ data->num_channels());
for (size_t i = 0; i < two_bands_states_.size(); ++i) {
WebRtcSpl_SynthesisQMF(bands->ibuf_const()->channels(0)[i],
bands->ibuf_const()->channels(1)[i],
@@ -84,8 +86,8 @@ void SplittingFilter::TwoBandsSynthesis(const IFChannelBuffer* bands,
void SplittingFilter::ThreeBandsAnalysis(const IFChannelBuffer* data,
IFChannelBuffer* bands) {
- DCHECK_EQ(static_cast<int>(three_band_filter_banks_.size()),
- data->num_channels());
+ RTC_DCHECK_EQ(static_cast<int>(three_band_filter_banks_.size()),
+ data->num_channels());
for (size_t i = 0; i < three_band_filter_banks_.size(); ++i) {
three_band_filter_banks_[i]->Analysis(data->fbuf_const()->channels()[i],
data->num_frames(),
@@ -95,8 +97,8 @@ void SplittingFilter::ThreeBandsAnalysis(const IFChannelBuffer* data,
void SplittingFilter::ThreeBandsSynthesis(const IFChannelBuffer* bands,
IFChannelBuffer* data) {
- DCHECK_EQ(static_cast<int>(three_band_filter_banks_.size()),
- data->num_channels());
+ RTC_DCHECK_EQ(static_cast<int>(three_band_filter_banks_.size()),
+ data->num_channels());
for (size_t i = 0; i < three_band_filter_banks_.size(); ++i) {
three_band_filter_banks_[i]->Synthesis(bands->fbuf_const()->bands(i),
bands->num_frames_per_band(),

Powered by Google App Engine
This is Rietveld 408576698