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
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_VECTOR_MATH_TESTING_H_
6 #define MEDIA_BASE_VECTOR_MATH_TESTING_H_
10 #include "build/build_config.h"
11 #include "media/base/media_export.h"
14 namespace vector_math
{
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
[]);
18 MEDIA_EXPORT
void FMUL_C(const float src
[], float scale
, int len
, float dest
[]);
19 MEDIA_EXPORT
std::pair
<float, float> EWMAAndMaxPower_C(
20 float initial_value
, const float src
[], int len
, float smoothing_factor
);
22 #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL)
23 MEDIA_EXPORT
void FMAC_SSE(const float src
[], float scale
, int len
,
25 MEDIA_EXPORT
void FMUL_SSE(const float src
[], float scale
, int len
,
27 MEDIA_EXPORT
std::pair
<float, float> EWMAAndMaxPower_SSE(
28 float initial_value
, const float src
[], int len
, float smoothing_factor
);
31 #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON)
32 MEDIA_EXPORT
void FMAC_NEON(const float src
[], float scale
, int len
,
34 MEDIA_EXPORT
void FMUL_NEON(const float src
[], float scale
, int len
,
36 MEDIA_EXPORT
std::pair
<float, float> EWMAAndMaxPower_NEON(
37 float initial_value
, const float src
[], int len
, float smoothing_factor
);
40 } // namespace vector_math
43 #endif // MEDIA_BASE_VECTOR_MATH_TESTING_H_