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