blob: cf37d47bec1b3933b9ec211537ff75c1e33d5299 [file] [log] [blame]
kma@webrtc.org0221b782012-09-08 00:09:26 +00001/*
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
Karl Wiberg225842c2019-06-28 14:51:49 +020011// Some code came from common/rtcd.c in the WebM project.
kma@webrtc.org0221b782012-09-08 00:09:26 +000012
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020013#include "common_audio/signal_processing/include/signal_processing_library.h"
kma@webrtc.org0221b782012-09-08 00:09:26 +000014
Karl Wiberg225842c2019-06-28 14:51:49 +020015// 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.
kma@webrtc.org0221b782012-09-08 00:09:26 +000018
paskoe305d952016-05-17 10:56:40 -070019#if defined(WEBRTC_HAS_NEON)
kma@webrtc.org0221b782012-09-08 00:09:26 +000020
Karl Wiberg225842c2019-06-28 14:51:49 +020021const MaxAbsValueW16 WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16Neon;
22const MaxAbsValueW32 WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32Neon;
23const MaxValueW16 WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16Neon;
24const MaxValueW32 WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32Neon;
25const MinValueW16 WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16Neon;
26const MinValueW32 WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32Neon;
27const CrossCorrelation WebRtcSpl_CrossCorrelation =
28 WebRtcSpl_CrossCorrelationNeon;
29const DownsampleFast WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFastNeon;
30const ScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound =
31 WebRtcSpl_ScaleAndAddVectorsWithRoundC;
andrew@webrtc.org5140e242013-02-21 20:12:21 +000032
andrew@webrtc.org5140e242013-02-21 20:12:21 +000033#elif defined(MIPS32_LE)
Karl Wiberg225842c2019-06-28 14:51:49 +020034
35const MaxAbsValueW16 WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16_mips;
36const MaxAbsValueW32 WebRtcSpl_MaxAbsValueW32 =
37#ifdef MIPS_DSP_R1_LE
38 WebRtcSpl_MaxAbsValueW32_mips;
kma@webrtc.org0221b782012-09-08 00:09:26 +000039#else
Karl Wiberg225842c2019-06-28 14:51:49 +020040 WebRtcSpl_MaxAbsValueW32C;
41#endif
42const MaxValueW16 WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16_mips;
43const MaxValueW32 WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32_mips;
44const MinValueW16 WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16_mips;
45const MinValueW32 WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32_mips;
46const CrossCorrelation WebRtcSpl_CrossCorrelation =
47 WebRtcSpl_CrossCorrelation_mips;
48const DownsampleFast WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFast_mips;
49const ScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound =
50#ifdef MIPS_DSP_R1_LE
51 WebRtcSpl_ScaleAndAddVectorsWithRound_mips;
52#else
53 WebRtcSpl_ScaleAndAddVectorsWithRoundC;
54#endif
kma@webrtc.org0221b782012-09-08 00:09:26 +000055
Karl Wiberg225842c2019-06-28 14:51:49 +020056#else
kma@webrtc.org0221b782012-09-08 00:09:26 +000057
Karl Wiberg225842c2019-06-28 14:51:49 +020058const MaxAbsValueW16 WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16C;
59const MaxAbsValueW32 WebRtcSpl_MaxAbsValueW32 = WebRtcSpl_MaxAbsValueW32C;
60const MaxValueW16 WebRtcSpl_MaxValueW16 = WebRtcSpl_MaxValueW16C;
61const MaxValueW32 WebRtcSpl_MaxValueW32 = WebRtcSpl_MaxValueW32C;
62const MinValueW16 WebRtcSpl_MinValueW16 = WebRtcSpl_MinValueW16C;
63const MinValueW32 WebRtcSpl_MinValueW32 = WebRtcSpl_MinValueW32C;
64const CrossCorrelation WebRtcSpl_CrossCorrelation = WebRtcSpl_CrossCorrelationC;
65const DownsampleFast WebRtcSpl_DownsampleFast = WebRtcSpl_DownsampleFastC;
66const ScaleAndAddVectorsWithRound WebRtcSpl_ScaleAndAddVectorsWithRound =
67 WebRtcSpl_ScaleAndAddVectorsWithRoundC;
kma@webrtc.org0221b782012-09-08 00:09:26 +000068
Karl Wiberg225842c2019-06-28 14:51:49 +020069#endif