aluebs@webrtc.org | 37ca765 | 2014-03-24 10:16:11 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef COMMON_AUDIO_FIR_FILTER_NEON_H_ |
| 12 | #define COMMON_AUDIO_FIR_FILTER_NEON_H_ |
aluebs@webrtc.org | 37ca765 | 2014-03-24 10:16:11 +0000 | [diff] [blame] | 13 | |
kwiberg | c2b785d | 2016-02-24 05:22:32 -0800 | [diff] [blame] | 14 | #include <memory> |
| 15 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 16 | #include "common_audio/fir_filter.h" |
Karl Wiberg | 29e7bee | 2018-03-22 14:11:52 +0100 | [diff] [blame] | 17 | #include "rtc_base/memory/aligned_malloc.h" |
aluebs@webrtc.org | 37ca765 | 2014-03-24 10:16:11 +0000 | [diff] [blame] | 18 | |
| 19 | namespace webrtc { |
| 20 | |
| 21 | class FIRFilterNEON : public FIRFilter { |
| 22 | public: |
| 23 | FIRFilterNEON(const float* coefficients, |
| 24 | size_t coefficients_length, |
| 25 | size_t max_input_length); |
Patrik Höglund | f715c53 | 2017-11-17 11:04:15 +0100 | [diff] [blame] | 26 | ~FIRFilterNEON() override; |
aluebs@webrtc.org | 37ca765 | 2014-03-24 10:16:11 +0000 | [diff] [blame] | 27 | |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 28 | void Filter(const float* in, size_t length, float* out) override; |
aluebs@webrtc.org | 37ca765 | 2014-03-24 10:16:11 +0000 | [diff] [blame] | 29 | |
| 30 | private: |
| 31 | size_t coefficients_length_; |
| 32 | size_t state_length_; |
kwiberg | c2b785d | 2016-02-24 05:22:32 -0800 | [diff] [blame] | 33 | std::unique_ptr<float[], AlignedFreeDeleter> coefficients_; |
| 34 | std::unique_ptr<float[], AlignedFreeDeleter> state_; |
aluebs@webrtc.org | 37ca765 | 2014-03-24 10:16:11 +0000 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | } // namespace webrtc |
| 38 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 39 | #endif // COMMON_AUDIO_FIR_FILTER_NEON_H_ |