tx_float_init.c (2968B)
1 /* 2 * This file is part of FFmpeg. 3 * 4 * FFmpeg is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * FFmpeg is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with FFmpeg; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 #define TX_FLOAT 20 #include "libavutil/tx_priv.h" 21 #include "libavutil/attributes.h" 22 #include "libavutil/aarch64/cpu.h" 23 24 TX_DECL_FN(fft2, neon) 25 TX_DECL_FN(fft4_fwd, neon) 26 TX_DECL_FN(fft4_inv, neon) 27 TX_DECL_FN(fft8, neon) 28 TX_DECL_FN(fft8_ns, neon) 29 TX_DECL_FN(fft16, neon) 30 TX_DECL_FN(fft16_ns, neon) 31 TX_DECL_FN(fft32, neon) 32 TX_DECL_FN(fft32_ns, neon) 33 TX_DECL_FN(fft_sr, neon) 34 TX_DECL_FN(fft_sr_ns, neon) 35 36 static av_cold int neon_init(AVTXContext *s, const FFTXCodelet *cd, 37 uint64_t flags, FFTXCodeletOptions *opts, 38 int len, int inv, const void *scale) 39 { 40 ff_tx_init_tabs_float(len); 41 if (cd->max_len == 2) 42 return ff_tx_gen_ptwo_revtab(s, opts); 43 else 44 return ff_tx_gen_split_radix_parity_revtab(s, len, inv, opts, 8, 0); 45 } 46 47 const FFTXCodelet * const ff_tx_codelet_list_float_aarch64[] = { 48 TX_DEF(fft2, FFT, 2, 2, 2, 0, 128, NULL, neon, NEON, AV_TX_INPLACE, 0), 49 TX_DEF(fft2, FFT, 2, 2, 2, 0, 192, neon_init, neon, NEON, AV_TX_INPLACE | FF_TX_PRESHUFFLE, 0), 50 TX_DEF(fft4_fwd, FFT, 4, 4, 2, 0, 128, NULL, neon, NEON, AV_TX_INPLACE | FF_TX_FORWARD_ONLY, 0), 51 TX_DEF(fft4_fwd, FFT, 4, 4, 2, 0, 192, neon_init, neon, NEON, AV_TX_INPLACE | FF_TX_PRESHUFFLE, 0), 52 TX_DEF(fft4_inv, FFT, 4, 4, 2, 0, 128, NULL, neon, NEON, AV_TX_INPLACE | FF_TX_INVERSE_ONLY, 0), 53 TX_DEF(fft8, FFT, 8, 8, 2, 0, 128, neon_init, neon, NEON, AV_TX_INPLACE, 0), 54 TX_DEF(fft8_ns, FFT, 8, 8, 2, 0, 192, neon_init, neon, NEON, AV_TX_INPLACE | FF_TX_PRESHUFFLE, 0), 55 TX_DEF(fft16, FFT, 16, 16, 2, 0, 128, neon_init, neon, NEON, AV_TX_INPLACE, 0), 56 TX_DEF(fft16_ns, FFT, 16, 16, 2, 0, 192, neon_init, neon, NEON, AV_TX_INPLACE | FF_TX_PRESHUFFLE, 0), 57 TX_DEF(fft32, FFT, 32, 32, 2, 0, 128, neon_init, neon, NEON, AV_TX_INPLACE, 0), 58 TX_DEF(fft32_ns, FFT, 32, 32, 2, 0, 192, neon_init, neon, NEON, AV_TX_INPLACE | FF_TX_PRESHUFFLE, 0), 59 60 TX_DEF(fft_sr, FFT, 64, 131072, 2, 0, 128, neon_init, neon, NEON, 0, 0), 61 TX_DEF(fft_sr_ns, FFT, 64, 131072, 2, 0, 192, neon_init, neon, NEON, AV_TX_INPLACE | FF_TX_PRESHUFFLE, 0), 62 63 NULL, 64 };