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

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

Issue 536843002: Change members's order and combine duplicated method for FFTFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Separated using VectorMatch::vsmul from FFTFrameMac.cpp Created 6 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: Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp
diff --git a/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp b/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp
index 11ede46f9865f9aec7242f572ba360734e2068c5..319eba5cf69e0af6cc84d5d7562770f7b0601ccc 100644
--- a/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp
+++ b/Source/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp
@@ -52,11 +52,11 @@ const int kMaxFFTPow2Size = 24;
FFTFrame::FFTFrame(unsigned fftSize)
: m_FFTSize(fftSize)
, m_log2FFTSize(static_cast<unsigned>(log2(fftSize)))
+ , m_realData(fftSize / 2)
+ , m_imagData(fftSize / 2)
, m_forwardContext(0)
, m_inverseContext(0)
, m_complexData(fftSize)
- , m_realData(fftSize / 2)
- , m_imagData(fftSize / 2)
{
// We only allow power of two.
ASSERT(1UL << m_log2FFTSize == m_FFTSize);
@@ -78,11 +78,11 @@ FFTFrame::FFTFrame()
FFTFrame::FFTFrame(const FFTFrame& frame)
: m_FFTSize(frame.m_FFTSize)
, m_log2FFTSize(frame.m_log2FFTSize)
+ , m_realData(frame.m_FFTSize / 2)
+ , m_imagData(frame.m_FFTSize / 2)
, m_forwardContext(0)
, m_inverseContext(0)
, m_complexData(frame.m_FFTSize)
- , m_realData(frame.m_FFTSize / 2)
- , m_imagData(frame.m_FFTSize / 2)
{
m_forwardContext = contextForSize(m_FFTSize, DFT_R2C);
m_inverseContext = contextForSize(m_FFTSize, IDFT_C2R);
@@ -145,16 +145,6 @@ void FFTFrame::doInverseFFT(float* data)
VectorMath::vsmul(interleavedData, 1, &scale, data, 1, m_FFTSize);
}
-float* FFTFrame::realData() const
-{
- return const_cast<float*>(m_realData.data());
-}
-
-float* FFTFrame::imagData() const
-{
- return const_cast<float*>(m_imagData.data());
-}
-
float* FFTFrame::getUpToDateComplexData()
{
// FIXME: if we can't completely get rid of this method, SSE
« no previous file with comments | « Source/platform/audio/android/FFTFrameOpenMAXDLAndroid.cpp ('k') | Source/platform/audio/ipp/FFTFrameIPP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698