2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
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.
11 #include "dl/api/omxtypes.h"
14 extern void x86SP_FFT_CToC_FC32_Fwd_Radix4_fs(
19 extern void x86SP_FFT_CToC_FC32_Inv_Radix4_fs(
24 extern void x86SP_FFT_CToC_FC32_Fwd_Radix4_fs_sse(
29 extern void x86SP_FFT_CToC_FC32_Inv_Radix4_fs_sse(
34 extern void x86SP_FFT_CToC_FC32_Fwd_Radix4_ms(
37 const OMX_F32 *twiddle,
42 extern void x86SP_FFT_CToC_FC32_Inv_Radix4_ms(
45 const OMX_F32 *twiddle,
50 extern void x86SP_FFT_CToC_FC32_Fwd_Radix4_ms_sse(
53 const OMX_F32 *twiddle,
58 extern void x86SP_FFT_CToC_FC32_Inv_Radix4_ms_sse(
61 const OMX_F32 *twiddle,
66 extern void x86SP_FFT_CToC_FC32_Fwd_Radix4_ls(
69 const OMX_F32 *twiddle,
72 extern void x86SP_FFT_CToC_FC32_Inv_Radix4_ls(
75 const OMX_F32 *twiddle,
78 extern void x86SP_FFT_CToC_FC32_Fwd_Radix4_ls_sse(
81 const OMX_F32 *twiddle,
84 extern void x86SP_FFT_CToC_FC32_Inv_Radix4_ls_sse(
87 const OMX_F32 *twiddle,
90 extern void x86SP_FFT_CToC_FC32_Fwd_Radix2_ls(
93 const OMX_F32 *twiddle,
96 extern void x86SP_FFT_CToC_FC32_Inv_Radix2_ls(
99 const OMX_F32 *twiddle,
102 extern void x86SP_FFT_CToC_FC32_Fwd_Radix2_ls_sse(
105 const OMX_F32 *twiddle,
108 extern void x86SP_FFT_CToC_FC32_Inv_Radix2_ls_sse(
111 const OMX_F32 *twiddle,
114 OMX_F32* x86SP_F32_radix4_kernel_OutOfPlace(
118 const OMX_F32 *twiddle,
123 OMX_INT n_by_4 = n >> 2;
128 x86SP_FFT_CToC_FC32_Fwd_Radix4_fs(src, in, n);
130 x86SP_FFT_CToC_FC32_Inv_Radix4_fs(src, in, n);
132 for (sub_size = 4, sub_num = n_by_4;
134 sub_size = sub_size << 2, sub_num = sub_num >> 2) {
137 x86SP_FFT_CToC_FC32_Fwd_Radix4_ms(in, out, twiddle,
138 n, sub_size, sub_num);
140 x86SP_FFT_CToC_FC32_Inv_Radix4_ms(in, out, twiddle,
141 n, sub_size, sub_num);
151 x86SP_FFT_CToC_FC32_Fwd_Radix2_ls(in, out, twiddle, n);
153 x86SP_FFT_CToC_FC32_Fwd_Radix4_ls(in, out, twiddle, n);
156 x86SP_FFT_CToC_FC32_Inv_Radix2_ls(in, out, twiddle, n);
158 x86SP_FFT_CToC_FC32_Inv_Radix4_ls(in, out, twiddle, n);
164 OMX_F32* x86SP_F32_radix4_kernel_OutOfPlace_sse(
168 const OMX_F32 *twiddle,
170 // true for forward, false for inverse.
172 OMX_INT sub_size, sub_num;
173 OMX_INT n_by_4 = n >> 2;
179 x86SP_FFT_CToC_FC32_Fwd_Radix4_fs_sse(src, in, n);
181 x86SP_FFT_CToC_FC32_Inv_Radix4_fs_sse(src, in, n);
183 for (sub_size = 4, sub_num = n_by_4;
185 sub_size = sub_size << 2, sub_num = sub_num >> 2) {
188 x86SP_FFT_CToC_FC32_Fwd_Radix4_ms_sse(in, out, twiddle,
189 n, sub_size, sub_num);
191 x86SP_FFT_CToC_FC32_Inv_Radix4_ms_sse(in, out, twiddle,
192 n, sub_size, sub_num);
200 // If n is not power of 4, sub_num == 2.
203 x86SP_FFT_CToC_FC32_Fwd_Radix2_ls_sse(in, out, twiddle, n);
205 x86SP_FFT_CToC_FC32_Fwd_Radix4_ls_sse(in, out, twiddle, n);
208 x86SP_FFT_CToC_FC32_Inv_Radix2_ls_sse(in, out, twiddle, n);
210 x86SP_FFT_CToC_FC32_Inv_Radix4_ls_sse(in, out, twiddle, n);