2003-01-07 18:15:48 +00:00
|
|
|
/*
|
2011-03-18 17:35:10 +00:00
|
|
|
* This file is part of Libav.
|
2006-10-07 15:30:46 +00:00
|
|
|
*
|
2011-03-18 17:35:10 +00:00
|
|
|
* Libav is free software; you can redistribute it and/or
|
2003-01-07 18:15:48 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
2006-10-07 15:30:46 +00:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2003-01-07 18:15:48 +00:00
|
|
|
*
|
2011-03-18 17:35:10 +00:00
|
|
|
* Libav is distributed in the hope that it will be useful,
|
2003-01-07 18:15:48 +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
|
2011-03-18 17:35:10 +00:00
|
|
|
* License along with Libav; if not, write to the Free Software
|
2006-01-12 22:43:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-01-07 18:15:48 +00:00
|
|
|
*/
|
2012-05-21 16:24:42 -04:00
|
|
|
|
2013-04-14 14:47:30 +02:00
|
|
|
#include "config.h"
|
2016-01-30 14:45:28 +01:00
|
|
|
|
2013-08-23 18:48:17 +02:00
|
|
|
#include "libavutil/cpu.h"
|
2014-06-05 08:46:47 -07:00
|
|
|
#include "libavutil/ppc/cpu.h"
|
2010-03-06 22:37:14 +00:00
|
|
|
|
2016-01-30 14:45:28 +01:00
|
|
|
#include "libavcodec/fft.h"
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2010-07-04 18:33:47 +00:00
|
|
|
void ff_fft_calc_interleave_altivec(FFTContext *s, FFTComplex *z);
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2013-04-14 14:47:30 +02:00
|
|
|
av_cold void ff_fft_init_ppc(FFTContext *s)
|
2009-09-15 21:14:14 +00:00
|
|
|
{
|
2015-05-10 23:22:17 +02:00
|
|
|
#if HAVE_GNU_AS && HAVE_ALTIVEC && HAVE_BIGENDIAN
|
2014-06-05 08:46:47 -07:00
|
|
|
if (!PPC_ALTIVEC(av_get_cpu_flags()))
|
2013-08-23 18:48:17 +02:00
|
|
|
return;
|
|
|
|
|
|
2010-07-04 18:33:47 +00:00
|
|
|
s->fft_calc = ff_fft_calc_interleave_altivec;
|
2016-01-30 14:39:00 +01:00
|
|
|
#endif /* HAVE_GNU_AS && HAVE_ALTIVEC && HAVE_BIGENDIAN */
|
2009-09-15 21:14:14 +00:00
|
|
|
}
|