| OLD | NEW |
| 1 /* Copyright (C) 2013 Google Inc. All rights reserved. | 1 /* Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 * | 2 * |
| 3 * Redistribution and use in source and binary forms, with or without | 3 * Redistribution and use in source and binary forms, with or without |
| 4 * modification, are permitted provided that the following conditions | 4 * modification, are permitted provided that the following conditions |
| 5 * are met: | 5 * are met: |
| 6 * | 6 * |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #if OS(ANDROID) && USE(WEBAUDIO_OPENMAX_DL_FFT) | 29 #if OS(ANDROID) && USE(WEBAUDIO_OPENMAX_DL_FFT) |
| 30 | 30 |
| 31 #include "platform/audio/FFTFrame.h" | 31 #include "platform/audio/FFTFrame.h" |
| 32 | 32 |
| 33 #include "platform/audio/AudioArray.h" | 33 #include "platform/audio/AudioArray.h" |
| 34 #include "wtf/MathExtras.h" | 34 #include "wtf/MathExtras.h" |
| 35 #include <dl/sp/api/armSP.h> | 35 #include <dl/sp/api/armSP.h> |
| 36 #include <dl/sp/api/omxSP.h> | 36 #include <dl/sp/api/omxSP.h> |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace blink { |
| 39 | 39 |
| 40 #if ENABLE(ASSERT) | 40 #if ENABLE(ASSERT) |
| 41 const unsigned kMaxFFTPow2Size = 15; | 41 const unsigned kMaxFFTPow2Size = 15; |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 // Normal constructor: allocates for a given fftSize. | 44 // Normal constructor: allocates for a given fftSize. |
| 45 FFTFrame::FFTFrame(unsigned fftSize) | 45 FFTFrame::FFTFrame(unsigned fftSize) |
| 46 : m_FFTSize(fftSize) | 46 : m_FFTSize(fftSize) |
| 47 , m_log2FFTSize(static_cast<unsigned>(log2(fftSize))) | 47 , m_log2FFTSize(static_cast<unsigned>(log2(fftSize))) |
| 48 , m_forwardContext(0) | 48 , m_forwardContext(0) |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 173 |
| 174 if (status == OMX_Sts_NoErr) { | 174 if (status == OMX_Sts_NoErr) { |
| 175 OMXFFTSpec_R_F32* context = static_cast<OMXFFTSpec_R_F32*>(malloc(bufSiz
e)); | 175 OMXFFTSpec_R_F32* context = static_cast<OMXFFTSpec_R_F32*>(malloc(bufSiz
e)); |
| 176 omxSP_FFTInit_R_F32(context, log2FFTSize); | 176 omxSP_FFTInit_R_F32(context, log2FFTSize); |
| 177 return context; | 177 return context; |
| 178 } | 178 } |
| 179 | 179 |
| 180 return 0; | 180 return 0; |
| 181 } | 181 } |
| 182 | 182 |
| 183 } // namespace WebCore | 183 } // namespace blink |
| 184 | 184 |
| 185 #endif // #if OS(ANDROID) && !USE(WEBAUDIO_OPENMAX_DL_FFT) | 185 #endif // #if OS(ANDROID) && !USE(WEBAUDIO_OPENMAX_DL_FFT) |
| 186 | 186 |
| 187 #endif // ENABLE(WEB_AUDIO) | 187 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |