diff options
author | Janne Grunau <janne-libav@jannau.net> | 2014-03-26 15:20:42 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2014-04-22 19:35:40 +0200 |
commit | 650c4300d94aa9398ff1dd4f454bf39eaa285f62 (patch) | |
tree | 9f3063c9591be5412f48029d5a510ecc48ee804e /libavcodec/aarch64/fft_init_aarch64.c | |
parent | f9157463dbcd2db8fe9504197c0c04d0d7d04f31 (diff) | |
download | ffmpeg-650c4300d94aa9398ff1dd4f454bf39eaa285f62.tar.gz |
aarch64: NEON float FFT
Approximately as fast as the ARM NEON version on Apple's A7.
Diffstat (limited to 'libavcodec/aarch64/fft_init_aarch64.c')
-rw-r--r-- | libavcodec/aarch64/fft_init_aarch64.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libavcodec/aarch64/fft_init_aarch64.c b/libavcodec/aarch64/fft_init_aarch64.c new file mode 100644 index 0000000000..caa5a0d90a --- /dev/null +++ b/libavcodec/aarch64/fft_init_aarch64.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2009 Mans Rullgard <mans@mansr.com> + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" + +#include "libavutil/aarch64/cpu.h" +#include "libavcodec/fft.h" + +void ff_fft_permute_neon(FFTContext *s, FFTComplex *z); +void ff_fft_calc_neon(FFTContext *s, FFTComplex *z); + +av_cold void ff_fft_init_aarch64(FFTContext *s) +{ + int cpu_flags = av_get_cpu_flags(); + + if (have_neon(cpu_flags)) { + s->fft_permute = ff_fft_permute_neon; + s->fft_calc = ff_fft_calc_neon; + } +} |