Changeset 74147 in webkit


Ignore:
Timestamp:
Dec 15, 2010 3:12:06 PM (13 years ago)
Author:
kbr@google.com
Message:

2010-12-15 Kenneth Russell <kbr@google.com>

Reviewed by James Robinson.

Web Audio API: port FFTFrame to MKL
https://bugs.webkit.org/show_bug.cgi?id=50986

Fixed bug in log2 emulation function provided for Windows port of
Web Audio API.

  • wtf/MathExtras.h: (log2):

2010-12-15 Kenneth Russell <kbr@google.com>

Reviewed by James Robinson.

Web Audio API: port FFTFrame to MKL
https://bugs.webkit.org/show_bug.cgi?id=50986

Ported FFTFrame to Intel's MKL. This patch contains the port and
initial, though not complete, build system changes. Tested so far
with a unit test by Chris Rogers (which requires code changes to
AudioContext.cpp and is not being checked in). Further testing to
follow once layout tests are available for the Web Audio API.

  • WebCore.gyp/WebCore.gyp:
  • WebCore.gypi:
  • platform/audio/FFTFrame.h:
  • platform/audio/mkl: Added.
  • platform/audio/mkl/FFTFrameMKL.cpp: Added. (WebCore::FFTFrame::FFTFrame): (WebCore::FFTFrame::~FFTFrame): (WebCore::FFTFrame::multiply): (WebCore::FFTFrame::doFFT): (WebCore::FFTFrame::doInverseFFT): (WebCore::FFTFrame::cleanup): (WebCore::FFTFrame::realData): (WebCore::FFTFrame::imagData): (WebCore::FFTFrame::getUpToDateComplexData): (WebCore::FFTFrame::descriptorHandleForSize):
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r74065 r74147  
     12010-12-15  Kenneth Russell  <kbr@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        Web Audio API: port FFTFrame to MKL
     6        https://bugs.webkit.org/show_bug.cgi?id=50986
     7
     8        Fixed bug in log2 emulation function provided for Windows port of
     9        Web Audio API.
     10
     11        * wtf/MathExtras.h:
     12        (log2):
     13
    1142010-12-14  Mark Rowe  <mrowe@apple.com>
    215
  • trunk/JavaScriptCore/wtf/MathExtras.h

    r73458 r74147  
    147147
    148148// MSVC's math.h does not currently supply log2.
    149 inline bool log2(double num)
     149inline double log2(double num)
    150150{
    151151    // This constant is roughly M_LN2, which is not provided by default on Windows.
  • trunk/WebCore/ChangeLog

    r74145 r74147  
     12010-12-15  Kenneth Russell  <kbr@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        Web Audio API: port FFTFrame to MKL
     6        https://bugs.webkit.org/show_bug.cgi?id=50986
     7
     8        Ported FFTFrame to Intel's MKL. This patch contains the port and
     9        initial, though not complete, build system changes. Tested so far
     10        with a unit test by Chris Rogers (which requires code changes to
     11        AudioContext.cpp and is not being checked in). Further testing to
     12        follow once layout tests are available for the Web Audio API.
     13
     14        * WebCore.gyp/WebCore.gyp:
     15        * WebCore.gypi:
     16        * platform/audio/FFTFrame.h:
     17        * platform/audio/mkl: Added.
     18        * platform/audio/mkl/FFTFrameMKL.cpp: Added.
     19        (WebCore::FFTFrame::FFTFrame):
     20        (WebCore::FFTFrame::~FFTFrame):
     21        (WebCore::FFTFrame::multiply):
     22        (WebCore::FFTFrame::doFFT):
     23        (WebCore::FFTFrame::doInverseFFT):
     24        (WebCore::FFTFrame::cleanup):
     25        (WebCore::FFTFrame::realData):
     26        (WebCore::FFTFrame::imagData):
     27        (WebCore::FFTFrame::getUpToDateComplexData):
     28        (WebCore::FFTFrame::descriptorHandleForSize):
     29
    1302010-12-15  Yong Li  <yoli@rim.com>
    231
  • trunk/WebCore/WebCore.gyp/WebCore.gyp

    r74044 r74147  
    827827          },
    828828        }],
     829        # FIXME: (kbr) ideally this target should just depend on webcore_prerequisites
     830        # to pick up this include directory, but I'm nervous about making that change.
     831        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
     832          'include_dirs': [
     833            '<(chromium_src_dir)/third_party/mkl/include',
     834          ],
     835        }],
    829836      ],
    830837    },
     
    9951002          'include_dirs++': ['../dom'],
    9961003        }],
     1004        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
     1005          # This directory needs to be on the include path for multiple sub-targets of webcore.
     1006          'direct_dependent_settings': {
     1007            'include_dirs': [
     1008              '<(chromium_src_dir)/third_party/mkl/include',
     1009            ],
     1010          },
     1011        }],
    9971012      ],
    9981013    },
     
    10571072        # of their enclosing directories and tags at the ends of their
    10581073        # filenames.
    1059         ['exclude', '(android|cairo|cf|cg|curl|gtk|haiku|linux|mac|opentype|posix|qt|soup|svg|symbian|win|wx)/'],
     1074        ['exclude', '(android|cairo|cf|cg|curl|gtk|haiku|linux|mac|mkl|opentype|posix|qt|soup|svg|symbian|win|wx)/'],
    10601075        ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'],
    10611076
     
    12231238          'sources/': [
    12241239            ['exclude', '/GeolocationService.*$'],
     1240          ],
     1241        }],
     1242        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
     1243          'sources/': [
     1244            ['include', 'platform/audio/mkl/FFTFrameMKL\\.cpp$'],
    12251245          ],
    12261246        }],
     
    14361456          },
    14371457        }],
     1458        ['OS=="win" and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
     1459          # FIXME: (kbr) figure out how to make these dependencies
     1460          # work in a cross-platform way. Attempts to use
     1461          # "link_settings" and "libraries" in conjunction with the
     1462          # msvs-specific settings didn't work so far.
     1463          'all_dependent_settings': {
     1464            'msvs_settings': {
     1465              'VCLinkerTool': {
     1466                'AdditionalLibraryDirectories': [
     1467                  # This is a hack to make this directory correct
     1468                  # relative to targets like chrome_dll. Should use
     1469                  # <(chromium_src_dir).
     1470                  '../third_party/mkl/lib/win/ia32',
     1471                ],
     1472                'AdditionalDependencies': [
     1473                  'mkl_intel_c.lib',
     1474                  'mkl_sequential.lib',
     1475                  'mkl_core.lib',
     1476                ],
     1477              },
     1478            },
     1479          },
     1480        }],
    14381481        ['enable_svg!=0', {
    14391482          'dependencies': [
  • trunk/WebCore/WebCore.gypi

    r74062 r74147  
    24412441            'platform/audio/mac/AudioFileReaderMac.cpp',
    24422442            'platform/audio/mac/FFTFrameMac.cpp',
     2443            'platform/audio/mkl/FFTFrameMKL.cpp',
    24432444            'platform/animation/Animation.cpp',
    24442445            'platform/animation/Animation.h',
  • trunk/WebCore/platform/audio/FFTFrame.h

    r66941 r74147  
    3434#if OS(DARWIN)
    3535#include <Accelerate/Accelerate.h>
     36#endif
     37
     38#if !OS(DARWIN) && USE(WEBAUDIO_MKL)
     39#include "mkl_dfti.h"
    3640#endif
    3741
     
    96100    AudioFloatArray m_imagData;
    97101#endif // OS(DARWIN)
     102#if !OS(DARWIN) && USE(WEBAUDIO_MKL)
     103    // Interleaves the planar real and imaginary data and returns a
     104    // pointer to the resulting storage which can be used for in-place
     105    // or out-of-place operations. FIXME: ideally all of the MKL
     106    // routines would operate on planar data and this method would be
     107    // removed.
     108    float* getUpToDateComplexData();
     109
     110    static DFTI_DESCRIPTOR_HANDLE descriptorHandleForSize(unsigned fftSize);
     111
     112    static DFTI_DESCRIPTOR_HANDLE* descriptorHandles;
     113
     114    DFTI_DESCRIPTOR_HANDLE m_handle;
     115    AudioFloatArray m_complexData;
     116    AudioFloatArray m_realData;
     117    AudioFloatArray m_imagData;
     118#endif // !OS(DARWIN) && USE(WEBAUDIO_MKL)
    98119};
    99120
Note: See TracChangeset for help on using the changeset viewer.