2014-03-26 14:20:42 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
|
|
|
*
|
2014-04-22 21:05:56 +00:00
|
|
|
* This file is part of FFmpeg.
|
2014-03-26 14:20:42 +00:00
|
|
|
*
|
2014-04-22 21:05:56 +00:00
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2014-03-26 14:20:42 +00:00
|
|
|
* 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.
|
|
|
|
*
|
2014-04-22 21:05:56 +00:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2014-03-26 14:20:42 +00:00
|
|
|
* 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
|
2014-04-22 21:05:56 +00:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2014-03-26 14:20:42 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2016-01-30 13:54:35 +00:00
|
|
|
#include "libavutil/attributes.h"
|
|
|
|
#include "libavutil/cpu.h"
|
2014-03-26 14:20:42 +00:00
|
|
|
#include "libavutil/aarch64/cpu.h"
|
2016-01-30 13:54:35 +00:00
|
|
|
|
2014-03-26 14:20:42 +00:00
|
|
|
#include "libavcodec/fft.h"
|
|
|
|
|
|
|
|
void ff_fft_permute_neon(FFTContext *s, FFTComplex *z);
|
|
|
|
void ff_fft_calc_neon(FFTContext *s, FFTComplex *z);
|
|
|
|
|
2014-04-15 16:35:57 +00:00
|
|
|
void ff_imdct_calc_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
|
|
|
|
void ff_imdct_half_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
|
|
|
|
void ff_mdct_calc_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
|
|
|
|
|
2014-03-26 14:20:42 +00:00
|
|
|
av_cold void ff_fft_init_aarch64(FFTContext *s)
|
|
|
|
{
|
|
|
|
int cpu_flags = av_get_cpu_flags();
|
|
|
|
|
|
|
|
if (have_neon(cpu_flags)) {
|
2022-08-29 05:09:03 +00:00
|
|
|
if (s->nbits < 17) {
|
|
|
|
s->fft_permute = ff_fft_permute_neon;
|
|
|
|
s->fft_calc = ff_fft_calc_neon;
|
|
|
|
}
|
2014-04-15 16:35:57 +00:00
|
|
|
#if CONFIG_MDCT
|
|
|
|
s->imdct_calc = ff_imdct_calc_neon;
|
|
|
|
s->imdct_half = ff_imdct_half_neon;
|
|
|
|
s->mdct_calc = ff_mdct_calc_neon;
|
|
|
|
s->mdct_permutation = FF_MDCT_PERM_INTERLEAVE;
|
|
|
|
#endif
|
2014-03-26 14:20:42 +00:00
|
|
|
}
|
|
|
|
}
|