blob: 1ffefd80dc5c2b8e1ea83a6bf406139718b1f021 [file] [log] [blame]
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +00001/*
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 Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef COMMON_AUDIO_FIR_FILTER_NEON_H_
12#define COMMON_AUDIO_FIR_FILTER_NEON_H_
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +000013
kwibergc2b785d2016-02-24 05:22:32 -080014#include <memory>
15
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020016#include "common_audio/fir_filter.h"
Karl Wiberg29e7bee2018-03-22 14:11:52 +010017#include "rtc_base/memory/aligned_malloc.h"
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +000018
19namespace webrtc {
20
21class FIRFilterNEON : public FIRFilter {
22 public:
23 FIRFilterNEON(const float* coefficients,
24 size_t coefficients_length,
25 size_t max_input_length);
Patrik Höglundf715c532017-11-17 11:04:15 +010026 ~FIRFilterNEON() override;
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +000027
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000028 void Filter(const float* in, size_t length, float* out) override;
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +000029
30 private:
31 size_t coefficients_length_;
32 size_t state_length_;
kwibergc2b785d2016-02-24 05:22:32 -080033 std::unique_ptr<float[], AlignedFreeDeleter> coefficients_;
34 std::unique_ptr<float[], AlignedFreeDeleter> state_;
aluebs@webrtc.org37ca7652014-03-24 10:16:11 +000035};
36
37} // namespace webrtc
38
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020039#endif // COMMON_AUDIO_FIR_FILTER_NEON_H_