diff options
author | Måns Rullgård <mans@mansr.com> | 2009-09-15 21:14:14 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2009-09-15 21:14:14 +0000 |
commit | f486321395e3804ceece2a562f4bf1a8d99d5f24 (patch) | |
tree | f91c4602266840c48649887c3d85b9adc88525a2 /libavcodec/fft.c | |
parent | 9155be47d1e94f392ef8066f911c49e2a19358bc (diff) | |
download | ffmpeg-f486321395e3804ceece2a562f4bf1a8d99d5f24.tar.gz |
Move per-arch fft init bits into the corresponding subdirs
Originally committed as revision 19864 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/fft.c')
-rw-r--r-- | libavcodec/fft.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/libavcodec/fft.c b/libavcodec/fft.c index 538f66858b..c827139faf 100644 --- a/libavcodec/fft.c +++ b/libavcodec/fft.c @@ -62,7 +62,6 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) { int i, j, m, n; float alpha, c1, s1, s2; - int split_radix = 1; int av_unused has_vectors; if (nbits < 2 || nbits > 16) @@ -87,41 +86,13 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) s->imdct_half = ff_imdct_half_c; s->mdct_calc = ff_mdct_calc_c; s->exptab1 = NULL; + s->split_radix = 1; -#if HAVE_MMX && HAVE_YASM - has_vectors = mm_support(); - if (has_vectors & FF_MM_SSE && HAVE_SSE) { - /* SSE for P3/P4/K8 */ - s->imdct_calc = ff_imdct_calc_sse; - s->imdct_half = ff_imdct_half_sse; - s->fft_permute = ff_fft_permute_sse; - s->fft_calc = ff_fft_calc_sse; - } else if (has_vectors & FF_MM_3DNOWEXT && HAVE_AMD3DNOWEXT) { - /* 3DNowEx for K7 */ - s->imdct_calc = ff_imdct_calc_3dn2; - s->imdct_half = ff_imdct_half_3dn2; - s->fft_calc = ff_fft_calc_3dn2; - } else if (has_vectors & FF_MM_3DNOW && HAVE_AMD3DNOW) { - /* 3DNow! for K6-2/3 */ - s->imdct_calc = ff_imdct_calc_3dn; - s->imdct_half = ff_imdct_half_3dn; - s->fft_calc = ff_fft_calc_3dn; - } -#elif HAVE_ALTIVEC - has_vectors = mm_support(); - if (has_vectors & FF_MM_ALTIVEC) { - s->fft_calc = ff_fft_calc_altivec; - split_radix = 0; - } -#elif HAVE_NEON - s->fft_permute = ff_fft_permute_neon; - s->fft_calc = ff_fft_calc_neon; - s->imdct_calc = ff_imdct_calc_neon; - s->imdct_half = ff_imdct_half_neon; - s->mdct_calc = ff_mdct_calc_neon; -#endif + if (ARCH_ARM) ff_fft_init_arm(s); + if (HAVE_ALTIVEC) ff_fft_init_altivec(s); + if (HAVE_MMX) ff_fft_init_mmx(s); - if (split_radix) { + if (s->split_radix) { for(j=4; j<=nbits; j++) { int m = 1<<j; double freq = 2*M_PI/m; |