| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 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 11 matching lines...) Expand all Loading... |
| 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef VectorMath_h | 25 #ifndef VectorMath_h |
| 26 #define VectorMath_h | 26 #define VectorMath_h |
| 27 | 27 |
| 28 #include "platform/PlatformExport.h" | 28 #include "platform/PlatformExport.h" |
| 29 | 29 |
| 30 // Defines the interface for several vector math functions whose implementation
will ideally be optimized. | 30 // Defines the interface for several vector math functions whose implementation
will ideally be optimized. |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace blink { |
| 33 namespace VectorMath { | 33 namespace VectorMath { |
| 34 | 34 |
| 35 // Vector scalar multiply and then add. | 35 // Vector scalar multiply and then add. |
| 36 PLATFORM_EXPORT void vsma(const float* sourceP, int sourceStride, const float* s
cale, float* destP, int destStride, size_t framesToProcess); | 36 PLATFORM_EXPORT void vsma(const float* sourceP, int sourceStride, const float* s
cale, float* destP, int destStride, size_t framesToProcess); |
| 37 | 37 |
| 38 PLATFORM_EXPORT void vsmul(const float* sourceP, int sourceStride, const float*
scale, float* destP, int destStride, size_t framesToProcess); | 38 PLATFORM_EXPORT void vsmul(const float* sourceP, int sourceStride, const float*
scale, float* destP, int destStride, size_t framesToProcess); |
| 39 PLATFORM_EXPORT void vadd(const float* source1P, int sourceStride1, const float*
source2P, int sourceStride2, float* destP, int destStride, size_t framesToProce
ss); | 39 PLATFORM_EXPORT void vadd(const float* source1P, int sourceStride1, const float*
source2P, int sourceStride2, float* destP, int destStride, size_t framesToProce
ss); |
| 40 | 40 |
| 41 // Finds the maximum magnitude of a float vector. | 41 // Finds the maximum magnitude of a float vector. |
| 42 PLATFORM_EXPORT void vmaxmgv(const float* sourceP, int sourceStride, float* maxP
, size_t framesToProcess); | 42 PLATFORM_EXPORT void vmaxmgv(const float* sourceP, int sourceStride, float* maxP
, size_t framesToProcess); |
| 43 | 43 |
| 44 // Sums the squares of a float vector's elements. | 44 // Sums the squares of a float vector's elements. |
| 45 PLATFORM_EXPORT void vsvesq(const float* sourceP, int sourceStride, float* sumP,
size_t framesToProcess); | 45 PLATFORM_EXPORT void vsvesq(const float* sourceP, int sourceStride, float* sumP,
size_t framesToProcess); |
| 46 | 46 |
| 47 // For an element-by-element multiply of two float vectors. | 47 // For an element-by-element multiply of two float vectors. |
| 48 PLATFORM_EXPORT void vmul(const float* source1P, int sourceStride1, const float*
source2P, int sourceStride2, float* destP, int destStride, size_t framesToProce
ss); | 48 PLATFORM_EXPORT void vmul(const float* source1P, int sourceStride1, const float*
source2P, int sourceStride2, float* destP, int destStride, size_t framesToProce
ss); |
| 49 | 49 |
| 50 // Multiplies two complex vectors. | 50 // Multiplies two complex vectors. |
| 51 PLATFORM_EXPORT void zvmul(const float* real1P, const float* imag1P, const float
* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t frames
ToProcess); | 51 PLATFORM_EXPORT void zvmul(const float* real1P, const float* imag1P, const float
* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t frames
ToProcess); |
| 52 | 52 |
| 53 // Copies elements while clipping values to the threshold inputs. | 53 // Copies elements while clipping values to the threshold inputs. |
| 54 PLATFORM_EXPORT void vclip(const float* sourceP, int sourceStride, const float*
lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t
framesToProcess); | 54 PLATFORM_EXPORT void vclip(const float* sourceP, int sourceStride, const float*
lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t
framesToProcess); |
| 55 | 55 |
| 56 } // namespace VectorMath | 56 } // namespace VectorMath |
| 57 } // namespace WebCore | 57 } // namespace blink |
| 58 | 58 |
| 59 #endif // VectorMath_h | 59 #endif // VectorMath_h |
| OLD | NEW |