Changeset 76562 in webkit
- Timestamp:
- Jan 24, 2011 6:39:50 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76561 r76562 1 2011-01-24 Kenneth Russell <kbr@google.com> 2 3 Reviewed by James Robinson. 4 5 Web Audio API: port FFTFrame to FFTW 6 https://bugs.webkit.org/show_bug.cgi?id=52989 7 8 Ported FFTFrame class to the open-source FFTW library. Tested with 9 unit tests from Chris Rogers. Made preliminary changes to GYP 10 files for conditional compilation of these files; will need to be 11 adjusted once FFTW is integrated as third-party source. 12 13 * WebCore.gyp/WebCore.gyp: 14 * WebCore.gypi: 15 * platform/audio/FFTFrame.h: 16 * platform/audio/fftw: Added. 17 * platform/audio/fftw/FFTFrameFFTW.cpp: Added. 18 (WebCore::FFTFrame::FFTFrame): 19 (WebCore::FFTFrame::~FFTFrame): 20 (WebCore::FFTFrame::multiply): 21 (WebCore::FFTFrame::doFFT): 22 (WebCore::FFTFrame::doInverseFFT): 23 (WebCore::FFTFrame::cleanup): 24 (WebCore::FFTFrame::realData): 25 (WebCore::FFTFrame::imagData): 26 (WebCore::FFTFrame::fftwPlanForSize): 27 1 28 2011-01-24 Anders Carlsson <andersca@apple.com> 2 29 -
trunk/Source/WebCore/WebCore.gyp/WebCore.gyp
r76380 r76562 853 853 }], 854 854 # FIXME: (kbr) ideally this target should just depend on webcore_prerequisites 855 # to pick up th is include directory, but I'm nervous about making that change.855 # to pick up these include directories, but I'm nervous about making that change. 856 856 ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', { 857 857 'include_dirs': [ 858 858 '<(chromium_src_dir)/third_party/mkl/include', 859 ], 860 }], 861 ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', { 862 'include_dirs': [ 863 '<(chromium_src_dir)/third_party/fftw/api', 859 864 ], 860 865 }], … … 1035 1040 }, 1036 1041 }], 1042 ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', { 1043 # This directory needs to be on the include path for multiple sub-targets of webcore. 1044 'direct_dependent_settings': { 1045 'include_dirs': [ 1046 '<(chromium_src_dir)/third_party/fftw/api', 1047 ], 1048 }, 1049 }], 1037 1050 ], 1038 1051 }, … … 1097 1110 # of their enclosing directories and tags at the ends of their 1098 1111 # filenames. 1099 ['exclude', '(android|cairo|cf|cg|curl| gtk|haiku|linux|mac|mkl|opentype|posix|qt|soup|svg|symbian|win|wx)/'],1112 ['exclude', '(android|cairo|cf|cg|curl|fftw|gtk|haiku|linux|mac|mkl|opentype|posix|qt|soup|svg|symbian|win|wx)/'], 1100 1113 ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'], 1101 1114 … … 1269 1282 'sources/': [ 1270 1283 ['include', 'platform/audio/mkl/FFTFrameMKL\\.cpp$'], 1284 ], 1285 }], 1286 ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', { 1287 'sources/': [ 1288 ['include', 'platform/audio/fftw/FFTFrameFFTW\\.cpp$'], 1271 1289 ], 1272 1290 }], … … 1502 1520 }, 1503 1521 }], 1522 ['OS=="linux" and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', { 1523 # FIXME: (kbr) figure out how to make these dependencies 1524 # work in a cross-platform way. Attempts to use 1525 # "link_settings" and "libraries" in conjunction with the 1526 # msvs-specific settings didn't work so far. 1527 'all_dependent_settings': { 1528 'ldflags': [ 1529 # FIXME: (kbr) build the FFTW into PRODUCT_DIR using GYP. 1530 '-Lthird_party/fftw/.libs', 1531 ], 1532 'link_settings': { 1533 'libraries': [ 1534 '-lfftw3f' 1535 ], 1536 }, 1537 }, 1538 }], 1504 1539 ['enable_svg!=0', { 1505 1540 'dependencies': [ -
trunk/Source/WebCore/WebCore.gypi
r76541 r76562 2436 2436 'platform/audio/VectorMath.cpp', 2437 2437 'platform/audio/chromium/AudioBusChromium.cpp', 2438 'platform/audio/fftw/FFTFrameFFTW.cpp', 2438 2439 'platform/audio/mac/AudioBusMac.mm', 2439 2440 'platform/audio/mac/AudioDestinationMac.h', -
trunk/Source/WebCore/platform/audio/FFTFrame.h
r74147 r76562 36 36 #endif 37 37 38 #if !OS(DARWIN) && USE(WEBAUDIO_MKL) 38 #if !OS(DARWIN) 39 #if USE(WEBAUDIO_MKL) 39 40 #include "mkl_dfti.h" 41 #endif // USE(WEBAUDIO_MKL) 42 #if USE(WEBAUDIO_FFTW) 43 #include "fftw3.h" 44 #endif // USE(WEBAUDIO_FFTW) 40 45 #endif 41 46 … … 99 104 AudioFloatArray m_realData; 100 105 AudioFloatArray m_imagData; 101 #e ndif //OS(DARWIN)102 #if !OS(DARWIN) &&USE(WEBAUDIO_MKL)106 #else // !OS(DARWIN) 107 #if USE(WEBAUDIO_MKL) 103 108 // Interleaves the planar real and imaginary data and returns a 104 109 // pointer to the resulting storage which can be used for in-place … … 116 121 AudioFloatArray m_realData; 117 122 AudioFloatArray m_imagData; 118 #endif // !OS(DARWIN) && USE(WEBAUDIO_MKL) 123 #endif // USE(WEBAUDIO_MKL) 124 #if USE(WEBAUDIO_FFTW) 125 fftwf_plan m_forwardPlan; 126 fftwf_plan m_backwardPlan; 127 128 enum Direction { 129 Forward, 130 Backward 131 }; 132 133 AudioFloatArray m_realData; 134 AudioFloatArray m_imagData; 135 136 static fftwf_plan* fftwForwardPlans; 137 static fftwf_plan* fftwBackwardPlans; 138 139 static fftwf_plan fftwPlanForSize(unsigned fftSize, Direction, 140 float*, float*, float*); 141 #endif // USE(WEBAUDIO_FFTW) 142 #endif // !OS(DARWIN) 119 143 }; 120 144
Note: See TracChangeset
for help on using the changeset viewer.