kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 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 | |
Karl Wiberg | 225842c | 2019-06-28 14:51:49 +0200 | [diff] [blame^] | 11 | // Some code came from common/rtcd.c in the WebM project. |
kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 12 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 13 | #include "common_audio/signal_processing/include/signal_processing_library.h" |
kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 14 | |
Karl Wiberg | 225842c | 2019-06-28 14:51:49 +0200 | [diff] [blame^] | 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. |
kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 18 | |
pasko | e305d95 | 2016-05-17 10:56:40 -0700 | [diff] [blame] | 19 | #if defined(WEBRTC_HAS_NEON) |
kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 20 | |
Karl Wiberg | 225842c | 2019-06-28 14:51:49 +0200 | [diff] [blame^] | 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; |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 32 | |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 33 | #elif defined(MIPS32_LE) |
Karl Wiberg | 225842c | 2019-06-28 14:51:49 +0200 | [diff] [blame^] | 34 | |
| 35 | const MaxAbsValueW16 WebRtcSpl_MaxAbsValueW16 = WebRtcSpl_MaxAbsValueW16_mips; |
| 36 | const MaxAbsValueW32 WebRtcSpl_MaxAbsValueW32 = |
| 37 | #ifdef MIPS_DSP_R1_LE |
| 38 | WebRtcSpl_MaxAbsValueW32_mips; |
kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 39 | #else |
Karl Wiberg | 225842c | 2019-06-28 14:51:49 +0200 | [diff] [blame^] | 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 |
kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 55 | |
Karl Wiberg | 225842c | 2019-06-28 14:51:49 +0200 | [diff] [blame^] | 56 | #else |
kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 57 | |
Karl Wiberg | 225842c | 2019-06-28 14:51:49 +0200 | [diff] [blame^] | 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; |
kma@webrtc.org | 0221b78 | 2012-09-08 00:09:26 +0000 | [diff] [blame] | 68 | |
Karl Wiberg | 225842c | 2019-06-28 14:51:49 +0200 | [diff] [blame^] | 69 | #endif |