Debian Codegraph @

modules/lsp-dsp-lib/include/private/dsp/arch/x86/sse/fastconv.h

raw
1 /*
2 * Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3 * (C) 2020 Vladimir Sadovnikov <[email protected]>
4 *
5 * This file is part of lsp-dsp-lib
6 * Created on: 31 мар. 2020 г.
7 *
8 * lsp-dsp-lib is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * lsp-dsp-lib is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with lsp-dsp-lib. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #ifndef PRIVATE_DSP_ARCH_X86_SSE_FASTCONV_H_
23 #define PRIVATE_DSP_ARCH_X86_SSE_FASTCONV_H_
24
25 #ifndef PRIVATE_DSP_ARCH_X86_SSE_IMPL
26 #error "This header should not be included directly"
27 #endif /* PRIVATE_DSP_ARCH_X86_SSE_IMPL */
28
29 #include <private/dsp/arch/x86/sse/fastconv/parse.h>
30 #include <private/dsp/arch/x86/sse/fastconv/papply.h>
31 #include <private/dsp/arch/x86/sse/fastconv/apply.h>
32 #include <private/dsp/arch/x86/sse/fastconv/irestore.h>
33 #include <private/dsp/arch/x86/sse/fastconv/restore.h>
34
35 namespace lsp
36 {
37 namespace sse
38 {
39 void fastconv_parse_apply(float *dst, float *tmp, const float *c, const float *src, size_t rank)
40 {
41 // Do direct FFT
42 fastconv_parse_internal(tmp, src, rank);
43
44 // Apply complex convolution
45 fastconv_parse_apply_internal(tmp, c, rank);
46
47 // Do reverse FFT
48 fastconv_restore_internal(dst, tmp, rank);
49 }
50
51 void fastconv_apply(float *dst, float *tmp, const float *c1, const float *c2, size_t rank)
52 {
53 // Apply complex convolution
54 fastconv_apply_internal(tmp, c1, c2, rank);
55
56 // Do reverse FFT
57 fastconv_restore_internal(dst, tmp, rank);
58 }
59 }
60 }
61
62 #endif /* PRIVATE_DSP_ARCH_X86_SSE_FASTCONV_H_ */