1 /*
2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 // Some code came from common/rtcd.c in the WebM project.
12 
13 #include "common_audio/signal_processing/include/signal_processing_library.h"
14 
15 // TODO(bugs.webrtc.org/9553): These function pointers are useless. Refactor
16 // things so that we simply have a bunch of regular functions with different
17 // implementations for different platforms.
18 
19 #if defined(WEBRTC_HAS_NEON)
20 
21 const MaxAbsValueW16 WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16Neon;
22 const MaxAbsValueW32 WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32Neon;
23 const MaxValueW16 WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16Neon;
24 const MaxValueW32 WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32Neon;
25 const MinValueW16 WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16Neon;
26 const MinValueW32 WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32Neon;
27 const CrossCorrelation WebRtcSpl_CrossCorrelation =
28     WebRtcSpl_CrossCorrelationNeon;
29 const DownsampleFast WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFastNeon;
30 const ScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound =
31     WebRtcSpl_ScaleAndAddVectorsWithRoundC;
32 
33 #elif defined(MIPS32_LE)
34 
35 const MaxAbsValueW16 WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16_mips;
36 const MaxAbsValueW32 WebRtcSpl_MaxAbsValueW32 =
37 #ifdef MIPS_DSP_R1_LE
38     WebRtcSpl_MaxAbsValueW32_mips;
39 #else
40     WebRtcSpl_MaxAbsValueW32C;
41 #endif
42 const MaxValueW16 WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16_mips;
43 const MaxValueW32 WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32_mips;
44 const MinValueW16 WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16_mips;
45 const MinValueW32 WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32_mips;
46 const CrossCorrelation WebRtcSpl_CrossCorrelation =
47     WebRtcSpl_CrossCorrelation_mips;
48 const DownsampleFast WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFast_mips;
49 const ScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound =
50 #ifdef MIPS_DSP_R1_LE
51     WebRtcSpl_ScaleAndAddVectorsWithRound_mips;
52 #else
53     WebRtcSpl_ScaleAndAddVectorsWithRoundC;
54 #endif
55 
56 #else
57 
58 const MaxAbsValueW16 WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16C;
59 const MaxAbsValueW32 WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32C;
60 const MaxValueW16 WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16C;
61 const MaxValueW32 WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32C;
62 const MinValueW16 WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16C;
63 const MinValueW32 WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32C;
64 const CrossCorrelation WebRtcSpl_CrossCorrelation = WebRtcSpl_CrossCorrelationC;
65 const DownsampleFast WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFastC;
66 const ScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound =
67     WebRtcSpl_ScaleAndAddVectorsWithRoundC;
68 
69 #endif
70