| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_VECTOR_MATH_TESTING_H_ | 5 #ifndef MEDIA_BASE_VECTOR_MATH_TESTING_H_ |
| 6 #define MEDIA_BASE_VECTOR_MATH_TESTING_H_ | 6 #define MEDIA_BASE_VECTOR_MATH_TESTING_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
| 12 | 12 |
| 13 namespace media { | 13 namespace media { |
| 14 namespace vector_math { | 14 namespace vector_math { |
| 15 | 15 |
| 16 // Optimized versions exposed for testing. See vector_math.h for details. | 16 // Optimized versions exposed for testing. See vector_math.h for details. |
| 17 MEDIA_EXPORT void FMAC_C(const float src[], float scale, int len, float dest[]); | 17 MEDIA_EXPORT float Convolve_C(const float* src, |
| 18 MEDIA_EXPORT void FMUL_C(const float src[], float scale, int len, float dest[]); | 18 const float* k1, |
| 19 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_C( | 19 const float* k2, |
| 20 float initial_value, const float src[], int len, float smoothing_factor); | 20 double kernel_interpolation_factor); |
| 21 MEDIA_EXPORT float DotProduct_C(const float* a, const float* b, int len); |
| 22 MEDIA_EXPORT void FMAC_C(const float* src, float scale, int len, float* dest); |
| 23 MEDIA_EXPORT void FMUL_C(const float* src, float scale, int len, float* dest); |
| 24 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_C(float initial_value, |
| 25 const float* src, |
| 26 int len, |
| 27 float smoothing_factor); |
| 21 | 28 |
| 22 #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) | 29 #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) |
| 23 MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, | 30 MEDIA_EXPORT float Convolve_SSE(const float* src, |
| 24 float dest[]); | 31 const float* k1, |
| 25 MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, | 32 const float* k2, |
| 26 float dest[]); | 33 double kernel_interpolation_factor); |
| 34 MEDIA_EXPORT float Convolve_AVX(const float* src, |
| 35 const float* k1, |
| 36 const float* k2, |
| 37 double kernel_interpolation_factor); |
| 38 MEDIA_EXPORT float DotProduct_SSE(const float* a, const float* b, int len); |
| 39 MEDIA_EXPORT float DotProduct_AVX(const float* a, const float* b, int len); |
| 40 MEDIA_EXPORT void FMAC_SSE(const float* src, float scale, int len, float* dest); |
| 41 MEDIA_EXPORT void FMAC_AVX(const float* src, float scale, int len, float* dest); |
| 42 MEDIA_EXPORT void FMUL_SSE(const float* src, float scale, int len, float* dest); |
| 27 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_SSE( | 43 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_SSE( |
| 28 float initial_value, const float src[], int len, float smoothing_factor); | 44 float initial_value, |
| 45 const float* src, |
| 46 int len, |
| 47 float smoothing_factor); |
| 29 #endif | 48 #endif |
| 30 | 49 |
| 31 #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) | 50 #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) |
| 32 MEDIA_EXPORT void FMAC_NEON(const float src[], float scale, int len, | 51 MEDIA_EXPORT float Convolve_NEON(const float* src, |
| 33 float dest[]); | 52 const float* k1, |
| 34 MEDIA_EXPORT void FMUL_NEON(const float src[], float scale, int len, | 53 const float* k2, |
| 35 float dest[]); | 54 double kernel_interpolation_factor); |
| 55 MEDIA_EXPORT float DotProduct_NEON(const float* a, const float* b, int len); |
| 56 MEDIA_EXPORT void FMAC_NEON(const float* src, |
| 57 float scale, |
| 58 int len, |
| 59 float* dest); |
| 60 MEDIA_EXPORT void FMUL_NEON(const float* src, |
| 61 float scale, |
| 62 int len, |
| 63 float* dest); |
| 36 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_NEON( | 64 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_NEON( |
| 37 float initial_value, const float src[], int len, float smoothing_factor); | 65 float initial_value, |
| 66 const float* src, |
| 67 int len, |
| 68 float smoothing_factor); |
| 38 #endif | 69 #endif |
| 39 | 70 |
| 40 } // namespace vector_math | 71 } // namespace vector_math |
| 41 } // namespace media | 72 } // namespace media |
| 42 | 73 |
| 43 #endif // MEDIA_BASE_VECTOR_MATH_TESTING_H_ | 74 #endif // MEDIA_BASE_VECTOR_MATH_TESTING_H_ |
| OLD | NEW |