Changeset 147491 in webkit


Ignore:
Timestamp:
Apr 2, 2013 1:24:49 PM (11 years ago)
Author:
Raymond Toy
Message:

Add support for using ARM FFT in WebAudio
https://bugs.webkit.org/show_bug.cgi?id=109755

Reviewed by Chris Rogers.

Source/WebCore:

No new tests.

  • WebCore.gyp/WebCore.gyp: Add dependency on openmax_dl when use_openmax_dl_fft is enabled.
  • WebCore.gypi: Add source FFTFrameOpenMAXDLAndroid.cpp
  • platform/audio/AudioArray.h:

(WebCore::AudioArray::allocate): Need 32-byte aligntment with the
OpenMAX DL FFT.

  • platform/audio/FFTFrame.h:

(FFTFrame): Support OpenMAX DL FFT

  • platform/audio/FFTFrameStub.cpp: Support OpenMAX DL FFT
  • platform/audio/chromium/FFTFrameOpenMAXDLAndroid.cpp: Added. Implements the

necessary interface using the OpenMAX DL FFT routines.
(WebCore):
(WebCore::FFTFrame::FFTFrame):
(WebCore::FFTFrame::initialize):
(WebCore::FFTFrame::cleanup):
(WebCore::FFTFrame::~FFTFrame):
(WebCore::FFTFrame::multiply):
(WebCore::FFTFrame::doFFT):
(WebCore::FFTFrame::doInverseFFT):
(WebCore::FFTFrame::realData):
(WebCore::FFTFrame::imagData):
(WebCore::FFTFrame::contextForSize):

Source/WebKit/chromium:

  • features.gypi: Support building with the OpenMAX DL FFT.
Location:
trunk/Source
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147490 r147491  
     12013-04-02  Raymond Toy  <rtoy@google.com>
     2
     3        Add support for using ARM FFT in WebAudio
     4        https://bugs.webkit.org/show_bug.cgi?id=109755
     5
     6        Reviewed by Chris Rogers.
     7
     8        No new tests.
     9
     10        * WebCore.gyp/WebCore.gyp: Add dependency on openmax_dl when use_openmax_dl_fft is enabled.
     11        * WebCore.gypi: Add source FFTFrameOpenMAXDLAndroid.cpp
     12        * platform/audio/AudioArray.h:
     13        (WebCore::AudioArray::allocate): Need 32-byte aligntment with the
     14        OpenMAX DL FFT.
     15        * platform/audio/FFTFrame.h:
     16        (FFTFrame): Support OpenMAX DL FFT
     17        * platform/audio/FFTFrameStub.cpp: Support OpenMAX DL FFT
     18        * platform/audio/chromium/FFTFrameOpenMAXDLAndroid.cpp: Added.  Implements the
     19        necessary interface using the OpenMAX DL FFT routines.
     20        (WebCore):
     21        (WebCore::FFTFrame::FFTFrame):
     22        (WebCore::FFTFrame::initialize):
     23        (WebCore::FFTFrame::cleanup):
     24        (WebCore::FFTFrame::~FFTFrame):
     25        (WebCore::FFTFrame::multiply):
     26        (WebCore::FFTFrame::doFFT):
     27        (WebCore::FFTFrame::doInverseFFT):
     28        (WebCore::FFTFrame::realData):
     29        (WebCore::FFTFrame::imagData):
     30        (WebCore::FFTFrame::contextForSize):
     31
    1322013-04-02  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
    233
  • trunk/Source/WebCore/WebCore.gyp/WebCore.gyp

    r147294 r147491  
    281281        ],
    282282      }],
     283     ['OS=="android" and use_openmax_dl_fft!=0', {
     284       'webcore_include_dirs': [
     285         '<(DEPTH)/third_party/openmax_dl'
     286       ]
     287     }],
    283288    ],
    284289  },  # variables
     
    15911596          ],
    15921597        }],
     1598       ['"WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1" in feature_defines', {
     1599         'direct_dependent_settings': {
     1600           'include_dirs': [
     1601             '<(chromium_src_dir)/third_party/openmax_dl',
     1602           ],
     1603         },
     1604         'dependencies': [
     1605           '<(chromium_src_dir)/third_party/openmax_dl/dl/dl.gyp:openmax_dl',
     1606         ],
     1607       }],
    15931608        # Windows shared builder needs extra help for linkage
    15941609        ['OS=="win" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
  • trunk/Source/WebCore/WebCore.gypi

    r147470 r147491  
    37813781            'platform/audio/chromium/AudioDestinationChromium.cpp',
    37823782            'platform/audio/chromium/AudioDestinationChromium.h',
     3783            'platform/audio/chromium/FFTFrameOpenMAXDLAndroid.cpp',
    37833784            'platform/audio/ffmpeg/FFTFrameFFMPEG.cpp',
    37843785            'platform/audio/mac/FFTFrameMac.cpp',
  • trunk/Source/WebCore/platform/audio/AudioArray.h

    r141816 r147491  
    6161        unsigned initialSize = sizeof(T) * n;
    6262
    63 #if USE(WEBAUDIO_FFMPEG)
     63#if USE(WEBAUDIO_FFMPEG) || USE(WEBAUDIO_OPENMAX_DL_FFT)
    6464        const size_t alignment = 32;
    6565#else
  • trunk/Source/WebCore/platform/audio/FFTFrame.h

    r143499 r147491  
    5555#endif // USE(WEBAUDIO_GSTREAMER)
    5656
    57 #if USE(WEBAUDIO_FFMPEG)
     57#if USE(WEBAUDIO_OPENMAX_DL_FFT)
     58#include "dl/sp/api/armSP.h"
     59#include "dl/sp/api/omxSP.h"
     60#elif USE(WEBAUDIO_FFMPEG)
    5861struct RDFTContext;
    59 #endif // USE(WEBAUDIO_FFMPEG)
     62#endif
    6063
    6164#endif // !USE_ACCELERATE_FFT
     
    178181#endif // USE(WEBAUDIO_IPP)
    179182
     183#if USE(WEBAUDIO_OPENMAX_DL_FFT)
     184    static OMXFFTSpec_R_F32* contextForSize(unsigned log2FFTSize);
     185
     186    OMXFFTSpec_R_F32* m_forwardContext;
     187    OMXFFTSpec_R_F32* m_inverseContext;
     188
     189    AudioFloatArray m_complexData;
     190    AudioFloatArray m_realData;
     191    AudioFloatArray m_imagData;
     192#endif
     193   
    180194#endif // !USE_ACCELERATE_FFT
    181195};
  • trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp

    r123175 r147491  
    3030#if ENABLE(WEB_AUDIO)
    3131
    32 #if !OS(DARWIN) && !USE(WEBAUDIO_MKL) && !USE(WEBAUDIO_FFMPEG) && !USE(WEBAUDIO_GSTREAMER) && !USE(WEBAUDIO_IPP)
     32#if !OS(DARWIN) && !USE(WEBAUDIO_MKL) && !USE(WEBAUDIO_FFMPEG) && !USE(WEBAUDIO_GSTREAMER) && !USE(WEBAUDIO_IPP) && !USE(WEBAUDIO_OPENMAX_DL_FFT)
    3333
    3434#include "FFTFrame.h"
  • trunk/Source/WebKit/chromium/ChangeLog

    r147390 r147491  
     12013-04-02  Raymond Toy  <rtoy@google.com>
     2
     3        Add support for using ARM FFT in WebAudio
     4        https://bugs.webkit.org/show_bug.cgi?id=109755
     5
     6        Reviewed by Chris Rogers.
     7
     8        * features.gypi: Support building with the OpenMAX DL FFT.
     9
    1102013-04-01  <webkit.review.bot@gmail.com>
    211
  • trunk/Source/WebKit/chromium/features.gypi

    r147280 r147491  
    186186          # https://bugs.webkit.org/show_bug.cgi?id=88636
    187187          'ENABLE_SHARED_WORKERS=1',
    188           'ENABLE_WEB_AUDIO=0',
    189188          'WTF_USE_NATIVE_FULLSCREEN_VIDEO=1',
    190189        ],
     
    233232        ],
    234233      }],
     234      ['OS=="android" and use_openmax_dl_fft!=0', {
     235        'feature_defines': [
     236          'WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1',
     237          # Enabling the FFT is enough to enable WebAudio support to
     238          # allow most WebAudio features to work on Android.
     239          'ENABLE_WEB_AUDIO=1',
     240        ],
     241      }],
    235242      ['OS=="win" or OS=="android" or use_x11==1', {
    236243        'feature_defines': [
Note: See TracChangeset for help on using the changeset viewer.