<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[172431] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/172431">172431</a></dd>
<dt>Author</dt> <dd>philn@webkit.org</dd>
<dt>Date</dt> <dd>2014-08-12 00:49:22 -0700 (Tue, 12 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebAudio] FFTFrame is cluttered with dead code
https://bugs.webkit.org/show_bug.cgi?id=135751

Reviewed by Eric Carlson.

Cleaned up unused FFTFrame implementations from the tree. If the
FFMPEG or IPP versions are needed later on again this patch can be
rolled out.

No new tests, the code removed was disabled on all ports.

* platform/audio/Biquad.cpp:
(WebCore::Biquad::Biquad):
(WebCore::Biquad::~Biquad):
(WebCore::Biquad::process):
(WebCore::Biquad::reset):
(WebCore::Biquad::setNormalizedCoefficients):
* platform/audio/Biquad.h:
* platform/audio/DirectConvolver.cpp:
(WebCore::DirectConvolver::DirectConvolver):
(WebCore::DirectConvolver::process):
(WebCore::DirectConvolver::reset):
* platform/audio/DirectConvolver.h:
* platform/audio/FFTFrame.h:
* platform/audio/FFTFrameStub.cpp:
* platform/audio/ffmpeg/FFTFrameFFMPEG.cpp: Removed.
* platform/audio/ipp/FFTFrameIPP.cpp: Removed.
* platform/audio/mac/FFTFrameMac.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioAudioArrayh">trunk/Source/WebCore/platform/audio/AudioArray.h</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioBiquadcpp">trunk/Source/WebCore/platform/audio/Biquad.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioBiquadh">trunk/Source/WebCore/platform/audio/Biquad.h</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioDirectConvolvercpp">trunk/Source/WebCore/platform/audio/DirectConvolver.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioDirectConvolverh">trunk/Source/WebCore/platform/audio/DirectConvolver.h</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioFFTFrameh">trunk/Source/WebCore/platform/audio/FFTFrame.h</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioFFTFrameStubcpp">trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformaudiomacFFTFrameMaccpp">trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformaudioffmpegFFTFrameFFMPEGcpp">trunk/Source/WebCore/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioippFFTFrameIPPcpp">trunk/Source/WebCore/platform/audio/ipp/FFTFrameIPP.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/ChangeLog        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2014-08-10  Philippe Normand  &lt;pnormand@igalia.com&gt;
+
+        [WebAudio] FFTFrame is cluttered with dead code
+        https://bugs.webkit.org/show_bug.cgi?id=135751
+
+        Reviewed by Eric Carlson.
+
+        Cleaned up unused FFTFrame implementations from the tree. If the
+        FFMPEG or IPP versions are needed later on again this patch can be
+        rolled out.
+
+        No new tests, the code removed was disabled on all ports.
+
+        * platform/audio/Biquad.cpp:
+        (WebCore::Biquad::Biquad):
+        (WebCore::Biquad::~Biquad):
+        (WebCore::Biquad::process):
+        (WebCore::Biquad::reset):
+        (WebCore::Biquad::setNormalizedCoefficients):
+        * platform/audio/Biquad.h:
+        * platform/audio/DirectConvolver.cpp:
+        (WebCore::DirectConvolver::DirectConvolver):
+        (WebCore::DirectConvolver::process):
+        (WebCore::DirectConvolver::reset):
+        * platform/audio/DirectConvolver.h:
+        * platform/audio/FFTFrame.h:
+        * platform/audio/FFTFrameStub.cpp:
+        * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp: Removed.
+        * platform/audio/ipp/FFTFrameIPP.cpp: Removed.
+        * platform/audio/mac/FFTFrameMac.cpp:
+
</ins><span class="cx"> 2014-08-11  Mark Rowe  &lt;mrowe@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix the Mac build.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioAudioArrayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/AudioArray.h (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/AudioArray.h        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/AudioArray.h        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -55,12 +55,7 @@
</span><span class="cx">     void allocate(Checked&lt;size_t&gt; n)
</span><span class="cx">     {
</span><span class="cx">         Checked&lt;unsigned&gt; initialSize = sizeof(T) * n;
</span><del>-
-#if USE(WEBAUDIO_FFMPEG) || USE(WEBAUDIO_OPENMAX_DL_FFT)
-        const size_t alignment = 32;
-#else
</del><span class="cx">         const size_t alignment = 16;
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">         if (m_allocation)
</span><span class="cx">             fastFree(m_allocation);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioBiquadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/Biquad.cpp (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/Biquad.cpp        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/Biquad.cpp        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -55,12 +55,6 @@
</span><span class="cx">     m_outputBuffer.allocate(kBufferSize + 2);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(WEBAUDIO_IPP)
-    int bufferSize;
-    ippsIIRGetStateSize64f_BiQuad_32f(1, &amp;bufferSize);
-    m_ippInternalBuffer = ippsMalloc_8u(bufferSize);
-#endif // USE(WEBAUDIO_IPP)
-
</del><span class="cx">     // Initialize as pass-thru (straight-wire, no filter effect)
</span><span class="cx">     setNormalizedCoefficients(1, 0, 0, 1, 0, 0);
</span><span class="cx"> 
</span><span class="lines">@@ -69,9 +63,6 @@
</span><span class="cx"> 
</span><span class="cx"> Biquad::~Biquad()
</span><span class="cx"> {
</span><del>-#if USE(WEBAUDIO_IPP)
-    ippsFree(m_ippInternalBuffer);
-#endif // USE(WEBAUDIO_IPP)
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Biquad::process(const float* sourceP, float* destP, size_t framesToProcess)
</span><span class="lines">@@ -80,9 +71,7 @@
</span><span class="cx">     // Use vecLib if available
</span><span class="cx">     processFast(sourceP, destP, framesToProcess);
</span><span class="cx"> 
</span><del>-#elif USE(WEBAUDIO_IPP)
-    ippsIIR64f_32f(sourceP, destP, static_cast&lt;int&gt;(framesToProcess), m_biquadState);
-#else // USE(WEBAUDIO_IPP)
</del><ins>+#else
</ins><span class="cx"> 
</span><span class="cx">     int n = framesToProcess;
</span><span class="cx"> 
</span><span class="lines">@@ -196,11 +185,6 @@
</span><span class="cx">     outputP[0] = 0;
</span><span class="cx">     outputP[1] = 0;
</span><span class="cx"> 
</span><del>-#elif USE(WEBAUDIO_IPP)
-    int bufferSize;
-    ippsIIRGetStateSize64f_BiQuad_32f(1, &amp;bufferSize);
-    ippsZero_8u(m_ippInternalBuffer, bufferSize);
-
</del><span class="cx"> #else
</span><span class="cx">     m_x1 = m_x2 = m_y1 = m_y2 = 0;
</span><span class="cx"> #endif
</span><span class="lines">@@ -289,19 +273,6 @@
</span><span class="cx">     m_b2 = b2 * a0Inverse;
</span><span class="cx">     m_a1 = a1 * a0Inverse;
</span><span class="cx">     m_a2 = a2 * a0Inverse;
</span><del>-
-#if USE(WEBAUDIO_IPP)
-    Ipp64f taps[6];
-    taps[0] = m_b0;
-    taps[1] = m_b1;
-    taps[2] = m_b2;
-    taps[3] = 1;
-    taps[4] = m_a1;
-    taps[5] = m_a2;
-    m_biquadState = 0;
-
-    ippsIIRInit64f_BiQuad_32f(&amp;m_biquadState, taps, 1, 0, m_ippInternalBuffer);
-#endif // USE(WEBAUDIO_IPP)
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Biquad::setLowShelfParams(double frequency, double dbGain)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioBiquadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/Biquad.h (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/Biquad.h        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/Biquad.h        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -32,10 +32,6 @@
</span><span class="cx"> #include &quot;AudioArray.h&quot;
</span><span class="cx"> #include &lt;complex&gt;
</span><span class="cx"> #include &lt;sys/types.h&gt;
</span><del>- 
-#if USE(WEBAUDIO_IPP)
-#include &lt;ipps.h&gt;
-#endif // USE(WEBAUDIO_IPP)
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -99,10 +95,6 @@
</span><span class="cx">     AudioDoubleArray m_inputBuffer;
</span><span class="cx">     AudioDoubleArray m_outputBuffer;
</span><span class="cx"> 
</span><del>-#elif USE(WEBAUDIO_IPP)
-    IppsIIRState64f_32f* m_biquadState;
-    Ipp8u* m_ippInternalBuffer;
-
</del><span class="cx"> #else
</span><span class="cx">     // Filter memory
</span><span class="cx">     double m_x1; // input delayed by 1 sample
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioDirectConvolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/DirectConvolver.cpp (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/DirectConvolver.cpp        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/DirectConvolver.cpp        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -44,9 +44,6 @@
</span><span class="cx">     
</span><span class="cx"> DirectConvolver::DirectConvolver(size_t inputBlockSize)
</span><span class="cx">     : m_inputBlockSize(inputBlockSize)
</span><del>-#if USE(WEBAUDIO_IPP)
-    , m_overlayBuffer(inputBlockSize)
-#endif // USE(WEBAUDIO_IPP)
</del><span class="cx">     , m_buffer(inputBlockSize * 2)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -71,19 +68,6 @@
</span><span class="cx">     if (!isCopyGood)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-#if USE(WEBAUDIO_IPP)
-    float* outputBuffer = m_buffer.data();
-    float* overlayBuffer = m_overlayBuffer.data();
-    bool isCopyGood2 = overlayBuffer &amp;&amp; m_overlayBuffer.size() &gt;= kernelSize &amp;&amp; m_buffer.size() == m_inputBlockSize * 2;
-    ASSERT(isCopyGood2);
-    if (!isCopyGood2)
-        return;
-
-    ippsConv_32f(static_cast&lt;const Ipp32f*&gt;(sourceP), framesToProcess, static_cast&lt;Ipp32f*&gt;(kernelP), kernelSize, static_cast&lt;Ipp32f*&gt;(outputBuffer));
-
-    vadd(outputBuffer, 1, overlayBuffer, 1, destP, 1, framesToProcess);
-    memcpy(overlayBuffer, outputBuffer + m_inputBlockSize, sizeof(float) * kernelSize);
-#else
</del><span class="cx">     float* inputP = m_buffer.data() + m_inputBlockSize;
</span><span class="cx"> 
</span><span class="cx">     // Copy samples to 2nd half of input buffer.
</span><span class="lines">@@ -369,15 +353,11 @@
</span><span class="cx"> 
</span><span class="cx">     // Copy 2nd half of input buffer to 1st half.
</span><span class="cx">     memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess);
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DirectConvolver::reset()
</span><span class="cx"> {
</span><span class="cx">     m_buffer.zero();
</span><del>-#if USE(WEBAUDIO_IPP)
-    m_overlayBuffer.zero();
-#endif // USE(WEBAUDIO_IPP)
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioDirectConvolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/DirectConvolver.h (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/DirectConvolver.h        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/DirectConvolver.h        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -31,10 +31,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AudioArray.h&quot;
</span><span class="cx"> 
</span><del>-#if USE(WEBAUDIO_IPP)
-#include &lt;ipps.h&gt;
-#endif // USE(WEBAUDIO_IPP)
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class DirectConvolver {
</span><span class="lines">@@ -48,9 +44,6 @@
</span><span class="cx"> private:
</span><span class="cx">     size_t m_inputBlockSize;
</span><span class="cx"> 
</span><del>-#if USE(WEBAUDIO_IPP)
-    AudioFloatArray m_overlayBuffer;
-#endif // USE(WEBAUDIO_IPP)
</del><span class="cx">     AudioFloatArray m_buffer;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioFFTFrameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/FFTFrame.h (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/FFTFrame.h        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/FFTFrame.h        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -31,18 +31,10 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AudioArray.h&quot;
</span><span class="cx"> 
</span><del>-#if OS(DARWIN) &amp;&amp; !USE(WEBAUDIO_FFMPEG)
-#define USE_ACCELERATE_FFT 1
-#else
-#define USE_ACCELERATE_FFT 0
-#endif
-
-#if USE_ACCELERATE_FFT
</del><ins>+#if OS(DARWIN)
</ins><span class="cx"> #include &lt;Accelerate/Accelerate.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !USE_ACCELERATE_FFT
-
</del><span class="cx"> #if USE(WEBAUDIO_GSTREAMER)
</span><span class="cx"> #include &lt;glib.h&gt;
</span><span class="cx"> G_BEGIN_DECLS
</span><span class="lines">@@ -50,19 +42,6 @@
</span><span class="cx"> G_END_DECLS
</span><span class="cx"> #endif // USE(WEBAUDIO_GSTREAMER)
</span><span class="cx"> 
</span><del>-#if USE(WEBAUDIO_OPENMAX_DL_FFT)
-#include &quot;dl/sp/api/armSP.h&quot;
-#include &quot;dl/sp/api/omxSP.h&quot;
-#elif USE(WEBAUDIO_FFMPEG)
-struct RDFTContext;
-#endif
-
-#endif // !USE_ACCELERATE_FFT
-
-#if USE(WEBAUDIO_IPP)
-#include &lt;ipps.h&gt;
-#endif // USE(WEBAUDIO_IPP)
-
</del><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/Threading.h&gt;
</span><span class="lines">@@ -111,7 +90,7 @@
</span><span class="cx"> 
</span><span class="cx">     void interpolateFrequencyComponents(const FFTFrame&amp; frame1, const FFTFrame&amp; frame2, double x);
</span><span class="cx"> 
</span><del>-#if USE_ACCELERATE_FFT
</del><ins>+#if OS(DARWIN)
</ins><span class="cx">     DSPSplitComplex&amp; dspSplitComplex() { return m_frame; }
</span><span class="cx">     DSPSplitComplex dspSplitComplex() const { return m_frame; }
</span><span class="cx"> 
</span><span class="lines">@@ -124,20 +103,8 @@
</span><span class="cx">     DSPSplitComplex m_frame;
</span><span class="cx">     AudioFloatArray m_realData;
</span><span class="cx">     AudioFloatArray m_imagData;
</span><del>-#else // !USE_ACCELERATE_FFT
</del><ins>+#endif
</ins><span class="cx"> 
</span><del>-#if USE(WEBAUDIO_FFMPEG)
-    static RDFTContext* contextForSize(unsigned fftSize, int trans);
-
-    RDFTContext* m_forwardContext;
-    RDFTContext* m_inverseContext;
-
-    float* getUpToDateComplexData();
-    AudioFloatArray m_complexData;
-    AudioFloatArray m_realData;
-    AudioFloatArray m_imagData;
-#endif // USE(WEBAUDIO_FFMPEG)
-
</del><span class="cx"> #if USE(WEBAUDIO_GSTREAMER)
</span><span class="cx">     GstFFTF32* m_fft;
</span><span class="cx">     GstFFTF32* m_inverseFft;
</span><span class="lines">@@ -145,29 +112,6 @@
</span><span class="cx">     AudioFloatArray m_realData;
</span><span class="cx">     AudioFloatArray m_imagData;
</span><span class="cx"> #endif // USE(WEBAUDIO_GSTREAMER)
</span><del>-
-#if USE(WEBAUDIO_IPP)
-    Ipp8u* m_buffer;
-    IppsDFTSpec_R_32f* m_DFTSpec;
-
-    float* getUpToDateComplexData();
-    AudioFloatArray m_complexData;
-    AudioFloatArray m_realData;
-    AudioFloatArray m_imagData;
-#endif // USE(WEBAUDIO_IPP)
-
-#if USE(WEBAUDIO_OPENMAX_DL_FFT)
-    static OMXFFTSpec_R_F32* contextForSize(unsigned log2FFTSize);
-
-    OMXFFTSpec_R_F32* m_forwardContext;
-    OMXFFTSpec_R_F32* m_inverseContext;
-
-    AudioFloatArray m_complexData;
-    AudioFloatArray m_realData;
-    AudioFloatArray m_imagData;
-#endif
-    
-#endif // !USE_ACCELERATE_FFT
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioFFTFrameStubcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_AUDIO)
</span><span class="cx"> 
</span><del>-#if !OS(DARWIN) &amp;&amp; !USE(WEBAUDIO_FFMPEG) &amp;&amp; !USE(WEBAUDIO_GSTREAMER) &amp;&amp; !USE(WEBAUDIO_IPP) &amp;&amp; !USE(WEBAUDIO_OPENMAX_DL_FFT)
</del><ins>+#if !OS(DARWIN) &amp;&amp; !USE(WEBAUDIO_GSTREAMER)
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;FFTFrame.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -102,6 +102,6 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif // !OS(DARWIN) &amp;&amp; !USE(WEBAUDIO_FFMPEG) &amp;&amp; !USE(WEBAUDIO_GSTREAMER) &amp;&amp; !USE(WEBAUDIO_IPP)
</del><ins>+#endif // !OS(DARWIN) &amp;&amp; !USE(WEBAUDIO_GSTREAMER)
</ins><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEB_AUDIO)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioffmpegFFTFrameFFMPEGcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -1,253 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// FFTFrame implementation using FFmpeg's RDFT algorithm,
-// suitable for use on Windows and Linux.
-
-#include &quot;config.h&quot;
-
-#if ENABLE(WEB_AUDIO)
-
-#if USE(WEBAUDIO_FFMPEG)
-
-#include &quot;FFTFrame.h&quot;
-
-#include &quot;VectorMath.h&quot;
-
-extern &quot;C&quot; {
-    #include &lt;libavcodec/avfft.h&gt;
-}
-
-#include &lt;wtf/MathExtras.h&gt;
-
-namespace {
-
-struct FFTComplexProxy {
-    int16_t re;
-    int16_t im;
-};
-
-struct FFTContextProxy {
-    int nbits;
-    int inverse;
-    uint16_t* revtab;
-    FFTComplexProxy* tmpBuf;
-    int mdctSize;
-    int mdctBits;
-    void* tcos;
-    void* tsin;
-    void (*fftPermute)();
-    void (*fftCalc)();
-    void (*imdctCalc)();
-    void (*imdctHalf)();
-    void (*mdctCalc)();
-    void (*mdctCalcw)();
-    int fftPermutation;
-    int mdctPermutation;
-};
-
-struct RDFTContextProxy {
-    int nbits;
-    int inverse;
-    int signConvention;
-    const void* tcos;
-    const void* tsin;
-    FFTContextProxy fft;
-    void (*rdft_calc)();
-};
-
-}
-
-namespace WebCore {
-
-const int kMaxFFTPow2Size = 24;
-
-// Normal constructor: allocates for a given fftSize.
-FFTFrame::FFTFrame(unsigned fftSize)
-    : m_FFTSize(fftSize)
-    , m_log2FFTSize(static_cast&lt;unsigned&gt;(log2(fftSize)))
-    , 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 &lt;&lt; m_log2FFTSize == m_FFTSize);
-
-    m_forwardContext = contextForSize(fftSize, DFT_R2C);
-    m_inverseContext = contextForSize(fftSize, IDFT_C2R);
-}
-
-// Creates a blank/empty frame (interpolate() must later be called).
-FFTFrame::FFTFrame()
-    : m_FFTSize(0)
-    , m_log2FFTSize(0)
-    , m_forwardContext(0)
-    , m_inverseContext(0)
-{
-}
-
-// Copy constructor.
-FFTFrame::FFTFrame(const FFTFrame&amp; frame)
-    : m_FFTSize(frame.m_FFTSize)
-    , m_log2FFTSize(frame.m_log2FFTSize)
-    , 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);
-
-    // Copy/setup frame data.
-    unsigned nbytes = sizeof(float) * (m_FFTSize / 2);
-    memcpy(realData(), frame.realData(), nbytes);
-    memcpy(imagData(), frame.imagData(), nbytes);
-}
-
-void FFTFrame::initialize()
-{
-}
-
-void FFTFrame::cleanup()
-{
-}
-
-FFTFrame::~FFTFrame()
-{
-    av_rdft_end(m_forwardContext);
-    av_rdft_end(m_inverseContext);
-}
-
-void FFTFrame::multiply(const FFTFrame&amp; frame)
-{
-    FFTFrame&amp; frame1 = *this;
-    FFTFrame&amp; frame2 = const_cast&lt;FFTFrame&amp;&gt;(frame);
-
-    float* realP1 = frame1.realData();
-    float* imagP1 = frame1.imagData();
-    const float* realP2 = frame2.realData();
-    const float* imagP2 = frame2.imagData();
-
-    unsigned halfSize = fftSize() / 2;
-    float real0 = realP1[0];
-    float imag0 = imagP1[0];
-
-    VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, halfSize); 
-
-    // Multiply the packed DC/nyquist component
-    realP1[0] = real0 * realP2[0];
-    imagP1[0] = imag0 * imagP2[0];
-
-    // Scale accounts the peculiar scaling of vecLib on the Mac.
-    // This ensures the right scaling all the way back to inverse FFT.
-    // FIXME: if we change the scaling on the Mac then this scale
-    // factor will need to change too.
-    float scale = 0.5f;
-
-    VectorMath::vsmul(realP1, 1, &amp;scale, realP1, 1, halfSize);
-    VectorMath::vsmul(imagP1, 1, &amp;scale, imagP1, 1, halfSize);
-}
-
-void FFTFrame::doFFT(const float* data)
-{
-    // Copy since processing is in-place.
-    float* p = m_complexData.data();
-    memcpy(p, data, sizeof(float) * m_FFTSize);
-
-    // Compute Forward transform.
-    av_rdft_calc(m_forwardContext, p);
-
-    // De-interleave to separate real and complex arrays.
-    int len = m_FFTSize / 2;
-
-    // FIXME: see above comment in multiply() about scaling.
-    const float scale = 2.0f;
-
-    for (int i = 0; i &lt; len; ++i) {
-        int baseComplexIndex = 2 * i;
-        // m_realData[0] is the DC component and m_imagData[0] is the nyquist component
-        // since the interleaved complex data is packed.
-        m_realData[i] = scale * p[baseComplexIndex];
-        m_imagData[i] = scale * p[baseComplexIndex + 1];
-    }
-}
-
-void FFTFrame::doInverseFFT(float* data)
-{
-    // Prepare interleaved data.
-    float* interleavedData = getUpToDateComplexData();
-
-    // Compute inverse transform.
-    av_rdft_calc(m_inverseContext, interleavedData);
-
-    // Scale so that a forward then inverse FFT yields exactly the original data.
-    const float scale = 1.0 / m_FFTSize;
-    VectorMath::vsmul(interleavedData, 1, &amp;scale, data, 1, m_FFTSize);
-}
-
-float* FFTFrame::realData() const
-{
-    return const_cast&lt;float*&gt;(m_realData.data());
-}
-
-float* FFTFrame::imagData() const
-{
-    return const_cast&lt;float*&gt;(m_imagData.data());
-}
-
-float* FFTFrame::getUpToDateComplexData()
-{
-    // FIXME: if we can't completely get rid of this method, SSE
-    // optimization could be considered if it shows up hot on profiles.
-    int len = m_FFTSize / 2;
-    for (int i = 0; i &lt; len; ++i) {
-        int baseComplexIndex = 2 * i;
-        m_complexData[baseComplexIndex] = m_realData[i];
-        m_complexData[baseComplexIndex + 1] = m_imagData[i];
-    }
-    return const_cast&lt;float*&gt;(m_complexData.data());
-}
-
-RDFTContext* FFTFrame::contextForSize(unsigned fftSize, int trans)
-{
-    // FIXME: This is non-optimal. Ideally, we'd like to share the contexts for FFTFrames of the same size.
-    // But FFmpeg's RDFT uses a scratch buffer inside the context and so they are not thread-safe.
-    // We could improve this by sharing the FFTFrames on a per-thread basis.
-    ASSERT(fftSize);
-    int pow2size = static_cast&lt;int&gt;(log2(fftSize));
-    ASSERT(pow2size &lt; kMaxFFTPow2Size);
-
-    RDFTContext* context = av_rdft_init(pow2size, (RDFTransformType)trans);
-    return context;
-}
-
-} // namespace WebCore
-
-#endif // !OS(DARWIN) &amp;&amp; USE(WEBAUDIO_FFMPEG)
-
-#endif // ENABLE(WEB_AUDIO)
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioippFFTFrameIPPcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/audio/ipp/FFTFrameIPP.cpp (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/ipp/FFTFrameIPP.cpp        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/ipp/FFTFrameIPP.cpp        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -1,189 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2012 Intel Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// FFTFrame implementation using Intel IPP's DFT algorithm,
-// suitable for use on Linux.
-
-#include &quot;config.h&quot;
-
-#if ENABLE(WEB_AUDIO)
-
-#if USE(WEBAUDIO_IPP)
-
-#include &quot;FFTFrame.h&quot;
-
-#include &quot;VectorMath.h&quot;
-
-#include &lt;wtf/MathExtras.h&gt;
-
-namespace WebCore {
-
-const unsigned maximumFFTPower2Size = 24;
-
-// Normal constructor: allocates for a given fftSize.
-FFTFrame::FFTFrame(unsigned fftSize)
-    : m_FFTSize(fftSize)
-    , m_log2FFTSize(static_cast&lt;unsigned&gt;(log2(fftSize)))
-    , m_complexData(fftSize)
-    , m_realData(fftSize / 2)
-    , m_imagData(fftSize / 2)
-{
-    // We only allow power of two.
-    ASSERT(1UL &lt;&lt; m_log2FFTSize == m_FFTSize);
-    ASSERT(m_log2FFTSize &lt;= maximumFFTPower2Size);
-
-    ippsDFTInitAlloc_R_32f(&amp;m_DFTSpec, m_FFTSize, IPP_FFT_NODIV_BY_ANY, ippAlgHintFast);
-    int bufferSize = 0;
-    ippsDFTGetBufSize_R_32f(m_DFTSpec, &amp;bufferSize);
-    m_buffer = ippsMalloc_8u(bufferSize);
-}
-
-// Creates a blank/empty frame (interpolate() must later be called).
-FFTFrame::FFTFrame()
-    : m_FFTSize(0)
-    , m_log2FFTSize(0)
-{
-}
-
-// Copy constructor.
-FFTFrame::FFTFrame(const FFTFrame&amp; frame)
-    : m_FFTSize(frame.m_FFTSize)
-    , m_log2FFTSize(frame.m_log2FFTSize)
-    , m_complexData(frame.m_FFTSize)
-    , m_realData(frame.m_FFTSize / 2)
-    , m_imagData(frame.m_FFTSize / 2)
-{
-    ippsDFTInitAlloc_R_32f(&amp;m_DFTSpec, m_FFTSize, IPP_FFT_NODIV_BY_ANY, ippAlgHintFast);
-    int bufferSize = 0;
-    ippsDFTGetBufSize_R_32f(m_DFTSpec, &amp;bufferSize);
-    m_buffer = ippsMalloc_8u(bufferSize);
-
-    // Copy/setup frame data.
-    unsigned numberOfBytes = sizeof(float) * m_FFTSize;
-    memcpy(realData(), frame.realData(), numberOfBytes);
-    memcpy(imagData(), frame.imagData(), numberOfBytes);
-}
-
-void FFTFrame::initialize()
-{
-}
-
-void FFTFrame::cleanup()
-{
-}
-
-FFTFrame::~FFTFrame()
-{
-    ippsFree(m_buffer);
-    ippsDFTFree_R_32f(m_DFTSpec);
-}
-
-void FFTFrame::multiply(const FFTFrame&amp; frame)
-{
-    FFTFrame&amp; frame1 = *this;
-    FFTFrame&amp; frame2 = const_cast&lt;FFTFrame&amp;&gt;(frame);
-
-    float* realP1 = frame1.realData();
-    float* imagP1 = frame1.imagData();
-    const float* realP2 = frame2.realData();
-    const float* imagP2 = frame2.imagData();
-
-    unsigned halfSize = fftSize() / 2;
-    float real0 = realP1[0];
-    float imag0 = imagP1[0];
-
-    VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, halfSize); 
-
-    // Multiply the packed DC/nyquist component
-    realP1[0] = real0 * realP2[0];
-    imagP1[0] = imag0 * imagP2[0];
-
-    // Scale accounts the peculiar scaling of vecLib on the Mac.
-    // This ensures the right scaling all the way back to inverse FFT.
-    // FIXME: if we change the scaling on the Mac then this scale
-    // factor will need to change too.
-    float scale = 0.5f;
-
-    VectorMath::vsmul(realP1, 1, &amp;scale, realP1, 1, halfSize);
-    VectorMath::vsmul(imagP1, 1, &amp;scale, imagP1, 1, halfSize);
-}
-
-void FFTFrame::doFFT(const float* data)
-{
-    Ipp32f* complexP = m_complexData.data();
-
-    // Compute Forward transform to perm format.
-    ippsDFTFwd_RToPerm_32f(reinterpret_cast&lt;Ipp32f*&gt;(const_cast&lt;float*&gt;(data)), complexP, m_DFTSpec, m_buffer);
-
-    const Ipp32f scale = 2.0f;
-
-    ippsMulC_32f_I(scale, complexP, m_FFTSize);
-
-    Ipp32f* realP = m_realData.data();
-    Ipp32f* imagP = m_imagData.data();
-    ippsCplxToReal_32fc(reinterpret_cast&lt;Ipp32fc*&gt;(complexP), realP, imagP, m_FFTSize &gt;&gt; 1);
-}
-
-void FFTFrame::doInverseFFT(float* data)
-{
-    Ipp32f* complexP = getUpToDateComplexData();
-
-    // Compute inverse transform.
-    ippsDFTInv_PermToR_32f(complexP, reinterpret_cast&lt;Ipp32f*&gt;(data), m_DFTSpec, m_buffer);
-
-    // Scale so that a forward then inverse FFT yields exactly the original data.
-    const float scale = 1.0 / (2 * m_FFTSize);
-
-    ippsMulC_32f_I(scale, reinterpret_cast&lt;Ipp32f*&gt;(data), m_FFTSize);
-}
-
-float* FFTFrame::realData() const
-{
-    return const_cast&lt;float*&gt;(m_realData.data());
-}
-
-float* FFTFrame::imagData() const
-{
-    return const_cast&lt;float*&gt;(m_imagData.data());
-}
-
-float* FFTFrame::getUpToDateComplexData()
-{
-    int len = m_FFTSize &gt;&gt; 1;
-    // Merge the real and imagimary vectors to complex vector.
-    Ipp32f* realP = m_realData.data();
-    Ipp32f* imagP = m_imagData.data();
-    Ipp32fc* complexP = reinterpret_cast&lt;Ipp32fc*&gt;(m_complexData.data());
-    ippsRealToCplx_32f(realP, imagP, complexP, len);
-
-    return const_cast&lt;float*&gt;(m_complexData.data());
-}
-
-} // namespace WebCore
-
-#endif // USE(WEBAUDIO_IPP)
-
-#endif // ENABLE(WEB_AUDIO)
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformaudiomacFFTFrameMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp (172430 => 172431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp        2014-08-12 07:42:54 UTC (rev 172430)
+++ trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp        2014-08-12 07:49:22 UTC (rev 172431)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_AUDIO)
</span><span class="cx"> 
</span><del>-#if OS(DARWIN) &amp;&amp; !USE(WEBAUDIO_FFMPEG)
</del><ins>+#if OS(DARWIN)
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;FFTFrame.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -188,6 +188,6 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif // #if OS(DARWIN) &amp;&amp; !USE(WEBAUDIO_FFMPEG)
</del><ins>+#endif // #if OS(DARWIN)
</ins><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEB_AUDIO)
</span></span></pre>
</div>
</div>

</body>
</html>