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

Unified Diff: third_party/WebKit/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp

Issue 2803073002: Convert RELEASE_ASSERT()/ASSERT(...) to CHECK()/DCHECK_op(...) in platform/audio (Closed)
Patch Set: Removing DCHECK_IS_ON from FFTFrameOpenMAXDLAndroid.cpp 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
Index: third_party/WebKit/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp
diff --git a/third_party/WebKit/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp b/third_party/WebKit/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp
index 8c6c046d8c8a6563c37d2ad4f95ecb613c5110d1..f46ac8c2b445874ea371d9708064489edd1dec7b 100644
--- a/third_party/WebKit/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp
+++ b/third_party/WebKit/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp
@@ -42,11 +42,9 @@ extern "C" {
namespace blink {
-#if DCHECK_IS_ON()
// Max FFT size for FFMPEG. WebAudio currently only uses FFTs up to size 15
// (2^15 points).
const int kMaxFFTPow2Size = 16;
-#endif
// Normal constructor: allocates for a given fftSize.
FFTFrame::FFTFrame(unsigned fftSize)
@@ -58,7 +56,7 @@ FFTFrame::FFTFrame(unsigned fftSize)
m_inverseContext(nullptr),
m_complexData(fftSize) {
// We only allow power of two.
- ASSERT(1UL << m_log2FFTSize == m_FFTSize);
+ DCHECK_EQ(1UL << m_log2FFTSize, m_FFTSize);
m_forwardContext = contextForSize(fftSize, DFT_R2C);
m_inverseContext = contextForSize(fftSize, IDFT_C2R);
@@ -157,7 +155,7 @@ RDFTContext* FFTFrame::contextForSize(unsigned fftSize, int trans) {
// by sharing the FFTFrames on a per-thread basis.
DCHECK(fftSize);
int pow2size = static_cast<int>(log2(fftSize));
- ASSERT(pow2size < kMaxFFTPow2Size);
+ DCHECK_LT(pow2size, kMaxFFTPow2Size);
RDFTContext* context = av_rdft_init(pow2size, (RDFTransformType)trans);
return context;

Powered by Google App Engine
This is Rietveld 408576698